Compare commits
10 Commits
2c03628332
...
fe678523a4
Author | SHA1 | Date |
---|---|---|
|
fe678523a4 | |
|
26d9e63dcb | |
|
8f7af4633e | |
|
1624d06f1d | |
|
ae19b0cb2b | |
|
15ca5d6069 | |
|
8b7393f50c | |
|
99b25aea37 | |
|
3511d8a5aa | |
|
6d2df689d9 |
|
@ -1,15 +0,0 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
|
||||
#patreon: # Replace with a single Patreon username
|
||||
#open_collective: # Replace with a single Open Collective username
|
||||
#ko_fi: # Replace with a single Ko-fi username
|
||||
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
#liberapay: # Replace with a single Liberapay username
|
||||
#issuehunt: # Replace with a single IssueHunt username
|
||||
#otechie: # Replace with a single Otechie username
|
||||
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
#github: [Valeria-Fadeeva]
|
||||
custom: ["https://www.tinkoff.ru/rm/fadeeva.valeriya96/9bLRi79066", "https://yoomoney.ru/to/4100115921160758", "https://qiwi.com/n/VALERIAFADEEVA", "valeria.fadeeva.me"]
|
|
@ -16,6 +16,4 @@ linux-xanmod-anbox-fallback.efi
|
|||
|
||||
[YooMoney](https://yoomoney.ru/to/4100115921160758)
|
||||
|
||||
[Qiwi](https://qiwi.com/n/VALERIAFADEEVA)
|
||||
|
||||
Etherium 0x981FBf878fe451BDB83BEaF68078394d4B13213f
|
||||
|
|
5
push.sh
5
push.sh
|
@ -1,3 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
git add . && git commit -m "Update" && git push
|
||||
git add . && git commit -m "Update"
|
||||
git push
|
||||
|
||||
echo "Ready"
|
||||
|
|
|
@ -39,6 +39,8 @@ else
|
|||
|
||||
fi
|
||||
|
||||
BOOT_PATH="/boot"
|
||||
|
||||
ukify_conf="/etc/kernel/uki.conf"
|
||||
keys_count=0
|
||||
|
||||
|
@ -71,30 +73,30 @@ EOF
|
|||
echo "Check Secure Boot keys"
|
||||
declare -a keys=("/etc/kernel/secure-boot.key.pem" "/etc/kernel/secure-boot.cert.pem" "/etc/kernel/pcr-initrd.key.pem" "/etc/kernel/pcr-initrd.pub.pem" "/etc/kernel/pcr-system.key.pem" "/etc/kernel/pcr-system.pub.pem")
|
||||
|
||||
for i in ${keys[@]}
|
||||
for i in "${keys[@]}"
|
||||
do
|
||||
if [ -f "${i}" ]
|
||||
then
|
||||
echo "${i} exist"
|
||||
keys_count=$(expr $keys_count + 1)
|
||||
keys_count=$(($keys_count + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $keys_count < 6 ]]
|
||||
if [ $keys_count -lt 6 ]
|
||||
then
|
||||
for i in ${keys[@]}
|
||||
for i in "${keys[@]}"
|
||||
do
|
||||
if [ -f "${i}" ]
|
||||
then
|
||||
echo "${i} remove"
|
||||
rm "${i}"
|
||||
keys_count=$(expr $keys_count - 1)
|
||||
keys_count=$(($keys_count - 1))
|
||||
fi
|
||||
done
|
||||
fi
|
||||
echo "Keys = $keys_count"
|
||||
|
||||
if [ -f "${ukify_conf}" ] && [[ $keys_count == 0 ]]
|
||||
if [ -f "${ukify_conf}" ] && [ $keys_count == 0 ]
|
||||
then
|
||||
echo "Generate keys"
|
||||
/usr/lib/systemd/ukify genkey --config "${ukify_conf}"
|
||||
|
@ -140,16 +142,18 @@ while getopts ":hag:xyz" arg; do
|
|||
|
||||
efi_image="$BOOT_PATH/$kernel_name.efi"
|
||||
efi_image_fallback="$BOOT_PATH/$kernel_name-fallback.efi"
|
||||
efi_image_fallback_terminal="$BOOT_PATH/$kernel_name-fallback-terminal.efi"
|
||||
|
||||
declare -a images=()
|
||||
images+=($efi_image)
|
||||
images+=($efi_image_fallback)
|
||||
images+=("$efi_image")
|
||||
images+=("$efi_image_fallback")
|
||||
images+=("$efi_image_fallback_terminal")
|
||||
|
||||
for image in "${images[@]}";
|
||||
do
|
||||
if [ -f ]; then
|
||||
if [ -f "$image" ]; then
|
||||
echo "==> Removing $image..."
|
||||
rm -f $image
|
||||
rm -f "$image"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -181,7 +185,7 @@ if (( update_all )); then
|
|||
for kernel_path in /usr/lib/modules/*; do
|
||||
[ -f "$kernel_path/pkgbase" ] || continue
|
||||
|
||||
kernel_version=$(basename $kernel_path)
|
||||
kernel_version=$(basename "$kernel_path")
|
||||
kernel_dir="/usr/lib/modules/$kernel_version"
|
||||
pkgbase="$kernel_dir/pkgbase"
|
||||
kernel_name=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "$pkgbase")
|
||||
|
@ -204,17 +208,23 @@ function gen_image() {
|
|||
kernel_dir="/usr/lib/modules/$kernel_version"
|
||||
|
||||
if [ -f "/etc/kernel/cmdline" ]; then
|
||||
cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "/etc/kernel/cmdline")
|
||||
cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "/etc/kernel/cmdline" | tr '[:space:]' ' ' | tr -s ' ')
|
||||
|
||||
elif [ -f "/boot/refind_linux.conf" ]; then
|
||||
cmdline=$(cat "/boot/refind_linux.conf" | head -n 1 | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||
cmdline=$(head -n 1 < "/boot/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||
|
||||
elif [ -f "/efi/refind_linux.conf" ]; then
|
||||
cmdline=$(cat "/efi/refind_linux.conf" | head -n 1 | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||
cmdline=$(head -n 1 < "/efi/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||
|
||||
elif [ -f "/boot/efi/refind_linux.conf" ]; then
|
||||
cmdline=$(cat "/boot/efi/refind_linux.conf" | head -n 1 | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||
cmdline=$(head -n 1 < "/boot/efi/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||
|
||||
else
|
||||
cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' -e 's/initrd.*$//g' "/proc/cmdline")
|
||||
fi
|
||||
|
||||
cmdline_terminal="$cmdline systemd.unit=multi-user.target"
|
||||
|
||||
vmlinuz="$kernel_dir/vmlinuz"
|
||||
|
||||
initrd_image="$(mktemp)"
|
||||
|
@ -222,6 +232,7 @@ function gen_image() {
|
|||
|
||||
efi_image="$BOOT_PATH/$kernel_name.efi"
|
||||
efi_image_fallback="$BOOT_PATH/$kernel_name-fallback.efi"
|
||||
efi_image_fallback_terminal="$BOOT_PATH/$kernel_name-fallback-terminal.efi"
|
||||
|
||||
echo "==> Building initrd image $kernel_name $initrd_image"
|
||||
# dracut --force --hostonly --no-hostonly-cmdline --kver "$kernel_version" "$initrd_image"
|
||||
|
@ -279,6 +290,34 @@ function gen_image() {
|
|||
/usr/lib/systemd/ukify build "${ukify_args[@]}"
|
||||
fi
|
||||
|
||||
echo "==> Building initrd image $kernel_name $initrd_image_fallback TERMINAL"
|
||||
# dracut --force --kver "$kernel_version" "$initrd_image_fallback"
|
||||
dracut --force --no-hostonly --no-hostonly-i18n --early-microcode --kernel-cmdline="$cmdline_terminal" --kver "$kernel_version" "$initrd_image_fallback"
|
||||
|
||||
declare -a ukify_args=("${ukify_global_args[@]}")
|
||||
ukify_args+=(--linux "$vmlinuz")
|
||||
if [ -f "/boot/amd-ucode.img" ];then
|
||||
ukify_args+=(--initrd "/boot/amd-ucode.img")
|
||||
fi
|
||||
if [ -f "/boot/intel-ucode.img" ];then
|
||||
ukify_args+=(--initrd "/boot/intel-ucode.img")
|
||||
fi
|
||||
ukify_args+=(--initrd "$initrd_image_fallback")
|
||||
ukify_args+=(--cmdline "$cmdline_terminal")
|
||||
ukify_args+=(--os-release "/etc/os-release")
|
||||
ukify_args+=(--uname "$kernel_version")
|
||||
ukify_args+=(--output "$efi_image_fallback_terminal")
|
||||
ukify_args+=(--measure)
|
||||
|
||||
echo "==> Ukify image $kernel_name $efi_image_fallback_terminal TERMINAL"
|
||||
if [ -f "${ukify_conf}" ]; then
|
||||
# ukify_args+=(--sbat='sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
|
||||
# uki.author.myimage,1,UKI for System,uki.author.myimage,1,https://www.freedesktop.org/software/systemd/man/systemd-stub.html')
|
||||
/usr/lib/systemd/ukify --config "${ukify_conf}" build "${ukify_args[@]}"
|
||||
else
|
||||
/usr/lib/systemd/ukify build "${ukify_args[@]}"
|
||||
fi
|
||||
|
||||
rm -f "$initrd_image"
|
||||
rm -f "$initrd_image_fallback"
|
||||
}
|
||||
|
|
|
@ -13,4 +13,4 @@ Target = usr/src/*/dkms.conf
|
|||
[Action]
|
||||
Description = Ensure ESP is mounted...
|
||||
When = PreTransaction
|
||||
Exec = /usr/bin/dracut-ukify -x
|
||||
Exec = /bin/sh -c "/usr/bin/dracut-ukify -x"
|
||||
|
|
|
@ -7,5 +7,5 @@ Target = usr/src/*/dkms.conf
|
|||
[Action]
|
||||
Description = Removing linux images...
|
||||
When = PreTransaction
|
||||
Exec = /usr/bin/dracut-ukify -y
|
||||
Exec = /bin/sh -c "/usr/bin/dracut-ukify -y"
|
||||
NeedsTargets
|
||||
|
|
|
@ -13,5 +13,5 @@ Target = usr/src/*/dkms.conf
|
|||
[Action]
|
||||
Description = Updating linux images...
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/dracut-ukify -z
|
||||
Exec = /bin/sh -c "/usr/bin/dracut-ukify -z"
|
||||
NeedsTargets
|
||||
|
|
Loading…
Reference in New Issue