setenv kerneladdr 0x82000000 setenv splashzipaddr 0x80400000 setenv splashaddr 0x80800000 setenv status_loading 'status set 18' setenv status_load_success 'status set 10' setenv status_load_error 'status set 8' setenv bootargs mpurate=${mpurate} mux=${mux} echo "Replicant GTA04" run status_loading i2c dev 0 if mmc rescan 0 then # Load splash if fatload mmc 0 ${splashzipaddr} splash.rgb16z then unzip ${splashzipaddr} ${splashaddr} if lcm init then lcm power 2 lcm on lcm fb ${splashaddr} lcm backlight 255 fi else if fatload mmc 0 ${splashaddr} splash then if lcm init then lcm power 2 lcm on lcm fb ${splashaddr} lcm backlight 255 fi fi fi # Load kernel if status check 1 || ext4load mmc 0:3 ${kerneladdr} .startrecovery then if fatload mmc 0 ${kerneladdr} recovery.img then run status_load_success lcm backlight 0 lcm power 0 lcm off bootm ${kerneladdr} else echo "Loading recovery kernel failed" run status_load_error fi fi if fatload mmc 0 ${kerneladdr} boot.img then run status_load_success lcm backlight 0 lcm power 0 lcm off bootm ${kerneladdr} else echo "Loading kernel failed" run status_load_error if fatload mmc 0 ${kerneladdr} recovery.img then run status_load_success lcm backlight 0 lcm power 0 lcm off bootm ${kerneladdr} else echo "Loading recovery kernel failed" run status_load_error fi fi else echo "Scanning mmc failed" run status_load_error fi