just copy from ext4 part to efi part since vendor' uboot is a bitch
This commit is contained in:
parent
9d165a3f10
commit
511e697cdb
18
boot.cmd
18
boot.cmd
@ -42,34 +42,34 @@ if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgro
|
||||
|
||||
#load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd
|
||||
#load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image
|
||||
load ${devtype} ${devnum}:1 ${ramdisk_addr_r} ${prefix}uInitrd-${uname_r}
|
||||
load ${devtype} ${devnum}:1 ${kernel_addr_r} ${prefix}vmlinuz-${uname_r}
|
||||
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd-${uname_r}
|
||||
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}vmlinuz-${uname_r}
|
||||
|
||||
load ${devtype} ${devnum}:1 ${fdt_addr_r} ${prefix}dtb-${uname_r}/${fdtfile}
|
||||
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb-${uname_r}/${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize 65536
|
||||
for overlay_file in ${overlays}; do
|
||||
if load ${devtype} ${devnum}:1 ${load_addr} ${prefix}dtb-${uname_r}/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
||||
if load ${devtype} ${devnum} ${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"
|
||||
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||
fi
|
||||
done
|
||||
for overlay_file in ${user_overlays}; do
|
||||
if load ${devtype} ${devnum}:1 ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
||||
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
|
||||
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||
fi
|
||||
done
|
||||
if test "${overlay_error}" = "true"; then
|
||||
echo "Error applying DT overlays, restoring original DT"
|
||||
load ${devtype} ${devnum}:1 ${fdt_addr_r} ${prefix}dtb-${uname_r}/${fdtfile}
|
||||
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb-${uname_r}/${fdtfile}
|
||||
else
|
||||
if load ${devtype} ${devnum}:1 ${load_addr} ${prefix}dtb-${uname_r}/rockchip/overlay/${overlay_prefix}-fixup.scr; then
|
||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb-${uname_r}/rockchip/overlay/${overlay_prefix}-fixup.scr; then
|
||||
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
||||
source ${load_addr}
|
||||
fi
|
||||
if test -e ${devtype} ${devnum}:1 ${prefix}fixup.scr; then
|
||||
load ${devtype} ${devnum}:1 ${load_addr} ${prefix}fixup.scr
|
||||
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then
|
||||
load ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr
|
||||
echo "Applying user provided fixup script (fixup.scr)"
|
||||
source ${load_addr}
|
||||
fi
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
Name: opi5-efi
|
||||
Version: 0.0.4
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Necessary files for booting from vendor U-Boot on Orange Pi 5
|
||||
License: GPL
|
||||
Provides: %{name}-%{version}
|
||||
|
7
post.sh
7
post.sh
@ -23,7 +23,8 @@ sed -i "s/setenvrootdev/setenv rootdev \"${BOOT_PART}\"/" "/boot/efi/boot.cmd-${
|
||||
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}"
|
||||
cp "/boot/uInitrd-${UNAME_R}" /boot/uInitrd
|
||||
|
||||
mkimage -C none -A arm -T script -d "/boot/efi/boot.cmd-${FULL_VER}" "/boot/efi/boot.scr-${FULL_VER}"
|
||||
cp "/boot/efi/boot.scr-${FULL_VER}" /boot/efi/boot.scr
|
||||
|
||||
cp "/boot/uInitrd-${UNAME_R}" "/boot/efi/uInitrd-${UNAME_R}"
|
||||
cp "/boot/vmlinuz-${UNAME_R}" "/boot/efi/vmlinuz-${UNAME_R}"
|
||||
cp -r "/boot/dtb-${UNAME_R}" "/boot/efi/dtb-${UNAME_R}"
|
||||
|
Loading…
Reference in New Issue
Block a user