[Debian Stretch 2018-03-05] BeagleBone Green: Reducing boot time

Hi,
I would like to know how I can reduce the boot time of my Beaglebone.
The startup takes about 1 minute and half, than the card is ready.
I need to have a boot time of around 30 seconds or lower.
Here are some screenshots about system information:
image

image

The system starts from a micro SD card, and the main program uses gpio, i2c Bus, Spi Bus and the PRUs

First booting from eMMC is going to be much faster than an SD card.
eMMC has an 8 bit data bus and SD-card only 4 bits. Also the clock on the eMMC runs at around 200Mhz I think where as the SD card clock speed is 50Mhz, so much faster overall.

After that you will need to see where the bottlenecks are.

You can manually look through the output of dmesg after booting, or there is a perl script in the kernel source code in linux/scripts called bootgraph.pl
You can use this to generate a nice kernel boot graph.

You need to add a couple of options to the parameters passed to the kernel from u-boot. These are mentioned in the script.

For the fastest boot you will probable need to build your own kernel.

Disable all hardware that is not needed. Where possible compile in drivers rather than make them loadable modules.

Next you will need to optimise the systemd startup.

Run your code as soon as possible. This will depend on itā€™s dependencies.

Unused services should be disabled.

Depending on what you are doing, you may want to play around with a complete OS custom build, but that will take time and a fair bit of work.
While systemd is nice in general, if you have very simple needs then good old fashioned sysvint may be a better choice.

@GiovanniMo grab a newer imageā€¦ Specifically the minimal imageā€¦

I spent a lot of time in Bullseye changing systemd/udev to make things more dynamic, instead of scripts that just waitā€¦

Regards,

Thank you for your replies.
I am currently bound to this version of debian. I am not an expert about configurations in Linux environment, and on my system I am using both the PRUs and xenomai cobalt co-kernel.
I tried to use a different debian image but I had many problems with settings.
So, Iā€™d like use this version and Iā€™d like reduce the boot time.

After startup, with dmesg I see this report:

image

image

That looks like random is blocking due to not enough entropy. I seem to recall it is possible to save a random seed for later boots to help with this.

Try googling and you should find something.

Install haveged

sudo apt update
sudo apt install haveged

in /boot/uEnv.txt add rng_core to cmdlineā€¦

rng_core.default_quality=100

Regards,

Good morning,
I did it and it looks like random doesnā€™t take much time anymore.
However, the boot is still too long, from dmesg I see that:

[ 1.893312] of_cfs_init: OK
[ 1.896571] remoteproc0: remote processor wkup_m3 is now up
[ 1.896592] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
[ 1.901921] PM: Hibernation image not present or could not be loaded.
[ 1.903909] Freeing unused kernel memory: 832K
[ 30.174579] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. O pts: (null)
[ 31.195628] systemd[1]: System time before build time, advancing clock.
[ 31.363676] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 31.428305] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SEL INUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL + XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[ 31.429090] systemd[1]: Detected architecture arm.

ā€¦

[ 36.845129] net eth0: ALE Table size 1024
[ 36.901311] net eth0: phy found : id is : 0x7c0f1
[ 36.932491] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 41.949157] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow con trol rx/tx
[ 41.949263] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 43.610738] nf_conntrack version 0.5.0 (7759 buckets, 31036 max)

ā€¦

[ 46.345480] configfs-gadget gadget: high-speed config #1: c
[ 48.685458] IPv6: ADDRCONF(NETDEV_UP): usb1: link is not ready
[ 70.208999] pvrsrvkm: loading out-of-tree module taints kernel.
[ 71.958931] [drm] Initialized pvr 1.14.3699939 20110701 on minor 0

Could I do something else?

Hi to everyone,
I am trying to do another way. I installed a debian version 10.3 (console image) and Iā€™m evaluate the speed of the startup.
At the moment I get a faster startup:

root@beaglebone:~# systemd-analyze
Startup finished in 9.992s (kernel) + 35.094s (userspace) = 45.087s
graphical.target reached after 34.868s in userspace
root@beaglebone:~# systemd-analyze blame
         25.670s ifupdown-pre.service
         16.224s dev-mmcblk0p1.device
          3.525s systemd-udev-trigger.service
          3.112s generic-board-startup.service
          2.233s loadcpufreq.service
          1.524s systemd-journald.service
          1.160s systemd-timesyncd.service
          1.029s connman.service

Just some questions:
1-What is ā€˜ifupdown-pre.serviceā€™?
2-Why does it want all that time?
3-Why is ā€˜generic-board startupā€™ as fast with this version?

I attach the plot of boot phase:

startup

Please run, this script on the version of Debian you are bound too:

sudo /opt/scripts/tools/version.sh

and share itā€™s output so we can better explain what needs to be doneā€¦

Regards,

Hi Robert, thanks for your time!

This is the output about Debian 10.3, that I have just installed on my BBG.

root@beaglebone:~# /opt/scripts/tools/version.sh
eeprom:[A335BNLTBBG1BBG220051063]
model:[TI_AM335x_BeagleBone_Green]
dogtag:[BeagleBoard.org Debian Buster Console Image 2020-04-06]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-g07d5700                                                                                                                                                             e21]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-UIO-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[M-BB-BBG-00A0]
kernel:[4.19.94-ti-r42]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_emmc=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-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.20200403.0-0rcnee0~buster+20200403]
pkg:[bb-wl18xx-firmware]:[1.20200322.0-0rcnee0~buster+20200322]
pkg:[kmod]:[26-1]
WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev us                                                                                                                                                             ers systemd-journal bluetooth netdev gpio pwm eqep remoteproc admin spi iio i2c                                                                                                                                                              docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/m                                                                                                                                                             mcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656                                                                                                                                                              rng_core.default_quality=100 quiet]
dmesg | grep remote
[   39.732567] remoteproc remoteproc0: wkup_m3 is available
[   39.779655] remoteproc remoteproc0: powering up wkup_m3
[   39.779688] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf,                                                                                                                                                              size 217168
[   39.779963] remoteproc remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
dmesg | grep pinctrl-single
[    0.925977] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[    0.939596] gpio-of-helper ocp:cape-universal: ready
END

Hereā€™s the output of the system Iā€™m bound to:

git:/opt/scripts/:[247665d553b6b28fdd47c38e80e910a9208772be]
eeprom:[A335BNLTBBG1BBG121036695]
model:[TI_AM335x_BeagleBone_Green]
dogtag:[BeagleBoard.org Debian Image 2018-03-05]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.09-00002-gd5b4c4b656]:[location: dd MBR]
kernel:[4.4.113-ti-xenomai-r149]
nodejs:[v6.17.0]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_emmc=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-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.4.20190429.0-0rcnee0~stretch+20190429]
pkg:[bb-wl18xx-firmware]:[1.20190227.1-0rcnee0~stretch+20190227]
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]:[20180825+dfsg-1rcnee1~stretch+20181217]
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/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet]
dmesg | grep pinctrl-single
[    1.407150] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    1.409214] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
[    1.409467] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
[    1.409678] gpio-of-helper ocp:cape-universal: Allocated GPIO id=2
[    1.409872] gpio-of-helper ocp:cape-universal: Allocated GPIO id=3
[    1.410073] gpio-of-helper ocp:cape-universal: Allocated GPIO id=4
[    1.410276] gpio-of-helper ocp:cape-universal: Allocated GPIO id=5
[    1.410469] gpio-of-helper ocp:cape-universal: Allocated GPIO id=6
[    1.410665] gpio-of-helper ocp:cape-universal: Allocated GPIO id=7
[    1.410871] gpio-of-helper ocp:cape-universal: Allocated GPIO id=8
[    1.411064] gpio-of-helper ocp:cape-universal: Allocated GPIO id=9
[    1.411266] gpio-of-helper ocp:cape-universal: Allocated GPIO id=10
[    1.411461] gpio-of-helper ocp:cape-universal: Allocated GPIO id=11
[    1.411706] gpio-of-helper ocp:cape-universal: Allocated GPIO id=12
[    1.411911] gpio-of-helper ocp:cape-universal: Allocated GPIO id=13
[    1.412438] gpio-of-helper ocp:cape-universal: Allocated GPIO id=14
[    1.412644] gpio-of-helper ocp:cape-universal: Allocated GPIO id=15
[    1.412842] gpio-of-helper ocp:cape-universal: Allocated GPIO id=16
[    1.413029] gpio-of-helper ocp:cape-universal: Allocated GPIO id=17
[    1.413220] gpio-of-helper ocp:cape-universal: Allocated GPIO id=18
[    1.413409] gpio-of-helper ocp:cape-universal: Allocated GPIO id=19
[    1.413599] gpio-of-helper ocp:cape-universal: Allocated GPIO id=20
[    1.413790] gpio-of-helper ocp:cape-universal: Allocated GPIO id=21
[    1.413973] gpio-of-helper ocp:cape-universal: Allocated GPIO id=22
[    1.414209] gpio-of-helper ocp:cape-universal: Allocated GPIO id=23
[    1.414406] gpio-of-helper ocp:cape-universal: Allocated GPIO id=24
[    1.414590] gpio-of-helper ocp:cape-universal: Allocated GPIO id=25
[    1.414789] gpio-of-helper ocp:cape-universal: Allocated GPIO id=26
[    1.414973] gpio-of-helper ocp:cape-universal: Allocated GPIO id=27
[    1.415164] gpio-of-helper ocp:cape-universal: Allocated GPIO id=28
[    1.415364] gpio-of-helper ocp:cape-universal: Allocated GPIO id=29
[    1.415551] gpio-of-helper ocp:cape-universal: Allocated GPIO id=30
[    1.415736] gpio-of-helper ocp:cape-universal: Allocated GPIO id=31
[    1.415930] gpio-of-helper ocp:cape-universal: Allocated GPIO id=32
[    1.416223] gpio-of-helper ocp:cape-universal: Allocated GPIO id=33
[    1.416428] gpio-of-helper ocp:cape-universal: Allocated GPIO id=34
[    1.416619] gpio-of-helper ocp:cape-universal: Allocated GPIO id=35
[    1.416813] gpio-of-helper ocp:cape-universal: Allocated GPIO id=36
[    1.417009] gpio-of-helper ocp:cape-universal: Allocated GPIO id=37
[    1.417194] gpio-of-helper ocp:cape-universal: Allocated GPIO id=38
[    1.417386] gpio-of-helper ocp:cape-universal: Allocated GPIO id=39
[    1.417588] gpio-of-helper ocp:cape-universal: Allocated GPIO id=40
[    1.417777] gpio-of-helper ocp:cape-universal: Allocated GPIO id=41
[    1.417965] gpio-of-helper ocp:cape-universal: Allocated GPIO id=42
[    1.418163] gpio-of-helper ocp:cape-universal: Allocated GPIO id=43
[    1.418360] gpio-of-helper ocp:cape-universal: Allocated GPIO id=44
[    1.418585] gpio-of-helper ocp:cape-universal: Allocated GPIO id=45
[    1.418777] gpio-of-helper ocp:cape-universal: Allocated GPIO id=46
[    1.418968] gpio-of-helper ocp:cape-universal: Allocated GPIO id=47
[    1.419169] gpio-of-helper ocp:cape-universal: Allocated GPIO id=48
[    1.419362] gpio-of-helper ocp:cape-universal: Allocated GPIO id=49
[    1.419555] gpio-of-helper ocp:cape-universal: Allocated GPIO id=50
[    1.419763] gpio-of-helper ocp:cape-universal: Allocated GPIO id=51
[    1.420059] gpio-of-helper ocp:cape-universal: Allocated GPIO id=52
[    1.420274] gpio-of-helper ocp:cape-universal: Allocated GPIO id=53
[    1.420469] gpio-of-helper ocp:cape-universal: Allocated GPIO id=54
[    1.420663] gpio-of-helper ocp:cape-universal: Allocated GPIO id=55
[    1.420867] gpio-of-helper ocp:cape-universal: Allocated GPIO id=56
[    1.421061] gpio-of-helper ocp:cape-universal: Allocated GPIO id=57
[    1.421255] gpio-of-helper ocp:cape-universal: Allocated GPIO id=58
[    1.421458] gpio-of-helper ocp:cape-universal: Allocated GPIO id=59
[    1.421657] gpio-of-helper ocp:cape-universal: Allocated GPIO id=60
[    1.421867] gpio-of-helper ocp:cape-universal: Allocated GPIO id=61
[    1.422063] gpio-of-helper ocp:cape-universal: Allocated GPIO id=62
[    1.422257] gpio-of-helper ocp:cape-universal: Allocated GPIO id=63
[    1.422462] gpio-of-helper ocp:cape-universal: Allocated GPIO id=64
[    1.422659] gpio-of-helper ocp:cape-universal: Allocated GPIO id=65
[    1.422848] gpio-of-helper ocp:cape-universal: Allocated GPIO id=66
[    1.423040] gpio-of-helper ocp:cape-universal: Allocated GPIO id=67
[    1.423226] gpio-of-helper ocp:cape-universal: Allocated GPIO id=68
[    1.423239] gpio-of-helper ocp:cape-universal: ready
END

