Files
pawlet_rpi5/mkbootimg.mk
oxmc ff34391e4b rpi5: partition layout, boot setup, slow_storage, BootControl, wrimg for Android 16
Partition layout:
- BoardConfig: system 8 GB, vendor 2 GB
- mkimg: matching system/vendor partition sizes
- fstab: remove discard from metadata; make discard opt-in via
  BOARD_STORAGE_SUPPORTS_DISCARD to avoid boot-time I/O stalls
- wrimg: grow userdata to fill remaining device space on flash

Boot:
- mkbootimg: use stamp file for rpiboot; uppercase FAT volume label
- rpi5: set androidboot.boot_devices for by-name symlink creation
- wrimg: stamp androidboot.slot_suffix in cmdline.txt after each A/B write
- rpi5: disable AVB (no vbmeta partition in this layout)

A/B / BootControl:
- sepolicy: add BootControl HAL policy and fix partition file_contexts
- wrimg: switch to PARTLABEL-based device detection; fix system_ext brackets

Initial repo setup:
- Separate into standalone pawlet_rpi5 repository
- Disable recovery/TWRP; fix include paths and package names
- Align to upstream KonstaKANG rpi5 base
2026-06-11 09:14:16 -07:00

31 lines
997 B
Makefile

#
# Copyright (C) 2021-2022 KonstaKANG
# Copyright (C) 2025-2026 oxmc
#
# SPDX-License-Identifier: Apache-2.0
#
DEVICE_PATH := device/pawlet/rpi5
KERNEL_PATH := device/brcm/rpi5-kernel
# Use a stamp file so ninja tracks the directory contents correctly.
# Targeting the directory itself confuses ninja when inner files change.
RPI_BOOT_OUT := $(PRODUCT_OUT)/rpiboot
RPI_BOOT_STAMP := $(RPI_BOOT_OUT)/.stamp
$(RPI_BOOT_STAMP): $(INSTALLED_RAMDISK_TARGET)
mkdir -p $(RPI_BOOT_OUT)/overlays
cp $(DEVICE_PATH)/boot/* $(RPI_BOOT_OUT)
cp $(KERNEL_PATH)/Image $(RPI_BOOT_OUT)
cp $(KERNEL_PATH)/bcm2712*-rpi-*.dtb $(RPI_BOOT_OUT)
cp $(KERNEL_PATH)/overlays/* $(RPI_BOOT_OUT)/overlays
cp $(PRODUCT_OUT)/ramdisk.img $(RPI_BOOT_OUT)
echo $(BOARD_KERNEL_CMDLINE) > $(RPI_BOOT_OUT)/cmdline.txt
touch $@
$(INSTALLED_BOOTIMAGE_TARGET): $(RPI_BOOT_STAMP)
$(call pretty,"Target boot image: $@")
dd if=/dev/zero of=$@ bs=1M count=128
mkfs.fat -F 32 -n "BOOT" $@
mcopy -s -i $@ $(RPI_BOOT_OUT)/* ::