update_kernel.sh is failing

We have some BBB’s that are very old that are used for machine control. The old usb1 drivers won’t connect with newer Macs and we have decided to update them, but we are getting the following:

/opt/scripts/tools# ./update_kernel.sh 
info: checking archive
ERROR: The certificate of ‘rcn-ee.com’ is not trusted.
ERROR: The certificate of ‘rcn-ee.com’ has expired.

The process works well with newer linux versions - so it seems to be something on the old BBB’s. We are trying to build a script than can be downloaded to these boards to update them and any help would be appreciated.

/opt/scripts/tools# ./version.sh 
git:/opt/scripts/:[b17d2f43e8efb6672c691ac7a7f45171cb984eca]
eeprom:[A335BNLTBWA51646BBWG3535]
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Image 2018-03-05]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2018.01-00002-ge9ff418fb8 (Feb 20 2018 - 20:14:57)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.01-00002-ge9ff418fb8]:[location: dd MBR]
kernel:[4.9.126-ti-r115]
nodejs:[v8.12.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-SPIDEV1-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.4.20181019.0-0rcnee0~stretch+20181019]
pkg:[bb-customizations]:[1.20180815-0rcnee0~stretch+20180815]
WARNING:pkg:[bb-usb-gadgets]:[NOT_INSTALLED]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[roboticscape]:[0.4.4-git20180608.0-0rcnee0~stretch+20180609]:[GOT_REPLACED_BY_NEXT]
WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep remote
[    1.627199] remoteproc remoteproc0: wkup_m3 is available
[    1.751034] remoteproc remoteproc0: powering up wkup_m3
[    1.751574] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[    1.757453] remoteproc remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
dmesg | grep pinctrl-single
[    1.340744] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    1.341779] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

Fixed with: Debian 9.x/10.x: ERROR: The certificate of ‘rcn-ee.com’ is not trusted.

Edit: Ah, your running Stretch… give me a moment and test that too…
Edit2: yeap, same command for 10.x works with 9.x:

We need to upgrade: libgnutls30

Debian GNU/Linux 9 beaglebone ttyS0

BeagleBoard.org Debian Stretch IoT Image 2020-04-06

Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

default username:password is [debian:temppwd]

beaglebone login: 
root@beaglebone:~# wget https://rcn-ee.com/repos/debian/dists/buster/Release
--2021-10-22 15:25:42--  https://rcn-ee.com/repos/debian/dists/buster/Release
Resolving rcn-ee.com (rcn-ee.com)... 45.33.2.10, 2600:3c00::f03c:91ff:fe37:6ad5
Connecting to rcn-ee.com (rcn-ee.com)|45.33.2.10|:443... connected.
ERROR: The certificate of ‘rcn-ee.com’ is not trusted.
ERROR: The certificate of ‘rcn-ee.com’ has expired.
sudo apt update
sudo apt install --only-upgrade libgnutls30
root@beaglebone:~# sudo apt update ; sudo apt install --only-upgrade libgnutls30
Ign:2 http://deb.debian.org/debian stretch InRelease
Get:1 http://repos.rcn-ee.com/debian stretch InRelease [3,079 B]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
Get:4 http://deb.debian.org/debian-security stretch/updates InRelease [53.0 kB]
Get:5 http://deb.debian.org/debian stretch Release [118 kB]                    
Get:6 http://deb.debian.org/debian stretch Release.gpg [3,177 B]
Get:7 http://repos.rcn-ee.com/debian stretch/main armhf Packages [1,794 kB]
Get:8 http://deb.debian.org/debian-security stretch/updates/contrib armhf Packages [1,764 B]
Get:9 http://deb.debian.org/debian-security stretch/updates/main armhf Packages [700 kB]
Get:10 http://deb.debian.org/debian-security stretch/updates/non-free armhf Packages [5,320 B]
Get:11 http://deb.debian.org/debian stretch/contrib armhf Packages [41.8 kB]   
Get:12 http://deb.debian.org/debian stretch/main armhf Packages [6,908 kB]     
Get:13 http://deb.debian.org/debian stretch/non-free armhf Packages [59.8 kB]  
Fetched 6,256 B in 54s (114 B/s)                                               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
124 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  gnutls-bin
The following packages will be upgraded:
  libgnutls30
1 upgraded, 0 newly installed, 0 to remove and 123 not upgraded.
Need to get 842 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Get:1 http://deb.debian.org/debian-security stretch/updates/main armhf libgnutls30 armhf 3.5.8-5+deb9u6 [842 kB]
Fetched 842 kB in 0s (2,102 kB/s)
(Reading database ... 56622 files and directories currently installed.)
Preparing to unpack .../libgnutls30_3.5.8-5+deb9u6_armhf.deb ...
Unpacking libgnutls30:armhf (3.5.8-5+deb9u6) over (3.5.8-5+deb9u4) ...
Setting up libgnutls30:armhf (3.5.8-5+deb9u6) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
root@beaglebone:~# wget https://rcn-ee.com/repos/debian/dists/buster/Release
--2021-10-22 15:29:36--  https://rcn-ee.com/repos/debian/dists/buster/Release
Resolving rcn-ee.com (rcn-ee.com)... 45.33.2.10, 2600:3c00::f03c:91ff:fe37:6ad5
Connecting to rcn-ee.com (rcn-ee.com)|45.33.2.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2196 (2.1K)
Saving to: ‘Release’

