Enable DT overlay support in u-boot for sunxi boards
This commit is contained in:
parent
e81fb4f909
commit
bd2cb32440
@ -33,6 +33,14 @@ if test "${console}" = "serial" || test "${console}" = "both"; then setenv conso
|
||||
|
||||
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} panic=10 consoleblank=0 enforcing=0 loglevel=${verbosity} ${extraargs} ${extraboardargs}"
|
||||
load ${devtype} 0 ${fdt_addr_r} /boot/dtb/allwinner/${fdtfile} || load ${devtype} 0 ${fdt_addr_r} /dtb/allwinner/${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize
|
||||
for overlay_file in ${overlays}; do
|
||||
if load ${devtype} 0 ${load_addr} dtb/allwinner/overlays/${overlay_file}.dtbo || load ${devtype} 0 ${load_addr} boot/dtb/allwinner/overlays/${overlay_file}.dtbo; then
|
||||
echo "Applying DT overlay ${overlay_file}.dtbo"
|
||||
fdt apply ${load_addr}
|
||||
fi
|
||||
done
|
||||
load ${devtype} 0 ${ramdisk_addr_r} /boot/uInitrd || load ${devtype} 0 ${ramdisk_addr_r} uInitrd
|
||||
load ${devtype} 0 ${kernel_addr_r} /boot/Image || load ${devtype} 0 ${kernel_addr_r} Image
|
||||
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
||||
|
||||
@ -39,6 +39,14 @@ load ${devtype} 0 ${kernel_addr_r} /boot/zImage || load ${devtype} 0 ${kernel_ad
|
||||
|
||||
if load ${devtype} 0 0x00000000 /boot/.next || load ${devtype} 0 0x00000000 .next; then
|
||||
load ${devtype} 0 ${fdt_addr_r} /boot/dtb/${fdtfile} || load ${devtype} 0 ${fdt_addr_r} /dtb/${fdtfile}
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize
|
||||
for overlay_file in ${overlays}; do
|
||||
if load ${devtype} 0 ${load_addr} dtb/overlays/${overlay_file}.dtbo || load ${devtype} 0 ${load_addr} boot/dtb/overlays/${overlay_file}.dtbo; then
|
||||
echo "Applying DT overlay ${overlay_file}.dtbo"
|
||||
fdt apply ${load_addr}
|
||||
fi
|
||||
done
|
||||
bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
||||
else
|
||||
load ${devtype} 0 ${fdt_addr_r} /boot/script.bin || load ${devtype} 0 ${fdt_addr_r} script.bin
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
diff --git a/u-boot/lib/Kconfig b/u-boot/lib/Kconfig
|
||||
index b16062fbe..8c797a779 100644
|
||||
--- a/u-boot/lib/Kconfig
|
||||
+++ b/u-boot/lib/Kconfig
|
||||
@@ -141,6 +141,7 @@ config OF_LIBFDT
|
||||
|
||||
config OF_LIBFDT_OVERLAY
|
||||
bool "Enable the FDT library overlay support"
|
||||
+ default y if OF_LIBFDT
|
||||
help
|
||||
This enables the FDT library (libfdt) overlay support.
|
||||
|
||||
12
patch/u-boot/u-boot-sunxi/enable-DT-overlays-support.patch
Normal file
12
patch/u-boot/u-boot-sunxi/enable-DT-overlays-support.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/lib/Kconfig b/lib/Kconfig
|
||||
index b16062fbe..8c797a779 100644
|
||||
--- a/lib/Kconfig
|
||||
+++ b/lib/Kconfig
|
||||
@@ -141,6 +141,7 @@ config OF_LIBFDT
|
||||
|
||||
config OF_LIBFDT_OVERLAY
|
||||
bool "Enable the FDT library overlay support"
|
||||
+ default y if OF_LIBFDT
|
||||
help
|
||||
This enables the FDT library (libfdt) overlay support.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user