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 <jkhpro1003@gmail.com>
Change-Id: Ic010d5bf433078f40872a1bd53990a7ffda90372
This commit is contained in:
steve.jeong
2022-11-22 11:35:47 +09:00
committed by Dongjin Kim
parent d61a80b588
commit 4ab4aac61d
4 changed files with 18 additions and 0 deletions

5
addon/wifi/packages Normal file
View File

@@ -0,0 +1,5 @@
wireless-tools
wpasupplicant
network-manager
rtl8821au-dkms
rtl8821cu-dkms

View File

@@ -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@@

View File

@@ -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

View File

@@ -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