2

I have been having trouble enabling Falcon mode on the BeagleBone Black. I have a working U-Boot (v2019.04) and Linux (Debian 11.5, kernel v5.15.65-bone-rt-r30), but I have been unsuccessful thus far in enabling Falcon mode. There are several errors I have come across. The first is when I attempt to save the environment:

=> saveenv Saving Environment to EXT4... ** Unable to use mmc 0:1 for saveenv ** Failed (1) 

The second is when I try to export the SPL. It correctly reads the uImage header:

=> spl export fdt ${loadaddr} - ${fdtaddr} ## Booting kernel from Legacy Image at 82000000 ... Image Name: Linux kernel Created: 2022-10-26 17:38:41 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 9880064 Bytes = 9.4 MiB Load Address: 80008000 Entry Point: 80008000 

But then it has a checksum error and doesn’t finish the process:

 Verifying Checksum ... Bad Data CRC ERROR: can't get kernel image! XIP Invalid Image ... OK data abort 

This is my full U-Boot console log:

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: Global external warm reset has occurred. Reset Source: Global warm SW reset has occurred. Reset Source: Power-on reset has occurred. RTC 32KCLK Source: External. MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Loading Environment from EXT4... ** Unable to use mmc 0:1 for loading the env ** Board: BeagleBone Black <ethaddr> not set. Validating first E-fuse MAC BeagleBone Black: Model: BeagleBone Black Industrial: 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 2 seconds => => setenv args_mmc 'setenv bootargs console=${console} ${optargs} root=/dev/mmcblk0p1 ro rootfstype=${mmcrootfstype}' => setenv loadfdt 'mmc read ${fdtaddr} 80 180' => setenv loadimage 'mmc read ${loadaddr} 900 2000' => setenv bootcmd 'run args_mmc; run loadfdt; run loadimage; bootm ${loadaddr} - ${fdtaddr}' => saveenv Saving Environment to EXT4... ** Unable to use mmc 0:1 for saveenv ** Failed (1) => run args_mmc => run loadimage MMC read: dev # 0, block # 2304, count 8192 ... 8192 blocks read: OK => run loadfdt MMC read: dev # 0, block # 128, count 384 ... 384 blocks read: OK => spl export fdt ${loadaddr} - ${fdtaddr} ## Booting kernel from Legacy Image at 82000000 ... Image Name: Linux kernel Created: 2022-10-26 17:38:41 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 9880064 Bytes = 9.4 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... Bad Data CRC ERROR: can't get kernel image! XIP Invalid Image ... OK data abort pc : [<9ff91558>] lr : [<9ff6d2fd>] reloc pc : [<80838558>] lr : [<808142fd>] sp : 9df38b88 ip : 00000000 fp : 00000006 r10: 00000003 r9 : 9df38eb8 r8 : 9df38c6c r7 : 00000000 r6 : 9ffc0238 r5 : 00000000 r4 : 00000000 r3 : 00000020 r2 : 00000000 r1 : 00000000 r0 : 00000000 Flags: Nzcv IRQs off FIQs on Mode SVC_32 Code: f7fe2000 2800fc91 e7f4d0ed 9ff9f6a8 (4a106803) Resetting CPU ... resetting ... 

I am following the tutorial https://embetrix.com/2017/05/07/fast-boot-linux-with-u-boot-falcon-mode/ (except that I am compiling everything on an Ubuntu server and writing the SD card directly from the BeagleBone Black in Debian, so I skip the section with the five “part” commands in Yocto–hopefully that’s not a problem), so it’s possible there is an error in the tutorial or in my environment in some way. Perhaps there is a timeout issue when reading the kernel, or my device tree file is wrong? I created the uImage from a working zImage, and the uImage header is being read appropriately, so I’m not sure what the issue is. Any help would be greatly appreciated.

EDIT: At the suggestion below I changed the config to no longer use the EXT4 filesystem. My environment variables now save, which is great! Unfortunately the kernel checksum problem still persists. My current U-Boot log is below:

U-Boot SPL 2022.04 (Nov 03 2022 - 11:40:28 -0400) Trying to boot from MMC2 U-Boot 2022.04 (Nov 03 2022 - 11:40:28 -0400) CPU : AM335X-GP rev 2.1 Model: TI AM335x BeagleBone Black DRAM: 512 MiB Reset Source: Power-on reset has occurred. RTC 32KCLK Source: External. Core: 150 devices, 14 uclasses, devicetree: separate WDT: Started wdt@44e35000 with servicing (60s timeout) MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Loading Environment from MMC... *** Warning - bad CRC, using default environment Board: BeagleBone Black <ethaddr> not set. Validating first E-fuse MAC BeagleBone Black: Model: BeagleBone Black Industrial: 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: Could not get PHY for ethernet@4a100000: addr 0 eth2: ethernet@4a100000, eth3: usb_ether Press SPACE to abort autoboot in 0 seconds => setenv args_mmc 'setenv bootargs console=${console} ${optargs} root=/dev/mmcblk0p1 ro rootfstype=${mmcrootfstype}' => setenv loadfdt 'mmc read ${fdtaddr} 80 180' => setenv loadimage 'mmc read ${loadaddr} 900 2000' => setenv bootcmd 'run args_mmc; run loadfdt; run loadimage; bootm ${loadaddr} - ${fdtaddr}' => saveenv Saving Environment to MMC... Writing to redundant MMC(0)... OK => run args_mmc => run loadimage MMC read: dev # 0, block # 2304, count 8192 ... 8192 blocks read: OK => run loadfdt MMC read: dev # 0, block # 128, count 384 ... 384 blocks read: OK => spl export fdt ${loadaddr} - ${fdtaddr} ## Booting kernel from Legacy Image at 82000000 ... Image Name: Linux kernel Created: 2022-10-26 17:38:41 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 9880064 Bytes = 9.4 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... Bad Data CRC ERROR: can't get kernel image! XIP Invalid Image data abort pc : [<9ffa9fe8>] lr : [<9ff6bfa9>] reloc pc : [<80843fe8>] lr : [<80805fa9>] sp : 9df30e08 ip : 00000000 fp : 00000020 r10: 00000003 r9 : 9df45eb0 r8 : 9df30f04 r7 : 00000000 r6 : 9ffe3b1c r5 : 00000000 r4 : 00000000 r3 : edfe0dd0 r2 : 00000003 r1 : 00000000 r0 : 00000000 Flags: nzCv IRQs off FIQs on Mode SVC_32 (T) Code: bfef 0000 b510 4b24 (6801) 4602 Resetting CPU ... resetting ... 
0

2 Answers 2

2
  1. What is the block size of your SDcard? 512 bytes would obviously be too small. Even if it is 1kByte, the 8192 blocks you load are not enough for your 9.4 MiB kernel image, so a partly loaded image will have a bad CRC. So for 512 bytes block size, you'd need around setenv loadimage 'mmc read ${loadaddr} 900 4C00', for example.
  2. If you fix that, you will run into the next problem with your root=/dev/mmcblk0p1 command line using your partition without file system as root file system.

Maybe you better stick to ext4 if this fits your tutorial. Using a raw partition is faster, but gives room for many additional pitfalls.

2
  • Your first point ended up being my problem as I detail in my answer below. Your second point did not end up being an issue as far as I can tell. Thank you for your help! Commented Nov 4, 2022 at 17:24
  • So I found that what I thought was the kernel booting from SPL was actually just the normal U-Boot process. I'm not getting the CRC error, but I think the files are just being written back to the SD card. I would like them to be written to eMMC. Do you have any thoughts? Also, I received the warning WARN: FDT size > CMD_SPL_WRITE_SIZE. Commented Nov 4, 2022 at 20:40
2

So it turns out I had an error in this one U-Boot command, which reads 4.19MB:

setenv loadimage 'mmc read ${loadaddr} 900 2000' 

Because my image is 9.65MB (and therefore much bigger than the one used in the tutorial), it should've been:

setenv loadimage 'mmc read ${loadaddr} 900 8000' 

which reads 16.8MB, plenty of space for the kernel. Falcon mode is now functional. Thanks for your help!

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.