Revert "arch/arm/boot64: Check fit_decompress() return value" This reverts commit d82ea582354c8344f492c1b39f167119ffe79c96. Reason for revert: ToT broken tested on Quenbi/Quartz. ``` TPM: secdata_firmware unchanged nvdata unchanged tpm_get_response: command 0x121, return code 0x0 TPM: secdata_kernel locked Shutting down all USB controllers. Exiting depthcharge with code 4 at timestamp: 15592912 LZ4 decompressing kernel@1 to 0xdf7ff058 ERROR: Failed to decompress kernel ``` BUG=b:482448971 TEST=Able to build and boot google/quartz. Original change's description: > 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> BUG=none Change-Id: Ia558849a751c27cd45a247ea15a71022cefea6dc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/depthcharge/+/7553670 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Subrata Banik <subratabanik@chromium.org> Commit-Queue: Subrata Banik <subratabanik@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Tested-by: Subrata Banik <subratabanik@chromium.org> Reviewed-by: Jayvik Desai <jayvik@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`!