Skip to content

Commit

Permalink
u-boot: Update env_resin.h to catch fs fails
Browse files Browse the repository at this point in the history
Occasionally fs write can fail. It is very rare but has been
observed on the rpi3. Reset uboot if fatwrite fails.

See raspberrypi/linux#2392 and other linked
tickets for more information.

Signed-off-by: Zubair Lutfullah Kakakhel <zubair@balena.io>
  • Loading branch information
ZubairLK committed Jul 1, 2019
1 parent 36651e2 commit 1beb25c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meta-balena-common/recipes-bsp/u-boot/patches/env_resin.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"env set os_bc_inced 1;" \
"echo bootcount=${bootcount} now;" \
"env export -t ${resin_kernel_load_addr} bootcount;" \
"fatwrite ${resin_dev_type} ${resin_dev_index}:${resin_boot_part} ${resin_kernel_load_addr} ${os_bc_file} 0xd;" \
"if fatwrite ${resin_dev_type} ${resin_dev_index}:${resin_boot_part} ${resin_kernel_load_addr} ${os_bc_file} 0xd; then; else; reset; fi;" \
"echo bootcount=${bootcount} written to ${resin_dev_type} ${resin_dev_index}:${resin_boot_part} ${os_bc_file};" \
"fi;\0" \
\
Expand Down

0 comments on commit 1beb25c

Please sign in to comment.