armbian-build/config/sources/families/meson-sm1.conf
Ricardo Pardini 731feb73f6
ODROID HC4: edge: experimental: SPI+SATA boot on HC4 via chewitt's amlogic-2021.07 uboot tree (#3106)
- done in a single if block in sm1 family
- add nand-sata-install support via UBOOT_TARGET_MAP and write_uboot_platform_mtd

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
2021-09-02 20:49:34 +02:00

46 lines
1.4 KiB
Plaintext

source "${BASH_SOURCE%/*}/include/meson64_common.inc"
ASOUND_STATE="asound.state.meson64"
CPUMIN=667000
CPUMAX=2100000
GOVERNOR=ondemand
[[ ${BRANCH} == legacy ]] && SERIALCON=ttyS0
if [[ ${BRANCH} == edge ]] && [[ $BOARD == odroidhc4 ]]; then
# Experimental, use chewitt's u-boot, which enables SPI+SATA booting.
display_alert "Using experimental u-boot with SPI+SATA" "edge+odroidhc4" "info"
BOOTSOURCE="https://github.com/chewitt/u-boot.git"
BOOTDIR='u-boot-chewitt'
BOOTBRANCH='branch:amlogic-2021.07'
UBOOT_TARGET_MAP="u-boot-dtb.img;;u-boot.bin.sd.bin:u-boot.bin u-boot-dtb.img u-boot.bin:u-boot-spi.bin"
BOOTCONFIG="odroid-hc4_defconfig" # hc4_defconfig vs c4_defconfig, enables PCIe+SATA stuff.
write_uboot_platform_mtd() {
if [[ -f $1/u-boot-spi.bin ]]; then
dd if=$1/u-boot-spi.bin of=/dev/mtdblock0
sync
else
echo "SPI u-boot image not found!"
exit 1
fi
}
fi
family_tweaks()
{
:
}
uboot_custom_postprocess() {
# FIP trees for C4 and HC4 are identical as of 30/06/2021
if [[ $BOARD == odroidc4 ]]; then
uboot_g12_postprocess $SRC/cache/sources/amlogic-boot-fip/odroid-c4 g12a
elif [[ $BOARD == odroidhc4 ]]; then
uboot_g12_postprocess $SRC/cache/sources/amlogic-boot-fip/odroid-hc4 g12a
elif [[ $BOARD == khadas-vim3l ]]; then
uboot_g12_postprocess $SRC/cache/sources/amlogic-boot-fip/khadas-vim3l g12a
else
display_alert "uboot_custom_postprocess meson-sm1" "Unknown BOARD: $BOARD - not using FIP trees" "wrn"
fi
}