Skip to content

Commit edb7b15

Browse files
committed
common: kernels: warnings for when LINUXCONFIG is set to something nonstandard
- board: beagley-ai.conf: mark TODO - family: sun55iw3: mark TODO
1 parent fe8b540 commit edb7b15

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

config/boards/beagley-ai.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function post_family_config_branch_current__beagley_ai_use_beagle_kernel_uboot()
2525
declare -g KERNEL_MAJOR_MINOR="6.6"
2626
declare -g KERNELBRANCH="branch:v6.6.58-ti-arm64-r21"
2727
declare -g LINUXFAMILY="k3-beagle" # Separate kernel package from the regular `k3` family
28-
declare -g LINUXCONFIG="linux-k3-${BRANCH}"
28+
declare -g LINUXCONFIG="linux-k3-${BRANCH}" # TODO: wrong! shared .config with `k3` family; should use its own
2929

3030
declare -g BOOTSOURCE="https://github.com/glneo/u-boot" # v2025.04-rc3 + BeagleY-AI support
3131
declare -g BOOTBRANCH="branch:beagley-ai"

config/sources/common.conf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,17 @@ function late_family_config__common_defaults_for_mainline_kernel() {
132132
# if LINUXCONFIG is unset... default to linux-${LINUXFAMILY}-${BRANCH} # Attention: no KERNEL_MAJOR_MINOR here, so manual file rollover is necessary
133133
if [[ -z ${LINUXCONFIG} ]]; then
134134
display_alert "LINUXCONFIG is unset; using 'linux-${LINUXFAMILY}-${BRANCH}'" "common_defaults_for_mainline" "debug"
135-
LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
135+
declare -g -r LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}" # READ-ONLY from here!
136+
else
137+
# LINUXCONFIG is set. Historically there's a large chance that it is a mistake, as LINUXCONFIG should _always_ be "linux-${LINUXFAMILY}-${BRANCH}"
138+
# Exception are uefi family members, as for those we're skipping the uefi- prefix in LINUXFAMILY.
139+
if [[ "${LINUXCONFIG}" == "linux-uefi-${LINUXFAMILY}-${BRANCH}" ]]; then
140+
: # let it be
141+
elif [[ "${LINUXCONFIG}" != "linux-${LINUXFAMILY}-${BRANCH}" ]]; then
142+
display_alert "LINUXCONFIG ('${LINUXCONFIG}') does not match expected 'linux-${LINUXFAMILY}-${BRANCH}'" "you probably should use a separate LINUXFAMILY instead of setting LINUXCONFIG" "warn"
143+
else
144+
display_alert "LINUXCONFIG is set to '${LINUXCONFIG}'" "common_defaults_for_mainline: you shouldn't set LINUXCONFIG, it is auto-determined from LINUXFAMILY and BRANCH." "warn"
145+
fi
136146
fi
137147

138148
# Mainline defaults

config/sources/families/sun55iw3.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare -g BOOTENV_FILE='sunxi.txt'
2020
declare -g UBOOT_TARGET_MAP="${UBOOT_TARGET_MAP:-BINMAN_ALLOW_MISSING=1;;u-boot-sunxi-with-spl.bin}"
2121
declare -g OVERLAY_DIR="/boot/dtb/allwinner/overlay"
2222
declare -g LINUXFAMILY="sun55iw3"
23-
declare -g LINUXCONFIG="linux-sunxi64-${BRANCH}"
23+
declare -g LINUXCONFIG="linux-sunxi64-${BRANCH}" # @TODO: this is wrong; it is sharing a single .config with 2 LINUXFAMILYs: sunxi64 and sun55iw3
2424

2525
case "${BRANCH}" in
2626

0 commit comments

Comments
 (0)