Iā€™m using two different devices to compare the two system

Thanks! Iā€™m now digging for that image on my NAS.

What are you allowed to change? Does the image have network access, can you run apt update/upgrade? git pull etc? Or is the image locked as is from the 2018-03-05 build date? so you can only enable/disable scripts?

Before i take a look at this fully, i just want to know your rulesā€¦

Edit, found my archiveā€¦ which version of stretch was this?

2018-03-05$ ls
buster-iot  stretch-console  stretch-iot  stretch-lxqt  stretch-lxqt-2gb  stretch-lxqt-xm  stretch-machinekit  stretch-oemflasher

Regards,

Okay, had to tweak things a little bitā€¦

sudo apt update

sudo apt install linux-image-4.4.113-ti-xenomai-r149

sudo apt install --only-upgrade nodejs
sudo apt install --only-upgrade bb-cape-overlays

###TO MATCH YOUR OLD VERSION>>>>
git clone https://github.com/beagleboard/bb.org-overlays ; 
cd ./bb.org-overlays/ ;
git checkout 7e8a169d1985f77451ee54233d95e870ad9b011a -b tmp ;
make ;
sudo make install

But it matchesā€¦ Or close enoughā€¦

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh 
[sudo] password for debian: 
git:/opt/scripts/:[247665d553b6b28fdd47c38e80e910a9208772be]
eeprom:[A335BNLTBBG1BBG217095844]
model:[TI_AM335x_BeagleBone_Green]
dogtag:[BeagleBoard.org Debian Image 2018-03-05]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.01-00002-ge9ff418fb8]:[location: dd MBR]
kernel:[4.4.113-ti-xenomai-r149]
nodejs:[v6.17.0]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_emmc=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-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-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[roboticscape]:[0.3.4-git20170602-0rcnee4~stretch+20171108]:[GOT_REPLACED_BY_NEXT]
WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
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/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[    1.406915] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    1.409039] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
[    1.409294] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
[    1.409512] gpio-of-helper ocp:cape-universal: Allocated GPIO id=2
[    1.409709] gpio-of-helper ocp:cape-universal: Allocated GPIO id=3
[    1.409906] gpio-of-helper ocp:cape-universal: Allocated GPIO id=4
[    1.410113] gpio-of-helper ocp:cape-universal: Allocated GPIO id=5
[    1.410306] gpio-of-helper ocp:cape-universal: Allocated GPIO id=6
[    1.410508] gpio-of-helper ocp:cape-universal: Allocated GPIO id=7
[    1.410701] gpio-of-helper ocp:cape-universal: Allocated GPIO id=8
[    1.410896] gpio-of-helper ocp:cape-universal: Allocated GPIO id=9
[    1.411099] gpio-of-helper ocp:cape-universal: Allocated GPIO id=10
[    1.411293] gpio-of-helper ocp:cape-universal: Allocated GPIO id=11
[    1.411543] gpio-of-helper ocp:cape-universal: Allocated GPIO id=12
[    1.411748] gpio-of-helper ocp:cape-universal: Allocated GPIO id=13
[    1.411931] gpio-of-helper ocp:cape-universal: Allocated GPIO id=14
[    1.412520] gpio-of-helper ocp:cape-universal: Allocated GPIO id=15
[    1.412725] gpio-of-helper ocp:cape-universal: Allocated GPIO id=16
[    1.412919] gpio-of-helper ocp:cape-universal: Allocated GPIO id=17
[    1.413109] gpio-of-helper ocp:cape-universal: Allocated GPIO id=18
[    1.413292] gpio-of-helper ocp:cape-universal: Allocated GPIO id=19
[    1.413479] gpio-of-helper ocp:cape-universal: Allocated GPIO id=20
[    1.413670] gpio-of-helper ocp:cape-universal: Allocated GPIO id=21
[    1.413852] gpio-of-helper ocp:cape-universal: Allocated GPIO id=22
[    1.414095] gpio-of-helper ocp:cape-universal: Allocated GPIO id=23
[    1.414283] gpio-of-helper ocp:cape-universal: Allocated GPIO id=24
[    1.414469] gpio-of-helper ocp:cape-universal: Allocated GPIO id=25
[    1.414662] gpio-of-helper ocp:cape-universal: Allocated GPIO id=26
[    1.414855] gpio-of-helper ocp:cape-universal: Allocated GPIO id=27
[    1.415045] gpio-of-helper ocp:cape-universal: Allocated GPIO id=28
[    1.415236] gpio-of-helper ocp:cape-universal: Allocated GPIO id=29
[    1.415422] gpio-of-helper ocp:cape-universal: Allocated GPIO id=30
[    1.415613] gpio-of-helper ocp:cape-universal: Allocated GPIO id=31
[    1.415798] gpio-of-helper ocp:cape-universal: Allocated GPIO id=32
[    1.416171] gpio-of-helper ocp:cape-universal: Allocated GPIO id=33
[    1.416397] gpio-of-helper ocp:cape-universal: Allocated GPIO id=34
[    1.416588] gpio-of-helper ocp:cape-universal: Allocated GPIO id=35
[    1.416784] gpio-of-helper ocp:cape-universal: Allocated GPIO id=36
[    1.416980] gpio-of-helper ocp:cape-universal: Allocated GPIO id=37
[    1.417176] gpio-of-helper ocp:cape-universal: Allocated GPIO id=38
[    1.417364] gpio-of-helper ocp:cape-universal: Allocated GPIO id=39
[    1.417560] gpio-of-helper ocp:cape-universal: Allocated GPIO id=40
[    1.417748] gpio-of-helper ocp:cape-universal: Allocated GPIO id=41
[    1.417944] gpio-of-helper ocp:cape-universal: Allocated GPIO id=42
[    1.418138] gpio-of-helper ocp:cape-universal: Allocated GPIO id=43
[    1.418336] gpio-of-helper ocp:cape-universal: Allocated GPIO id=44
[    1.418557] gpio-of-helper ocp:cape-universal: Allocated GPIO id=45
[    1.418750] gpio-of-helper ocp:cape-universal: Allocated GPIO id=46
[    1.418941] gpio-of-helper ocp:cape-universal: Allocated GPIO id=47
[    1.419140] gpio-of-helper ocp:cape-universal: Allocated GPIO id=48
[    1.419340] gpio-of-helper ocp:cape-universal: Allocated GPIO id=49
[    1.419540] gpio-of-helper ocp:cape-universal: Allocated GPIO id=50
[    1.419734] gpio-of-helper ocp:cape-universal: Allocated GPIO id=51
[    1.419931] gpio-of-helper ocp:cape-universal: Allocated GPIO id=52
[    1.420237] gpio-of-helper ocp:cape-universal: Allocated GPIO id=53
[    1.420438] gpio-of-helper ocp:cape-universal: Allocated GPIO id=54
[    1.420631] gpio-of-helper ocp:cape-universal: Allocated GPIO id=55
[    1.420835] gpio-of-helper ocp:cape-universal: Allocated GPIO id=56
[    1.421030] gpio-of-helper ocp:cape-universal: Allocated GPIO id=57
[    1.421232] gpio-of-helper ocp:cape-universal: Allocated GPIO id=58
[    1.421436] gpio-of-helper ocp:cape-universal: Allocated GPIO id=59
[    1.421635] gpio-of-helper ocp:cape-universal: Allocated GPIO id=60
[    1.421837] gpio-of-helper ocp:cape-universal: Allocated GPIO id=61
[    1.422032] gpio-of-helper ocp:cape-universal: Allocated GPIO id=62
[    1.422227] gpio-of-helper ocp:cape-universal: Allocated GPIO id=63
[    1.422432] gpio-of-helper ocp:cape-universal: Allocated GPIO id=64
[    1.422629] gpio-of-helper ocp:cape-universal: Allocated GPIO id=65
[    1.422824] gpio-of-helper ocp:cape-universal: Allocated GPIO id=66
[    1.423009] gpio-of-helper ocp:cape-universal: Allocated GPIO id=67
[    1.423196] gpio-of-helper ocp:cape-universal: Allocated GPIO id=68
[    1.423210] gpio-of-helper ocp:cape-universal: ready
END
debian@beaglebone:~$ sudo systemd-analyze blame
         53.496s generic-board-startup.service
         42.391s dev-mmcblk0p1.device
          4.343s apache2.service
          4.232s systemd-udev-trigger.service
          3.910s loadcpufreq.service
          2.700s networking.service
          2.578s ssh.service
          2.563s udhcpd.service
          2.315s rsyslog.service
          2.262s pppd-dns.service
          1.765s systemd-journald.service
          1.668s bb-wl18xx-wlan0.service
          1.530s systemd-logind.service
          1.519s connman.service
          1.389s dnsmasq.service
          1.265s avahi-daemon.service
           968ms cpufrequtils.service
           800ms systemd-timesyncd.service
           752ms systemd-random-seed.service
           722ms wpa_supplicant.service
           673ms systemd-sysctl.service
           625ms kmod-static-nodes.service
           617ms systemd-udevd.service
