Fix boot.img creation: use pre-built u-boot instead of mkfs.fat
mkfs.fat and mcopy are disallowed in Android 16 build system. Use pre-built U-Boot binary as boot.img for packaging purposes. The actual bootable image is created by mkimg_gpt.sh. Copyright (C) 2026 Brendan Szymanski <hello@bscubed.dev>
This commit is contained in:
parent
c898f32cca
commit
0ffea7f732
1 changed files with 1 additions and 9 deletions
10
mkbootimg.mk
10
mkbootimg.mk
|
|
@ -25,14 +25,6 @@ $(OPI_BOOT_OUT): $(PRODUCT_OUT)/ramdisk.img
|
|||
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(OPI_BOOT_OUT)
|
||||
$(call pretty,"Target boot image: $@")
|
||||
|
||||
# Determine size in bytes, add 10 MiB padding, convert to 512-byte blocks
|
||||
BOOT_SIZE_BYTES=`du -s -k $(OPI_BOOT_OUT) | awk '{ print $$1 * 1024 }'`; \
|
||||
PADDED_BYTES=`expr $$BOOT_SIZE_BYTES + 10485760`; \
|
||||
BLOCKS=`expr $$PADDED_BYTES / 512`; \
|
||||
echo "Creating boot image with $$BLOCKS blocks..."; \
|
||||
dd if=/dev/zero of=$@ bs=512 count=$$BLOCKS; \
|
||||
mkfs.fat -F 32 -n "boot" $@; \
|
||||
mcopy -s -i $@ $(OPI_BOOT_OUT)/* ::
|
||||
cp $(KERNEL_PATH)/u-boot-rockchip.bin $@
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue