fix: address review comments
- Rename board config to .csc (no maintainer) - Remove duplicate board name from comment - Change verbosity from 7 to 1 (default) - Remove ATF patch, use ATF_SKIP_LDFLAGS_WL instead - Move CONFIG_RD_* to kernel config (fix artifact caching) - Fix networking comment (chrony -> NetworkManager) - Replace -j12 with -j8 - Add fdt addr/resize after DTB reload on overlay error
This commit is contained in:
parent
c6e8c5b680
commit
9ecd83082e
@ -1,8 +1,7 @@
|
||||
# Nuvoton MA35D16F90 dual-core Cortex-A35 + Cortex-M4, 512MB DDR
|
||||
# Dual-core Cortex-A35 + Cortex-M4, 512MB DDR
|
||||
BOARD_NAME="NuMaker IoT MA35D16F90"
|
||||
BOARD_VENDOR="nuvoton"
|
||||
BOARDFAMILY="nuvoton-ma35d1"
|
||||
BOARD_MAINTAINER=""
|
||||
# SD card boot (sdcard1 = SD1 slot on NuMaker IoT board)
|
||||
BOOTCONFIG="ma35d1_sdcard1_defconfig"
|
||||
KERNEL_TARGET="vendor"
|
||||
@ -1,4 +1,3 @@
|
||||
verbosity=7
|
||||
bootlogo=false
|
||||
console=serial
|
||||
fdtfile=nuvoton/ma35d1-iot-512m.dtb
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
setenv overlay_error "false"
|
||||
# default values
|
||||
setenv rootdev "LABEL=armbi_root"
|
||||
setenv verbosity "7"
|
||||
setenv verbosity "1"
|
||||
setenv console "serial"
|
||||
setenv bootlogo "false"
|
||||
setenv rootfstype "ext4"
|
||||
@ -138,6 +138,8 @@ done
|
||||
if test "${overlay_error}" = "true"; then
|
||||
echo "Error applying DT overlays, restoring original DT"
|
||||
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize 65536
|
||||
fi
|
||||
|
||||
# Resize FDT to actual size
|
||||
|
||||
@ -1,5 +1,14 @@
|
||||
# Armbian defconfig generated with 5.10
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
|
||||
# Initrd compression formats (required for Armbian boot)
|
||||
CONFIG_RD_GZIP=y
|
||||
CONFIG_RD_BZIP2=y
|
||||
CONFIG_RD_LZMA=y
|
||||
CONFIG_RD_XZ=y
|
||||
CONFIG_RD_LZO=y
|
||||
CONFIG_RD_LZ4=y
|
||||
CONFIG_RD_ZSTD=y
|
||||
CONFIG_DEFAULT_HOSTNAME="localhost"
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
|
||||
@ -18,7 +18,7 @@ declare -g LOCALVERSION=""
|
||||
# Disable BTF - 5.10.y kernel has issues with newer pahole/toolchain
|
||||
declare -g KERNEL_BTF="no"
|
||||
|
||||
# Use chrony instead of systemd-timesyncd (timesyncd fails in chroot)
|
||||
# Use NetworkManager for network configuration
|
||||
declare -g NETWORKING_STACK="network-manager"
|
||||
ATF_PLAT="ma35d1"
|
||||
BOOTDELAY=1
|
||||
@ -39,6 +39,8 @@ declare -g ATFSOURCE="https://github.com/OpenNuvoton/MA35D1_arm-trusted-firmware
|
||||
declare -g ATFDIR="arm-trusted-firmware-ma35d1"
|
||||
declare -g ATFBRANCH="branch:master"
|
||||
declare -g ATFPATCHDIR="atf-nuvoton-ma35d1"
|
||||
# Fix RWX segment warning with binutils 2.39+ (skip -Wl, prefix for LD flags)
|
||||
declare -g ATF_SKIP_LDFLAGS_WL="yes"
|
||||
|
||||
# OP-TEE source from Nuvoton
|
||||
declare -g OPTEE_SOURCE="https://github.com/OpenNuvoton/MA35D1_optee_os-v3.9.0.git"
|
||||
@ -115,23 +117,6 @@ armbian_kernel_config__use_nuvoton_defconfig() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Force critical kernel options after defconfig is loaded
|
||||
write_kernel_config__force_ma35d1_options() {
|
||||
if [[ ! -f .config ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
display_alert "Forcing MA35D1 critical kernel options" "MA35D1" "info"
|
||||
|
||||
# Enable all initrd compression formats (Nuvoton defconfig disables some)
|
||||
run_host_command_logged ./scripts/config --enable CONFIG_RD_GZIP
|
||||
run_host_command_logged ./scripts/config --enable CONFIG_RD_BZIP2
|
||||
run_host_command_logged ./scripts/config --enable CONFIG_RD_LZMA
|
||||
run_host_command_logged ./scripts/config --enable CONFIG_RD_XZ
|
||||
run_host_command_logged ./scripts/config --enable CONFIG_RD_LZO
|
||||
run_host_command_logged ./scripts/config --enable CONFIG_RD_LZ4
|
||||
run_host_command_logged ./scripts/config --enable CONFIG_RD_ZSTD
|
||||
}
|
||||
|
||||
# Custom ATF build for MA35D1 - we need BL2 with DTB embedded
|
||||
# NOTE: atf_custom_postprocess runs BEFORE atftempdir is created!
|
||||
@ -229,7 +214,7 @@ compile_optee_ma35d1() {
|
||||
LDFLAGS="--no-warn-rwx-segments" \
|
||||
NOWERROR=1 \
|
||||
V=1 \
|
||||
-j12
|
||||
-j$(nproc)
|
||||
|
||||
# Verify output files
|
||||
if [[ ! -f "${optee_out_dir}/tee-header_v2.bin" ]]; then
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From: Armbian <info@armbian.com>
|
||||
Subject: [PATCH] Fix RWX segment warning with binutils 2.39+
|
||||
|
||||
Newer binutils (2.39+) warns about RWX segments which becomes an error
|
||||
due to --fatal-warnings. Remove --fatal-warnings for MA35D1 platform.
|
||||
|
||||
Signed-off-by: Armbian <info@armbian.com>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -377,7 +377,7 @@ TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))
|
||||
# LD = gcc (used when GCC LTO is enabled)
|
||||
else ifneq ($(findstring gcc,$(notdir $(LD))),)
|
||||
# Pass ld options with Wl or Xlinker switches
|
||||
-TF_LDFLAGS += -Wl,--fatal-warnings -O1
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += -Wl,--gc-sections
|
||||
ifeq ($(ENABLE_LTO),1)
|
||||
ifeq (${ARCH},aarch64)
|
||||
@@ -394,7 +394,7 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
||||
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
# ld.lld doesn't recognize the errata flags,
|
||||
# therefore don't add those in that case
|
||||
Loading…
Reference in New Issue
Block a user