Skip to content

Problem of migrating from kernel overlays to uboot overlay #212

@BrentCC

Description

@BrentCC

Hi,
I have packet sniffing device that consists of BBG and a cape(sniffer)
The device was running with an old image from 2017, and I updated it to the latest image.
However after the update, I couldn't initialize BBG any more. After some debugging, the issue is related to the overlays.
The device was configured with kernel overlays with bone cape manager and slots, but these are removed from the latest kernel.

I tried several methods to re-configure it.
i) Disable the uboot overlay and stick to the old solution.
As instructed in here, I put #enable_uboot_overlays=1 in the boot up file. However, it is automatically written into the file when BBG boots up

debug: [enable_uboot_overlays=] ...
loading /boot/dtbs/4.19.94-ti-r42/am335x-bonegreen-overlay-ni2c2.dtb ...
54543 bytes read in 72 ms (739.3 KiB/s)
uboot_overlays: add [enable_uboot_overlays=1] to /boot/uEnv.txt to enable...

ii) Override U-Boot external capes
As instructed here, I put overrode the uboot overlay with my customized ones.(using dtc to compile dts into dtbo)

uboot_overlay_addr0=/lib/firmware/am335x-bonegreen-overlay-ni2c2.dtbo
uboot_overlay_addr1=/lib/firmware/BB-GIRTC-00A0.dtbo
uboot_overlay_addr2=/lib/firmware/BBHDME8DMAPALL-00A0.dtbo
uboot_overlay_addr3=/lib/firmware/BBHDME8GPIOPALL-00A0.dtbo
uboot_overlay_addr4=/lib/firmware/lastditch-00A0.dtbo
uboot_overlay_addr5=/lib/firmware/RECLAIMI2C2-00A0.dtbo

Afterwards, I couldn't boot up BBG because, I have this error:

libfdt fdt_check_header(): FDT_ERR_BADMAGIC
failed on fdt_overlay_apply(): FDT_ERR_BADMAGIC
base fdt does did not have a /__symbols__ node
make sure you've compiled with -@

I googled this error, and I found someone had encountered similar issue as well.
I tried to follow the suggestion to make my dtbo file, but nothing need to be done. Do you know why it's not working in my case?

debian@beaglebone:~/bb.org-overlays$ make /home/debian/dtree/src/am335x-bonegreen-overlay-ni2c2.dtbo
make: Nothing to be done for '/home/debian/dtree/src/am335x-bonegreen-overlay-ni2c2.dtbo'.

Therefore, the issue still remains. Could you give me some hints about migrating from kernel overlays to uboot overlays?
(By the way, the old DT files also contain slots)

Image: bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img
Hardware: SeeedStudio BeagleBone Green
Capes: Customized cape(packet sniffer)

sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[e4e4854ef8ff9ada5c85553376043ee7679167ca]
eeprom:[A335BNLTBBG1BBG217083985]
model:[TI_AM335x_BeagleBone_Green]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2019.04-00002-gc9b3922522                                                                                                              (Aug 24 2020 - 16:42:18 -0500)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-gc9b3922522]:[l                                                                                                             ocation: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[M-BB-BBG-00A0]
kernel:[4.19.94-ti-r59]
nodejs:[v10.15.2]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-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.20201221.0-0~buster+20201221]
pkg:[bb-customizations]:[1.20200306.0-0rcnee0~buster+20200306]
pkg:[bb-usb-gadgets]:[1.20200322.0-0rcnee0~buster+20200322]
pkg:[bb-wl18xx-firmware]:[1.20200322.0-0rcnee0~buster+20200322]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.4-git20190227.1-0rcnee0~buster+20190327]
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 i2c gpio pwm eqep remoteproc admin spi iio                                                                                                              docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/m                                                                                                             mcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656                                                                                                              rng_core.default_quality=100 quiet]
dmesg | grep remote
[   44.087108] remoteproc remoteproc0: wkup_m3 is available
[   44.186052] remoteproc remoteproc0: powering up wkup_m3
[   44.186080] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf,                                                                                                              size 217168
[   44.186332] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   45.821693] remoteproc remoteproc1: 4a334000.pru is available
[   45.829753] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   45.821693] remoteproc remoteproc1: 4a334000.pru is available
[   45.821861] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed succes                                                                                                             sfully
[   45.829753] remoteproc remoteproc2: 4a338000.pru is available
[   45.829932] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed succes                                                                                                             sfully
dmesg | grep pinctrl-single
[    0.987636] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[    1.001404] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

Thank you so much in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions