ff34391e4b
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
100 lines
3.7 KiB
Makefile
100 lines
3.7 KiB
Makefile
#
|
|
# Copyright (C) 2021-2022 KonstaKANG
|
|
# Copyright (C) 2025 oxmc
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
DEVICE_PATH := device/pawlet/rpi5
|
|
|
|
# PawletOS common board config (A/B, partition sizes, update_engine)
|
|
include vendor/pawlet/config/BoardConfigPawlet.mk
|
|
|
|
# Architecture
|
|
TARGET_ARCH := arm64
|
|
TARGET_ARCH_VARIANT := armv8-a
|
|
TARGET_CPU_ABI := arm64-v8a
|
|
TARGET_CPU_ABI2 :=
|
|
TARGET_CPU_VARIANT := cortex-a76
|
|
|
|
# Bluetooth
|
|
BOARD_HAVE_BLUETOOTH := true
|
|
|
|
# Bootloader
|
|
TARGET_NO_BOOTLOADER := true
|
|
|
|
# Recovery — TWRP disabled until it supports Android 16 (latest is android-14.1)
|
|
# Uncomment the block below and set TARGET_NO_RECOVERY := false to re-enable.
|
|
#ifneq ($(wildcard vendor/pawlet/twrp_recovery/recovery.mk),)
|
|
# BOARD_RECOVERYIMAGE_PARTITION_SIZE := 134217728 # 128M
|
|
# TARGET_RECOVERY_FSTAB := device/pawlet/rpi5/recovery/recovery.rpi5.fstab
|
|
# PRODUCT_COPY_FILES += $(call find-copy-subdir-files,*,device/pawlet/rpi5/recovery/root,recovery/root)
|
|
# TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"
|
|
# $(call inherit-product, vendor/pawlet/twrp_recovery/recovery.mk)
|
|
#endif
|
|
TARGET_NO_RECOVERY := true
|
|
|
|
# Display
|
|
TARGET_SCREEN_DENSITY := 240
|
|
|
|
# AVB — no vbmeta partition in layout
|
|
BOARD_AVB_ENABLE := false
|
|
|
|
# Kernel
|
|
BOARD_CUSTOM_BOOTIMG := true
|
|
BOARD_CUSTOM_BOOTIMG_MK := $(DEVICE_PATH)/mkbootimg.mk
|
|
BOARD_KERNEL_CMDLINE := console=ttyAMA10,115200 androidboot.hardware=rpi5
|
|
|
|
# Boot devices — see pawlet_rpi4/BoardConfig.mk for the rationale. First-stage
|
|
# init only creates /dev/block/by-name/* symlinks for partitions on a declared
|
|
# boot device (exact match vs uevent path minus /devices/platform/).
|
|
# RPi5 differs from RPi4: USB is on the RP1 chip behind the internal PCIe, and
|
|
# RP1's xHCI is itself a platform device, so init matches at the .usb node:
|
|
# NVMe (external PCIe HAT): axi/1000110000.pcie
|
|
# USB (RP1 xHCI on PCIe): axi/1000120000.pcie/1f00200000.usb (and .../1f00300000.usb)
|
|
# Extra entries are harmless (exact-match set). Verify/trim against an RPi5
|
|
# serial boot log (the sda / nvme0n1 /devices/platform/... path).
|
|
BOARD_KERNEL_CMDLINE += androidboot.boot_devices=axi/1000110000.pcie,axi/1000120000.pcie/1f00200000.usb,axi/1000120000.pcie/1f00300000.usb,axi/1000120000.pcie
|
|
|
|
# Manifest
|
|
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := $(DEVICE_PATH)/framework_compatibility_matrix.xml
|
|
DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
|
|
PRODUCT_MANIFEST_FILES := $(DEVICE_PATH)/product_manifest.xml
|
|
|
|
# Partition sizes
|
|
BOARD_FLASH_BLOCK_SIZE := 4096
|
|
BOARD_BOOTIMAGE_PARTITION_SIZE := 134217728 # 128M
|
|
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 8589934592 # 8192M (8GB)
|
|
BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE := 4294967296 # 4096M (4GB)
|
|
BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 104857600 # 100MB
|
|
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
|
|
TARGET_COPY_OUT_SYSTEM_EXT := system_ext
|
|
BOARD_VENDORIMAGE_PARTITION_SIZE := 2147483648 # 2048M (2GB)
|
|
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
|
|
TARGET_COPY_OUT_VENDOR := vendor
|
|
BOARD_USES_METADATA_PARTITION := true
|
|
BOARD_METADATAIMAGE_PARTITION_SIZE := 67108864 # 64MB (increased for A/B snapshot metadata)
|
|
BOARD_MISCIMAGE_PARTITION_SIZE := 4194304 # 4MB (A/B slot tracking)
|
|
BOARD_USERDATAIMAGE_PARTITION_SIZE := 134217728 # 128M
|
|
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
|
|
TARGET_USERIMAGES_USE_EXT4 := true
|
|
|
|
# Platform
|
|
TARGET_BOARD_PLATFORM := bcm2712
|
|
TARGET_BOOTLOADER_BOARD_NAME := bcm2712
|
|
|
|
# Properties
|
|
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
|
|
|
|
# SELinux
|
|
BOARD_SEPOLICY_DIRS += device/pawlet/rpi5/sepolicy
|
|
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
|
|
|
|
# Wifi
|
|
BOARD_WLAN_DEVICE := bcmdhd
|
|
BOARD_HOSTAPD_DRIVER := NL80211
|
|
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
|
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
|
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
|
WPA_SUPPLICANT_VERSION := VER_0_8_X
|