24 lines
820 B
Bash
Executable File
24 lines
820 B
Bash
Executable File
#!/bin/sh
|
|
# post_build.sh - Common post-build script for Raspberry Pi
|
|
#
|
|
# Called by Buildroot after assembling the target rootfs.
|
|
# Arguments:
|
|
# $1 = path to the target rootfs directory (e.g., output/target)
|
|
#
|
|
# Environment:
|
|
# BR2_EXTERNAL_RPI_COMMON_PATH = path to this external tree
|
|
#
|
|
# Use this script for:
|
|
# - Fixing file permissions
|
|
# - Creating symlinks
|
|
# - Generating config files that depend on build-time variables
|
|
# - Stripping unnecessary files from the rootfs
|
|
#
|
|
# Do NOT use this for:
|
|
# - Installing packages (use rootfs overlay or a package .mk instead)
|
|
# - Modifying files outside $1
|
|
|
|
# Add usb_modeswitch mdev rule
|
|
grep -q "usb_modeswitch" "$TARGET_DIR/etc/mdev.conf" || \
|
|
echo '$PRODUCT=bda/1a2b.* root:root 0660 */lib/mdev/rtl8821cu_usb_modeswitch.sh' >> "$TARGET_DIR/etc/mdev.conf"
|