3 # Hook to set the linux,stdout-path property from an nvram property
6 nvram_prop=petitboot,console
8 # we need to be using a dtb
9 [ -n "$boot_dtb" ] || exit
11 console=$(nvram --print-config="$nvram_prop")
13 [ $? = 0 -a -n "$console" ] || exit
19 dtc -I dtb -O dts $dtb_in
20 echo '/ { chosen { linux,stdout-path = "'$console'"; }; }; '
21 ) | dtc -I dts -O dtb -o $dtb_out
23 [ $? = 0 ] && mv $dtb_out $dtb_in