From cc0d6964bd30bc2951c66c83ee76251603495f65 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 14 Aug 2012 20:15:38 -0500 Subject: [PATCH] serial port: fighting Signed-off-by: Robert Nelson --- mk_mmc.sh | 35 ++++++++++++++++------------------- scripts/debian-tweaks.diff | 2 +- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 8b46506..6c103ac 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -801,15 +801,15 @@ function setup_bootscripts { boot_uenv_txt_template tweak_boot_scripts - #Setup serial - sed -i -e 's:SERIAL:'$SERIAL':g' "${DIR}/scripts/serial.conf" - sed -i -e 's:SERIAL:'$SERIAL':g' "${DIR}/scripts/ubuntu-tweaks.diff" - sed -i -e 's:SERIAL:'$SERIAL':g' "${DIR}/scripts/debian-tweaks.diff" - - if [ "$SMSC95XX_MOREMEM" ];then - sed -i 's/8192/16384/g' "${DIR}/scripts/ubuntu-tweaks.diff" - sed -i 's/8192/16384/g' "${DIR}/scripts/debian-tweaks.diff" - fi + echo "NetInstall: Setting up to use Serial Port: [${SERIAL}]" + sed -i -e 's:SERIAL:'${SERIAL}':g' "${DIR}/scripts/serial.conf" + sed -i -e 's:SERIAL:'${SERIAL}':g' "${DIR}/scripts/ubuntu-tweaks.diff" + sed -i -e 's:SERIAL:'${SERIAL}':g' "${DIR}/scripts/debian-tweaks.diff" + + if [ "$SMSC95XX_MOREMEM" ] ; then + sed -i 's/8192/16384/g' "${DIR}/scripts/ubuntu-tweaks.diff" + sed -i 's/8192/16384/g' "${DIR}/scripts/debian-tweaks.diff" + fi } function extract_base_initrd { @@ -1459,17 +1459,14 @@ fi } function reset_scripts { + sed -i -e 's:'${SERIAL}':SERIAL:g' "${DIR}/scripts/serial.conf" + sed -i -e 's:'${SERIAL}':SERIAL:g' "${DIR}/scripts/ubuntu-tweaks.diff" + sed -i -e 's:'${SERIAL}':SERIAL:g' "${DIR}/scripts/debian-tweaks.diff" - #Setup serial - sed -i -e 's:'$SERIAL':SERIAL:g' "${DIR}/scripts/serial.conf" - sed -i -e 's:'$SERIAL':SERIAL:g' "${DIR}/scripts/ubuntu-tweaks.diff" - sed -i -e 's:'$SERIAL':SERIAL:g' "${DIR}/scripts/debian-tweaks.diff" - - if [ "$SMSC95XX_MOREMEM" ];then - sed -i 's/16384/8192/g' "${DIR}/scripts/ubuntu-tweaks.diff" - sed -i 's/16384/8192/g' "${DIR}/scripts/debian-tweaks.diff" - fi - + if [ "${SMSC95XX_MOREMEM}" ] ; then + sed -i 's/16384/8192/g' "${DIR}/scripts/ubuntu-tweaks.diff" + sed -i 's/16384/8192/g' "${DIR}/scripts/debian-tweaks.diff" + fi } function check_mmc { diff --git a/scripts/debian-tweaks.diff b/scripts/debian-tweaks.diff index 2cf6270..534f986 100644 --- a/scripts/debian-tweaks.diff +++ b/scripts/debian-tweaks.diff @@ -19,7 +19,7 @@ index 0000000..6d06fc7 + echo "vm.min_free_kbytes = 8192" >> /target/etc/sysctl.conf + + if [ ! -f /etc/rcn-serial.conf ]; then -+ cat /target/etc/inittab | grep -V # | grep SERIAL || echo "T2:23:respawn:/sbin/getty -L SERIAL 115200 vt102" >> /target/etc/inittab && echo "#" >> /target/etc/inittab ++ cat /target/etc/inittab | grep -v '#' | grep SERIAL || echo "T2:23:respawn:/sbin/getty -L SERIAL 115200 vt102" >> /target/etc/inittab && echo "#" >> /target/etc/inittab + fi + + if [ -d /lib/firmware/ ] ; then