1
0
Fork 0

add boot arg that says why the board booted

optimizations
Martin T. H. Sandsmark 2017-05-26 19:49:26 +02:00
parent 782407354f
commit 270b026103
2 changed files with 7 additions and 0 deletions

View File

@ -787,6 +787,12 @@ int board_late_init(void)
{
wait_for_battery_charge(BATTERY_LEVEL_LOW);
if (get_imx_reset_cause() == 0x00010) {
setenv("por", "wdog");
} else {
setenv("por", "normal");
}
/*int battery_charge;
while ((battery_charge = get_battery_charge()) < BATTERY_LEVEL_LOW) {
if (!check_charger_status()) {

View File

@ -77,6 +77,7 @@
"splashpos=m,m\0" \
"mmcfallbackroot=/dev/mmcblk1p3\0" \
"mmcroot=/dev/mmcblk1p2\0" \
"por=undefined\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot} rootwait rw por=${por};\0" \
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \