Re: [OpenWrt-Users] How to execute python script in rpc shell script

2018-04-05 Thread Lars Kruse
Hello Phani,


Am Wed, 4 Apr 2018 15:02:13 -0500
schrieb Phani Siriki :

> I am able to import the module through normal execution. However it is
> not working in rpcd shell script. Could you please give me some
> inputs?

you could try to compare the search path under both conditions.

Probably the following would be sufficient?

 open("/tmp/pythonpath.out", "w").write("\n".join(sys.path))

(to be placed before the critical import statement)


Cheers,
Lars
___
openwrt-users mailing list
openwrt-users@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users


Re: [OpenWrt-Users] Confusion on whether the toolchain is for 32-bit ARM or 64-bit ARM

2018-04-05 Thread Damiano Verzulli
> [...]
> Now, we wish to use the toolchain for our project, but I am confused
> as to whether the toolchain supports (only) 32-bit ARM, or (only)
> 64-bit ARM, or both 32-bit and 64-bit ARM. So, will be thankful if the
> experts can help me on that.

Hi Ajay,

as it looks like your real problem is "building your project" (and, as
such, the "toolchain" is a side-problem, not the main one), I'd suggest a
slightly different approach.

Recently I spent LOTs of efforts in building an OpenWRT package "from
scratch" (I mean: a package NOT included in the OpenWRT repositories; a
package to be built from the source code, in the .tar.gz format).

Exactly like you, my first problem related to cross-compilation
capabilities; in my case, I built for a TP-LINK WDR-4300, with this CPU:


root@WRT:~# cat /proc/cpuinfo
system type : Atheros AR9344 rev 2
machine : TP-LINK TL-WDR3600/4300/4310
...
cpu model   : MIPS 74Kc V4.12
...
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented: mips16 dsp dsp2


As for "architecture" (32 vs 64 bit), even if in my case things were 
very
clear (as the WDR4300 CPU is clearly 32 bit) I REALLY DID _NOT_ NEED to
take care of them!

Specifically, I decided to deal with the "Official OpenWRT SDK":

https://openwrt.org/docs/guide-developer/using_the_sdk

that: "... is a pre-compiled toolchain designed to cross compile packages
for a specific target without compiling the whole system from scratch"

As you'll quickly discover, such an SDK is _ALREADY_ built for _EVERY_
platform supported by OpenWRT.
I mean: if you're planning to build _YOUR_ package for a specific platform
(eg: ar71xx) then you simply have to download related SDK FOR_THAT_PLATFORM
and you'll get all ready to go!

Unfortunately you're mentioning only "Allwinner A1x" and I really don't
know "which" OpenWRT platform apply to it:
https://downloads.openwrt.org/releases/17.01.4/targets/
Should it be "arm64", you can find the SDK at:
https://downloads.openwrt.org/releases/17.01.4/targets/arm64/generic/lede-sdk-17.01.4-arm64_gcc-5.4.0_musl-1.1.16.Linux-x86_64.tar.xz

As I said, I spent _LOTS_ of time investigating such activities and
should you need further details, feel free to give a look to the (hopefully
detailed) guide that I scratched down a couple of days ago [1].

Hope it helps!

Cheers,
DV

[1]
http://dvblog.soabit.com/building-custom-openwrt-packages-an-hopefully-complete-guide/

-- 
Damiano Verzulli
e-mail: dami...@verzulli.it
---
possible?ok:while(!possible){open_mindedness++}
---
"Technical people tend to fall into two categories: Specialists
and Generalists. The Specialist learns more and more about a
narrower and narrower field, until he eventually, in the limit,
knows everything about nothing. The Generalist learns less and
less about a wider and wider field, until eventually he knows
nothing about everything." - William Stucke - AfrISPA
  http://elists.isoc.org/mailman/private/pubsoft/2007-December/001935.html



signature.asc
Description: OpenPGP digital signature
___
openwrt-users mailing list
openwrt-users@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users