This commit is contained in:
Pratham Patel 2023-10-08 12:13:34 +05:30
parent 511e697cdb
commit 99064ba8ad
No known key found for this signature in database
3 changed files with 15 additions and 14 deletions

View File

@ -17,8 +17,8 @@ setenvuname_r
echo "Boot script loaded from ${devtype} ${devnum}" echo "Boot script loaded from ${devtype} ${devnum}"
if test -e ${devtype} ${devnum} ${prefix}uEnv.txt; then if test -e ${devtype} ${devnum} uEnv.txt; then
load ${devtype} ${devnum} ${load_addr} ${prefix}uEnv.txt load ${devtype} ${devnum} ${load_addr} uEnv.txt
env import -t ${load_addr} ${filesize} env import -t ${load_addr} ${filesize}
fi fi
@ -40,36 +40,36 @@ setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1"; fi if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1"; fi
#load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd #load ${devtype} ${devnum}:2 ${ramdisk_addr_r} uInitrd
#load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image #load ${devtype} ${devnum}:2 ${kernel_addr_r} Image
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd-${uname_r} load ${devtype} ${devnum}:2 ${ramdisk_addr_r} uInitrd-${uname_r}
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}vmlinuz-${uname_r} load ${devtype} ${devnum}:2 ${kernel_addr_r} vmlinuz-${uname_r}
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb-${uname_r}/${fdtfile} load ${devtype} ${devnum}:2 ${fdt_addr_r} 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} ${load_addr} ${prefix}dtb-${uname_r}/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then if load ${devtype} ${devnum}:2 ${load_addr} 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
done done
for overlay_file in ${user_overlays}; do for overlay_file in ${user_overlays}; do
if load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then if load ${devtype} ${devnum}:2 ${load_addr} overlay-user/${overlay_file}.dtbo; then
echo "Applying user provided DT overlay ${overlay_file}.dtbo" echo "Applying user provided DT overlay ${overlay_file}.dtbo"
fdt apply ${load_addr} || setenv overlay_error "true" fdt apply ${load_addr} || setenv overlay_error "true"
fi fi
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} ${fdt_addr_r} ${prefix}dtb-${uname_r}/${fdtfile} load ${devtype} ${devnum}:2 ${fdt_addr_r} dtb-${uname_r}/${fdtfile}
else else
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb-${uname_r}/rockchip/overlay/${overlay_prefix}-fixup.scr; then if load ${devtype} ${devnum}:2 ${load_addr} 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
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then if test -e ${devtype} ${devnum}:2 fixup.scr; then
load ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr load ${devtype} ${devnum}:2 ${load_addr} fixup.scr
echo "Applying user provided fixup script (fixup.scr)" echo "Applying user provided fixup script (fixup.scr)"
source ${load_addr} source ${load_addr}
fi fi

View File

@ -5,7 +5,7 @@
Name: opi5-efi Name: opi5-efi
Version: 0.0.4 Version: 0.0.4
Release: 3%{?dist} Release: 4%{?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}

View File

@ -15,6 +15,7 @@ if [ ! -f /boot/.uname ]; then
fi fi
if [ ! -f "/boot/initramfs-${UNAME_R}" ]; then if [ ! -f "/boot/initramfs-${UNAME_R}" ]; then
echo "Initramfs not found... regenerating."
/sbin/installkernel "${UNAME_R}" "/boot/.vmlinuz-${UNAME_R}-rpm" "/boot/.System.map-${UNAME_R}-rpm" /sbin/installkernel "${UNAME_R}" "/boot/.vmlinuz-${UNAME_R}-rpm" "/boot/.System.map-${UNAME_R}-rpm"
fi fi