From 4f0d99e04c15e999afbe73af3b685a9704927918 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 21 Apr 2023 23:12:25 -0700 Subject: add new archive files --- .../pinephone_fde/systemd_root_dir/boot/boot.txt | 34 ++++++++++ .../pinephone_fde/systemd_root_dir/etc/crypttab | 14 +++++ .../systemd_root_dir/etc/crypttab.initramfs | 1 + .../systemd_root_dir/etc/mkinitcpio.conf | 73 ++++++++++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 configs/pinephone_fde/systemd_root_dir/boot/boot.txt create mode 100644 configs/pinephone_fde/systemd_root_dir/etc/crypttab create mode 100644 configs/pinephone_fde/systemd_root_dir/etc/crypttab.initramfs create mode 100644 configs/pinephone_fde/systemd_root_dir/etc/mkinitcpio.conf (limited to 'configs/pinephone_fde/systemd_root_dir') diff --git a/configs/pinephone_fde/systemd_root_dir/boot/boot.txt b/configs/pinephone_fde/systemd_root_dir/boot/boot.txt new file mode 100644 index 0000000..c95ed1d --- /dev/null +++ b/configs/pinephone_fde/systemd_root_dir/boot/boot.txt @@ -0,0 +1,34 @@ +gpio set 98 # Enable vibrator + +setenv bootargs loglevel=4 console=${console} console=tty0 root=/dev/mapper/root rw rootwait quiet + +echo "Loading kernel..." +load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} ${bootdir}/Image.gz + +echo "Uncompressing kernel..." +unzip ${ramdisk_addr_r} ${kernel_addr_r} + +echo "Loading initramfs..." +load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} ${bootdir}/initramfs-linux.img +setenv ramdisk_size ${filesize} + +echo "Loading dtb..." +load mmc ${mmc_bootdev}:1 ${fdt_addr_r} ${bootdir}/dtbs/${fdtfile} + +echo Resizing FDT +fdt addr ${fdt_addr_r} +fdt resize + +echo Adding FTD RAM clock +fdt mknode / memory +fdt set /memory ram_freq ${ram_freq} +fdt list /memory + +echo Loading user script +setenv user_scriptaddr 0x61dbc200 +load mmc ${mmc_bootdev}:1 ${user_scriptaddr} ${bootdir}/user.scr +if test $? -eq 0; then source ${user_scriptaddr}; else echo No user script found; fi + +echo "Booting..." +gpio clear 98 # Disable vibrator +booti ${kernel_addr_r} ${ramdisk_addr_r}:0x${ramdisk_size} ${fdt_addr_r} diff --git a/configs/pinephone_fde/systemd_root_dir/etc/crypttab b/configs/pinephone_fde/systemd_root_dir/etc/crypttab new file mode 100644 index 0000000..5d5f279 --- /dev/null +++ b/configs/pinephone_fde/systemd_root_dir/etc/crypttab @@ -0,0 +1,14 @@ +# Configuration for encrypted block devices. +# See crypttab(5) for details. + +# NOTE: Do not list your root (/) partition here, it must be set up +# beforehand by the initramfs (/etc/mkinitcpio.conf). + +# +# home UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37 /etc/mypassword1 +# data1 /dev/sda3 /etc/mypassword2 +# data2 /dev/sda5 /etc/cryptfs.key +# swap /dev/sdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256 +# vol /dev/sdb7 none + +home UUID=b719aa8b-1f53-4069-bd9b-5edfb450f85a none diff --git a/configs/pinephone_fde/systemd_root_dir/etc/crypttab.initramfs b/configs/pinephone_fde/systemd_root_dir/etc/crypttab.initramfs new file mode 100644 index 0000000..307ce3b --- /dev/null +++ b/configs/pinephone_fde/systemd_root_dir/etc/crypttab.initramfs @@ -0,0 +1 @@ +root UUID=5f5bcfd4-816c-4a69-97b2-0dae88dc7c0c none password-echo=no diff --git a/configs/pinephone_fde/systemd_root_dir/etc/mkinitcpio.conf b/configs/pinephone_fde/systemd_root_dir/etc/mkinitcpio.conf new file mode 100644 index 0000000..935aa3a --- /dev/null +++ b/configs/pinephone_fde/systemd_root_dir/etc/mkinitcpio.conf @@ -0,0 +1,73 @@ +# vim:set ft=sh +# MODULES +# The following modules are loaded before any boot hooks are +# run. Advanced users may wish to specify all system modules +# in this array. For instance: +# MODULES=(usbhid xhci_hcd) +MODULES=() + +# BINARIES +# This setting includes any additional binaries a given user may +# wish into the CPIO image. This is run last, so it may be used to +# override the actual binaries included by a given hook +# BINARIES are dependency parsed, so you may safely ignore libraries +BINARIES=() + +# FILES +# This setting is similar to BINARIES above, however, files are added +# as-is and are not parsed in any way. This is useful for config files. +FILES=() + +# HOOKS +# This is the most important setting in this file. The HOOKS control the +# modules and scripts added to the image, and what happens at boot time. +# Order is important, and it is recommended that you do not change the +# order in which HOOKS are added. Run 'mkinitcpio -H ' for +# help on a given hook. +# 'base' is _required_ unless you know precisely what you are doing. +# 'udev' is _required_ in order to automatically load modules +# 'filesystems' is _required_ unless you specify your fs modules in MODULES +# Examples: +## This setup specifies all modules in the MODULES setting above. +## No RAID, lvm2, or encrypted root is needed. +# HOOKS=(base) +# +## This setup will autodetect all modules for your system and should +## work as a sane default +# HOOKS=(base udev autodetect modconf block filesystems fsck) +# +## This setup will generate a 'full' image which supports most systems. +## No autodetection is done. +# HOOKS=(base udev modconf block filesystems fsck) +# +## This setup assembles a mdadm array with an encrypted root file system. +## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices. +# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck) +# +## This setup loads an lvm2 volume group. +# HOOKS=(base udev modconf block lvm2 filesystems fsck) +# +## NOTE: If you have /usr on a separate partition, you MUST include the +# usr and fsck hooks. +HOOKS=(base systemd autodetect keyboard modconf block sd-encrypt filesystems fsck) + +# COMPRESSION +# Use this to compress the initramfs image. By default, gazip compression +# is used. Use 'cat' to create an uncompressed image. +#COMPRESSION="zstd" +#COMPRESSION="gzip" +#COMPRESSION="bzip2" +#COMPRESSION="lzma" +#COMPRESSION="xz" +#COMPRESSION="lzop" +#COMPRESSION="lz4" + +# COMPRESSION_OPTIONS +# Additional options for the compressor +#COMPRESSION_OPTIONS=() + +# MODULES_DECOMPRESS +# Decompress kernel modules during initramfs creation. +# Enable to speedup boot process, disable to save RAM +# during early userspace. Switch (yes/no). +#MODULES_DECOMPRESS="yes" -- cgit 1.4.1