diff --git a/config/boards/numaker-iot-ma35d16f90.conf b/config/boards/numaker-iot-ma35d16f90.csc similarity index 90% rename from config/boards/numaker-iot-ma35d16f90.conf rename to config/boards/numaker-iot-ma35d16f90.csc index 33a3cfd5f0..a9b92f562e 100644 --- a/config/boards/numaker-iot-ma35d16f90.conf +++ b/config/boards/numaker-iot-ma35d16f90.csc @@ -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" diff --git a/config/bootenv/nuvoton-ma35d1.txt b/config/bootenv/nuvoton-ma35d1.txt index b08fe8d709..ca8baf3599 100644 --- a/config/bootenv/nuvoton-ma35d1.txt +++ b/config/bootenv/nuvoton-ma35d1.txt @@ -1,4 +1,3 @@ -verbosity=7 bootlogo=false console=serial fdtfile=nuvoton/ma35d1-iot-512m.dtb diff --git a/config/bootscripts/boot-nuvoton-ma35d1.cmd b/config/bootscripts/boot-nuvoton-ma35d1.cmd index 0aa87e160a..7fe7d29580 100644 --- a/config/bootscripts/boot-nuvoton-ma35d1.cmd +++ b/config/bootscripts/boot-nuvoton-ma35d1.cmd @@ -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 diff --git a/config/kernel/linux-nuvoton-ma35d1-vendor.config b/config/kernel/linux-nuvoton-ma35d1-vendor.config index 9d9f670b39..1dc916d9fd 100644 --- a/config/kernel/linux-nuvoton-ma35d1-vendor.config +++ b/config/kernel/linux-nuvoton-ma35d1-vendor.config @@ -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 diff --git a/config/sources/families/nuvoton-ma35d1.conf b/config/sources/families/nuvoton-ma35d1.conf index 1d4d2b6a9e..c3fea88d23 100644 --- a/config/sources/families/nuvoton-ma35d1.conf +++ b/config/sources/families/nuvoton-ma35d1.conf @@ -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 diff --git a/patch/atf/atf-nuvoton-ma35d1/fix-rwx-segment-warning.patch b/patch/atf/atf-nuvoton-ma35d1/fix-rwx-segment-warning.patch deleted file mode 100644 index 97c23abb53..0000000000 --- a/patch/atf/atf-nuvoton-ma35d1/fix-rwx-segment-warning.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Armbian -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 ---- - 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