HOWTO: Update FFP 0.7-arm

Marvell Kirkwood based
Post Reply
barmalej2
Posts: 2398
Joined: Sun Apr 29, 2012 5:24 pm

HOWTO: Update FFP 0.7-arm

Post by barmalej2 » Thu Jun 21, 2018 9:18 am

As you may know already, FFP (abbreviation of fonz fun_plug) is aging. During last year, I built new toolchain for FFP, based on uClibc-ng, which is well maintained and has periodic updates unlike outdated uClibc. Also I have updated core ffp packages-gcc, binutils, openssh, openssl and so on, compiled some new ones and prepared them as new major release for FFP. Here you can find full list of all new packages. From interesting ones, I would like to mention rclone, which is used for a synchronizing/copying/fuse mounting with cloud storagies and zyxel-samba, which is target update for Zyxel's NSA3** series firmware samba service.
Some background info:
Theoretically and practically the new toolchain is not compatible with old one, but a lot efforts has been done to make it as much closer as possible to the old one, so most of old programs will work after updating, but not all of them. Upgrade of all core ffp packages is required. For that purpose slapt-get package manager is used, which can download and install required dependencies. All new packages are uploaded in to separate 1.0 repository http://downloads.zyxel.nas-central.org/ ... /packages/. Updated slapt-get package manager uses both old 0.7 and new 1.0 repositories combined. By default, package with highest version number will be installed, when upgrading or installing packages. One more important note. For major upgrade to 1.0 version use --dist-upgrade target (instead of --upgrade), which forces uClibc-solibs and openssl packages to be installed first.

Before proceeding further, remember, that all the steps below is done at your own risk.
Here are the intructions for updating the FFP (abbreviation of fonz fun_plug) 0.7 arm:
# Download and install/upgrade slapt-get package first.

Code: Select all

test -d /ffp/funpkg/cache/br2 || mkdir -p /ffp/funpkg/cache/br2
cd /ffp/funpkg/cache/br2
/ffp/bin/wget -nv http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/1.0/arm/packages/slapt-get-0.10.2t-arm-3.txz
test -f /ffp/funpkg/installed/slapt-get-*-arm-* && funpkg -u slapt-get-0.10.2t-arm-3.txz || funpkg -i slapt-get-0.10.2t-arm-3.txz
# Then update packages list and use --dist-upgrade target to install/upgrade your current packages.

Code: Select all

slapt-get -u
slapt-get --dist-upgrade
Several steps to do after upgrade is complete:
# 1. Reload or restart of sshd service is required to pickup settings from new sshd_config file, if you are using ffp sshd service for connecting to NAS, otherwise-you can skip this step. This action is necessary to restore old behavior and permit ffp root user login, since the new sshd versions disables that by default.

Code: Select all

sh /ffp/start/sshd.sh reload
# Additional important notice on this action. For security reasons, it is not recommend usage of root user login account via ssh. Best practice is to disable root user login via ssh and use non-priviledged accounts (admin user for example) for that purpose. After login as simple user, you can elevate priviledges up to root by running command:

Code: Select all

su -
# To disable root user login access, edit sshd service configuration file -/ffp/etc/ssh/sshd_config and change line to:
PermitRootLogin no
# Reload of sshd service is required after changes in config file.

# 2. Source ffp shell applications-specific startup files, to load environment variables and aliases.

Code: Select all

for f in /ffp/etc/profile.d/*.sh; do source $f; done
# Updated gendeps and lddd scripts are the part of repackaged funpkg package from now. You can check missing dependencies after upgrade is complete by running:

Code: Select all

lddd
Good luck with updating ;) If you are getting error on any step, then stop, do not proceed further, do not close your active connection to NAS and report to me in this topic. Comments and feedback are also welcome.

MimoKar
Posts: 3
Joined: Sun Nov 26, 2017 3:46 pm

Re: HOWTO: Update FFP 0.7-arm

Post by MimoKar » Sat Jun 30, 2018 8:20 am

just done, no issue during update

stagger321
Posts: 58
Joined: Fri Feb 08, 2013 2:52 pm

Re: HOWTO: Update FFP 0.7-arm

Post by stagger321 » Sun Jul 01, 2018 11:46 am

Hi Barmalej2,

Using your FFP upgrade to try and get SMB2 working. Had tried via Mijzelf's Entware install, but as per my other thread for some reason the SMB2 startup disables access to the shares on my machine - which is odd. Reverting SMB1 works fine - but I can't then see my shares on my win10 PC
Mijzelf suggested I use your SMB2 option from the updated FFP.

I have an old install of FFP on a pendrive, which I have now inserted into my NSA325 and restarted it.
Get through your install instructions (as su -) , but it looks like I have FFP spaces issues at 'slapt-get -u'

Code: Select all

root@NSA325:/ffp/etc/profile.d# slapt-get --dist-upgrade
Reading Package Lists...Done
The following NEW packages will be installed:
  mpfr libtirpc db5 gdbm libunwind libtasn1 nettle gnutls
The following packages will be upgraded:
  uClibc-solibs openssl libiconv ncurses readline bash bzip2 coreutils dialog
  expat findutils funpkg gmp gawk gcc-solibs gettext grep groff gzip less lsof
  openssh pcre perl rsync sed strace tar util-linux wget xz zlib
The following packages will be reinstalled:
  slapt-get
32 upgraded, 1 reinstalled, 8 newly installed, 0 to remove, 0 not upgraded.
Need to get 36.5MB of archives.
You don't have enough free space in /ffp
Also after trying that and editing the sshd service configuration file -/ffp/etc/ssh/sshd_config, then trying the 'for f in .....' etc command I get an error. I see that the /ffp/etc/profile.d directory is empty.
Is the lack of space in ffp causing this?
Do I have to trash my current FFP pendrive install and reinstall from scratch??
Cheers

Stagger

NSA325_4.80(AAAJ.0), FFP 0.7, [2 x 2TB WD Caviar Greens (WD20EZRX) - RAID1]

barmalej2
Posts: 2398
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Update FFP 0.7-arm

Post by barmalej2 » Sun Jul 01, 2018 5:12 pm

stagger321 wrote:
Sun Jul 01, 2018 11:46 am
Is the lack of space in ffp causing this?

Might be. Let's check. What is the output of command:

Code: Select all

df -hT /ffp

stagger321
Posts: 58
Joined: Fri Feb 08, 2013 2:52 pm

Re: HOWTO: Update FFP 0.7-arm

Post by stagger321 » Wed Jul 04, 2018 10:27 am

Thanks for the response barmalej2
Seems OK to me.
It says it 'Need to get 36.5MB of archives.'??

Code: Select all

admin@NSA325:~$ df -hT /ffp
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sdc2      ext2  464M  302M  138M  69% /e-data/9d11f709-2ee0-4411-aaa6-175face1c0c7
Cheers

Stagger

NSA325_4.80(AAAJ.0), FFP 0.7, [2 x 2TB WD Caviar Greens (WD20EZRX) - RAID1]

barmalej2
Posts: 2398
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Update FFP 0.7-arm

Post by barmalej2 » Wed Jul 04, 2018 12:50 pm

Not good at all. Free space left is 138MB. After downloading the required update packages you will have 101,50 MB only. Where to uncompress packages? You definitely need a bigger USB stick and slapt-get correctly determined the lack of space.

stagger321
Posts: 58
Joined: Fri Feb 08, 2013 2:52 pm

Re: HOWTO: Update FFP 0.7-arm

Post by stagger321 » Thu Jul 05, 2018 8:51 am

OK Thanks.
So I am creating a new FFP stick on a spare 8GB pendrive.
When I start this it creates the new FFPBOOT partition on the pendrive but does not down load anything. Confirmed this in the log file.
When I check to see where its getting this from I can see its downloading from http://ffp.inreto.de/ffp/ - which is not available.
Is there another way to do this - like for instance copying the data from the old drive in the putty window, or do I need that FFP site available to complete the stick.
I also notice that on the new drive there is no /ffp location - all the symbolic links in ffproot point at nothing.
Its a while since I looked at FFP sticks - so forgotten the subtleties here.

Many thanks.

Log is below:

Code: Select all

/e-data/5B3D-D73F # cat  ffpboot.log
Rotating logfiles...
mv /mnt/parnerkey/ffpboot.log.2.gz /mnt/parnerkey/ffpboot.log.3.gz
mv /mnt/parnerkey/ffpboot.log.1.gz /mnt/parnerkey/ffpboot.log.2.gz
cat /mnt/parnerkey/ffpboot.log | gzip -c >/mnt/parnerkey/ffpboot.log.1.gz
Script fun_plug.sh version 20151012 running from /mnt/parnerkey
ffpstick started at Thu Jul 5 09:23:48 UTC 2018
Try to determine NAS type...
according to /zyxel/mnt/info/modelid: AA03->NSA325
type NSA325, fw NSA325_4.80(AAAJ.0)
Find the current usb device...usb device is /dev/sdc1 on device /dev/sdc
Copy myself to /tmp...And execute...
/tmp/.ffpstick/fun_plug.sh BackgroundPolling -d /dev/sdc -n NSA325 -f "NSA325_4.80(AAAJ.0)" -r no -l &
Script fun_plug.sh version 20151012 running from /tmp/.ffpstick
Wait for the stick to be mounted again by the firmware...
Probe all mount points 0 seconds...
probe /proc/bus/usb...
probe /dev/pts...
probe /zyxel/mnt/nand...
probe /zyxel/mnt/sysdisk...
probe /lib/security...
probe /lib/modules...
probe /tmp/tmpfs...
probe /usr/local/etc...
probe /usr/local/var...
probe /etc/zyxel...
probe /i-data/c3fb44f8...
probe /usr/local/apache/htdocs/adv,/res/imdb_poster...
No /anymountpoint/ffproot/after_booting.sh found
Probe all mount points 10 seconds...
probe /proc/bus/usb...
probe /dev/pts...
probe /zyxel/mnt/nand...
probe /zyxel/mnt/sysdisk...
probe /lib/security...
probe /lib/modules...
probe /tmp/tmpfs...
probe /usr/local/etc...
probe /usr/local/var...
probe /etc/zyxel...
probe /i-data/c3fb44f8...
probe /usr/local/apache/htdocs/adv,/res/imdb_poster...
probe /e-data/5B3D-D73F...
found ffpstick on /e-data/5B3D-D73F, moving logfile
probe /usr/local/zy-pkgs...
probe /etc/zyxel/zy-pkgs...
probe /usr/local/apache/htdocs/adv,/pkg...
probe /e-data/732557ea-6dda-4e2a-973d-31e1156d5430...
found ffproot on /e-data/732557ea-6dda-4e2a-973d-31e1156d5430/ffproot
probe /usr/local/apache/web_framework/data/cache...
probe /usr/local/apache/web_framework/data/config...
Starting /e-data/732557ea-6dda-4e2a-973d-31e1156d5430/ffproot/after_booting.sh version 20151012 at Thu Jul 5 09:24:33 UTC 2018...
Which FFP version to use?
Is OABI supported?...yes. Is EABI supported?...yes, choosing FFP 0.7/arm
Will try to download fun_plug.tgz (version 0.7/arm)
http://ffp.inreto.de/ffp/0.7/arm/fun_plug.tgz
If the script stops here, downloading the tarball from ffp.inreto.de failed.
You can try to get internet access for the NSA325,
or copy fun_plug.tgz (case sensitive!) to the share containing ffproot.
It should be recognized and installed.
It is possible that you have to reboot the box before this share shows up.
ping ffp.inreto.de...
ffp.inreto.de found. Downloading fun_plug.tgz...
pwd /e-data/732557ea-6dda-4e2a-973d-31e1156d5430/ffproot/ffp
tar: short read
Download failed.
Could not download fun_plug.tgz for some reason
Will start polling for the existance forever in the share containing ffproot...
Cheers

Stagger

NSA325_4.80(AAAJ.0), FFP 0.7, [2 x 2TB WD Caviar Greens (WD20EZRX) - RAID1]

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: HOWTO: Update FFP 0.7-arm

Post by Mijzelf » Thu Jul 05, 2018 4:49 pm

It seems the ffp server is down. Again. It has happened before, and so far it returned after some days. Unfortunately there is no one to notice, AFAIK. Fonz has disappeared from the web.

You can try to use the zypkg, which has the ffp base system included. Or you can copy the contents of your old stick to the new one.

@barmalej2: Do you think it's an idea to provide a new, updated, ffp base system? I think it could be a lot smaller than Fonz' original base system, as it provides unnecessary packages like lighttpd. And I guess slacker (and so dialog and ncurses) can be omitted. Or is your updated system still dependent on Fonz' repository?

barmalej2
Posts: 2398
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Update FFP 0.7-arm

Post by barmalej2 » Sun Jul 08, 2018 6:33 pm

Well, I think it is good idea update the ffp base system, but I see several problems with that.
1. slapt-get packages reinstall function is not working, although funpkg can do that using packages from slapt-get cache dir.
2. We still lack some packages, present in original fun_plug.tgz, but not updated yet (red colored):
bash
bzip2
coreutils
dialog
expat
findutils
funpkg
gawk
gcc-solibs
gettext
gmp
grep
groff
gzip
less
libiconv
lsof
man
ncurses
openssh
openssl
pcre
perl
readline
rsync
sed
strace
tar
uClibc-solibs
util-linux
wget
xz
zlib

busybox-netutils
e2fsprogs
ffp-init
file
infozip
libarchive
lighttpd
nfs-utils
portmap
procps
rcorder
shadow
tcp_wrappers
vim
Of course, some of them can be omitted, but not ncurses, since procps depends on it.
3. I am currently on vacations, so not much I can do now. And I don't know, will I have enough time after them.

stagger321
Posts: 58
Joined: Fri Feb 08, 2013 2:52 pm

Re: HOWTO: Update FFP 0.7-arm

Post by stagger321 » Fri Jul 13, 2018 11:25 am

Hi barmalej2, Mijzelf

Had issues with this copy from old (small) pendrive to the 8GB I have.
Sorted now (had to use tar to copy, as permission/ownership of file not retained - no matter what modifiers used with 'cp'), and after creating a /ffp mount point - booting gives me a working ffp stick.

I have now been able to complete the FFP update.

One thing - when I run 'lddd' I get missing uClibc

Code: Select all

root@NSA325:/ffp/funpkg# lddd
 uClibc package not found. Install it first.
Stupid question - as its a while since I installed anything for ffp, but how do I install the uClibc package, if its missing.
Then how do I install the Samba 3.6.25 package and enable, as that is the thing I am really after.

TIA.
Cheers

Stagger

NSA325_4.80(AAAJ.0), FFP 0.7, [2 x 2TB WD Caviar Greens (WD20EZRX) - RAID1]

barmalej2
Posts: 2398
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Update FFP 0.7-arm

Post by barmalej2 » Fri Jul 13, 2018 6:19 pm

Installation of any package from br2: repository easy can be done using slapt-get package manager:

Code: Select all

slapt-get -i packagename
To get available packages list, first update list itself (retrieve pkg data from repositories), then use --list or --available targets:

Code: Select all

slapt-get -u

Code: Select all

slapt-get --list

Code: Select all

slapt-get --available
Show package description:

Code: Select all

slapt-get --show packagename
Package Name: qbittorrent
Package Mirror: http://downloads.zyxel.nas-central.org/ ... /packages/
Package Priority: Preferred
Package Location: .
Package Version: 4.0.4-arm-1
Package Size: 4215 K
Package Installed Size: 5420 K
Package Required: boost,gcc-solibs | gcc,libtorrent,qt5-base,uClibc-solibs | uClibc,zlib
Package Conflicts:
Package Suggests:
Package MD5 Sum: b3c090ec800f0af3f1ce203dc8c28e30
Package Description:
Free BitTorrent client programmed in C++, based on Qt toolkit, libtorrent-rasterbar and boost.
The qBittorrent project aims to provide an open-source software alternative to ▒Torrent.
License(s): GPLv2+
Version: 4.0.4
Homepage: https://www.qbittorrent.org/
Package Installed: yes
All available commands:

Code: Select all

slapt-get - Jason Woodward <woodwardj at jaos dot org>
An implementation of the Debian APT system for Fonz Fun Plug (ffp)
Usage:
slapt-get [option(s)] [target]

Targets:
  -u, --update   retrieve pkg data from MIRROR
  --upgrade      upgrade installed pkgs
  --dist-upgrade upgrade to newer release
  -i, --install  [pkg name(s)] - install specified pkg(s)
  --install-set  [disk set(s)] - install specified disk set(s)
  --remove       [pkg name(s)] - remove specified pkg(s)
  --show         [pkg name(s)] - show pkg(s) description
  --filelist     [pkg name(s)] - show pkg(s) installed files
  --search       [expression] - search available pkgs
  --list         list pkgs
  --available    list available pkgs
  --installed    list installed pkgs
  --clean        purge cached pkgs
  --autoclean    only purge cache of older, unreacheable pkgs
  --add-keys     retrieve GPG keys for sources
  -h, --help     display this help and exit
  --version      print version and license info

Options:
  -d, --download-only     only download pkg on install/upgrade
  -s, --simulate          show pkgs to be installed/upgraded
  -y, --no-prompt         do not prompt during install/upgrade
  -p, --prompt            always prompt during install/upgrade
  --reinstall             reinstall the pkg
  --ignore-excludes       install/upgrade excludes
  --no-md5                do not perform md5 check sum
  --no-dep                skip dependency check
  --ignore-dep            ignore dependency failures
  --print-uris            print URIs only, do not download
  -S, --show-stats        show download statistics
  -c, --config []         specify alternate slapt-getrc location
  --remove-obsolete       remove obsolete packages
  --retry []              specify number of download retry attempts
  --no-upgrade            install package, do not attempt to upgrade
  --allow-unauthenticated allow unauthenticated packages
Be careful with --remove target. Always use in conjunction with -p and --no-dep options and for non-critical packages only. As example:

Code: Select all

slapt-get -p --no-dep --remove zyxel-samba
Reading Package Lists...Done
The following packages will be REMOVED:
zyxel-samba
0 upgraded, 0 reinstalled, 0 newly installed, 1 to remove, 0 not upgraded.
After unpacking 0.0kB of additional disk space will be used.
Do you want to continue? [y/N]
If I clearly remember lddd script requires binutils also, as well as uClibc.

Post Reply