From 4ab4aac61d539a71d6f6c711b82cd14630e2683e Mon Sep 17 00:00:00 2001 From: "steve.jeong" Date: Tue, 22 Nov 2022 11:35:47 +0900 Subject: [PATCH] odroid-stamper: Add build option "--addon-wifi". for select install DKMS packages or not. +) Add new directory "addon" it have no dependency of boards. Signed-off-by: steve.jeong Change-Id: Ic010d5bf433078f40872a1bd53990a7ffda90372 --- addon/wifi/packages | 5 +++++ fixups/S20-install-packages | 5 +++++ functions | 5 +++++ odroid-stamper | 3 +++ 4 files changed, 18 insertions(+) create mode 100644 addon/wifi/packages diff --git a/addon/wifi/packages b/addon/wifi/packages new file mode 100644 index 0000000..98525e3 --- /dev/null +++ b/addon/wifi/packages @@ -0,0 +1,5 @@ +wireless-tools +wpasupplicant +network-manager +rtl8821au-dkms +rtl8821cu-dkms diff --git a/fixups/S20-install-packages b/fixups/S20-install-packages index a3494fd..1245541 100755 --- a/fixups/S20-install-packages +++ b/fixups/S20-install-packages @@ -19,6 +19,11 @@ apt install @@DEFAULT_APT_OPTIONS@@ \ linux-image-@@DEFAULT_KERNEL_PACKAGE@@ \ @@DEFAULT_BOOTSCRIPT_PACKAGE@@ || exit 1 +if [ "x@@BUILD_DKMS@@" = "xtrue" ]; then + apt install @@DEFAULT_APT_OPTIONS@@ \ + linux-headers-@@DEFAULT_KERNEL_PACKAGE@@ +fi + if ls /overlay/host/debs/*.deb 1>/dev/null 2>&1; then dpkg -i $(ls /overlay/host/debs/*.deb) apt install --fix-broken @@DEFAULT_APT_OPTIONS@@ diff --git a/functions b/functions index e7bb919..a2a0c17 100644 --- a/functions +++ b/functions @@ -146,6 +146,10 @@ get_flavour_packages() { pkgs="${pkgs} casper" fi + if [ "x${WIFI}" = "xtrue" ]; then + pkgs="${pkgs} $(get_packages addon/wifi/packages)" + fi + echo ${pkgs} | tr " " "\n" | sort | uniq | tr "\n" " " } @@ -451,6 +455,7 @@ do_preinstall() { -e "s,@@LIVESYSTEM@@,${LIVESYSTEM},g" \ -e "s,@@MACHINEID@@,$(dbus-uuidgen),g" \ -e "s,@@INTERNAL@@,${INTERNAL},g" \ + -e "s,@@BUILD_DKMS@@,${BUILD_DKMS},g" \ ${fixup} done diff --git a/odroid-stamper b/odroid-stamper index 2d39ef9..64423ec 100755 --- a/odroid-stamper +++ b/odroid-stamper @@ -49,6 +49,7 @@ for opt in "$@"; do --kernel=*) opt_kernel_package="${opt#*=}";; --custom=*) opt_custom="${opt#*=}";; + --addon-wifi) opt_wifi=true;; esac done @@ -94,9 +95,11 @@ fi [ "x${opt_isoimage}" = "xtrue" ] && ISOIMAGE=true [ "x${opt_compress}" = "xtrue" ] && COMPRESS=true [ "x${opt_internal}" = "xtrue" ] && INTERNAL=true +[ "x${opt_wifi}" = "xtrue" ] && WIFI=true [ "${RUN_MENU}" = "true" ] && do_menu [ "x${ISOIMAGE}" = "xtrue" ] && LIVESYSTEM=true +[ "x${WIFI}" = "xtrue" ] && BUILD_DKMS=true if [ "x${IMAGE_FILE}" = "x" ]; then if [ "x${CUSTOMOS}" = "x" ]; then