about summary refs log tree commit diff
path: root/configs/pinephone_fde/udev_root_dir
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-04-21 23:12:25 -0700
committerXiao Pan <gky44px1999@gmail.com>2023-04-21 23:12:25 -0700
commit4f0d99e04c15e999afbe73af3b685a9704927918 (patch)
tree6bdf6ad7545ff546e17013cb3c47e1a659d1d37d /configs/pinephone_fde/udev_root_dir
parentf7b6653c92b6e20760b79eea49fe21194a7f3e4b (diff)
add new archive files
Diffstat (limited to 'configs/pinephone_fde/udev_root_dir')
-rw-r--r--configs/pinephone_fde/udev_root_dir/boot/boot.txt34
-rw-r--r--configs/pinephone_fde/udev_root_dir/etc/crypttab14
-rw-r--r--configs/pinephone_fde/udev_root_dir/etc/mkinitcpio.conf73
3 files changed, 121 insertions, 0 deletions
diff --git a/configs/pinephone_fde/udev_root_dir/boot/boot.txt b/configs/pinephone_fde/udev_root_dir/boot/boot.txt
new file mode 100644
index 0000000..1bb642a
--- /dev/null
+++ b/configs/pinephone_fde/udev_root_dir/boot/boot.txt
@@ -0,0 +1,34 @@
+gpio set 98 # Enable vibrator
+
+setenv bootargs loglevel=4 console=${console} console=tty0 cryptdevice=UUID=5f5bcfd4-816c-4a69-97b2-0dae88dc7c0c:root 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/udev_root_dir/etc/crypttab b/configs/pinephone_fde/udev_root_dir/etc/crypttab
new file mode 100644
index 0000000..dc3e241
--- /dev/null
+++ b/configs/pinephone_fde/udev_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).
+
+# <name>       <device>                                     <password>              <options>
+# 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 /etc/cryptsetup-keys.d/home.key
diff --git a/configs/pinephone_fde/udev_root_dir/etc/mkinitcpio.conf b/configs/pinephone_fde/udev_root_dir/etc/mkinitcpio.conf
new file mode 100644
index 0000000..30baa0c
--- /dev/null
+++ b/configs/pinephone_fde/udev_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 <hook name>' 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 udev autodetect keyboard modconf block osk-sdl 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"