arch/arm/boot64: Check fit_decompress() return value When the kernel format is incorrect, decompression functions such as ulz4ln() usually silently return 0 directly due to magic mismatch. Currently the return value of the first fit_decompress() call for scratch buffer isn't checked. Therefore, when the kernel format is wrong, we will see a misleading error message: ERROR: Invalid kernel magic: 0xf1204be8 != 0x644d5241 Add a return value check and print a more accurate error message on decompression failure. Also initialize the scratch to zero, and fix the extra newline in an error log. BUG=none TEST=emerge-rauru depthcharge BRANCH=none Change-Id: Ie89ebaa282a85f94d4b88a09e49ab0f94ba9a4f5 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/depthcharge/+/7544822 Reviewed-by: Yidi Lin <yidilin@google.com> Commit-Queue: Yidi Lin <yidilin@google.com>
Depthcharge is a bootloader for ChromeOS devices. It is responsible for initializing hardware, setting up the boot environment, and loading the operating system.
src/: Contains the source code for the depthcharge bootloader.board/: Contains the board-specific configuration files.src/drivers/: Contains the device drivers.To build depthcharge, you will need a ChromeOS development environment. Within the chroot:
emerge-$BOARD sys-boot/depthcharge Remember to build it before you build `chromeos-bootimage`!