rtl8821cu mdev rule for automatic usb modeswitch
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
|
||||
|
||||
# ssh keys
|
||||
/etc/ssh/ssh_host_ecdsa_key f 600 0 0 - - - - -
|
||||
/etc/ssh/ssh_host_ed25519_key f 600 0 0 - - - - -
|
||||
/etc/ssh/ssh_host_rsa_key f 600 0 0 - - - - -
|
||||
|
||||
#rtl8821cu usb modeswitch script
|
||||
/lib/mdev/rtl8821cu_usb_modeswitch.sh f 755 0 0 - - - - -
|
||||
@@ -18,17 +18,6 @@
|
||||
# - Installing packages (use rootfs overlay or a package .mk instead)
|
||||
# - Modifying files outside $1
|
||||
|
||||
set -e
|
||||
|
||||
TARGET_DIR="$1"
|
||||
|
||||
# Example: ensure /etc/hostname exists with a default value
|
||||
if [ ! -f "${TARGET_DIR}/etc/hostname" ]; then
|
||||
echo "rpi-common" > "${TARGET_DIR}/etc/hostname"
|
||||
fi
|
||||
|
||||
# Example: remove unnecessary documentation to save space
|
||||
rm -rf "${TARGET_DIR}/usr/share/man"
|
||||
rm -rf "${TARGET_DIR}/usr/share/doc"
|
||||
|
||||
echo ">>> Common post-build script completed"
|
||||
# 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"
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
[ "$ACTION" = "add" ] || exit 0
|
||||
usb_modeswitch -v 0bda -p 1a2b -c /usr/share/usb_modeswitch/0bda:1a2b &
|
||||
@@ -11,7 +11,7 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
|
||||
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt $(BR2_EXTERNAL_RPI_COMMON_PATH)/board/raspberrypi/device_table.txt"
|
||||
BR2_SYSTEM_DHCP="eth0"
|
||||
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_RPI_COMMON_PATH)/board/raspberrypi/rootfs-overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi/post-build.sh"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi/post-build.sh $(BR2_EXTERNAL_RPI_COMMON_PATH)/board/raspberrypi/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_RPI_COMMON_PATH)/board/raspberrypi/post-image.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
|
||||
Reference in New Issue
Block a user