From 3a5261aa987dd7249443edfaf2974420f7421f79 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Fri, 7 Sep 2012 16:47:03 -0500 Subject: [PATCH] Beaglebone: ulcd3 init script Signed-off-by: Robert Nelson --- scripts/debian-finish.sh | 19 +++++++++++++++++++ scripts/ubuntu-finish.sh | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/scripts/debian-finish.sh b/scripts/debian-finish.sh index f1c6fb1..04dafda 100644 --- a/scripts/debian-finish.sh +++ b/scripts/debian-finish.sh @@ -66,3 +66,22 @@ cat > /etc/e2fsck.conf <<-__EOF__ broken_system_clock = true __EOF__ + +cat > /etc/init.d/board_tweaks.sh <<-__EOF__ + #!/bin/sh + + if [ -f /boot/uboot/SOC.sh ] ; then + board=\$(cat /boot/uboot/SOC.sh | grep "board" | awk -F"=" '{print \$2}') + case "\${board}" in + BEAGLEBONE_A) + if [ -f /boot/uboot/tools/target/BeagleBone.sh ] ; then + /bin/sh /boot/uboot/tools/target/BeagleBone.sh &> /dev/null & + fi;; + esac + fi + +__EOF__ + +chmod u+x /etc/init.d/board_tweaks.sh +insserv board_tweaks.sh || true + diff --git a/scripts/ubuntu-finish.sh b/scripts/ubuntu-finish.sh index 457df03..20ccb83 100644 --- a/scripts/ubuntu-finish.sh +++ b/scripts/ubuntu-finish.sh @@ -135,3 +135,20 @@ fi __EOF__ +cat > /etc/init/board_tweaks.conf <<-__EOF__ + start on runlevel 2 + + script + if [ -f /boot/uboot/SOC.sh ] ; then + board=\$(cat /boot/uboot/SOC.sh | grep "board" | awk -F"=" '{print \$2}') + case "\${board}" in + BEAGLEBONE_A) + if [ -f /boot/uboot/tools/target/BeagleBone.sh ] ; then + /bin/sh /boot/uboot/tools/target/BeagleBone.sh &> /dev/null & + fi;; + esac + fi + end script + +__EOF__ +