debian@beaglebone:~$ sudo systemd-analyze
Startup finished in 30.338s (kernel) + 1min 242ms (userspace) = 1min 30.580s

First letā€™s update the ancient /opt/scripts/

cd /opt/scripts/ ; git pull

Update the bb-wl18xx-firmware, package to help cleanup /opt/scripts/

sudo apt install --only-upgrade bb-wl18xx-firmware
sudo reboot
debian@beaglebone:~$ sudo systemd-analyze blame --no-pager ; sudo systemd-analyze
         52.063s generic-board-startup.service
         42.700s dev-mmcblk0p1.device
          4.235s systemd-udev-trigger.service
          4.166s apache2.service
          3.617s loadcpufreq.service
          3.114s systemd-logind.service
          2.742s networking.service
          2.352s ssh.service
          2.012s rsyslog.service
          1.904s systemd-journald.service
          1.660s connman.service
          1.558s avahi-daemon.service
          1.368s dnsmasq.service
          1.268s udhcpd.service
           930ms cpufrequtils.service
           827ms systemd-timesyncd.service
           761ms systemd-modules-load.service
           714ms hostapd.service
           673ms wpa_supplicant.service
           660ms systemd-tmpfiles-setup-dev.service
           615ms dev-mqueue.mount
           587ms systemd-update-utmp.service
           567ms pppd-dns.service
           564ms systemd-udevd.service
           553ms sys-kernel-debug.mount
           548ms systemd-random-seed.service
           459ms systemd-user-sessions.service
           443ms systemd-remount-fs.service
           438ms user@1000.service
           373ms kmod-static-nodes.service
           372ms sys-fs-fuse-connections.mount
           364ms systemd-sysctl.service
           329ms systemd-tmpfiles-setup.service
           285ms sys-kernel-config.mount
           280ms systemd-journal-flush.service
           190ms systemd-update-utmp-runlevel.service
