U-Boot Overlays (now with hash based blacklist)

Howdy,

I've implemented a simplistic hash based lookup table for cape's that
collide with the virtual overlays (eMMC/HDMI/Wireless)..

U-Boot SPL 2017.01-00006-g28bba93c67 (Jan 27 2017 - 16:04:51)
Trying to boot from MMC1

U-Boot 2017.01-00006-g28bba93c67 (Jan 27 2017 - 16:04:51 -0600),
Build: jenkins-github_Bootloader-Builder-509

For example with a 4inch lcd plugged:

BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
/lib/firmware/BB-CAPE-DISP-CT4-00A0.dtbo [0x3c766f]
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:

loading /boot/vmlinuz-4.4.43-ti-r84 ...
8651176 bytes read in 593 ms (13.9 MiB/s)
loading /boot/dtbs/4.4.43-ti-r84/am335x-boneblack-overlay.dtb ...
53253 bytes read in 65 ms (799.8 KiB/s)
debug: [fdt_buffer=0x60000] ...
debug: [uboot_overlay_addr1=/lib/firmware/BB-CAPE-DISP-CT4-00A0.dtbo] ...
loading /lib/firmware/BB-CAPE-DISP-CT4-00A0.dtbo ...
4518 bytes read in 270 ms (15.6 KiB/s)
debug: [uboot_emmc=/lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo] ...
loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1105 bytes read in 135 ms (7.8 KiB/s)
loading /boot/initrd.img-4.4.43-ti-r84 ...
5232063 bytes read in 373 ms (13.4 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1
root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M
net.ifnames=0 quiet cape_universal=enable] ...
debug: [bootz 0x82000000 0x88080000:4fd5bf 88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   reserving fdt memory region: addr=88000000 size=6e000
   Loading Ramdisk to 8fb02000, end 8ffff5bf ... OK
   Loading Device Tree to 8fa91000, end 8fb01fff ... OK

Starting kernel ...

With the cape removed, the hdmi loads by default..

loading /boot/vmlinuz-4.4.43-ti-r84 ...
8651176 bytes read in 593 ms (13.9 MiB/s)
loading /boot/dtbs/4.4.43-ti-r84/am335x-boneblack-overlay.dtb ...
53253 bytes read in 65 ms (799.8 KiB/s)
debug: [fdt_buffer=0x60000] ...
debug: [uboot_emmc=/lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo] ...
loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1105 bytes read in 135 ms (7.8 KiB/s)
debug: [uboot_video=/lib/firmware/BB-HDMI-TDA998x-00A0.dtbo] ...
loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ...
4169 bytes read in 224 ms (17.6 KiB/s)
loading /boot/initrd.img-4.4.43-ti-r84 ...
5232063 bytes read in 374 ms (13.3 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1
root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M
net.ifnames=0 quiet cape_universal=enable] ...
debug: [bootz 0x82000000 0x88080000:4fd5bf 88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   reserving fdt memory region: addr=88000000 size=6e000
   Loading Ramdisk to 8fb02000, end 8ffff5bf ... OK
   Loading Device Tree to 8fa91000, end 8fb01fff ... OK

Starting kernel ...

The current "small" whitelist:

switch(cape_overlay_hash) {
    case 0x3c766f: /* /lib/firmware/BB-CAPE-DISP-CT4-00A0.dtbo */
        virtual_video=0;
        break;
    case 0xfc93c8f: /* /lib/firmware/BB-BONE-LCD7-01-00A3.dtbo */
        virtual_video=0;
        break;
    case 0xfe93c1f: /* /lib/firmware/BB-BONE-LCD4-01-00A1.dtbo */
        virtual_video=0;
        break;
    case 0x93b574f: /* /lib/firmware/BB-GREEN-HDMI-00A0.dtbo */
        virtual_video=0;
        break;
}

So please test your capes, and report the u-boot hash and what
interface needs to be disabled: eMMC, HDMI/(HDMI-audio), Wireless
(Black - usart, Green - wl18xx/usart)

as a reminder, you'll need the latest U-Boot

root@beaglebone:/opt/scripts/tools/developers# ./update_bootloader.sh

and remove [ sudo rm /uEnv.txt ]

in /boot/uEnv.txt

dtb=am335x-boneblack-overlay.dtb
enable_uboot_overlays=1

you can also test weither eMMC/HDMI/WIRELESS need to be disabled via
these options:

disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_wireless=1

Regards,