[beagleboard] Re: SYSBOOT set to MMC1,MMC0 but MMC0 always booted if SD Card present
I ended up patching the u-boot source code used by https://github.com/RobertCNelson/Bootloader-Builder to switch the boot target search order from mmc0, legacy_mmc0, mmc1, legacy_mmc1 to mmc1, legacy_mmc1, mmc0, legacy_mmc0. Then I wrote the MLO and SPL images to the image so they get used during install. Hope that helps. On Tuesday, December 29, 2020 at 6:18:53 AM UTC-8 zh.d...@gmail.com wrote: > Have you solved the problem? I had a similar problem when BBAI inserted > the SD card and was unable to start the system from eMMC. > > 在2020年10月13日星期二 UTC+8 上午6:40:08 写道: > >> I've got a custom board with SYSBOOT boot order set to always prefer the >> onboard eMMC (MMC1) over the SD card (MMC0), but after initial flash of the >> eMMC it always boots from the SD card if it is present. >> >> I'm speculating that SPL is loaded from MMC1 as I expect but then it is >> using MMC0 as the root device and booting from there. If that is the case, >> what changes are necessary to u-boot and or uEnv.txt to always boot from >> eMMC / MMC1 unless the button to boot from SD is held? >> >> Here is output from /dev/ttyO0 during both scenarios: >> >> *eMMC only, no SD card present* >> >> U-Boot SPL 2019.04-2-gc9b3922522 (Aug 24 2020 - 16:42:18 -0500) >> Trying to boot from MMC2 >> Loading Environment from EXT4... Card did not respond to voltage select! >> >> >> >> >> U-Boot 2019.04-2-gc9b3922522 (Aug 24 2020 - 16:42:18 -0500), Build: >> jenkins-github_Bootloader-Builder-144 >> >> CPU : AM335X-GP rev 2.1 >> I2C: ready >> DRAM: 512 MiB >> No match for driver 'omap_hsmmc' >> No match for driver 'omap_hsmmc' >> Some drivers were not found >> Reset Source: Power-on reset has occurred. >> RTC 32KCLK Source: External. >> MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 >> Loading Environment from EXT4... Card did not respond to voltage select! >> Board: BeagleBone Black >> not set. Validating first E-fuse MAC >> BeagleBone Black: >> BeagleBone Cape EEPROM: no EEPROM at address: 0x54 >> BeagleBone Cape EEPROM: no EEPROM at address: 0x55 >> BeagleBone Cape EEPROM: no EEPROM at address: 0x56 >> BeagleBone Cape EEPROM: no EEPROM at address: 0x57 >> Net: eth0: MII MODE >> cpsw, usb_ether >> Press SPACE to abort autoboot in 0 seconds >> board_name=[A335BNLT] ... >> board_rev=[] ... >> Card did not respond to voltage select! >> Card did not respond to voltage select! >> Card did not respond to voltage select! >> gpio: pin 56 (gpio 56) value is 0 >> gpio: pin 55 (gpio 55) value is 0 >> gpio: pin 54 (gpio 54) value is 0 >> gpio: pin 53 (gpio 53) value is 1 >> Card did not respond to voltage select! >> Card did not respond to voltage select! >> switch to partitions #0, OK >> mmc1(part 0) is current device >> Scanning mmc 1:1... >> gpio: pin 56 (gpio 56) value is 0 >> gpio: pin 55 (gpio 55) value is 0 >> gpio: pin 54 (gpio 54) value is 0 >> gpio: pin 53 (gpio 53) value is 1 >> switch to partitions #0, OK >> mmc1(part 0) is current device >> gpio: pin 54 (gpio 54) value is 1 >> Checking for: /uEnv.txt ... >> Checking for: /boot.scr ... >> Checking for: /boot/boot.scr ... >> Checking for: /boot/uEnv.txt ... >> gpio: pin 55 (gpio 55) value is 1 >> 1054 bytes read in 45 ms (22.5 KiB/s) >> Loaded environment from /boot/uEnv.txt >> debug: [dtb=x.dtb] ... >> Using: dtb=.dtb ... >> Checking if uname_r is set in /boot/uEnv.txt... >> gpio: pin 56 (gpio 56) value is 1 >> Running uname_boot ... >> loading /boot/vmlinuz-4.19.94-ti-r43 ... >> 10097528 bytes read in 706 ms (13.6 MiB/s) >> debug: [enable_uboot_overlays=1] ... >> debug: [enable_uboot_cape_universal=1] ... >> debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ... >> uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ... >> uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ... >> loading /boot/dtbs/4.19.94-ti-r43/am335x-boneblack-uboot-univ.dtb ... >> 60334 bytes read in 59 ms (998 KiB/s) >> uboot_overlays: [fdt_buffer=0x6] ... >> uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ... >> 867 bytes read in 318 ms (2 KiB/s) >> uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ... >> 1584 bytes read in 68 ms (22.5 KiB/s) >> uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ... >> 4915 bytes read in 191 ms (24.4 KiB/s) >> loading /boot/initrd.img-4.19.94-ti-r43 ... >> 3342230 bytes read in 242 ms (13.2 MiB/s) >> debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 >> root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M >> net.ifnames=0 quiet] ... >> debug: [bootz 0x8200 0x8808:32ff96 8800] ... >> ## Flattened Device Tree blob at 8800 >>Booting using the fdt blob at 0x8800 >>Loading Ramdisk to 8fcd, end 8f96 ... OK >>Loading Device Tree to 8fc5d000, end 8fcc ... OK >> >> *SD card present* >> >> U-Boot SPL 2019.04-2-gc9b3922522 (Aug 24 2020 - 16:42:18 -0500) >> Trying to boot from MMC2 >> Loading Environment from EXT4... **
[beagleboard] SYSBOOT set to MMC1,MMC0 but MMC0 always booted if SD Card present
I've got a custom board with SYSBOOT boot order set to always prefer the onboard eMMC (MMC1) over the SD card (MMC0), but after initial flash of the eMMC it always boots from the SD card if it is present. I'm speculating that SPL is loaded from MMC1 as I expect but then it is using MMC0 as the root device and booting from there. If that is the case, what changes are necessary to u-boot and or uEnv.txt to always boot from eMMC / MMC1 unless the button to boot from SD is held? Here is output from /dev/ttyO0 during both scenarios: *eMMC only, no SD card present* U-Boot SPL 2019.04-2-gc9b3922522 (Aug 24 2020 - 16:42:18 -0500) Trying to boot from MMC2 Loading Environment from EXT4... Card did not respond to voltage select! U-Boot 2019.04-2-gc9b3922522 (Aug 24 2020 - 16:42:18 -0500), Build: jenkins-github_Bootloader-Builder-144 CPU : AM335X-GP rev 2.1 I2C: ready DRAM: 512 MiB No match for driver 'omap_hsmmc' No match for driver 'omap_hsmmc' Some drivers were not found Reset Source: Power-on reset has occurred. RTC 32KCLK Source: External. MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Loading Environment from EXT4... Card did not respond to voltage select! Board: BeagleBone Black not set. Validating first E-fuse MAC BeagleBone Black: BeagleBone Cape EEPROM: no EEPROM at address: 0x54 BeagleBone Cape EEPROM: no EEPROM at address: 0x55 BeagleBone Cape EEPROM: no EEPROM at address: 0x56 BeagleBone Cape EEPROM: no EEPROM at address: 0x57 Net: eth0: MII MODE cpsw, usb_ether Press SPACE to abort autoboot in 0 seconds board_name=[A335BNLT] ... board_rev=[] ... Card did not respond to voltage select! Card did not respond to voltage select! Card did not respond to voltage select! gpio: pin 56 (gpio 56) value is 0 gpio: pin 55 (gpio 55) value is 0 gpio: pin 54 (gpio 54) value is 0 gpio: pin 53 (gpio 53) value is 1 Card did not respond to voltage select! Card did not respond to voltage select! switch to partitions #0, OK mmc1(part 0) is current device Scanning mmc 1:1... gpio: pin 56 (gpio 56) value is 0 gpio: pin 55 (gpio 55) value is 0 gpio: pin 54 (gpio 54) value is 0 gpio: pin 53 (gpio 53) value is 1 switch to partitions #0, OK mmc1(part 0) is current device gpio: pin 54 (gpio 54) value is 1 Checking for: /uEnv.txt ... Checking for: /boot.scr ... Checking for: /boot/boot.scr ... Checking for: /boot/uEnv.txt ... gpio: pin 55 (gpio 55) value is 1 1054 bytes read in 45 ms (22.5 KiB/s) Loaded environment from /boot/uEnv.txt debug: [dtb=x.dtb] ... Using: dtb=.dtb ... Checking if uname_r is set in /boot/uEnv.txt... gpio: pin 56 (gpio 56) value is 1 Running uname_boot ... loading /boot/vmlinuz-4.19.94-ti-r43 ... 10097528 bytes read in 706 ms (13.6 MiB/s) debug: [enable_uboot_overlays=1] ... debug: [enable_uboot_cape_universal=1] ... debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ... uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ... uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ... loading /boot/dtbs/4.19.94-ti-r43/am335x-boneblack-uboot-univ.dtb ... 60334 bytes read in 59 ms (998 KiB/s) uboot_overlays: [fdt_buffer=0x6] ... uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ... 867 bytes read in 318 ms (2 KiB/s) uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ... 1584 bytes read in 68 ms (22.5 KiB/s) uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ... 4915 bytes read in 191 ms (24.4 KiB/s) loading /boot/initrd.img-4.19.94-ti-r43 ... 3342230 bytes read in 242 ms (13.2 MiB/s) debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet] ... debug: [bootz 0x8200 0x8808:32ff96 8800] ... ## Flattened Device Tree blob at 8800 Booting using the fdt blob at 0x8800 Loading Ramdisk to 8fcd, end 8f96 ... OK Loading Device Tree to 8fc5d000, end 8fcc ... OK *SD card present* U-Boot SPL 2019.04-2-gc9b3922522 (Aug 24 2020 - 16:42:18 -0500) Trying to boot from MMC2 Loading Environment from EXT4... ** File not found /boot/uboot.env ** ** Unable to read "/boot/uboot.env" from mmc0:1 ** U-Boot 2019.04-2-gc9b3922522 (Aug 24 2020 - 16:42:18 -0500), Build: jenkins-github_Bootloader-Builder-144 CPU : AM335X-GP rev 2.1 I2C: ready DRAM: 512 MiB No match for driver 'omap_hsmmc' No match for driver 'omap_hsmmc' Some drivers were not found Reset Source: Power-on reset has occurred. RTC 32KCLK Source: External. MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Loading Environment from EXT4... ** File not found /boot/uboot.env ** ** Unable to read "/boot/uboot.env" from mmc0:1 ** Board: BeagleBone Black not set. Validating first E-fuse MAC BeagleBone Black: BeagleBone Cape EEPROM: no EEPROM at address: 0x54 BeagleBone Cape EEPROM: no EEPROM at address: 0x55 BeagleBone Cape EEPROM: no EEPROM at address: 0x56 BeagleBone Cape EEPROM: no EEPROM at address: 0x57 Net: eth0: MII MODE cpsw,