Release             100%[===================>]   2.14K  --.-KB/s    in 0s      

2021-10-22 15:29:36 (7.29 MB/s) - ‘Release’ saved [2196/2196]

Regards,

Thank you Robert! That was exactly what I needed.

The update_kernel.sh script does not seem to work with the 4.14 kernel.

I can get a list of available kernels:

debian@beaglebone:/opt/scripts$ sudo ./tools/update_kernel.sh --bone-kernel     info: checking archive
2021-10-23 23:04:29 URL:https://rcn-ee.com/repos/latest/stretch-armhf/LATEST-omap-psp [609/609] -> "LATEST-omap-psp" [1]
-----------------------------
Kernel Options:
ABI:1 STABLE 3.8.13-bone86
ABI:1 TESTING 5.8.18-bone26
ABI:1 LTS414 4.14.232-bone52
ABI:1 LTS419 4.19.191-bone67
ABI:1 V420X 4.20.17-bone15
ABI:1 V50X 5.0.21-bone19
ABI:1 V51X 5.1.21-bone18
ABI:1 V52X 5.2.21-bone18
ABI:1 V53X 5.3.18-bone23
ABI:1 LTS54 5.4.129-bone55
ABI:1 V55X 5.5.19-bone27
ABI:1 V56X 5.6.19-bone24
ABI:1 V57X 5.7.19-bone28
ABI:1 V58X 5.8.18-bone38
ABI:1 V59X 5.9.16-bone36
ABI:1 LTS510 5.10.56-bone47
ABI:1 V511X 5.11.22-bone32
ABI:1 V512X 5.12.19-bone28
ABI:1 V513X 5.13.9-bone16
ABI:1 V514X 5.14.0-rc5-bone7
-----------------------------
Kernel version options:
-----------------------------
LTS414: --lts-4_14
LTS419: --lts-4_19
LTS54: --lts-5_4
LTS510: --lts-5_10
-----------------------------
Please pass one of the above kernel options to update_kernel.sh
-----------------------------

However, when attempting to change to another release, I keep getting the same error. This is seen while just running ‘tools/update_kernel.sh’ as well:

debian@beaglebone:/opt/scripts$ sudo ./tools/update_kernel.sh --lts-4_19
No arg for -k option
Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
 -k version     Specify kernel version or 'all'
 -c             Create a new initramfs
 -u             Update an existing initramfs
 -d             Remove an existing initramfs
 -t             Take over a custom initramfs with this one
 -b directory   Set alternate boot directory
 -v             Be verbose
 -h             This message

debian@beaglebone:/opt/scripts$ sudo ./tools/update_kernel.sh
No arg for -k option
Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
 -k version     Specify kernel version or 'all'
 -c             Create a new initramfs
 -u             Update an existing initramfs
 -d             Remove an existing initramfs
 -t             Take over a custom initramfs with this one
 -b directory   Set alternate boot directory
 -v             Be verbose
 -h             This message

debian@beaglebone:/opt/scripts$ sudo ./tools/version.sh
git:/opt/scripts/:[b17d2f43e8efb6672c691ac7a7f45171cb984eca]
eeprom:[A335BNLT00C03214BBBK1847]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2019-08-03]
UBOOT: Booted Device-Tree:[am335x-boneblack.dts]
kernel:[4.14.108]
nodejs:[v6.17.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20210821.1-0~stretch+20210923]
pkg:[bb-customizations]:[1.20210810.1-0~stretch+20210810]
pkg:[bb-usb-gadgets]:[1.20211012.0-0~stretch+20211012]
pkg:[bb-wl18xx-firmware]:[1.20210922.2-0~stretch+20211007]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~stretch+20200716]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~stretch+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev gpio pwm eqep remoteproc admin spi tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait earlyprintk mem=512M]
dmesg | grep remote
[    1.753904] remoteproc remoteproc0: wkup_m3 is available
[    2.143321] remoteproc remoteproc0: powering up wkup_m3
[    2.148714] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[    2.157148] remoteproc remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
dmesg | grep pinctrl-single
[    0.450067] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    0.451228] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

Note: libgnutls30 is already the latest.

Cheers,

Jon

Hi @jomoengineer pretty sure you right here:

Please change:

#!/bin/sh -e

to

#!/bin/sh -ex

and log all output when you run it again…

Regards,

Robert,

Yeah, I am not sure what happened, but I loaded a 10.5 (8/25/2020) image on the uSD card and now I am able to use the “update_kernel.sh” script to move between the 4.19 and 4.14 kernels without issue.

Thanks,

Jon