§2023-11-08
Debian Bookworm and Ubuntu Mantic - boot.scr The first line in the boot.scr file you provided appears to be a sequence of non-printable characters and control characters. The ^ character followed by a letter or symbol represents a control character in a text file. These control characters have special meanings in computer systems, and they are typically not meant to be interpreted as regular text.
'V��]eI����>�boot script
#
# flash-kernel: bootscr.odroid-g12
#
# Bootscript using the new unified bootcmd handling
#
# Expects to be called with the following environment variables set:
#
# devtype e.g. mmc/scsi etc
# devnum The device number of the given type
# bootpart The partition containing the boot files
# distro_bootpart The partition containing the boot files
# (introduced in u-boot mainline 2016.01)
# prefix Prefix within the boot partiion to the boot files
# kernel_addr_r Address to load the kernel to
# fdt_addr_r Address to load the FDT to
# ramdisk_addr_r Address to load the initrd to.
#
# The uboot must support the booti and generic filesystem load commands.
setenv bootargs " ${bootargs} quiet splash"
setenv overlay_resize 8192
setenv bootlabel "Ubuntu 23.10"
# Default serial console
# setenv console "ttyAML0,115200n8"
# Default TTY console
setenv bootargs "${bootargs} console=tty1"
setenv fdt_addr_r "0x20000000"
setenv bootargs "${bootargs} cma=800M"
setenv bootargs "${bootargs} clk_ignore_unused"
setenv bootargs "${bootargs} fsck.mode=force fsck.repair=yes"
load ${devtype} ${devno}:${partition} ${loadaddr} ${prefix}config.ini \
&& ini generic ${loadaddr}
if test -n "${overlay_profile}"; then
ini overlay_${overlay_profile} ${loadaddr}
fi
if test -n "${console}"; then
setenv bootargs "${bootargs} console=${console}"
fi
if test -n "${default_console}"; then
setenv bootargs "${bootargs} console=${default_console}"
fi
if test -z "${fk_kvers}"; then
setenv fk_kvers "6.1.0-odroid-arm64"
fi
# Hack to set kernel load address for Linux kernel v3.16.56 only
if test "${fk_kvers}" = "3.16.56-odroid-arm64"; then
setenv kernel_addr_r "0x10800000"
fi
if test -z "${fdtfile}"; then
setenv fdtfile "meson64_odroid${variant}.dtb"
fi
if test -z "${distro_bootpart}"; then
setenv partition ${bootpart}
else
setenv partition ${distro_bootpart}
fi
if test -n "${fbcon}"; then
setenv bootargs "${bootargs} fbcon=${fbcon}"
fi
setenv dtbo_addr_r 0x21000000
setenv zimage_addr_r ${ramdisk_addr_r}
load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtbs/${fk_kvers}/amlogic/${fdtfile}
if test -n "${overlays}"; then
fdt addr ${fdt_addr_r}
fdt resize ${overlay_resize}
setenv overlay ${variant}
if test "${variant}" = "n2l"; then setenv overlay "n2"; fi
if test "${variant}" = "n2_plus"; then setenv overlay "n2"; fi
if test "${variant}" = "hc4"; then setenv overlay "c4"; fi
for file in ${overlays}; do
load ${devtype} ${devnum}:${partition} ${dtbo_addr_r} ${prefix}dtbs/${fk_kvers}/amlogic/overlays/odroid${overlay}/${file}.dtbo \
&& fdt apply ${dtbo_addr_r}
done
fi
load ${devtype} ${devnum}:${partition} ${zimage_addr_r} ${prefix}vmlinuz-${fk_kvers} \
&& unzip ${zimage_addr_r} ${kernel_addr_r} \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \
&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \
&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers} \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \
&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \
&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
load ${devtype} ${devnum}:${partition} ${zimage_addr_r} ${prefix}vmlinuz-${fk_kvers} \
&& unzip ${zimage_addr_r} ${kernel_addr_r} \
&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtb-${fk_kvers} \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \
&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \
&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
load ${devtype} ${devnum}:${partition} ${zimage_addr_r} ${prefix}vmlinuz \
&& unzip ${zimage_addr_r} ${kernel_addr_r} \
&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtb \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img \
&& echo "Booting Debian from ${devtype} ${devnum}:${partition}..." \
&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}