diff --git a/aa_wireless_dongle/board/common/rootfs_overlay/etc/init.d/S00persist b/aa_wireless_dongle/board/common/rootfs_overlay/etc/init.d/S00persist new file mode 100755 index 0000000..2aeb27d --- /dev/null +++ b/aa_wireless_dongle/board/common/rootfs_overlay/etc/init.d/S00persist @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Setup persistent storage +# + +case "$1" in + start) + echo "Setup persistent storage..." + mkdir -p /persist/seedrng + mkdir -p /persist/bluetooth + ;; + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? diff --git a/aa_wireless_dongle/board/common/rootfs_overlay/persist/.empty b/aa_wireless_dongle/board/common/rootfs_overlay/persist/.empty new file mode 100644 index 0000000..e69de29 diff --git a/aa_wireless_dongle/board/common/rootfs_overlay/var/lib/bluetooth b/aa_wireless_dongle/board/common/rootfs_overlay/var/lib/bluetooth new file mode 120000 index 0000000..88daf53 --- /dev/null +++ b/aa_wireless_dongle/board/common/rootfs_overlay/var/lib/bluetooth @@ -0,0 +1 @@ +/persist/bluetooth \ No newline at end of file diff --git a/aa_wireless_dongle/board/common/rootfs_overlay/var/lib/seedrng b/aa_wireless_dongle/board/common/rootfs_overlay/var/lib/seedrng new file mode 120000 index 0000000..6bfec86 --- /dev/null +++ b/aa_wireless_dongle/board/common/rootfs_overlay/var/lib/seedrng @@ -0,0 +1 @@ +/persist/seedrng \ No newline at end of file diff --git a/aa_wireless_dongle/board/raspberrypi/genimage.cfg.in b/aa_wireless_dongle/board/raspberrypi/genimage.cfg.in new file mode 100644 index 0000000..bed9a60 --- /dev/null +++ b/aa_wireless_dongle/board/raspberrypi/genimage.cfg.in @@ -0,0 +1,40 @@ +image boot.vfat { + vfat { + files = { +#BOOT_FILES# + } + } + + size = 32M +} + +image persist.ext4 { + name = "persist" + ext4 { + label = "persist" + use-mke2fs = true + } + size = 32M +} + + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } + + partition persist { + partition-type = 0x83 + image = "persist.ext4" + } +} diff --git a/aa_wireless_dongle/board/raspberrypi/post-image.sh b/aa_wireless_dongle/board/raspberrypi/post-image.sh new file mode 100755 index 0000000..b85ef9f --- /dev/null +++ b/aa_wireless_dongle/board/raspberrypi/post-image.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +source board/raspberrypi/post-image.sh diff --git a/aa_wireless_dongle/board/raspberrypi/rootfs_overlay/etc/fstab b/aa_wireless_dongle/board/raspberrypi/rootfs_overlay/etc/fstab new file mode 100644 index 0000000..b11c6cb --- /dev/null +++ b/aa_wireless_dongle/board/raspberrypi/rootfs_overlay/etc/fstab @@ -0,0 +1,9 @@ +# +/dev/root / ext2 ro,noauto 0 1 +/dev/mmcblk0p3 /persist ext4 defaults,noatime 0 2 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /tmp tmpfs mode=1777 0 0 +tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 +sysfs /sys sysfs defaults 0 0 \ No newline at end of file diff --git a/aa_wireless_dongle/board/raspberrypi0w/rootfs_overlay/.empty b/aa_wireless_dongle/board/raspberrypi0w/rootfs_overlay/.empty deleted file mode 100644 index d3f5a12..0000000 --- a/aa_wireless_dongle/board/raspberrypi0w/rootfs_overlay/.empty +++ /dev/null @@ -1 +0,0 @@ - diff --git a/aa_wireless_dongle/configs/raspberrypi0w_defconfig b/aa_wireless_dongle/configs/raspberrypi0w_defconfig index d70fc07..74858b5 100644 --- a/aa_wireless_dongle/configs/raspberrypi0w_defconfig +++ b/aa_wireless_dongle/configs/raspberrypi0w_defconfig @@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-zero-w" # Rootfs overlay -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/common/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi0w/rootfs_overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/common/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi/rootfs_overlay" BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/patches" # Enable compressed kernel module support @@ -72,9 +72,10 @@ BR2_TARGET_GENERIC_ROOT_PASSWD="password" # BR2_TARGET_GENERIC_GETTY is not set # Filesystem / image +BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=n BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y -BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ROOTFS_EXT2_SIZE="80M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi0w/post-build.sh" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi0w/post-image.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi/post-image.sh" diff --git a/aa_wireless_dongle/configs/raspberrypi3a_defconfig b/aa_wireless_dongle/configs/raspberrypi3a_defconfig index 0e81556..f5d6e83 100644 --- a/aa_wireless_dongle/configs/raspberrypi3a_defconfig +++ b/aa_wireless_dongle/configs/raspberrypi3a_defconfig @@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3" # Rootfs overlay -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/common/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi4/rootfs_overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/common/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi4/rootfs_overlay" BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/patches" # Enable compressed kernel module support @@ -72,9 +72,10 @@ BR2_TARGET_GENERIC_ROOT_PASSWD="password" # BR2_TARGET_GENERIC_GETTY is not set # Filesystem / image +BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=n BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y -BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ROOTFS_EXT2_SIZE="80M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi/post-image.sh" diff --git a/aa_wireless_dongle/configs/raspberrypi4_defconfig b/aa_wireless_dongle/configs/raspberrypi4_defconfig index 0ffa885..311c063 100644 --- a/aa_wireless_dongle/configs/raspberrypi4_defconfig +++ b/aa_wireless_dongle/configs/raspberrypi4_defconfig @@ -23,7 +23,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2711-rpi-4-b" # Rootfs overlay -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/common/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi4/rootfs_overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/common/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi4/rootfs_overlay" BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/patches" # Enable compressed kernel module support @@ -73,9 +73,10 @@ BR2_TARGET_GENERIC_ROOT_PASSWD="password" # BR2_TARGET_GENERIC_GETTY is not set # Filesystem / image +BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=n BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y -BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ROOTFS_EXT2_SIZE="80M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4/post-build.sh" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4/post-image.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi/post-image.sh" diff --git a/aa_wireless_dongle/configs/raspberrypizero2w_defconfig b/aa_wireless_dongle/configs/raspberrypizero2w_defconfig index 625d7d0..8144198 100644 --- a/aa_wireless_dongle/configs/raspberrypizero2w_defconfig +++ b/aa_wireless_dongle/configs/raspberrypizero2w_defconfig @@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-zero-2-w" # Rootfs overlay -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/common/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi0w/rootfs_overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/common/rootfs_overlay $(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi/rootfs_overlay" BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/patches" # Enable compressed kernel module support @@ -72,9 +72,10 @@ BR2_TARGET_GENERIC_ROOT_PASSWD="password" # BR2_TARGET_GENERIC_GETTY is not set # Filesystem / image +BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=n BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y -BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ROOTFS_EXT2_SIZE="80M" # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypizero2w/post-build.sh" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypizero2w/post-image.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_AA_WIRELESS_DONGLE_PATH)/board/raspberrypi/post-image.sh"