diff --git a/ptxdist/configs/ecu01/barebox-defaultenv-2/bin/init b/ptxdist/configs/ecu01/barebox-defaultenv-2/bin/init index d1b3f6b..b841bbd 100644 --- a/ptxdist/configs/ecu01/barebox-defaultenv-2/bin/init +++ b/ptxdist/configs/ecu01/barebox-defaultenv-2/bin/init @@ -22,7 +22,7 @@ global eag.devel_mode [ -z "${global.hostname}" ] && global.hostname=generic [ -z "${global.user}" ] && global.user=none magicvar -a global.user "username (used in network filenames)" -[ -z "${global.autoboot_timeout}" ] && global.autoboot_timeout=3 +[ -z "${global.autoboot_timeout}" ] && global.autoboot_timeout=5 magicvar -a global.autoboot_timeout "timeout in seconds before automatic booting" [ -z "${global.boot.default}" ] && global.boot.default=net [ -z "${global.allow_color}" ] && global.allow_color=true @@ -37,24 +37,7 @@ if [ "${global.eag.devel_mode}" = "true" ] ; then splash -x 0 -y 0 /env/assets/default_devel.png fi -# allow to stop the boot before execute the /env/init/* -# but without waiting -# (we can only use here since the serial connection used for the -# Quantron console is also be used to connect another device, which might -# send other data here) -timeout -s -c 0 -autoboot="$?" - -if [ "${autoboot}" = "1" ]; then - echo "Aborting auto boot before sourcing /etc/init/*" - exit -fi - -for i in /env/init/*; do - . $i -done - -echo -e -n "\nHit to stop autoboot: " +echo -e -n "\nHit CTRL-C to stop autoboot: " # give the user a chance to jump into the barebox console # (we can only use here since the serial connection used for the @@ -64,7 +47,9 @@ timeout -c ${global.autoboot_timeout} autoboot="$?" if [ "$autoboot" = "1" ] ; then - echo "Aborting auto boot (use develmode command do enable/disable Linux console output) ..." + echo "Aborting auto boot" + echo "- use develmode command do enable/disable Linux console output" + echo "- use run_env_init_scripts to run init scripts manually" exit fi @@ -80,21 +65,20 @@ fi # ttymxc4/serial4 on/off (or does not touch the serial settings) ... # if [ "${global.eag.devel_mode}" = "false" ] ; then - echo "#" - echo "# developer mode __DISABLED__" - echo "#" nv.linux.bootargs.console="quiet loglevel=4" serial4.active="" elif [ "${global.eag.devel_mode}" = "true" ] ; then - echo "#" - echo "# developer mode ENABLED" - echo "#" + echo "__DEVELOPER_MODE__ENABLED__" nv.linux.bootargs.console="console=ttymxc4,115200n" serial4.active="ioe" elif [ "${global.eag.devel_mode}" = "mu" ] ; then true # do nothing, in case we do not want to alter settings fi +# init scripts need to be executed after we disable serial output +# in non-devel mode so this cannot interfere with connected devices +run_env_init_scripts + boot # EOF.