restart from scratch
This commit is contained in:
parent
adcad08ca3
commit
2c1b79a999
103
boot.cmd
103
boot.cmd
@ -1,60 +1,87 @@
|
|||||||
|
# DO NOT EDIT THIS FILE
|
||||||
|
#
|
||||||
|
# Please edit /boot/orangepiEnv.txt to set supported parameters
|
||||||
|
#
|
||||||
|
|
||||||
setenv load_addr "0x9000000"
|
setenv load_addr "0x9000000"
|
||||||
setenv overlay_error "false"
|
setenv overlay_error "false"
|
||||||
# default values
|
# default values
|
||||||
setenvrootdev
|
setenv rootdev "/dev/mmcblk0p1"
|
||||||
setenvunamer
|
setenv verbosity "1"
|
||||||
setenv envfile "${prefix}uEnv.txt-${unamer}"
|
setenv console "both"
|
||||||
setenv dtbdir "${prefix}dtb-${unamer}"
|
setenv bootlogo "false"
|
||||||
|
setenv rootfstype "ext4"
|
||||||
|
setenv docker_optimizations "on"
|
||||||
|
setenv earlycon "off"
|
||||||
|
setenv uname_r "-5.10.160-1.el9.aarch64+64k"
|
||||||
|
setenv other_uname_r "-5.10.160"
|
||||||
|
|
||||||
echo "Boot script loaded from ${devtype} ${devnum}"
|
echo "Boot script loaded from ${devtype} ${devnum}"
|
||||||
|
|
||||||
echo "Testing for existence ${devtype} ${devnum} ${envfile}"
|
if test -e ${devtype} ${devnum} ${prefix}orangepiEnv.txt; then
|
||||||
if test -e ${devtype} ${devnum} ${envfile}; then
|
load ${devtype} ${devnum} ${load_addr} ${prefix}orangepiEnv.txt
|
||||||
echo "Loading ${devtype} ${devnum} ${load_addr} ${envfile}"
|
env import -t ${load_addr} ${filesize}
|
||||||
load ${devtype} ${devnum} ${load_addr} ${envfile}
|
fi
|
||||||
echo "Loaded ${devtype} ${devnum} ${envfile} into ${load_addr} filesize ${filesize}"
|
|
||||||
echo "Importing into environment"
|
if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi
|
||||||
env import -t ${load_addr} ${filesize}
|
|
||||||
echo "${envfile} imported into environment"
|
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
|
||||||
|
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS2,1500000 ${consoleargs}"; fi
|
||||||
|
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi
|
||||||
|
if test "${bootlogo}" = "true"; then
|
||||||
|
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
|
||||||
|
else
|
||||||
|
setenv consoleargs "splash=verbose ${consoleargs}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get PARTUUID of first partition on SD/eMMC the boot script was loaded from
|
# get PARTUUID of first partition on SD/eMMC the boot script was loaded from
|
||||||
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi
|
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi
|
||||||
|
|
||||||
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd-${unamer}
|
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}"
|
||||||
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}vmlinuz-${unamer}
|
|
||||||
|
|
||||||
load ${devtype} ${devnum} ${fdt_addr_r} ${dtbdir}/${fdtfile}
|
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} ${kernel_addr_r} ${prefix}Image
|
||||||
|
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd${uname_r}
|
||||||
|
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}vmlinuz${other_uname_r}
|
||||||
|
|
||||||
|
load ${devtype} ${devnum} ${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} ${load_addr} ${dtbdir}/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"
|
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"
|
||||||
elif load ${devtype} ${devnum} ${load_addr} ${dtbdir}/rockchip/overlay/${overlay_file}.dtbo; then
|
fi
|
||||||
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
|
|
||||||
fdt apply ${load_addr} || setenv overlay_error "true"
|
|
||||||
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} ${load_addr} ${prefix}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} ${dtbdir}/${fdtfile}
|
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb${uname_r}/${fdtfile}
|
||||||
else
|
else
|
||||||
if load ${devtype} ${devnum} ${load_addr} ${dtbdir}/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)"
|
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} ${prefix}fixup.scr; then
|
||||||
load ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr
|
load ${devtype} ${devnum} ${load_addr} ${prefix}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
|
||||||
fi
|
fi
|
||||||
kaslrseed
|
|
||||||
|
if test "${ethernet_phy}" = "rtl8211f"; then
|
||||||
|
fdt set /ethernet@ff540000 tx_delay <0x24>
|
||||||
|
fdt set /ethernet@ff540000 rx_delay <0x18>
|
||||||
|
fi
|
||||||
|
|
||||||
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
||||||
|
|
||||||
|
# Recompile with:
|
||||||
|
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
|
||||||
|
5
uEnv.txt
5
uEnv.txt
@ -1,5 +1,8 @@
|
|||||||
verbosity=1
|
verbosity=1
|
||||||
bootlogo=false
|
bootlogo=false
|
||||||
overlay_prefix=rockchip-rk3588
|
extraargs=cma=128M
|
||||||
|
overlay_prefix=rk3588
|
||||||
fdtfile=rockchip/rk3588s-orangepi-5.dtb
|
fdtfile=rockchip/rk3588s-orangepi-5.dtb
|
||||||
|
rootdev=UUID=db4e6004-8585-4150-984e-66abe5a77000
|
||||||
rootfstype=ext4
|
rootfstype=ext4
|
||||||
|
bootcmd=run distro_bootcmd
|
||||||
|
Loading…
Reference in New Issue
Block a user