Skip to content

Commit 62cbe33

Browse files
committed
board/aarch64: use board-specific .mk file for "post-build.sh" tasks
Drop support for board-specific post-build.sh scripts in favor of using the Buildroot _POST_INSTALL_HOOKS. Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 473d268 commit 62cbe33

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

board/aarch64/raspberrypi-rpi64/post-build.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

board/aarch64/raspberrypi-rpi64/raspberrypi-rpi64.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,16 @@ define RASPBERRYPI_RPI64_LINUX_CONFIG_FIXUPS
6363
$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
6464
endef
6565

66+
ifeq ($(BR2_PACKAGE_RASPBERRYPI_RPI64),y)
67+
68+
# Armbian firmware installs to /lib/firmware but driver wants the
69+
# file(s) in /lib/firmware/brcm/
70+
define RPI64_FIXUP_FIRMWARE_LOCATION
71+
mv "$(TARGET_DIR)/lib/firmware/BCM4345C0.hcd" "$(TARGET_DIR)/lib/firmware/brcm/"
72+
endef
73+
LINUX_FIRMWARE_POST_INSTALL_HOOKS += RPI64_FIXUP_FIRMWARE_LOCATION
74+
75+
endif
76+
6677
$(eval $(ix-board))
6778
$(eval $(generic-package))

board/common/post-build.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,6 @@ grep -qsE '^/bin/true$$' "$TARGET_DIR/etc/shells" \
108108
grep -qsE '^/bin/false$$' "$TARGET_DIR/etc/shells" \
109109
|| echo "/bin/false" >> "$TARGET_DIR/etc/shells"
110110

111-
# Run board-specific post-build scripts for enabled boards
112-
for script in "${BR2_EXTERNAL_INFIX_PATH}/board/${BR2_ARCH}/"*/post-build.sh; do
113-
board_name=$(basename "$(dirname "$script")")
114-
115-
# Convert to BR2_PACKAGE_* variable name
116-
# e.g., raspberrypi-rpi64 -> BR2_PACKAGE_RASPBERRYPI_RPI64
117-
# marvell-cn9130-crb -> BR2_PACKAGE_MARVELL_CN9130_CRB
118-
var_name="BR2_PACKAGE_$(echo "$board_name" | tr '[:lower:]' '[:upper:]' | tr '-' '_')"
119-
120-
# Run the script only if the board package is enabled
121-
if [ "${!var_name}" = "y" ]; then
122-
ixmsg "Calling $script"
123-
"$script"
124-
fi
125-
done
126-
127111
# Allow clish (symlink to /usr/bin/klish) to be a login shell
128112
grep -qsE '^/bin/clish$$' "$TARGET_DIR/etc/shells" \
129113
|| echo "/bin/clish" >> "$TARGET_DIR/etc/shells"

0 commit comments

Comments
 (0)