slitaz-arm rev 57

Improve/fix sat-rpi and main ARM rcS
author Christophe Lincoln <pankso@slitaz.org>
date Fri Mar 14 23:02:33 2014 +0100 (2014-03-14)
parents e78c96840be9
children 2d1f132ea8bf
files Makefile rootfs/etc/init.d/rcS sat-rpi
line diff
     1.1 --- a/Makefile	Fri Mar 14 18:02:26 2014 +0000
     1.2 +++ b/Makefile	Fri Mar 14 23:02:33 2014 +0100
     1.3 @@ -7,12 +7,9 @@
     1.4  
     1.5  install:
     1.6  	install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
     1.7 -	#install -m 0755 -d $(DESTDIR)$(PREFIX)/share/slitaz-arm
     1.8  	install -m 0755 sat $(DESTDIR)$(PREFIX)/bin
     1.9  	install -m 0755 sat-rpi $(DESTDIR)$(PREFIX)/bin
    1.10 -	install -m 0755 rpi/tazberry $(DESTDIR)$(PREFIX)/bin
    1.11  
    1.12  uninstall:
    1.13  	rm -f $(DESTDIR)$(PREFIX)/bin/sat
    1.14  	rm -f $(DESTDIR)$(PREFIX)/bin/sat-rpi
    1.15 -	rm -f $(DESTDIR)$(PREFIX)/bin/tazberry
     2.1 --- a/rootfs/etc/init.d/rcS	Fri Mar 14 18:02:26 2014 +0000
     2.2 +++ b/rootfs/etc/init.d/rcS	Fri Mar 14 23:02:33 2014 +0100
     2.3 @@ -18,19 +18,30 @@
     2.4  echo $(colorize 34 "Processing: /etc/init.d/rcS")
     2.5  
     2.6  # Mount all from: /etc/fstab
     2.7 +echo "Mounting filesystems in fstab..."
     2.8  mkdir -p /dev/pts /dev/shm
     2.9 -echo "Mounting filesystems in fstab..."
    2.10  mount -a
    2.11  
    2.12  # Mount /run as tmpfs so runtime data are not written to disk
    2.13  echo -n "Mounting tmpfs filesystem on: /run"
    2.14  mount -t tmpfs tmpfs /run
    2.15 +mount --bind /run /var/run
    2.16  status
    2.17  
    2.18 +# Store boot messages to log files
    2.19 +log="/var/log/boot.log"
    2.20 +dmesg > /var/log/dmesg.log &
    2.21 +echo "$0" > ${log}
    2.22 +
    2.23  # Be quiet at boot
    2.24  echo "0 0 0 0" > /proc/sys/kernel/printk
    2.25  
    2.26 -# Use udev and disable hotplug helper (udevd listens to netlink)
    2.27 +# /dev devtmpfs
    2.28 +echo -n "Mounting devtmpfs filesystem on: /dev"
    2.29 +mount -t devtmpfs devtmpfs /dev
    2.30 +status
    2.31 +
    2.32 +# Use udev and disable hotplug helper (udevd listen to netlink)
    2.33  if [ -x "/sbin/udevd" ]; then
    2.34  	echo "" > /proc/sys/kernel/hotplug
    2.35  	echo "Starting udevd & udevadm [trigger settle]..."
    2.36 @@ -44,27 +55,37 @@
    2.37  	status
    2.38  fi
    2.39  
    2.40 -# Clean up
    2.41 -echo -n "Cleaning up the system..."
    2.42 -rm -rf /tmp /var/run && ln -s /run /var/run
    2.43 -mkdir /tmp && chmod 1777 /tmp
    2.44 +# Clean up /tmp
    2.45 +echo -n "Cleaning up temporary files:  /tmp"
    2.46 +rm -rf /tmp && mkdir /tmp && chmod 1777 /tmp
    2.47  status
    2.48  
    2.49 -# Start syslogd and klogd.
    2.50 +# Start syslogd and klogd
    2.51  echo -n "Starting system log daemons: syslogd/klogd..."
    2.52 -syslogd -s $SYSLOGD_SIZE && klogd
    2.53 +syslogd -s ${SYSLOGD_SIZE} && klogd
    2.54  status
    2.55  
    2.56 +# Run post install configs on first boot --> into a script ?
    2.57 +if [ ! -f "/var/lib/slitaz/post-install" ]; then
    2.58 +	colorize 33 "Running post install configs..."
    2.59 +	mkdir -p /var/lib/slitaz
    2.60 +	echo "$ARCH" > /var/lib/slitaz/post-install
    2.61 +	[ -s /etc/keymap.conf ] || tazkeymap
    2.62 +	#[ -s /etc/locale.conf ] || tazlocale
    2.63 +	# change root password
    2.64 +	# add a user
    2.65 +fi
    2.66 +
    2.67  # Load all modules from config file
    2.68  if [ "$LOAD_MODULES" ]; then
    2.69  	colorize 33 "Loading Kernel modules..."
    2.70 -	for mod in $LOAD_MODULES; do
    2.71 +	for mod in ${LOAD_MODULES}; do
    2.72  		modprobe -v $mod
    2.73  	done
    2.74  fi
    2.75  
    2.76  # Start all init scripts
    2.77 -for script in $RUN_SCRIPTS; do
    2.78 +for script in ${RUN_SCRIPTS}; do
    2.79  	colorize 34 "Processing: /etc/init.d/$script"
    2.80  	/etc/init.d/$script
    2.81  done
    2.82 @@ -72,7 +93,7 @@
    2.83  # Start all daemons
    2.84  if [ "$RUN_DAEMONS" ]; then
    2.85  	colorize 33 "Starting all daemons..."
    2.86 -	for daemon in $RUN_DAEMONS; do
    2.87 +	for daemon in ${RUN_DAEMONS}; do
    2.88  		/etc/init.d/$daemon start
    2.89  	done
    2.90  fi
     3.1 --- a/sat-rpi	Fri Mar 14 18:02:26 2014 +0000
     3.2 +++ b/sat-rpi	Fri Mar 14 23:02:33 2014 +0100
     3.3 @@ -213,7 +213,7 @@
     3.4  		
     3.5  		# We may want to simply regenerate the RPi distro
     3.6  		if [ ! "$nosat" ]; then
     3.7 -			sat gen --work="$work" --flavor="$flavor" --kmap --noinit --nolinux
     3.8 +			sat gen --work="$work" --flavor="$flavor" --noinit --nolinux
     3.9  		fi
    3.10  		
    3.11  		header "SliTaz Raspberry Pi distro"