pyavitz / debian-image-builder

Debian image builder for single board computers
Other
139 stars 33 forks source link

USB Drive support #63

Closed ShorTie8 closed 1 year ago

ShorTie8 commented 1 year ago

This patch allows you to install to a usb device using inotify-wait. So it ends up being like a 6k patch and a Find_USB script. make usb board=rock5b, calls Find_USB and writes the drive to USB_Drive.txt. USB_Drive.txt is used to determine whether to use losetup or not.

USB.patch Find_USB.txt

pyavitz commented 1 year ago

What exactly am I looking at here? Is it writing an img created by the builder, to USB, from the builder?

ShorTie8 commented 1 year ago

Instead of creating a image, writing to a loopback, it uses /dev/sdX, a usb device.

pyavitz commented 1 year ago

Well when you and github become friends create a PR.

ShorTie8 commented 1 year ago

I reversed my comment and it killed the pr, lol. So we start out adding in USB_Drive into custom.txt bye,

diff --git a/lib/dialog/config b/lib/dialog/config index 5c9df0e3..73838641 100755 --- a/lib/dialog/config +++ b/lib/dialog/config @@ -213,6 +213,9 @@ echo "" >> custom.txt echo "# Compression Types: xz zst" >> custom.txt echo 'IMG_COMPRESSION="xz"' >> custom.txt echo "" >> custom.txt +echo "# USB Drive: sdX" >> custom.txt +echo 'USB_Drive=""' >> custom.txt +echo "" >> custom.txt echo "### DO NOT EDIT BELOW THIS LINE" >> custom.txt echo "# CUSTOM=${BUILDER}" >> custom.txt }

??

ShorTie8 commented 1 year ago

Gona do up a more generic Dev_Device for all