Startup finished in 30.187s (kernel) + 58.729s (userspace) = 1min 28.916s

bb-wl18xx-wlan0ā€™s now goneā€¦

debian@beaglebone:~$ journalctl | grep am335
Sep 30 23:36:50 beaglebone kernel:  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
Sep 30 23:36:54 beaglebone sh[1245]: generic-board-startup: [startup script=/opt/scripts/boot/am335x_evm.sh]
Sep 30 23:36:55 beaglebone sh[1245]: am335x_evm: usb_image_file=[/var/cache/doc-beaglebone-getting-started/beaglebone-getting-started-2017-05-25.img]
Sep 30 23:36:55 beaglebone sh[1245]: am335x_evm: cpsw: ethernet@4a100000/slave@4a100200/mac-address
Sep 30 23:36:56 beaglebone sh[1245]: am335x_evm: cpsw: C8:FD:19:E8:73:C5
Sep 30 23:36:56 beaglebone sh[1245]: am335x_evm: cpsw: [C8:FD:19:E8:73:C5] [C8:FD:19:E8:73] [C5]
Sep 30 23:36:59 beaglebone sh[1245]: am335x_evm: use_libcomposite
Sep 30 23:36:59 beaglebone sh[1245]: am335x_evm: Looking for libcomposite
Sep 30 23:36:59 beaglebone sh[1245]: am335x_evm: modprobe libcomposite
Sep 30 23:37:00 beaglebone sh[1245]: am335x_evm: Creating g_multi
Sep 30 23:37:00 beaglebone sh[1245]: am335x_evm: enable USB mass_storage /var/local/bb_usb_mass_storage.img
Sep 30 23:37:01 beaglebone sh[1245]: am335x_evm: g_multi Created
Sep 30 23:37:01 beaglebone sh[1245]: am335x_evm: Starting usb0 network
Sep 30 23:37:03 beaglebone sh[1245]: am335x_evm: Starting usb1 network
Sep 30 23:37:04 beaglebone sh[1245]: am335x_evm: dnsmasq: setting up for usb0/usb1

preload libcomposite and remove extra roboticscap modulesā€¦

sudo rm /etc/modules-load.d/roboticscape_modules.conf 
sudo sh -c "echo 'libcomposite' >> /etc/modules-load.d/gadget"

Update bb-customizations

sudo apt install --only-upgrade bb-customizations
debian@beaglebone:~$ sudo systemd-analyze blame --no-pager ; sudo systemd-analyze
[sudo] password for debian: 
         25.820s generic-board-startup.service
         24.424s dev-mmcblk0p1.device
          4.258s systemd-udev-trigger.service
          4.139s apache2.service
          3.521s loadcpufreq.service
          2.735s networking.service
          2.605s ssh.service
          2.494s systemd-logind.service
          2.201s connman.service
          1.960s avahi-daemon.service
          1.706s systemd-journald.service
          1.475s pppd-dns.service
          1.418s dnsmasq.service
           958ms cpufrequtils.service
           955ms hostapd.service
           946ms udhcpd.service
           856ms rsyslog.service
           840ms systemd-user-sessions.service
           785ms systemd-timesyncd.service
           773ms systemd-udevd.service
           666ms systemd-tmpfiles-setup-dev.service
           666ms systemd-random-seed.service
           644ms wpa_supplicant.service
           617ms user@1000.service
           588ms sys-kernel-debug.mount
           570ms dev-mqueue.mount
           556ms systemd-sysctl.service
           467ms systemd-update-utmp.service
           411ms systemd-modules-load.service
           376ms systemd-journal-flush.service
           362ms sys-fs-fuse-connections.mount
           355ms kmod-static-nodes.service
           345ms systemd-tmpfiles-setup.service
           341ms sys-kernel-config.mount
           341ms systemd-remount-fs.service
           260ms systemd-update-utmp-runlevel.service
Startup finished in 30.366s (kernel) + 35.381s (userspace) = 1min 5.748s

in /boot/uEnv.txt add rng_core to cmdlineā€¦

rng_core.default_quality=100

Hum, so 4.4.x doesnā€™t have the rng wait delayā€¦

