Skip to content

Commit

Permalink
Add external/usb disk encryption (adds exfatprogs and e2fsprogs)
Browse files Browse the repository at this point in the history
Adds:
- e2fsprogs to support ext4 filesystem creation through mke2fs
- add /etc/mke2fs.conf so that mke2fs knows how to handle ext2/ext3/ext4
- removes mke2fs support from busybox
- bump busybox to latest version which adds cpu accelerated hash functions (not needed per se here)
- Adds exfatprogs to have mkfs.exfat and fsck.exfat
- Adds prepare_thumb_drive /etc/luks-functions to be able to prepare a thumb drive with percentage of drive assigned to LUKS, rest to exfat
- Modify most board configs to test space requirements failing

TODO:
- REMOVE test.sh (unit test case here, not sure where we should add this in the future)

GOAL here is to have secure thumb drive creation which Heads will be able to use to backup/restore/use generated GPG key material in the future (next PR)
  • Loading branch information
tlaurion committed Aug 9, 2023
1 parent d7b4a47 commit d447cab
Show file tree
Hide file tree
Showing 58 changed files with 561 additions and 85 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ bin_modules-$(CONFIG_POWERPC_UTILS) += powerpc-utils
bin_modules-$(CONFIG_IO386) += io386
bin_modules-$(CONFIG_IOPORT) += ioport
bin_modules-$(CONFIG_ZSTD) += zstd
bin_modules-$(CONFIG_E2FSPROGS) += e2fsprogs
bin_modules-$(CONFIG_EXFATPROGS) += exfatprogs

$(foreach m, $(bin_modules-y), \
$(call map,initrd_bin_add,$(call bins,$m)) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/UNTESTED_qemu-linuxboot/UNTESTED_qemu-linuxboot.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ CONFIG_BUSYBOX=n
else
CONFIG_CRYPTSETUP=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/UNTESTED_t520-maximized/UNTESTED_t520-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/UNTESTED_w530-maximized/UNTESTED_w530-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/librem_13v2/librem_13v2.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/librem_13v4/librem_13v4.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/librem_14/librem_14.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/librem_15v3/librem_15v3.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/librem_15v4/librem_15v4.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/librem_l1um/librem_l1um.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/librem_l1um_v2/librem_l1um_v2.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/librem_mini/librem_mini.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ CONFIG_IOPORT=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/librem_mini_v2/librem_mini_v2.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ CONFIG_IOPORT=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ CONFIG_UTIL_LINUX=y
CONFIG_CRYPTSETUP2=y
CONFIG_GPG2=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_DROPBEAR=y
CONFIG_MSRTOOLS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ CONFIG_UTIL_LINUX=y
CONFIG_CRYPTSETUP2=y
CONFIG_GPG2=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_DROPBEAR=y
CONFIG_MSRTOOLS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ CONFIG_UTIL_LINUX=y
CONFIG_CRYPTSETUP2=y
CONFIG_GPG2=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_DROPBEAR=y
CONFIG_MSRTOOLS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ CONFIG_UTIL_LINUX=y
CONFIG_CRYPTSETUP2=y
CONFIG_GPG2=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_DROPBEAR=y
CONFIG_MSRTOOLS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ CONFIG_UTIL_LINUX=y
CONFIG_CRYPTSETUP2=y
CONFIG_GPG2=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_DROPBEAR=y
CONFIG_MSRTOOLS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ CONFIG_FLASHROM=y
CONFIG_PCIUTILS=y
CONFIG_UTIL_LINUX=y
CONFIG_CRYPTSETUP2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_GPG2=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_DROPBEAR=y
CONFIG_MSRTOOLS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ CONFIG_UTIL_LINUX=y
CONFIG_CRYPTSETUP2=y
CONFIG_GPG2=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_DROPBEAR=y
CONFIG_MSRTOOLS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ CONFIG_UTIL_LINUX=y
CONFIG_CRYPTSETUP2=y
CONFIG_GPG2=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_DROPBEAR=y
CONFIG_MSRTOOLS=y
Expand Down
2 changes: 2 additions & 0 deletions boards/t420-hotp-maximized/t420-hotp-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/t420-maximized/t420-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/t430-hotp-maximized/t430-hotp-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/t430-maximized/t430-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/t440p-maximized/t440p-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y
CONFIG_POPT=y
Expand Down
2 changes: 2 additions & 0 deletions boards/t530-hotp-maximized/t530-hotp-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/t530-maximized/t530-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
2 changes: 2 additions & 0 deletions boards/x220-hotp-maximized/x220-hotp-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CONFIG_GPG2=y
CONFIG_KEXEC=y
CONFIG_UTIL_LINUX=y
CONFIG_LVM2=y
CONFIG_E2FSPROGS=y
CONFIG_EXFATPROGS=y
CONFIG_MBEDTLS=y
CONFIG_PCIUTILS=y

Expand Down
Loading

0 comments on commit d447cab

Please sign in to comment.