PDA

View Full Version : [Zgemma H7] nodejs packages



robbieb43
01-02-23, 15:38
I am running OpenViX 5.4.009 (2021-03-31) on one of my Zgemma H7s and have installed nodejs from the feed. I am using OpenViX 6.2 on my other identical box. I checked the list of available packages on this and see that nodejs is absent. I am therefore unable to upgrade my 5.4 box because I rely on this package. Can anyone tell me how I can get it for this box (Arm 7)? Is there another feed I can add somehow for instance? Many thanks Rob

Willo3092
01-02-23, 17:19
There are no longer any feeds for ViX 5.4. You will need to flash 6.2.

abu baniaz
01-02-23, 17:29
I am not 100% sure, but nodejs adds considerable length and resources to the build process. It may not be present on the Vix image. Maybe obtain it from another image and add to Vix image. You have a hardware multiboot receiver so should be straight forward.

Huevos
01-02-23, 18:08
Can you tell us what you use this for? This was removed from the image over a year ago and you are the first one to request it.

robbieb43
01-02-23, 19:14
Can you tell us what you use this for? This was removed from the image over a year ago and you are the first one to request it.

I use it run a lightweight bespoke proxy server connected with IPTV streaming (could PM the details). In the past I would not have used packages like this due to the processor limitations, but the processor on boxes like the Zgemma start opening up lots of new possibilities. NodeJs runs well without impacting on the box noticeably and is a useful/powerful general purpose scripting environment, in my humble opinion.

I noticed it had gone when I put a version 6xx on my multiboot so did not use it, sticking with 5.4.

Thanks

Rob

robbieb43
01-02-23, 19:52
I am not 100% sure, but nodejs adds considerable length and resources to the build process. It may not be present on the Vix image. Maybe obtain it from another image and add to Vix image. You have a hardware multiboot receiver so should be straight forward.
Are you suggesting copy it across from the “donor” image? If so any pointers on how to ensure I resolve any dependency issues would be welcome.

abu baniaz
02-02-23, 03:40
Are you suggesting copy it across from the “donor” image? If so any pointers on how to ensure I resolve any dependency issues would be welcome.

Yes, exactly that.


Enable debug logs on OpenATV. Restart. Install nodejs, see the log to see what it installs.

Then do following:
opkg download blahblah

You will find those packages in /home/root. Transfer to storage device, reboot into vix, install the packages

There would be a way to install using the command line directly from another image's plugin/feed server. Or hack the opkg files to point to the other image's server.

robbieb43
02-02-23, 12:52
Yes, exactly that.


Enable debug logs on OpenATV. Restart. Install nodejs, see the log to see what it installs.

Then do following:
opkg download blahblah

You will find those packages in /home/root. Transfer to storage device, reboot into vix, install the packages

There would be a way to install using the command line directly from another image's plugin/feed server. Or hack the opkg files to point to the other image's server.
Thanks very much for this - I will try and report back. I did start exploring where the feeds were stored but could not identify a way to add extra feeds, but clearly this would be a more elegant approach.

Ev0
02-02-23, 12:58
nodejs depends on the following packages also being installed:


brotli (>= 1.0.9), libc6 (>= 2.34), libcares2 (>= 1.17.2), libcrypto1.1 (>= 1.1.1l), libgcc1 (>= 11.2.0), libicui18n69 (>= 69.1), libicuuc69 (>= 69.1), libssl1.1 (>= 1.1.1l), libstdc++6 (>= 11.2.0), libz1 (>= 1.2.11)

robbieb43
05-02-23, 13:58
I have now successfully installed node js on my box. I have been having some difficulties as discussed in another thread, getting openatv installed in my multiboot so I have tried another route. The node js project site provides some binaries including an ARMv7 as my zgemma requires. I have detailed my steps in case anyone wishes to follow it. Initial impressions are OK although I suspect the CPU occupancy is a little higher - though there could be other reasons since my use case includes ffmpeg, and this is a newer version than I had running on openvix 5.4.

The following instructions are directed at people familiar with the command line:



# Go to this website:
# With Browser go to >> https://nodejs.org/en/download/current/
#
# To get url of the latest Arm7 (as that's what the zgemma H7 processor family is) right click on the ARMv7 button and copy the link.
# For me this was:
# https://nodejs.org/dist/v19.6.0/node-v19.6.0-linux-armv7l.tar.xz

# At command line on the box (putty, linux terminal etc) do the following
#
# Go somewhere where you have space such as your hdd and make a temporary directory
mkdir nodejs
cd nodejs
#

# Download the distro using the copied url:
wget https://nodejs.org/dist/v19.6.0/node-v19.6.0-linux-armv7l.tar.xz

# So from this we can see we have a file with Version of v19.6.0 and distro for linux-armv7l

# Make target directory
mkdir -p /usr/local/lib/nodejs

# Extract file to the target (using the correct Version and Distro values from your download file).
VERSION=v19.6.0&&DISTRO=armv7l&&tar -xJvf node-$VERSION-$DISTRO.tar.xz -C /usr/local/lib/nodejs

# Add to session path
VERSION=v19.6.0&&DISTRO=linux-armv7l&&export PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH
# NB: This is not perminent so you need to add to profile (it is just for testing in a couple of steps)- see next step
#
# In you favourite editor (nano, vi etc) edit the profile file to make path perminent
# If you are cautious you can make a copy first:
cp /etc/profile /etc/profile.old
nano /etc/profile
# BEFORE the line near the end that looks similar to:
# export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
# Add following to line
VERSION=v19.6.0&&DISTRO=linux-armv7l&&PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH
# save and exit

# Install libatomic
opkg update
opkg install libatomic

# Check it is installed:
node -v
# Should show something like
# v19.6.0

