Files
pawlet_rpi4/mkbootimg.mk
oxmc 0d6551f178 rpi4: 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
- slow_storage.mk: raise Watchdog timeout so first-boot SELinux label pass
  does not kill system_server on slow SD cards

Boot:
- mkbootimg: use stamp file for rpiboot; uppercase FAT volume label for
  compatibility with some UEFI firmware
- rpi4: set androidboot.boot_devices for by-name symlink creation
- wrimg: stamp androidboot.slot_suffix in cmdline.txt after each A/B write
- rpi4: 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

Packages:
- product: add LawnchairQuickStep to PRODUCT_PACKAGES

SELinux:
- Fix remaining Android 16 boot-log denials and permission labels
2026-06-11 09:14:11 -07:00

33 lines
1.1 KiB
Makefile

#
# Copyright (C) 2021-2022 KonstaKANG
# Copyright (C) 2025-2026 oxmc
#
# SPDX-License-Identifier: Apache-2.0
#
DEVICE_PATH := device/pawlet/rpi4
KERNEL_PATH := device/brcm/rpi4-kernel
VENDOR_PATH := vendor/brcm
# 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)/bcm2711-rpi-*.dtb $(RPI_BOOT_OUT)
cp $(KERNEL_PATH)/overlays/* $(RPI_BOOT_OUT)/overlays
cp $(PRODUCT_OUT)/ramdisk.img $(RPI_BOOT_OUT)
cp $(VENDOR_PATH)/rpi4/proprietary/boot/* $(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)/* ::