debian@beaglebone:~$ sudo systemd-analyze blame --no-pager ; sudo systemd-analyze
[sudo] password for debian: 
         25.561s generic-board-startup.service
         24.940s dev-mmcblk0p1.device
          5.006s loadcpufreq.service
          4.294s apache2.service
          4.140s systemd-udev-trigger.service
          2.709s systemd-logind.service
          2.651s networking.service
          2.547s ssh.service
          2.232s udhcpd.service
          1.536s pppd-dns.service
          1.466s systemd-journald.service
          1.431s dnsmasq.service
          1.371s connman.service
          1.268s avahi-daemon.service
          1.019s cpufrequtils.service
           923ms systemd-user-sessions.service
           914ms dev-mqueue.mount
           866ms hostapd.service
           852ms wpa_supplicant.service
           787ms sys-kernel-debug.mount
           772ms sys-kernel-config.mount
           765ms systemd-sysctl.service
           747ms systemd-timesyncd.service
           700ms systemd-udevd.service
           569ms kmod-static-nodes.service
           561ms user@1000.service
           542ms sys-fs-fuse-connections.mount
           519ms systemd-update-utmp.service
           483ms systemd-remount-fs.service
           479ms systemd-journal-flush.service
           469ms rsyslog.service
           435ms systemd-random-seed.service
           374ms systemd-tmpfiles-setup.service
           374ms systemd-modules-load.service
           313ms systemd-tmpfiles-setup-dev.service
           260ms systemd-update-utmp-runlevel.service
Startup finished in 32.493s (kernel) + 36.094s (userspace) = 1min 8.588s

Finally nuke /boot/initrd.img-*

sudo rm /boot/initrd.img-*
debian@beaglebone:~$ sudo systemd-analyze blame --no-pager ; sudo systemd-analyze
[sudo] password for debian: 
         26.240s generic-board-startup.service
         25.869s dev-mmcblk0p1.device
          4.530s loadcpufreq.service
          4.246s apache2.service
          3.663s systemd-udev-trigger.service
          2.766s networking.service
          2.499s systemd-logind.service
          2.248s ssh.service
          1.928s rsyslog.service
          1.498s systemd-journald.service
          1.312s dnsmasq.service
          1.177s cpufrequtils.service
          1.134s connman.service
          1.024s avahi-daemon.service
           951ms dev-mqueue.mount
           935ms udhcpd.service
           857ms systemd-timesyncd.service
           855ms systemd-modules-load.service
           854ms kmod-static-nodes.service
           790ms hostapd.service
           788ms systemd-udevd.service
           696ms systemd-user-sessions.service
           682ms systemd-remount-fs.service
           642ms user@1000.service
           638ms wpa_supplicant.service
           624ms systemd-fsck-root.service
           613ms systemd-tmpfiles-setup-dev.service
           488ms systemd-update-utmp.service
           474ms sys-kernel-config.mount
           466ms systemd-journal-flush.service
           442ms systemd-random-seed.service
           370ms sys-kernel-debug.mount
           335ms systemd-sysctl.service
           297ms systemd-tmpfiles-setup.service
           273ms pppd-dns.service
           181ms systemd-update-utmp-runlevel.service
           144ms sys-fs-fuse-connections.mount
Startup finished in 3.579s (kernel) + 37.013s (userspace) = 40.593s

xenomai doesnā€™t like cpufreq changesā€¦ since the kenrel defaults to PEFORMANCE:

debian@beaglebone:~$ zcat /proc/config.gz | grep DEFAULT_GOV
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set

Just nuke cpufrequtils

sudo apt remove cpufrequtils --purge

ppps is for modemsā€¦

sudo apt remove ppp --purge

These keep triggeringā€¦

sudo systemctl disable apt-daily.timer 
sudo systemctl disable apt-daily-upgrade.timer 

No wifi on greenā€¦

sudo apt remove hostapd --purge
sudo apt remove wpasupplicant --purge
debian@beaglebone:~$ sudo systemd-analyze blame --no-pager ; sudo systemd-analyze
[sudo] password for debian: 
         19.458s dev-mmcblk0p1.device
         16.310s generic-board-startup.service
          3.684s systemd-udev-trigger.service
          3.171s apache2.service
          2.358s networking.service
          1.742s ssh.service
          1.723s systemd-journald.service
          1.344s systemd-logind.service
          1.257s udhcpd.service
          1.148s dnsmasq.service
          1.015s rsyslog.service
           847ms kmod-static-nodes.service
           789ms systemd-timesyncd.service
           783ms systemd-udevd.service
           722ms connman.service
           687ms systemd-fsck-root.service
           653ms dev-mqueue.mount
           611ms systemd-sysctl.service
           598ms systemd-user-sessions.service
           525ms systemd-journal-flush.service
           500ms systemd-update-utmp.service
           486ms avahi-daemon.service
           454ms systemd-random-seed.service
           445ms user@1000.service
           434ms sys-fs-fuse-connections.mount
           413ms sys-kernel-debug.mount
           363ms sys-kernel-config.mount
           348ms systemd-remount-fs.service
           340ms systemd-modules-load.service
           300ms systemd-tmpfiles-setup-dev.service
           284ms systemd-tmpfiles-setup.service
           179ms systemd-update-utmp-runlevel.service
Startup finished in 3.582s (kernel) + 25.686s (userspace) = 29.268s

Ugh, bonescript is runningā€¦

sudo systemctl disable bonescript-autorun.service
sudo systemctl disable bonescript.socket

Make sure these donā€™t startā€¦

sudo systemctl disable cloud9.socket
sudo systemctl disable node-red.socket
sudo systemctl disable apache2.service

Disable at

sudo apt remove at --purge
debian@beaglebone:~$ sudo systemd-analyze blame --no-pager ; sudo systemd-analyze
[sudo] password for debian: 
         18.670s dev-mmcblk0p1.device
         15.865s generic-board-startup.service
          3.719s systemd-udev-trigger.service
          2.363s networking.service
          1.524s ssh.service
          1.330s systemd-journald.service
          1.123s connman.service
          1.083s dnsmasq.service
          1.075s udhcpd.service
           967ms sys-kernel-debug.mount
           877ms systemd-timesyncd.service
           852ms systemd-logind.service
           835ms systemd-hostnamed.service
           798ms systemd-udevd.service
           765ms kmod-static-nodes.service
           704ms systemd-sysctl.service
           703ms rsyslog.service
           630ms avahi-daemon.service
           568ms systemd-fsck-root.service
           535ms sys-kernel-config.mount
           521ms dev-mqueue.mount
           499ms systemd-update-utmp.service
           498ms systemd-journal-flush.service
           374ms systemd-random-seed.service
           373ms systemd-modules-load.service
           363ms systemd-remount-fs.service
           357ms sys-fs-fuse-connections.mount
           320ms systemd-tmpfiles-setup-dev.service
           313ms user@1000.service
           292ms systemd-user-sessions.service
           284ms systemd-tmpfiles-setup.service
           197ms systemd-update-utmp-runlevel.service
Startup finished in 3.581s (kernel) + 24.661s (userspace) = 28.243s

Finally, if you donā€™t need the usb gadget drivers (usb0, usb1, usb flash, usb cdcā€¦)

sudo systemctl disable generic-board-startup.service
sudo rm /etc/systemd/system/getty.target.wants/serial-getty@ttyGS0.service
sudo apt remove udhcpd --purge
debian@beaglebone:~$ sudo systemd-analyze blame --no-pager ; sudo systemd-analyze
         15.589s dev-mmcblk0p1.device
          3.806s systemd-udev-trigger.service
          2.374s networking.service
          1.305s ssh.service
          1.258s systemd-journald.service
           922ms rsyslog.service
           906ms systemd-timesyncd.service
           782ms dev-mqueue.mount
           771ms systemd-sysctl.service
           757ms systemd-udevd.service
           734ms sys-kernel-debug.mount
           638ms systemd-fsck-root.service
           594ms avahi-daemon.service
           592ms kmod-static-nodes.service
           559ms connman.service
           492ms sys-fs-fuse-connections.mount
           484ms systemd-journal-flush.service
           473ms systemd-update-utmp.service
           449ms systemd-random-seed.service
           437ms sys-kernel-config.mount
           392ms systemd-tmpfiles-setup-dev.service
           361ms user@1000.service
           356ms systemd-logind.service
           307ms systemd-modules-load.service
           299ms systemd-remount-fs.service
           245ms systemd-user-sessions.service
           239ms systemd-tmpfiles-setup.service
           226ms systemd-update-utmp-runlevel.service
Startup finished in 3.582s (kernel) + 12.374s (userspace) = 15.956s
2 Likes

Goodmorning Robert,
I donā€™t know how I can thank you!
This is exactly what I needed, now booting takes about 30 seconds.
I havenā€™t disabled ā€œgeneric-startup.serviceā€ as I could need a USB port, but the timing I got is perfect.
Networking.service still takes over 10 seconds, but overall itā€™s ok.

systemd-analyze blame --no-pager ; systemd-analyze
         15.598s dev-mmcblk0p1.device
         15.473s networking.service
          6.211s generic-board-startup.service
          3.017s udhcpd.service
          2.846s systemd-udev-trigger.service
          2.602s systemd-logind.service
          1.872s roboticscape.service
          1.834s ssh.service
          1.211s connman.service
          1.187s systemd-journald.service
          1.145s systemd-fsck-root.service
          1.000s avahi-daemon.service
           975ms dnsmasq.service
           751ms systemd-udevd.service
           610ms sys-kernel-debug.mount
           598ms dev-mqueue.mount
           593ms rsyslog.service
           585ms systemd-tmpfiles-setup-dev.service
           534ms systemd-journal-flush.service
           531ms systemd-update-utmp.service
           504ms vsftpd.service
           493ms systemd-user-sessions.service
           471ms systemd-modules-load.service
           403ms sys-kernel-config.mount
           400ms systemd-update-utmp-runlevel.service
           394ms tempest.service
           386ms systemd-random-seed.service
           339ms sys-fs-fuse-connections.mount
           322ms kmod-static-nodes.service
           294ms systemd-tmpfiles-setup.service
           286ms systemd-sysctl.service
           201ms systemd-remount-fs.service
Startup finished in 1.984s (kernel) + 25.770s (userspace) = 27.754s

Now, I only have the last little problem.
I show you the result of ā€˜version.shā€™:

root@tempest:/lib/firmware# /opt/scripts/tools/version.sh
git:/opt/scripts/:[9c0602cc5de15e35bcbff32e80511c72b03e7a16]
eeprom:[A335BNLTBBG1BBG121036695]
model:[TI_AM335x_BeagleBone_Green]
dogtag:[BeagleBoard.org Debian Image 2018-03-05]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot SPL 2019.04-g923f8b8 (Jan 02 2022 - 19:05:15 +0000)]:[location: dd MBR]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-g923f8b8]:[location: dd MBR]
UBOOT: Loaded Overlay:[AM335X-PRU-UIO-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[M-BB-BBG-00A0]
kernel:[4.4.113-ti-xenomai-r149]
nodejs:[v6.17.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_emmc=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-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.20220316.0-0~stretch+20220316]
pkg:[bb-usb-gadgets]:[1.20220316.1-0~stretch+20220316]
pkg:[bb-wl18xx-firmware]:[1.20211222.2-0~stretch+20211222]
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]:[20180825+dfsg-1rcnee1~stretch+20181217]
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 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet]
dmesg | grep remote
[    0.933816]  remoteproc0: wkup_m3 is available
[    0.933838]  remoteproc0: Note: remoteproc is still under development and considered experimental.
[    0.933849]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    1.004400]  remoteproc0: powering up wkup_m3
[    1.004432]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[    1.004697]  remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
dmesg | grep pinctrl-single
[    0.750917] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    0.751908] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
[    0.752108] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
[    0.752122] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END
root@tempest:~# config-pin -q p8.16
P8_16 pinmux file not found!
Pin has no cape: P8_16
root@tempest:~# config-pin -q p8.15
P8_15 pinmux file not found!
Pin has no cape: P8_15
root@tempest:~# config-pin -q p8.20
P8_20 pinmux file not found!
Pin has no cape: P8_20

