main/postmarketos-initramfs: unify setup_usb_storage (MR 5912)

Right now we have two similar implementations of setting up a USB mass
storage gadget, in init_functions.sh and as separate script for the
debug-shell. Given that init_functions.sh is available in debug-shell
anyway, unify both in a common setup_usb_storage_configfs() function.

Having this included in the initramfs debug-shell by default (without
installing postmarketos-mkinitfs-hook-debug-shell) also simplifies
recovery, since you can set up the USB storage for repairing the flashed
postmarketOS installation in case of boot failures. The size overhead is
minimal, since this has no extra dependencies.
This commit is contained in:
Stephan Gerhold
2024-12-17 23:24:15 +03:00
committed by Alexey Min
parent 854b37b98a
commit ce05d2d8ff
5 changed files with 55 additions and 99 deletions
-1
View File
@@ -21,7 +21,6 @@ sh_files="
./main/postmarketos-installkernel/installkernel-pmos
./main/postmarketos-initramfs/init.sh
./main/postmarketos-initramfs/init_functions.sh
./main/postmarketos-mkinitfs-hook-debug-shell/setup_usb_storage.sh
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
./main/ttyescape/*.post-install
./main/unl0kr/unlock.sh