odroidhc4: u-boot: 2025.04; use hc4 defconfig for sd as well as mtd

This commit is contained in:
Ricardo Pardini
2025-05-03 21:43:30 +02:00
committed by Igor
parent fb1ac8cb1d
commit faac26177a
2 changed files with 12 additions and 31 deletions

View File

@@ -2,7 +2,7 @@
BOARD_NAME="Odroid HC4"
BOARDFAMILY="meson-sm1"
BOARD_MAINTAINER="igorpecovnik"
BOOTCONFIG="odroid-c4_defconfig" # for the SD card; but also 'odroid-hc4_defconfig', see below at pre_config_uboot_target
BOOTCONFIG="odroid-hc4_defconfig"
KERNEL_TARGET="current,edge"
KERNEL_TEST_TARGET="current"
MODULES_BLACKLIST="simpledrm" # SimpleDRM conflicts with Panfrost
@@ -12,8 +12,8 @@ BOOT_FDT_FILE="amlogic/meson-sm1-odroid-hc4.dtb"
PACKAGE_LIST_BOARD="lm-sensors fancontrol" # SPI, sensors, manual fan control via 'pwmconfig'
# Newer u-boot for the HC4. There's patches in `board_odroidhc4` for the defconfigs used in the UBOOT_TARGET_MAP below.
BOOTBRANCH_BOARD="tag:v2024.04"
BOOTPATCHDIR="v2024.04"
BOOTBRANCH_BOARD="tag:v2025.04"
BOOTPATCHDIR="v2025.04"
# We build u-boot twice: C4 config for SD cards, and HC4 (with SATA/PCI/SPI) config for SPI.
UBOOT_TARGET_MAP="
@@ -39,22 +39,6 @@ function post_uboot_custom_postprocess__odroid_hc4_uboot() {
uboot_g12_postprocess "${SRC}"/cache/sources/amlogic-boot-fip/odroid-hc4 g12a
}
# switch defconfig according to target, so we can still use the same post_config_uboot_target for both.
function pre_config_uboot_target__odroidhc4_defconfig_per_target() {
case "${target_make}" in
"armbian_target=spi "*)
BOOTCONFIG="odroid-hc4_defconfig"
;;
"armbian_target=sd "*)
BOOTCONFIG="odroid-c4_defconfig"
;;
*)
exit_with_error "Unknown target_make: '${target_make}', unknown BOOTCONFIG."
;;
esac
display_alert "setting BOOTCONFIG for target" "${target_make}: '${BOOTCONFIG}'" "info"
}
# Enable extra u-boot .config options, this way we avoid patching defconfig
function post_config_uboot_target__extra_configs_for_odroid_hc4() {
display_alert "u-boot for ${BOARD}" "u-boot: enable preboot & pci+usb start in preboot" "info"

View File

@@ -1,32 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Sun, 14 Jan 2024 13:44:58 +0100
Subject: meson64: change `BOOT_TARGET_DEVICES` to try to boot USB, NVME and
SCSI before SD, MMC, PXE, DHCP
Subject: odroidhc4: boot order: USB -> SATA -> SD
---
include/configs/meson64.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
include/configs/meson64.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/configs/meson64.h b/include/configs/meson64.h
index 111111111111..222222222222 100644
--- a/include/configs/meson64.h
+++ b/include/configs/meson64.h
@@ -99,12 +99,12 @@
@@ -119,10 +119,12 @@
#define BOOT_TARGET_DEVICES(func) \
func(ROMUSB, romusb, na) \
func(USB_DFU, usbdfu, na) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 2) \
- BOOT_TARGET_MMC(func) \
+ func(MMC, mmc, 2) \
+ func(MMC, mmc, 1) \
BOOT_TARGET_DEVICES_USB(func) \
BOOT_TARGET_NVME(func) \
BOOT_TARGET_SCSI(func) \
+ func(MMC, mmc, 0) \
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 2) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
#endif
--
Armbian