diff --git a/board/shredos/fsoverlay/usr/bin/nwipe_launcher b/board/shredos/fsoverlay/usr/bin/nwipe_launcher index c3c9d128f9..afd8e22e7c 100755 --- a/board/shredos/fsoverlay/usr/bin/nwipe_launcher +++ b/board/shredos/fsoverlay/usr/bin/nwipe_launcher @@ -3,9 +3,49 @@ # trap the ctrl+c signal trap "echo" INT +# initialise +country_code="" +nwipe_options_string="" + +# read the kernel command line for the loadkeys label for setting the correct keyboard layout +country_code=$(kernel_cmdline_extractor loadkeys) +if [ $? == 0 ] +then + if [ "$country_code" != "" ] + then + loadkeys $country_code + fi +fi + +# read the kernel command line for nwipe options +nwipe_options_string=$(kernel_cmdline_extractor nwipe_options) +if [ $? == 0 ] +then + nwipe_options_flag=1 +else + nwipe_options_flag=0 +fi + # run nwipe with a time stamped log file while true do +if [ $nwipe_options_flag == 0 ] +then /usr/bin/nwipe --logfile=nwipe_log_$(date +%Y%m%d-%H%M%S).txt +else + /usr/bin/nwipe --logfile=nwipe_log_$(date +%Y%m%d-%H%M%S).txt $nwipe_options_string +fi +printf "Paused, press a key to restart nwipe." +read -rsn1 input +sleep 1; +printf " 4" +sleep 1 +printf " 3" +sleep 1; +printf " 2" +sleep 1 +printf " 1" +sleep 1; +printf " 0" done diff --git a/configs/shredos_defconfig b/configs/shredos_defconfig index 82afb65d7a..ac6a6b4edb 100644 --- a/configs/shredos_defconfig +++ b/configs/shredos_defconfig @@ -14,13 +14,23 @@ BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/shredos/kernel-5.6-defconfig.config" BR2_PACKAGE_BINUTILS=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_E2FSPROGS=y BR2_PACKAGE_HDPARM=y +BR2_PACKAGE_HWDATA=y BR2_PACKAGE_KBD=y +BR2_PACKAGE_MEMTEST86=y BR2_PACKAGE_SMARTMONTOOLS=y BR2_PACKAGE_TRIGGERHAPPY=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_HIDAPI=y BR2_PACKAGE_LIBATASMART=y BR2_PACKAGE_LIBHID=y BR2_PACKAGE_ELFUTILS=y +BR2_PACKAGE_KERNEL_CMDLINE_EXTRACTOR=y BR2_PACKAGE_NWIPE=y BR2_PACKAGE_UTIL_LINUX_BINARIES=y BR2_PACKAGE_UTIL_LINUX_MOUNT=y diff --git a/package/Config.in b/package/Config.in index 5c89f9f490..471cc63766 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1799,6 +1799,7 @@ menu "Other" source "package/gsl/Config.in" source "package/gtest/Config.in" source "package/jemalloc/Config.in" + source "package/kernel_cmdline_extractor/Config.in" source "package/lapack/Config.in" source "package/libargtable2/Config.in" source "package/libatomic_ops/Config.in" diff --git a/package/kernel_cmdline_extractor/Config.in b/package/kernel_cmdline_extractor/Config.in new file mode 100644 index 0000000000..d4beaa2c25 --- /dev/null +++ b/package/kernel_cmdline_extractor/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_KERNEL_CMDLINE_EXTRACTOR + bool "kernel_cmdline_extractor" + help + Kernel_cmdline_extractor + +comment "kernel_cmdline_extractor" diff --git a/package/kernel_cmdline_extractor/kernel_cmdline_extractor.hash b/package/kernel_cmdline_extractor/kernel_cmdline_extractor.hash new file mode 100644 index 0000000000..7cf686fecc --- /dev/null +++ b/package/kernel_cmdline_extractor/kernel_cmdline_extractor.hash @@ -0,0 +1 @@ +sha1 c81a245e89ceb09b28634c6040eef65276e0f51d kernel_cmdline_extractor-v1.04.tar.gz diff --git a/package/kernel_cmdline_extractor/kernel_cmdline_extractor.mk b/package/kernel_cmdline_extractor/kernel_cmdline_extractor.mk new file mode 100644 index 0000000000..2b43ca775c --- /dev/null +++ b/package/kernel_cmdline_extractor/kernel_cmdline_extractor.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# kernel_cmdline_extractor +# +################################################################################ + +KERNEL_CMDLINE_EXTRACTOR_VERSION = v1.04 +KERNEL_CMDLINE_EXTRACTOR_SITE = $(call github,PartialVolume,kernel_cmdline_extractor,$(KERNEL_CMDLINE_EXTRACTOR_VERSION)) + +define KERNEL_CMDLINE_EXTRACTOR_INITSH + (cd $(@D) && ./autogen.sh); +endef + +KERNEL_CMDLINE_EXTRACTOR_POST_PATCH_HOOKS += KERNEL_CMDLINE_EXTRACTOR_INITSH + + +$(eval $(autotools-package))