Skip to content

Commit ff59a4b

Browse files
HeyMecoigorpecovnik
authored andcommitted
Genio: Address PR comments
1 parent 8f56288 commit ff59a4b

3 files changed

Lines changed: 22 additions & 36 deletions

File tree

config/boards/radxa-nio-12l.conf

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,4 @@ KERNEL_TEST_TARGET="collabora"
77
BOOT_FDT_FILE="mediatek/mt8395-radxa-nio-12l.dtb"
88
SERIALCON="ttyS0:921600"
99
HAS_VIDEO_OUTPUT="yes"
10-
11-
# Post-config function for vendor branch
12-
function post_family_config__nio12l_vendor_setup() {
13-
if [[ "${BRANCH}" == "vendor" ]]; then
14-
display_alert "Setting up Genio-Firmware package for ${BOARD}" "${RELEASE}///${BOARD}" "info"
15-
add_packages_to_image "linux-firmware-mediatek-genio" "ubuntu-dev-tools" "ubuntu-desktop"
16-
fi
17-
}
18-
19-
# Post-config function for collabora branch
20-
function post_family_config__nio12l_collabora_setup() {
21-
if [[ "${BRANCH}" == "collabora" ]]; then
22-
display_alert "Setting up Firmware-Full for ${BOARD}" "${RELEASE}///${BOARD}" "info"
23-
declare -g BOARD_FIRMWARE_INSTALL="-full"
24-
fi
25-
}
10+
declare -g BOARD_FIRMWARE_INSTALL="-full"

config/bootscripts/boot-genio.cmd

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,31 @@ setenv docker_optimizations "on"
1414
setenv earlycon "off"
1515

1616
# Set load address for temporary file loading (armbianEnv.txt, overlays, etc)
17-
# Using address that doesn't conflict with kernel (0x45000000), ramdisk (0x49000000), or fdt (0x44000000)
17+
# Using address that doesn't conflict with kernel (0x45000000) Note: on Arm64 it has to be 2mb aligned
18+
# Ramdisk (0x49000000),
19+
# or fdt (0x44000000)
1820
setenv load_addr "0x43000000"
1921

22+
# Move ramdisk further away to avoid kernel overwrite (176MB space for kernel)
23+
setenv ramdisk_addr_r "0x50000000"
24+
2025
test -n "${distro_bootpart}" || distro_bootpart=1
2126

2227
echo "Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}"
2328

2429
# get PARTUUID of first partition on SD/eMMC/UFS the boot script was loaded from
2530
echo "Detecting PARTUUID for ${devtype} device ${devnum}:${distro_bootpart}..."
26-
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi
27-
if test "${devtype}" = "scsi"; then part uuid scsi ${devnum}:${distro_bootpart} partuuid; fi
31+
32+
# Explicitly clear partuuid as U-Boot variables set by functions or used in loops may not behave as expected
33+
setenv partuuid
34+
35+
if test "${devtype}" = "mmc" || test "${devtype}" = "scsi" || test "${devtype}" = "usb"; then
36+
part uuid ${devtype} ${devnum}:${distro_bootpart} partuuid
37+
fi
2838

2939
# Use PARTUUID if available (more reliable), otherwise fall back to rootdev label
3040
if test -n "${partuuid}"; then
31-
echo "PARTUUID detected: ${partuuid}"
32-
setenv rootdev "PARTUUID=${partuuid}"
33-
echo "Set default rootdev=${rootdev}"
34-
else
35-
echo "PARTUUID not available, keeping fallback rootdev=${rootdev}"
41+
setenv rootdev "PARTUUID=${partuuid}"
3642
fi
3743

3844
# Load armbianEnv.txt if it exists - using direct load instead of test -e for better compatibility
@@ -51,7 +57,11 @@ fi
5157

5258
echo "Final rootdev: ${rootdev}"
5359

54-
if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi
60+
if test "${bootlogo}" = "true" ; then
61+
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
62+
else
63+
setenv consoleargs "splash=verbose ${consoleargs}"
64+
fi
5565

5666
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
5767
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,921600 ${consoleargs}"; fi
@@ -107,8 +117,8 @@ else
107117
fi
108118
fi
109119

110-
echo "Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards."
111-
kaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled
120+
# Resize the fdt to the actual size of the final dtb
121+
fdt resize
112122

113123
echo "Booting kernel from ${kernel_addr_r} with initramfs at ${ramdisk_addr_r} and DTB at ${fdt_addr_r}..."
114124
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

config/sources/families/genio.conf

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ declare -g BOOTCONFIG="none" # Skip U-Boot compilation
99
declare -g BOOTSCRIPT="boot-genio.cmd:boot.cmd" # Use custom boot script for Genio (compatible with U-Boot without itest/setexpr/bootz)
1010
declare -g BOOTENV_FILE="genio.txt" # Boot environment template for armbianEnv.txt
1111

12-
# GRUB and UEFI configuration (legacy, may be removed)
13-
declare -g UEFI_GRUB_TERMINAL="gfxterm" # Use graphics terminal for GRUB
14-
declare -g UEFI_GRUB_TIMEOUT=3 # GRUB menu timeout
15-
declare -g SERIALCON="ttyS0" # Serial console for GRUB | TODO: Figure out if we can get Grub via HDMI too
16-
declare -g BOARD_FIRMWARE_INSTALL="-full" # Install full firmware for UEFI support
17-
18-
# GRUB configuration with DTB support
19-
declare -g GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0,921600 root=LABEL=armbi_root rootwait rootfstype=ext4 efi=noruntime"
20-
2112
# Kernel configuration
2213
case $BRANCH in
2314

0 commit comments

Comments
 (0)