FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
470 views 4 comments
by anonymous

Hi,

TRB1 SDK from archive TRB1_R_GPL_00.07.01.2.tar.gz  compiles for me without any problem. However, after selecting Python to be added to the firmware in menuconfig AND updating feeds make runs into the following error:

/usr/bin/env bash ../python-package-install.sh "/home/bandi/Downloads/rutos-mdm9x07-trb1-gpl/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.6/ipkg-install" "/home/bandi/Downloads/rutos-mdm9x07-trb1-gpl/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.6/ipkg-arm_cortex-a7_neon-vfpv4/python3-base" "$V_Py3Package_python3_base_filespec"
bash: ../python-package-install.sh: No such file or directory
make[3]: *** [Makefile:394: /home/bandi/Downloads/rutos-mdm9x07-trb1-gpl/bin/packages/arm_cortex-a7_neon-vfpv4/base/python3-base_3.9.6-1_arm_cortex-a7_neon-vfpv4.ipk] Error 127
make[3]: Leaving directory '/home/bandi/Downloads/rutos-mdm9x07-trb1-gpl/package/lang/python/python3'
time: package/lang/python/python3/compile#0.29#0.08#0.32
    ERROR: package/lang/python/python3 failed to build.
make[2]: *** [package/Makefile:126: package/lang/python/python3/compile] Error 1
make[2]: Leaving directory '/home/bandi/Downloads/rutos-mdm9x07-trb1-gpl'
make[1]: *** [package/Makefile:120: /home/bandi/Downloads/rutos-mdm9x07-trb1-gpl/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/bandi/Downloads/rutos-mdm9x07-trb1-gpl'
make: *** [/home/bandi/Downloads/rutos-mdm9x07-trb1-gpl/include/toplevel.mk:234: world] Error 2

I was unable to find neither the python-package-install.sh nor any other file, referencing it (possibly, my bad).
Could anyone point me to the solution,

Regards,
alpintrekker

2 Answers

0 votes
by anonymous

Hello, 

Regarding this issue of yours, sorry to say we cannot provide support regarding the alterations or changes you are trying to make the device using the SDK. But regarding installing python to the device is possible with "opkg" commands. 

You can refer to this link for more information: [OpenWrt Wiki] Python

Regards,

Jerome

by anonymous

Hi Jerome,

thank you for your answer.

My original aim was to set up an environment to port the asyncua python module to TRB140. This is an asyncio based implementation of OPC UA protocol, which would be crucial to have in an upcoming project.

Could you help with this in any other way?

Regards,

András (aka. alpintrekker)
 

by anonymous
Hello,

I have tried to compile it as well and it seems to be successful but regarding the other package you want to install to the device for that, it would be best to communicate with your sales account manager for this type of integration. It may require additional research and development.

I have sent you a private message with the firmware I compiled with python 3

Regards,
Jerome
by anonymous

Hello Jerome,

nowadays porting a python module to yet another architecture is not a subject of R&D. Here is the openWRT guide.

After I sorted compiling problems with the TRB1_R_00.07.01.2 SDK, it was a breeze.

Regards,
András (aka. alpintrekker)

by anonymous
Hi,

Yes, unfortunately, any changes in the SDK are not covered by us. So once you are not able to implement it by yourself, we are recommending it for additional development.

Also, I tried to compile python 3 using the SDK using "make menuconfig" and it is under Languages and Python 3 is there.
I have shared the file with via pm.

Thanks for the guide :)

Regards,
Jerome
0 votes
by anonymous

For those, who interested in the root cause of the error, described in the question, I'd share the following findings:

  • first of all, we have to be aware, from which openWRT release the current firmware is forked. In case of firmware TRB1_R_00.07.01.2, by issuing command opkg update, I get multiple lines starting with

    Downloading https://downloads.openwrt.org/releases/21.02.0/

    so it can be safely assumed, that this firmware version derived from openWRT 21.02.0.
     
  • now the content of {sdk_root}/feeds/packages/lang/python/  can be compared (strictly after running in both sdk_root the ./scripts/feeds update -a command).

    And indeed, as diff said:
    Only in openwrt/feeds/packages/lang/python/: python-package-install.sh
     
  • The obvious solution was to copy the missing python-package-install.sh file to its relevant place (I assumed that this should not be RutOS specific), and voilá, everything  worked.

Regards,
András (aka. alpintrekker)

P.s. 1: The upper description was true for ./scripts/feeds update -a runs from Feb. 3 2022, 13:45 up until Feb. 9 afternoon. As of Thu 10 Feb 2022 09:08:31 AM CET, ./scripts/feeds update -a delivers the previously missing python-package-install.sh file. Anyone did anything to facilitate this, THANK YOU!

P.s. 2: By the way, the python-package-install.sh file is exactly the same in RutOS SDK and openWRT repo.