aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-02-06 13:57:43 +0100
committerlonkaars <loek@pipeframe.xyz>2024-02-06 13:57:43 +0100
commit86b1f0ef352205029457cc75e525f86aa70239e5 (patch)
treee356eb20edc24c4ab10eede5270e348f9e00e4cd
parenta9ef380662da3efa382017ff8423f1a894b31bfd (diff)
fix env vars + sysfs + led demoweek4
-rwxr-xr-xrootfs/bin/helloled9
-rw-r--r--rootfs/etc/fstab1
-rwxr-xr-xrootfs/etc/init.d/rcS7
-rw-r--r--rootfs/etc/inittab2
-rw-r--r--rootfs/etc/profile1
5 files changed, 14 insertions, 6 deletions
diff --git a/rootfs/bin/helloled b/rootfs/bin/helloled
new file mode 100755
index 0000000..877faab
--- /dev/null
+++ b/rootfs/bin/helloled
@@ -0,0 +1,9 @@
+#!/bin/sh
+BRIGHTNESS=0
+while true ; do
+ BRIGHTNESS=$(( ( $BRIGHTNESS + 1 ) % 2 ))
+ for i in $(seq 0 3) ; do
+ echo $BRIGHTNESS > "/sys/class/leds/beaglebone:green:usr$i/brightness"
+ done
+ sleep 0.5
+done
diff --git a/rootfs/etc/fstab b/rootfs/etc/fstab
index e84b78a..a474c4a 100644
--- a/rootfs/etc/fstab
+++ b/rootfs/etc/fstab
@@ -1 +1,2 @@
proc /proc proc defaults 0 0
+sysfs /sys sysfs defaults 0 0
diff --git a/rootfs/etc/init.d/rcS b/rootfs/etc/init.d/rcS
index be9ca09..59e0fe0 100755
--- a/rootfs/etc/init.d/rcS
+++ b/rootfs/etc/init.d/rcS
@@ -1,5 +1,4 @@
#!/bin/sh
-# mount all drives in /etc/fstab
-/bin/mount -a
-# set the system hostname
-/bin/hostname -F /etc/hostname
+mount -a
+hostname -F /etc/hostname
+syslogd
diff --git a/rootfs/etc/inittab b/rootfs/etc/inittab
index 805a39d..3f0c41a 100644
--- a/rootfs/etc/inittab
+++ b/rootfs/etc/inittab
@@ -4,5 +4,5 @@
::restart:/sbin/init
# put a shell on ttyS0 (serial header on board)
-ttyS0::respawn:/bin/sh
+ttyS0::respawn:-/bin/sh
diff --git a/rootfs/etc/profile b/rootfs/etc/profile
index 8e38c52..431ef69 100644
--- a/rootfs/etc/profile
+++ b/rootfs/etc/profile
@@ -1,6 +1,5 @@
# /etc/profile
umask 022
-cd "$HOME"
export PATH="$PATH:/usr/bin"
export LD_LIBRARY_PATH="/lib"