summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile22
-rw-r--r--init5
-rwxr-xr-xmake16
3 files changed, 13 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index 0b2d171..22883a1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,27 +1,21 @@
-all: initramfs.img amd-uc.img
+all: initramfs.img
initramfs.img:
./make
-include initramfs.d
-amd-uc.img: kernel/x86/microcode/AuthenticAMD.bin
- echo $^ | bsdcpio -o -H newc -R 0:0 > $@
+install: install-initramfs.img
-kernel/x86/microcode/AuthenticAMD.bin: /lib/firmware/amd-ucode/microcode_amd_fam17h.bin /lib/firmware/amd/amd_sev_fam17h_model0xh.sbin
- mkdir -p $(@D)
- cat $^ > $@
-
-install: /boot/initramfs.img /boot/amd-uc.img
-
-/boot/initramfs.img: initramfs.img
+install-initramfs.img: initramfs.img
rm -f $@.old $@.new
cp $< $@.new
if [ -e $@ ]; then mv $@ $@.old; fi
mv $@.new $@
-/boot/amd-uc.img: amd-uc.img
- cp $< $@
-
clean:
- $(RM) -r initramfs.img initramfs.d amd-uc.img kernel
+ $(RM) -r initramfs.img initramfs.d kernel
+
+.PHONY: all install install-initramfs.img clean
+
+MAKEFLAGS = -L -R -r
diff --git a/init b/init
index ee906d1..e8041ef 100644
--- a/init
+++ b/init
@@ -21,11 +21,6 @@ exec dropbear -F -s -p 2222 -K 30
dropbear_pid=$!
enc_root=$(findfs UUID=26748575-d7a7-418b-8f68-21be7c937500) || exit
-(
-amixer sset Master on
-amixer sset Master 30%
-aplay -Dhw:0,0 /usr/share/sounds/ding.wav
-) >/dev/null 2>&1 &
cryptsetup open --tries 65535 --allow-discards "$enc_root" root || [ -e /dev/mapper/root ] || exit
kill $dropbear_pid
diff --git a/make b/make
index 6d150ba..70c19f4 100755
--- a/make
+++ b/make
@@ -37,16 +37,8 @@ file /lib/firmware/rtl_nic/rtl8168h-2.fw /lib/firmware/rtl_nic/rtl8168h-2.fw 064
file /lib64/libnss_files.so.2 /lib64/libnss_files.so.2 0755 0 0
file /root/.ssh/authorized_keys $scriptdir/authorized_keys 0600 0 0
file /unlock $scriptdir/unlock 0755 0 0
-file /usr/share/alsa/cards/HDA-Intel.conf /usr/share/alsa/cards/HDA-Intel.conf 0644 0 0
-file /usr/share/alsa/cards/USB-Audio.conf /usr/share/alsa/cards/USB-Audio.conf 0644 0 0
-file /usr/share/sounds/ding.wav $scriptdir/ding.wav 0644 0 0
EOF
- find /usr/share/alsa \
- \( -name cards -o -name speaker-test -o -name ucm -o -name topology \) -prune -o \
- -type f -print | while read f; do
- printf 'file %s %s 0644 0 0\n' "$f" "$f"
- done
- for cmd in cryptsetup e2fsck aplay amixer dropbear; do
+ for cmd in cryptsetup e2fsck dropbear; do
cmdp="$(command -v "$cmd")"
# builtin
if [ "$cmd" = "$cmdp" ]; then
@@ -77,13 +69,15 @@ gen_dir_ents() {
}
gen_depfile() {
- echo "initramfs.img: make" >&3
+ deps='make'
while read type target source args; do
printf '%s %s %s %s\n' "$type" "$target" "$source" "$args"
if [ "$type" = file ]; then
- echo "initramfs.img: $source" >&3
+ deps="$deps $source"
+ echo "$source:" >&3
fi
done
+ echo "initramfs.img: $deps" >&3
}
gen_cpio_list | gen_dir_ents | sort -u | gen_depfile 3>initramfs.d | "${scriptdir}"/gen_init_cpio -t 0 - | xz --x86 --lzma2=preset=9e --check=crc32 -c > initramfs.img