add hypen and use a better var name (uname_r) instead of "unamer"
This commit is contained in:
parent
d7b9b67616
commit
9d165a3f10
14
boot.cmd
14
boot.cmd
@ -13,7 +13,7 @@ setenv rootfstype "ext4"
|
|||||||
setenv docker_optimizations "on"
|
setenv docker_optimizations "on"
|
||||||
setenv earlycon "off"
|
setenv earlycon "off"
|
||||||
setenvrootdev
|
setenvrootdev
|
||||||
setenvunamer
|
setenvuname_r
|
||||||
|
|
||||||
echo "Boot script loaded from ${devtype} ${devnum}"
|
echo "Boot script loaded from ${devtype} ${devnum}"
|
||||||
|
|
||||||
@ -42,14 +42,14 @@ if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgro
|
|||||||
|
|
||||||
#load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd
|
#load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd
|
||||||
#load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image
|
#load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image
|
||||||
load ${devtype} ${devnum}:1 ${ramdisk_addr_r} ${prefix}uInitrd${unamer}
|
load ${devtype} ${devnum}:1 ${ramdisk_addr_r} ${prefix}uInitrd-${uname_r}
|
||||||
load ${devtype} ${devnum}:1 ${kernel_addr_r} ${prefix}vmlinuz${unamer}
|
load ${devtype} ${devnum}:1 ${kernel_addr_r} ${prefix}vmlinuz-${uname_r}
|
||||||
|
|
||||||
load ${devtype} ${devnum}:1 ${fdt_addr_r} ${prefix}dtb${unamer}/${fdtfile}
|
load ${devtype} ${devnum}:1 ${fdt_addr_r} ${prefix}dtb-${uname_r}/${fdtfile}
|
||||||
fdt addr ${fdt_addr_r}
|
fdt addr ${fdt_addr_r}
|
||||||
fdt resize 65536
|
fdt resize 65536
|
||||||
for overlay_file in ${overlays}; do
|
for overlay_file in ${overlays}; do
|
||||||
if load ${devtype} ${devnum}:1 ${load_addr} ${prefix}dtb${unamer}/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
if load ${devtype} ${devnum}:1 ${load_addr} ${prefix}dtb-${uname_r}/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
||||||
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
|
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
|
||||||
fdt apply ${load_addr} || setenv overlay_error "true"
|
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||||
fi
|
fi
|
||||||
@ -62,9 +62,9 @@ for overlay_file in ${user_overlays}; do
|
|||||||
done
|
done
|
||||||
if test "${overlay_error}" = "true"; then
|
if test "${overlay_error}" = "true"; then
|
||||||
echo "Error applying DT overlays, restoring original DT"
|
echo "Error applying DT overlays, restoring original DT"
|
||||||
load ${devtype} ${devnum}:1 ${fdt_addr_r} ${prefix}dtb${unamer}/${fdtfile}
|
load ${devtype} ${devnum}:1 ${fdt_addr_r} ${prefix}dtb-${uname_r}/${fdtfile}
|
||||||
else
|
else
|
||||||
if load ${devtype} ${devnum}:1 ${load_addr} ${prefix}dtb${unamer}/rockchip/overlay/${overlay_prefix}-fixup.scr; then
|
if load ${devtype} ${devnum}:1 ${load_addr} ${prefix}dtb-${uname_r}/rockchip/overlay/${overlay_prefix}-fixup.scr; then
|
||||||
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
||||||
source ${load_addr}
|
source ${load_addr}
|
||||||
fi
|
fi
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Name: opi5-efi
|
Name: opi5-efi
|
||||||
Version: 0.0.4
|
Version: 0.0.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Necessary files for booting from vendor U-Boot on Orange Pi 5
|
Summary: Necessary files for booting from vendor U-Boot on Orange Pi 5
|
||||||
License: GPL
|
License: GPL
|
||||||
Provides: %{name}-%{version}
|
Provides: %{name}-%{version}
|
||||||
|
2
post.sh
2
post.sh
@ -20,7 +20,7 @@ fi
|
|||||||
|
|
||||||
echo "rootdev=${BOOT_PART}" >> "/boot/efi/uEnv.txt-${FULL_VER}"
|
echo "rootdev=${BOOT_PART}" >> "/boot/efi/uEnv.txt-${FULL_VER}"
|
||||||
sed -i "s/setenvrootdev/setenv rootdev \"${BOOT_PART}\"/" "/boot/efi/boot.cmd-${FULL_VER}"
|
sed -i "s/setenvrootdev/setenv rootdev \"${BOOT_PART}\"/" "/boot/efi/boot.cmd-${FULL_VER}"
|
||||||
sed -i "s/setenvunamer/setenv unamer \"${UNAME_R}\"/" "/boot/efi/boot.cmd-${FULL_VER}"
|
sed -i "s/setenvuname_r/setenv uname_r \"${UNAME_R}\"/" "/boot/efi/boot.cmd-${FULL_VER}"
|
||||||
|
|
||||||
mkimage -A arm -T ramdisk -C none -n uInitrd -d "/boot/initramfs-${UNAME_R}.img" "/boot/uInitrd-${UNAME_R}"
|
mkimage -A arm -T ramdisk -C none -n uInitrd -d "/boot/initramfs-${UNAME_R}.img" "/boot/uInitrd-${UNAME_R}"
|
||||||
cp "/boot/uInitrd-${UNAME_R}" /boot/uInitrd
|
cp "/boot/uInitrd-${UNAME_R}" /boot/uInitrd
|
||||||
|
Loading…
Reference in New Issue
Block a user