pastebin - collaborative debugging tool
eckelmann.kpaste.net RSS


Silence of The Quantrons 2 - Dead quiet on the serial line
Posted by Anonymous on Mon 29th Apr 2019 14:26
raw | new post

  1. diff --git a/ptxdist/configs/ecu01/barebox-defaultenv-2/bin/init b/ptxdist/configs/ecu01/barebox-defaultenv-2/bin/init
  2. index d1b3f6b..b841bbd 100644
  3. --- a/ptxdist/configs/ecu01/barebox-defaultenv-2/bin/init
  4. +++ b/ptxdist/configs/ecu01/barebox-defaultenv-2/bin/init
  5. @@ -22,7 +22,7 @@ global eag.devel_mode
  6.  [ -z "${global.hostname}" ] && global.hostname=generic
  7.  [ -z "${global.user}" ] && global.user=none
  8.  magicvar -a global.user "username (used in network filenames)"
  9. -[ -z "${global.autoboot_timeout}" ] && global.autoboot_timeout=3
  10. +[ -z "${global.autoboot_timeout}" ] && global.autoboot_timeout=5
  11.  magicvar -a global.autoboot_timeout "timeout in seconds before automatic booting"
  12.  [ -z "${global.boot.default}" ] && global.boot.default=net
  13.  [ -z "${global.allow_color}" ] && global.allow_color=true
  14. @@ -37,24 +37,7 @@ if [ "${global.eag.devel_mode}" = "true" ] ; then
  15.         splash -x 0 -y 0 /env/assets/default_devel.png
  16.  fi
  17.  
  18. -# allow to stop the boot before execute the /env/init/*
  19. -# but without waiting
  20. -# (we can only use <CTRL-C> here since the serial connection used for the
  21. -# Quantron console is also be used to connect another device, which might
  22. -# send other data here)
  23. -timeout -s -c 0
  24. -autoboot="$?"
  25. -
  26. -if [ "${autoboot}" = "1" ]; then
  27. -        echo "Aborting auto boot before sourcing /etc/init/*"
  28. -        exit
  29. -fi
  30. -
  31. -for i in /env/init/*; do
  32. -        . $i
  33. -done
  34. -
  35. -echo -e -n "\nHit <CTRL-C> to stop autoboot: "
  36. +echo -e -n "\nHit CTRL-C to stop autoboot: "
  37.  
  38.  # give the user a chance to jump into the barebox console
  39.  # (we can only use <CTRL-C> here since the serial connection used for the
  40. @@ -64,7 +47,9 @@ timeout -c ${global.autoboot_timeout}
  41.  autoboot="$?"
  42.  
  43.  if [ "$autoboot" = "1" ] ; then
  44. -        echo "Aborting auto boot (use develmode command do enable/disable Linux console output) ..."
  45. +        echo "Aborting auto boot"
  46. +       echo "- use develmode command do enable/disable Linux console output"
  47. +       echo "- use run_env_init_scripts to run init scripts manually"
  48.          exit
  49.  fi
  50.  
  51. @@ -80,21 +65,20 @@ fi
  52.  # ttymxc4/serial4 on/off (or does not touch the serial settings) ...
  53.  #
  54.  if [ "${global.eag.devel_mode}" = "false" ] ; then
  55. -       echo "#"
  56. -       echo "# developer mode __DISABLED__"
  57. -       echo "#"
  58.         nv.linux.bootargs.console="quiet loglevel=4"
  59.         serial4.active=""
  60.  elif [ "${global.eag.devel_mode}" = "true" ] ; then
  61. -       echo "#"
  62. -       echo "# developer mode ENABLED"
  63. -       echo "#"
  64. +       echo "__DEVELOPER_MODE__ENABLED__"
  65.         nv.linux.bootargs.console="console=ttymxc4,115200n"
  66.         serial4.active="ioe"
  67.  elif [ "${global.eag.devel_mode}" = "mu" ] ; then
  68.         true # do nothing, in case we do not want to alter settings
  69.  fi
  70.  
  71. +# init scripts need to be executed after we disable serial output
  72. +# in non-devel mode so this cannot interfere with connected devices
  73. +run_env_init_scripts
  74. +
  75.  boot
  76.  
  77.  # EOF.

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at