armbian-build/config/sources/families/meson-g12b.conf
Yuntian Zhang 3da96b2d77
Add support for Radxa Zero 2 (#3413)
Radxa Zero 2 is a small form factor SBC based on the Amlogic A311D
chipset that ships in a number of eMMC configurations:

- Amlogic A311D (Quad A73 + Dual A53) CPU
- 4GB LPDDR4 RAM
- 32/64/128GB eMMC
- Mali G52-MP4 GPU
- HDMI 2.1 output (micro)
- BCM4345 WiFi (2.4/5GHz a/b/g/n/ac) and BT 5.0
- 1x USB 2.0 port - Type C (OTG)
- 1x USB 3.0 port - Type C (Host)
- 1x micro SD Card slot
- 40 Pin GPIO header

Signed-off-by: Yuntian Zhang <yt@radxa.com>
2022-02-25 19:27:41 +01:00

46 lines
1.7 KiB
Plaintext

source "${BASH_SOURCE%/*}/include/meson64_common.inc"
ASOUND_STATE="asound.state.meson64"
[[ ${BRANCH} == legacy ]] && SERIALCON=ttyS0
if [[ -n ${USE_ODROID_UBOOT} ]] && [[ "${USE_ODROID_UBOOT}" == *"${BRANCH}"* ]]; then
# Current BRANCH is listed in USE_ODROID_UBOOT; use _ODROID variants if set.
BOOTCONFIG="${BOOTCONFIG_ODROID:-${BOOTCONFIG}}"
BOOTSCRIPT="${BOOTSCRIPT_ODROID:-${BOOTSCRIPT}}"
# Enable Odroid's legacy u-boot building. This requires old toolchains etc, but does NOT require FIP trees.
UBOOT_TARGET_MAP=';;sd_fuse/u-boot.bin'
UBOOT_USE_GCC='< 4.9'
UBOOT_TOOLCHAIN2="arm-none-eabi-:< 5.0"
UBOOT_COMPILER="aarch64-none-elf-"
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
BOOTBRANCH='branch:odroidg12-v2015.01'
BOOTPATCHDIR='u-boot-odroid'
BOOTDIR='u-boot-odroid'
write_uboot_platform() {
dd if=$1/u-boot.bin of=$2 bs=512 seek=1 conv=fsync >/dev/null 2>&1
}
else
# Mainline u-boot, everything is done by meson64_common.inc, we just need to handle FIP blobs
# Handling of FIP blobs
uboot_custom_postprocess() {
# @TODO: these should come from FIP_TREE_BOARD/FIP_TREE_FAMILY vars in board.conf instead of hardcoded here
if [[ $BOARD == odroidn2* ]]; then
# FIP trees 'odroid-n2-plus' and 'odroid-n2' are identical.
uboot_g12_postprocess "$SRC"/cache/sources/amlogic-boot-fip/odroid-n2 g12b
elif [[ $BOARD == khadas-vim3 ]]; then
# 'khadas-vim3' FIP tree contains 'lpddr3_1d.fw' which will trigger '--ddrfw9' in uboot_g12_postprocess
uboot_g12_postprocess "$SRC"/cache/sources/amlogic-boot-fip/khadas-vim3 g12b
elif [[ $BOARD == radxa-zero2 ]]; then
uboot_g12_postprocess "$SRC"/cache/sources/amlogic-boot-fip/radxa-zero2 g12b
else
echo "Don't know how to handle FIP trees for board '${BOARD}'"
exit 2
fi
}
fi