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>
1 file changed
tree: 6d5b28f73fa308389ecb4c8d88fe4b8b6f57396c
  1. configs/
  2. screenshot/
  3. src/
  4. tests/
  5. util/
  6. .checkpatch.conf
  7. .clang-format
  8. .gitignore
  9. COPYING
  10. Kconfig
  11. LICENSE
  12. Makefile
  13. Makefile.inc
  14. OWNERS
  15. PRESUBMIT.cfg
  16. PRESUBMIT.py
  17. README.md
  18. unblocked_terms.txt
README.md

Depthcharge

Depthcharge is a bootloader for ChromeOS devices. It is responsible for initializing hardware, setting up the boot environment, and loading the operating system.

Key Features

  • Hardware Initialization: Initializes and configures the system's hardware components, including memory, storage, and peripherals.
  • Boot Environment Setup: Sets up the necessary environment for the operating system to boot, including memory, storage, and other peripherals.
  • Booting the Operating System: Loads and executes the operating system kernel.
  • Security Features: Implements various security features, such as secure boot and verified boot, using the vboot library.

Project Structure

  • src/: Contains the source code for the depthcharge bootloader.
  • board/: Contains the board-specific configuration files.
  • src/drivers/: Contains the device drivers.

Build Instructions

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`!