Open mdrodrigo opened 6 months ago
For the record: I ran into the same situation with machine raspberrypi4
on Scarthgap and as described in this issue the board boots fine with image built for raspberrypi4-64
.
I also see this error. Does anybody know if there is a workaround?
To add a little more info:
raspberrypi4-64
uses the Image
format and the booti
command
raspberrypi4
uses the uImage
format and the bootm
command
If you take the uImage and extract it to a zImage you can boot it with bootz. The extracted zImage is identical to the kernel built without u-boot support.
Doing some research the error uncompressed: uncompress error -28
can happen if the kernel is larger than CONFIG_SYS_BOOTM_LEN
, the default is 8M, and the kernel we are trying to boot is 8.2M.
Setting CONFIG_SYS_BOOTM_LEN
to a larger number or making the kernel smaller should fix that issue.
I am new to Yocto so I don't know how to change kernel or u-boot options. But both use kconfig so I would expect that meta-raspberrypi
handles both in the same way.
I just came across this issue, @ashlin4010 thanks for pointing out where the bug is.
To set CONFIG_SYS_BOOTM_LEN
to a higher value, create a bbappend for u-boot
like this:
File structure:
meta-your-layer/
├── recipes-bsp
│ └── u-boot
│ ├── files
│ │ └── memory_size.cfg
│ └── u-boot_%.bbappend
u-boot_%.bbappend:
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " file://memory_size.cfg"
memory_size.cfg:
CONFIG_SYS_BOOTM_LEN=0x1000000
The memory_size.cfg
is picked up by u-boot and merged into the config.
Description:
Issue: Encountering a error during kernel uncompression on the Raspberry Pi 4 when utilizing the Scarthgap Yocto Release and meta-raspberrypi layer on the master branch. This issue manifests specifically with kernel version 6.6 on the raspberrypi4 machine. Upon booting, following the u-boot initialization, the kernel uncompression process triggers an error, causing the board to enter a reboot loop.
Error Log from U-Boot:
Observations: Curiously, this issue does not persist when utilizing the raspberrypi4-64 variant. In this case, the kernel operates without encountering any issues.
Steps to Reproduce:
Utilize the Scarthgap Yocto Release on a Raspberry Pi 4. Ensure the kernel version is 6.6. Observe the boot process, noting the error during kernel uncompression.
Expected Behavior: The kernel should uncompress successfully on the Raspberry Pi 4 using the Scarthgap Yocto Release, allowing the board to boot normally without encountering errors.
Additional Information:
This issue is specific to the raspberrypi4 machine and kernel version 6.6. No similar issues have been observed with the raspberrypi4-64 variant. When using the kernel 6.1 the problem does not occur. Any insights or resolutions would be greatly appreciated.
Thank you for your attention to this matter.