zz-update-uimg: Add more fdt search paths
This commit is contained in:
parent
f69f58afba
commit
78fe857bcd
|
|
@ -7,9 +7,14 @@ ABI="${1}"
|
||||||
# Create U-Boot ramdisk image
|
# Create U-Boot ramdisk image
|
||||||
mkimage -A arm64 -T ramdisk -C none -d "/boot/initrd.img-${ABI}" "/boot/initrd.uimg-${ABI}"
|
mkimage -A arm64 -T ramdisk -C none -d "/boot/initrd.img-${ABI}" "/boot/initrd.uimg-${ABI}"
|
||||||
|
|
||||||
FDT=/usr/lib/linux
|
# List of paths to search for fdtfile in
|
||||||
[ -d "/lib/firmware/${ABI}/device-tree" ] && FDT="/lib/firmware/${ABI}/device-tree"
|
FDT="\
|
||||||
[ -d "/usr/lib/linux-image-${ABI}" ] && FDT="/usr/lib/linux-image-${ABI}"
|
/lib/firmware/${ABI}/device-tree/\${vendor} \
|
||||||
|
/lib/firmware/${ABI}/device-tree \
|
||||||
|
/usr/lib/linux-image-${ABI}/\${vendor} \
|
||||||
|
/usr/lib/linux-image-${ABI} \
|
||||||
|
/usr/lib/linux/\${vendor} \
|
||||||
|
/usr/lib/linux"
|
||||||
|
|
||||||
# Create U-Boot boot script
|
# Create U-Boot boot script
|
||||||
cat << EOF > /boot/boot.cmd
|
cat << EOF > /boot/boot.cmd
|
||||||
|
|
@ -17,12 +22,13 @@ load \${devtype} \${devnum}:\${distro_bootpart} \${kernel_addr_r} /boot/vmlinuz-
|
||||||
load \${devtype} \${devnum}:\${distro_bootpart} \${ramdisk_addr_r} /boot/initrd.uimg-${ABI}
|
load \${devtype} \${devnum}:\${distro_bootpart} \${ramdisk_addr_r} /boot/initrd.uimg-${ABI}
|
||||||
part uuid \${devtype} \${devnum}:\${distro_bootpart} partuuid
|
part uuid \${devtype} \${devnum}:\${distro_bootpart} partuuid
|
||||||
setenv bootargs root=PARTUUID=\${partuuid} rw rootwait
|
setenv bootargs root=PARTUUID=\${partuuid} rw rootwait
|
||||||
if test -e \${devtype} \${devnum}:\${distro_bootpart} ${FDT}/\${fdtfile}; then
|
for fdtpath in ${FDT}; do
|
||||||
load \${devtype} \${devnum}:\${distro_bootpart} \${fdt_addr_r} ${FDT}/\${fdtfile}
|
if test -e \${devtype} \${devnum}:\${distro_bootpart} \${fdtpath}/\${fdtfile}; then
|
||||||
|
load \${devtype} \${devnum}:\${distro_bootpart} \${fdt_addr_r} \${fdtpath}/\${fdtfile}
|
||||||
booti \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr_r}
|
booti \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr_r}
|
||||||
else
|
fi
|
||||||
booti \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr}
|
done
|
||||||
fi
|
booti \${kernel_addr_r} \${ramdisk_addr_r} \${fdtcontroladdr}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Create U-Boot boot script
|
# Create U-Boot boot script
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,14 @@ ABI="${1}"
|
||||||
# Create U-Boot ramdisk image
|
# Create U-Boot ramdisk image
|
||||||
mkimage -A arm -T ramdisk -C none -d "/boot/initrd.img-${ABI}" "/boot/initrd.uimg-${ABI}"
|
mkimage -A arm -T ramdisk -C none -d "/boot/initrd.img-${ABI}" "/boot/initrd.uimg-${ABI}"
|
||||||
|
|
||||||
FDT=/usr/lib/linux
|
# List of paths to search for fdtfile in
|
||||||
[ -d "/lib/firmware/${ABI}/device-tree" ] && FDT="/lib/firmware/${ABI}/device-tree"
|
FDT="\
|
||||||
[ -d "/usr/lib/linux-image-${ABI}" ] && FDT="/usr/lib/linux-image-${ABI}"
|
/lib/firmware/${ABI}/device-tree/\${vendor} \
|
||||||
|
/lib/firmware/${ABI}/device-tree \
|
||||||
|
/usr/lib/linux-image-${ABI}/\${vendor} \
|
||||||
|
/usr/lib/linux-image-${ABI} \
|
||||||
|
/usr/lib/linux/\${vendor} \
|
||||||
|
/usr/lib/linux"
|
||||||
|
|
||||||
# Create U-Boot boot script
|
# Create U-Boot boot script
|
||||||
cat << EOF > /boot/boot.cmd
|
cat << EOF > /boot/boot.cmd
|
||||||
|
|
@ -17,12 +22,13 @@ load \${devtype} \${devnum}:\${distro_bootpart} \${kernel_addr_r} /boot/vmlinuz-
|
||||||
load \${devtype} \${devnum}:\${distro_bootpart} \${ramdisk_addr_r} /boot/initrd.uimg-${ABI}
|
load \${devtype} \${devnum}:\${distro_bootpart} \${ramdisk_addr_r} /boot/initrd.uimg-${ABI}
|
||||||
part uuid \${devtype} \${devnum}:\${distro_bootpart} partuuid
|
part uuid \${devtype} \${devnum}:\${distro_bootpart} partuuid
|
||||||
setenv bootargs root=PARTUUID=\${partuuid} rw rootwait
|
setenv bootargs root=PARTUUID=\${partuuid} rw rootwait
|
||||||
if test -e \${devtype} \${devnum}:\${distro_bootpart} ${FDT}/\${fdtfile}; then
|
for fdtpath in ${FDT}; do
|
||||||
load \${devtype} \${devnum}:\${distro_bootpart} \${fdt_addr_r} ${FDT}/\${fdtfile}
|
if test -e \${devtype} \${devnum}:\${distro_bootpart} \${fdtpath}/\${fdtfile}; then
|
||||||
|
load \${devtype} \${devnum}:\${distro_bootpart} \${fdt_addr_r} \${fdtpath}/\${fdtfile}
|
||||||
bootz \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr_r}
|
bootz \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr_r}
|
||||||
else
|
fi
|
||||||
bootz \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr}
|
done
|
||||||
fi
|
bootz \${kernel_addr_r} \${ramdisk_addr_r} \${fdtcontroladdr}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Create U-Boot boot script
|
# Create U-Boot boot script
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue