Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPi family: read board name from DT and bump CURRENT to 6.12.y #7845

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions config/boards/rpi4b.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Broadcom BCM2711 quad core 1-8Gb RAM SoC USB3 GBE USB-C WiFi/BT
declare -g BOARD_NAME="Raspberry Pi 4"
# All 64b Raspberry models from Broadcom BCM2837 - BCM271x quad core 1-16Gb RAM SoC USB3 GBE USB-C WiFi/BT
declare -g BOARD_NAME="Raspberry Pi"
declare -g BOARDFAMILY="bcm2711"
declare -g BOARD_MAINTAINER="PanderMusubi teknoid"
declare -g KERNEL_TARGET="legacy,current,edge"
declare -g KERNEL_TARGET="current,edge"
declare -g ASOUND_STATE="asound.state.rpi"
declare -g KERNEL_TEST_TARGET="current"
declare -g MODULES="i2c_dev"
7 changes: 0 additions & 7 deletions config/boards/rpi5b.csc

This file was deleted.

12 changes: 6 additions & 6 deletions config/sources/families/bcm2711.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ case "${BRANCH}" in

legacy)
declare -g KERNELSOURCE='https://github.com/raspberrypi/linux'
declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. For mainline caching.
declare -g KERNELBRANCH="branch:rpi-6.1.y"
declare -g KERNEL_MAJOR_MINOR="6.6" # Major and minor versions of this kernel. For mainline caching.
declare -g KERNELBRANCH="branch:rpi-6.6.y"
;;

current)
declare -g KERNELSOURCE='https://github.com/raspberrypi/linux'
declare -g KERNEL_MAJOR_MINOR="6.6" # Major and minor versions of this kernel. For mainline caching.
declare -g KERNELBRANCH="branch:rpi-6.6.y"
declare -g KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel. For mainline caching.
declare -g KERNELBRANCH="branch:rpi-6.12.y"
;;

edge)
declare -g EXTRAWIFI="no"
declare -g KERNELSOURCE='https://github.com/raspberrypi/linux'
declare -g KERNEL_MAJOR_MINOR="6.10" # Major and minor versions of this kernel. For mainline caching.
declare -g KERNELBRANCH="branch:rpi-6.10.y"
declare -g KERNEL_MAJOR_MINOR="6.14" # Major and minor versions of this kernel. For mainline caching.
declare -g KERNELBRANCH="branch:rpi-6.14.y"
;;
esac

Expand Down
5 changes: 5 additions & 0 deletions packages/bsp/common/etc/update-motd.d/10-armbian-header
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ fi
# Display software vendor logo
echo -e "\e[1;91m$(figlet -f small " $VENDOR")\e[0m";

# Read RPI model from cpuinfo
if [[ $BOARD == rpi4b ]]; then
BOARD_NAME=$(grep "Model" /proc/cpuinfo | sed -E 's/^Rev //; s/ Rev [0-9.]+$//' | cut -d":" -f2 | xargs)
fi

# Display version, board, and kernel version
[[ $VERSION == *trunk* ]] && VERSION=$(echo -e $VERSION | cut -d"." -f1-2 | sed "s/\$/ rolling/")
echo -e " \e[0;92mv${VERSION}\x1B[0m for $BOARD_NAME running Armbian Linux \e[0;92m${KERNELID^}\x1B[0m"
Expand Down
13 changes: 13 additions & 0 deletions packages/bsp/common/usr/lib/armbian/armbian-firstrun
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ case "$1" in
[[ "${LINUXFAMILY}" == meson64 ]] && set_fixed_mac
[[ "${BOARD}" == nanopi-r6* ]] && set_fixed_mac

# adjust hostname for rpi's
if [[ "${BOARD}" == rpi4b && "$(cat /etc/hostname)" == rpi4b ]]; then
BOARD_NAME=$(grep "Model" /proc/cpuinfo | sed -E 's/^Rev //; s/ Rev [0-9.]+$//' | cut -d":" -f2 | xargs)
[[ "$BOARD_NAME" == *"Zero 2 W"* ]] && NEW_HOSTNAME="rpizero2w"
[[ "$BOARD_NAME" == *"Pi 5 Model B"* ]] && NEW_HOSTNAME="rpi5b"
[[ "$BOARD_NAME" == *"Pi 3 Model B"* ]] && NEW_HOSTNAME="rpi3b"
[[ "$BOARD_NAME" == *"Pi 400"* ]] && NEW_HOSTNAME="rpi400"
# Update /etc/hosts to reflect the new hostname
sed -i "s/$(hostname)/$NEW_HOSTNAME/g" /etc/hosts
# Change the hostname
hostnamectl set-hostname "$NEW_HOSTNAME"
fi

# Remove KDE Neon base files upgrade pin
[[ -f /etc/apt/preferences.d/99-neon-base-files ]] && rm -f /etc/apt/preferences.d/99-neon-base-files

Expand Down
Loading