From d57a29cf670d03c19c46a704f7f72c47cb700767 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Thu, 24 Jul 2014 10:35:28 -0500 Subject: [PATCH] mk_mmc.sh: cleanup SERIAL_MODE Signed-off-by: Robert Nelson --- hwpack/am335x-bone-serial.conf | 2 +- hwpack/imx51-babbage.conf | 2 +- hwpack/imx6q-sabresd.conf | 2 +- hwpack/omap3-beagle.conf | 2 +- hwpack/omap4-panda-a4.conf | 2 +- hwpack/omap4-panda-es.conf | 2 +- hwpack/omap4-panda.conf | 2 +- hwpack/omap5-uevm.conf | 2 +- hwpack/tegra124-jetson-tk1.conf | 2 +- mk_mmc.sh | 15 +++++++-------- 10 files changed, 16 insertions(+), 17 deletions(-) diff --git a/hwpack/am335x-bone-serial.conf b/hwpack/am335x-bone-serial.conf index ae1cd48..d859b4a 100644 --- a/hwpack/am335x-bone-serial.conf +++ b/hwpack/am335x-bone-serial.conf @@ -57,7 +57,7 @@ SYSTEM="serial" SERIAL="ttyO0" SERIAL_CONSOLE="${SERIAL},115200n8" -SERIAL_MODE=1 +di_serial_mode=enable conf_note="Note: During the install use a 5Volt DC power supply as USB does not always provide enough power. If board locks up on boot run [sudo ifconfig usb0 up] on host." # diff --git a/hwpack/imx51-babbage.conf b/hwpack/imx51-babbage.conf index e6000f9..a27ca2c 100644 --- a/hwpack/imx51-babbage.conf +++ b/hwpack/imx51-babbage.conf @@ -59,4 +59,4 @@ SERIAL="ttymxc0" SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 -SERIAL_MODE=1 +di_serial_mode=enable diff --git a/hwpack/imx6q-sabresd.conf b/hwpack/imx6q-sabresd.conf index 806bd05..fee381b 100644 --- a/hwpack/imx6q-sabresd.conf +++ b/hwpack/imx6q-sabresd.conf @@ -61,4 +61,4 @@ SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 #video broken... -SERIAL_MODE=1 +di_serial_mode=enable diff --git a/hwpack/omap3-beagle.conf b/hwpack/omap3-beagle.conf index 90c035e..09406ca 100644 --- a/hwpack/omap3-beagle.conf +++ b/hwpack/omap3-beagle.conf @@ -59,4 +59,4 @@ SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 drm_device_identifier="DVI-D-1" -SERIAL_MODE=1 +di_serial_mode=enable diff --git a/hwpack/omap4-panda-a4.conf b/hwpack/omap4-panda-a4.conf index 5d58dfe..a8fe602 100644 --- a/hwpack/omap4-panda-a4.conf +++ b/hwpack/omap4-panda-a4.conf @@ -62,4 +62,4 @@ SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 drm_device_identifier="DVI-D-1" -SERIAL_MODE=1 +di_serial_mode=enable diff --git a/hwpack/omap4-panda-es.conf b/hwpack/omap4-panda-es.conf index 075e1fe..4306bec 100644 --- a/hwpack/omap4-panda-es.conf +++ b/hwpack/omap4-panda-es.conf @@ -62,4 +62,4 @@ SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 drm_device_identifier="DVI-D-1" -SERIAL_MODE=1 +di_serial_mode=enable diff --git a/hwpack/omap4-panda.conf b/hwpack/omap4-panda.conf index a6fbe2c..aaad78e 100644 --- a/hwpack/omap4-panda.conf +++ b/hwpack/omap4-panda.conf @@ -62,4 +62,4 @@ SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 drm_device_identifier="DVI-D-1" -SERIAL_MODE=1 +di_serial_mode=enable diff --git a/hwpack/omap5-uevm.conf b/hwpack/omap5-uevm.conf index ee9358b..ed8b7fb 100644 --- a/hwpack/omap5-uevm.conf +++ b/hwpack/omap5-uevm.conf @@ -63,4 +63,4 @@ SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 drm_device_identifier="HDMI-A-1" -SERIAL_MODE=1 +di_serial_mode=enable diff --git a/hwpack/tegra124-jetson-tk1.conf b/hwpack/tegra124-jetson-tk1.conf index 54b381f..921c9bd 100644 --- a/hwpack/tegra124-jetson-tk1.conf +++ b/hwpack/tegra124-jetson-tk1.conf @@ -50,7 +50,7 @@ conf_fdtfile="tegra124-jetson-tk1.dtb" SERIAL="ttyS0" SERIAL_CONSOLE="${SERIAL},115200n8" -SERIAL_MODE=1 +di_serial_mode=enable conf_note="Required: https://github.com/NVIDIA/tegra-uboot-flasher-scripts." # diff --git a/mk_mmc.sh b/mk_mmc.sh index e0149cd..3fb87a7 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -37,7 +37,6 @@ unset LOCAL_BOOTLOADER unset ADDON unset FIRMWARE -unset SERIAL_MODE unset BETA_KERNEL unset EXPERIMENTAL_KERNEL unset KERNEL_DEB @@ -414,7 +413,8 @@ boot_uenv_txt_template () { __EOF__ - if [ "${SERIAL_MODE}" ] ; then + if [ "x${di_serial_mode}" = "xenable" ] ; then + cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ xyz_message=echo; echo Installer for [${DISTARCH}] is using the Serial Interface; echo; @@ -491,7 +491,7 @@ tweak_boot_scripts () { #Set the Serial Console sed -i -e 's:SERIAL_CONSOLE:'$SERIAL_CONSOLE':g' ${TEMPDIR}/bootscripts/${ALL} - if [ "${USE_KMS}" ] && [ ! "${SERIAL_MODE}" ] ; then + if [ "${USE_KMS}" ] && [ ! "x${di_serial_mode}" = "xenable" ] ; then #optargs=VIDEO_CONSOLE sed -i -e 's:VIDEO_CONSOLE:console=tty0:g' ${TEMPDIR}/bootscripts/${ALL} @@ -499,7 +499,7 @@ tweak_boot_scripts () { sed -i -e 's:DICONSOLE:tty0:g' ${TEMPDIR}/bootscripts/${NET} fi - if [ "${SERIAL_MODE}" ] ; then + if [ "x${di_serial_mode}" = "xenable" ] ; then echo "NetInstall: Setting up to use Serial Port: [${SERIAL}]" #In pure serial mode, remove all traces of VIDEO sed -i -e 's:VIDEO_DISPLAY ::g' ${TEMPDIR}/bootscripts/${NET} @@ -950,8 +950,7 @@ initrd_preseed_settings () { case "${DIST}" in wheezy) - if [ ! "${SERIAL_MODE}" ] && [ "${conf_kernel_usb_not_builtin}" ] ; then - #Wheezy: + if [ ! "x${di_serial_mode}" = "xenable" ] && [ "${conf_kernel_usb_not_builtin}" ] ; then sed -i -e 's:#d-i console-tools:d-i console-tools:g' ${TEMPDIR}/initrd-tree/preseed.cfg sed -i -e 's:#d-i debian-installer:d-i debian-installer:g' ${TEMPDIR}/initrd-tree/preseed.cfg sed -i -e 's:#d-i console-keymaps-at:d-i console-keymaps-at:g' ${TEMPDIR}/initrd-tree/preseed.cfg @@ -1288,7 +1287,7 @@ populate_boot () { echo "uname_r=current" > ${TEMPDIR}/disk/boot/uEnv.txt - if [ "${SERIAL_MODE}" ] ; then + if [ "x${di_serial_mode}" = "xenable" ] ; then echo "message=echo; echo Installer for [${DISTARCH}] is using the Serial Interface; echo;" >> ${TEMPDIR}/disk/boot/uEnv.txt echo "mmcargs=run message; setenv bootargs console=${SERIAL_CONSOLE} root=/dev/ram0 rw" >> ${TEMPDIR}/disk/boot/uEnv.txt else @@ -1720,7 +1719,7 @@ while [ ! -z "$1" ] ; do FIRMWARE=1 ;; --serial-mode) - SERIAL_MODE=1 + di_serial_mode="enable" ;; --deb-file) checkparm $2