I am not able to configure the pins anymore.

Older post:

bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.09-00002-gd5b4c4b656]:[location: dd MBR]

Looks like you upgraded the bootloader in the process tooā€¦

The factory default for that image, can be found hereā€¦

/opt/backup/uboot/

sudo dd if=/opt/backup/uboot/MLO of=/dev/mmcblk0 count=2 seek=1 bs=128k
sudo dd if=/opt/backup/uboot/u-boot.img of=/dev/mmcblk0 count=4 seek=1 bs=384k

sudo dd if=/opt/backup/uboot/MLO of=/dev/mmcblk1 count=2 seek=1 bs=128k
sudo dd if=/opt/backup/uboot/u-boot.img of=/dev/mmcblk1 count=4 seek=1 bs=384k

Thatā€™ll restore it to 2018-03-05ā€™s versionā€¦

Next double check your overlays, this should match your older versionā€¦

git clone https://github.com/beagleboard/bb.org-overlays ; 
cd ./bb.org-overlays/ ;
git checkout 7e8a169d1985f77451ee54233d95e870ad9b011a -b tmp ;
make ;
sudo make install

Regards,

1 Like

Thank you Robert,
now it works and it is faster!

I have some questions. Iā€™d like to know more about this system since I have to use beaglebone and debian for this project. At the moment, I have no idea what I did and without your help I would never gotten this result.

  1. So, can you recommand me some manuals to improve my knowledge about this world?

  2. Regarding the procedure I followed, I noticed an important improvement when I updated this bb-wl18xx-firmware package. What is that?

  3. Why when I updated the booloader, I had a problem with the pin configuration? What is the connection between them?

I have a thousand questions, but I canā€™t write them all and you canā€™t answer all of them. So I would like to know where can I start? I am developing a multithreaded application and need to have real time behavior in certain cases so I have chosen to use xenomai. Are there any alternatives?
If I want to not be bound by this version of debian and update the system what do I need to know?

Better detection of which device got bootedā€¦ In the case of the BeagleBone Green, it just disabled it self correctlyā€¦ (To not run.)

Your requirements of 2018-03-05 and 4.4.113-ti-xenomai-r149, shipped with something that worked, but turned out to be over complicated and we figured out a better solution around 4.14.x time-frameā€¦

Your 4.4.x does this on bootup, when set for 2018-03-05

loading /boot/vmlinuz-4.4.113-ti-xenomai-r149 ...
9448312 bytes read in 642 ms (14 MiB/s)
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot.dtb ...
loading /boot/dtbs/4.4.113-ti-xenomai-r149/am335x-boneblack-uboot.dtb ...
59066 bytes read in 73 ms (790 KiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/M-BB-BBG-00A0.dtbo ...
423 bytes read in 1028 ms (0 Bytes/s)
uboot_overlays: uboot loading of [/lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo] disabled by /boot/uEnv.txt [disable_uboot_overlay_emmc=1]...
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
867 bytes read in 1174 ms (0 Bytes/s)
uboot_overlays: loading /lib/firmware/AM335X-PRU-UIO-00A0.dtbo ...
1035 bytes read in 122 ms (7.8 KiB/s)
uboot_overlays: loading /lib/firmware/univ-bbb-xxx-00A0.dtbo ...
118984 bytes read in 1004 ms (115.2 KiB/s)

Which takes am335x-boneblack-uboot.dtb and addā€™s univ-bbb-xxx-00A0.dtbo on top of it to create the cape-universal pins. But it only works if you donā€™t load any other overlays.

Today, ā€˜cape-universalā€™ is built into the base *.dtb and every overlay disables pins it usesā€¦

So, since your on 4.4.x and using univ-bbb-xxx-00A0.dtbo, donā€™t update u-boot or bb.org-overlays beyond what it shipped withā€¦

Newer versions of u-boot assume 4.14.x and the whole univ-bbb-xxx-00A0.dtbo was ripped out as it was a complex if/else messā€¦

Regards,

Xenomai has a fun abi, since your on 4.4.113-ti-xenomai, anything you build for 4.4.113-ti-xenomai is stuck on thereā€¦ Xenomai broke things on 4.9.x and then on 4.14.xā€¦ to the point i donā€™t bother to build it anymoreā€¦ Unless your a full time Xenomai developer, itā€™s a pain in the rearā€¦

Just use normal RTā€¦

First, what are your actual requirements in the systemā€¦ Xenomai, RT or ā€˜normalā€™ā€¦ Then what are you actually using??? (usart/can/etcā€¦)ā€¦

Our two supported branches are 4.19.x-ti based Buster, and 5.10.x-ti based Bullseyeā€¦ Buster is pretty frozenā€¦ Where-as Bullseye will see a major upgrade, 5.10.x-ti ā†’ 6.0/6.1 in itā€™s lifetime for us over this next year.

Monthy snapshots of both of these are located hereā€¦

https://forum.beagleboard.org/tag/latest-images

Regards,

2 Likes

Thanks for your answer Robert.

I need to develop a controller. The BBG is integrated into a larger electronic board and I use it to manage the system.
I am currently using Analogic Input, GPIO, Uart and I2C bus.
Up to now I have no particular requirements, it is a normal system, but I need to have a behavior in real time when I exchange data with PRU: with the Arm I fill a buffer, and the PRUs empty it, with a fixed frequency,. During this operation, the PRUs must never run out of data. To make sure this happens, I am now using Xenomai, because without it there are the problems with timing.

Also, I need to consider the using of SPI channel, and the PRUs eQEP function.