mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
meson-s4t7: Enable dtbo support
The support is implemented by using dtbo files supplied by Khadas directly in the linux-dtb package. The files are not compiled just copied.
This commit is contained in:
committed by
Ricardo Pardini
parent
72883cb07c
commit
02051676b0
78
config/bootscripts/boot-meson-s4t7.cmd
Normal file
78
config/bootscripts/boot-meson-s4t7.cmd
Normal file
@@ -0,0 +1,78 @@
|
||||
# DO NOT EDIT THIS FILE
|
||||
#
|
||||
# Please edit /boot/armbianEnv.txt to set supported parameters
|
||||
#
|
||||
|
||||
setenv overlay_error "false"
|
||||
setenv console "both"
|
||||
setenv verbosity "1"
|
||||
setenv earlycon "off"
|
||||
setenv bootlogo "false"
|
||||
setenv earlyconuart "0xfe078000"
|
||||
|
||||
if test "${board_name}" = "kvim1s"; then setenv earlyconuart "0xfe07a000"; fi
|
||||
|
||||
# Show what uboot default fdtfile is
|
||||
echo "U-boot default fdtfile: ${fdtfile}"
|
||||
|
||||
if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
|
||||
load ${devtype} ${devnum} ${loadaddr} ${prefix}armbianEnv.txt
|
||||
env import -t ${loadaddr} ${filesize}
|
||||
fi
|
||||
|
||||
if test "${console}" = "both"; then setenv console_serial "true"; setenv console_display "true"; fi
|
||||
if test "${console}" = "serial"; then setenv console_serial "true"; fi
|
||||
if test "${console}" = "display"; then setenv console_display "true"; fi
|
||||
|
||||
if test "${console_serial}" = "true"; then setenv consoleargs "console=ttyS0,921600"; fi
|
||||
if test "${console_display}" = "true"; then setenv consoleargs "console=tty1 ${consoleargs}"; fi
|
||||
|
||||
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon=aml-uart,${earlyconuart} ${consoleargs}"; fi
|
||||
|
||||
if test "${bootlogo}" = "true"; then
|
||||
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
|
||||
else
|
||||
setenv consoleargs "splash=verbose ${consoleargs}"
|
||||
fi
|
||||
|
||||
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} no_console_suspend loglevel=${verbosity} mac=${eth_mac} khadas.serial=${usid} partition_type=generic ${extraargs} ${extraboardargs}"
|
||||
|
||||
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize 65536
|
||||
|
||||
for overlay_file in ${overlays}; do
|
||||
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}dtb/amlogic/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
||||
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
|
||||
fdt apply ${scriptaddr} || setenv overlay_error "true"
|
||||
fi
|
||||
done
|
||||
|
||||
for overlay_file in ${user_overlays}; do
|
||||
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
||||
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
|
||||
fdt apply ${scriptaddr} || setenv overlay_error "true"
|
||||
fi
|
||||
done
|
||||
|
||||
if test "${overlay_error}" = "true"; then
|
||||
echo "Error applying DT overlays, restoring original DT"
|
||||
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||
else
|
||||
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}dtb/amlogic/overlay/${overlay_prefix}-fixup.scr; then
|
||||
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
||||
source ${scriptaddr}
|
||||
fi
|
||||
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then
|
||||
load ${devtype} ${devnum} ${scriptaddr} ${prefix}fixup.scr
|
||||
echo "Applying user provided fixup script (fixup.scr)"
|
||||
source ${scriptaddr}
|
||||
fi
|
||||
fi
|
||||
|
||||
load ${devtype} ${devnum} ${kernel_addr_r} /vmlinuz
|
||||
load ${devtype} ${devnum} ${ramdisk_addr_r} /initrd.img
|
||||
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
|
||||
|
||||
# Recompile with:
|
||||
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
|
||||
Reference in New Issue
Block a user