# Don't forget that throughout you need to use your correct VERSION=XXX and DISTRO=ZZZZ


Hope this helps anyone else that has this issue. Many thanks for the helpful suggestions in this thread, which I will explore further once I resolve my OpenATV installation issue.

robbieb43
10-02-23, 11:24
Enable debug logs on OpenATV. Restart. Install nodejs, see the log to see what it installs.

Then do following:
opkg download blahblah

You will find those packages in /home/root. Transfer to storage device, reboot into vix, install the packages

There would be a way to install using the command line directly from another image's plugin/feed server. Or hack the opkg files to point to the other image's server.

Thanks for the the pointer.


nodejs depends on the following packages also being installed:


brotli (>= 1.0.9), libc6 (>= 2.34), libcares2 (>= 1.17.2), libcrypto1.1 (>= 1.1.1l), libgcc1 (>= 11.2.0), libicui18n69 (>= 69.1), libicuuc69 (>= 69.1), libssl1.1 (>= 1.1.1l), libstdc++6 (>= 11.2.0), libz1 (>= 1.2.11)

Thanks also for this also Ev0.

After a few false starts I have managed to use the openATV feed to install nodejs also.

The feed used here install Node V16 which is pretty upto date, though behind the version 19 direct from the node.org site as described above.

The steps that worked for me are as follows:



#At the command line run:
opkg update
#
#create a file called "/etc/opkg/cortexa15hf-neon-vfpv4-feed.conf" with the following contents (not in quotes though):
# "src/gz openatv-cortexa15hf-neon-vfpv4 https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4" e.g. like this:
echo "src/gz openatv-cortexa15hf-neon-vfpv4 https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4" > /etc/opkg/cortexa15hf-neon-vfpv4-feed.conf
#
opkg update
opkg install nodejs
# test:
node -v
# should give installed version
# Remove feed:
rm /etc/opkg/cortexa15hf-neon-vfpv4-feed.conf
opkg update
#


If this does not work for you you can try downloading all the dependencies and installing each one but I did have some version issues when I did this:




# e.g something like download and unpack package list:

cd /tmp
wget https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4/Packages.gz

# unpack and search for nodejs
# This will give list of dependencies as in abu baniaz's post
# then for each of these
# wget https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4/<<file name of package from above>>
# e.g:
wget https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4/brotli_1.0.9-r0_cortexa15hf-neon-vfpv4.ipk
then install:
opkg install ./brotli_1.0.9-r0_cortexa15hf-neon-vfpv4.ipk
#
#Finally install nodejs once all the dependencies are in place:
wget https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4/nodejs_16.14.0-r0_cortexa15hf-neon-vfpv4.ipk && opkg install ./nodejs_16.14.0-r0_cortexa15hf-neon-vfpv4.ipk
#


I would suggest doing a trial run on a copy of your target image (image backup >> flash to spare partition >> boot) as this process is not without some pain sometimes.

Thanks to all those who offered suggestions here.

After all this the performance seemed about the same as the node.org version but at least it provides a second option.

Huevos
10-02-23, 13:53
Thanks for the the pointer.



Thanks also for this also Ev0.

After a few false starts I have managed to use the openATV feed to install nodejs also.

The feed used here install Node V16 which is pretty upto date, though behind the version 19 direct from the node.org site as described above.

The steps that worked for me are as follows:



#At the command line run:
opkg update
#
#create a file called "/etc/opkg/cortexa15hf-neon-vfpv4-feed.conf" with the following contents (not in quotes though):
# "src/gz openatv-cortexa15hf-neon-vfpv4 https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4" e.g. like this:
echo "src/gz openatv-cortexa15hf-neon-vfpv4 https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4" > /etc/opkg/cortexa15hf-neon-vfpv4-feed.conf
#
opkg update
opkg install nodejs
# test:
node -v
# should give installed version
# Remove feed:
rm /etc/opkg/cortexa15hf-neon-vfpv4-feed.conf
opkg update
#


If this does not work for you you can try downloading all the dependencies and installing each one but I did have some version issues when I did this:




# e.g something like download and unpack package list:

cd /tmp
wget https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4/Packages.gz

# unpack and search for nodejs
# This will give list of dependencies as in abu baniaz's post
# then for each of these
# wget https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4/<<file name of package from above>>
# e.g:
wget https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4/brotli_1.0.9-r0_cortexa15hf-neon-vfpv4.ipk
then install:
opkg install ./brotli_1.0.9-r0_cortexa15hf-neon-vfpv4.ipk
#
#Finally install nodejs once all the dependencies are in place:
wget https://feeds2.mynonpublic.com/7.1/h7/cortexa15hf-neon-vfpv4/nodejs_16.14.0-r0_cortexa15hf-neon-vfpv4.ipk && opkg install ./nodejs_16.14.0-r0_cortexa15hf-neon-vfpv4.ipk
#


I would suggest doing a trial run on a copy of your target image (image backup >> flash to spare partition >> boot) as this process is not without some pain sometimes.

Thanks to all those who offered suggestions here.

After all this the performance seemed about the same as the node.org version but at least it provides a second option.

Wow, why so complicated?

All you needed to do was copy /etc/opkg/static-cortexa15hf-neon-vfpv4-feed.conf from your ATV image to your ViX image. And then reboot ViX and nodjs will be available in the ViX image.

robbieb43
11-02-23, 16:11
Sadly if OpenATv take down nodejs from their feed , the more manual approach might be necessary.

Huevos
11-02-23, 21:12
Sadly if OpenATv take down nodejs from their feed , the more manual approach might be necessary.???, that is a static feed.

Huevos
18-06-23, 18:52
Nodejs is available on OpenViX 6.4 feeds.