Skip to content

Commit

Permalink
Fix prevent device tree on rpi (#107)
Browse files Browse the repository at this point in the history
* Fix prevent device tree

* Update uboot-boot.sh

* Update rauc-hook

* Update rauc-hook
  • Loading branch information
pvizeli committed Jul 15, 2018
1 parent ed8f248 commit 38a3af6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions buildroot-external/board/raspberrypi/rpi3-64/uboot-boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype

# Preserve origin bootargs
setenv bootargs_rpi
fdt addr ${fdt_addr}
setenv fdt_org ${fdt_addr}
fdt addr ${fdt_org}
fdt get value bootargs_rpi /chosen bootargs

setenv bootargs
Expand All @@ -35,6 +36,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
fi
done

setenv fdt_addr
if test -n "${bootargs}"; then
saveenv
else
Expand All @@ -48,7 +50,7 @@ fi
echo "Loading kernel"
run load_kernel
echo " Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr}
booti ${kernel_addr_r} - ${fdt_org}

echo "Fails on boot"
reset
6 changes: 4 additions & 2 deletions buildroot-external/board/raspberrypi/uboot-boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype

# Preserve origin bootargs
setenv bootargs_rpi
fdt addr ${fdt_addr}
setenv fdt_org ${fdt_addr}
fdt addr ${fdt_org}
fdt get value bootargs_rpi /chosen bootargs

setenv bootargs
Expand All @@ -35,6 +36,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
fi
done

setenv fdt_addr
if test -n "${bootargs}"; then
saveenv
else
Expand All @@ -48,7 +50,7 @@ fi
echo "Loading kernel"
run load_kernel
echo " Starting kernel"
bootz ${kernel_addr_r} - ${fdt_addr}
bootz ${kernel_addr_r} - ${fdt_org}

echo "Fails on boot"
reset
5 changes: 5 additions & 0 deletions buildroot-external/misc/rauc-hook
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ if [ -L /var/lib/systemd/timesync ]; then
rm -f /var/lib/systemd/timesync
fi

# u-boot first stage device tree
if [ -e /usr/sbin/fw_setenv ]; then
fw_setenv fdt_addr
fi

exit 0

0 comments on commit 38a3af6

Please sign in to comment.