slitaz-arm rev 30

Up .hgignore Makefile rcS
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 05 23:39:50 2014 +0100 (2014-03-05)
parents 78abe0d7b64e
children d3ca56913645
files .hgignore Makefile rootfs/etc/init.d/rcS sat
line diff
     1.1 --- a/.hgignore	Mon Mar 03 16:32:33 2014 +0000
     1.2 +++ b/.hgignore	Wed Mar 05 23:39:50 2014 +0100
     1.3 @@ -1,9 +1,5 @@
     1.4  distro/
     1.5 -cache/
     1.6  mirror/
     1.7  packages/
     1.8  spk/
     1.9 -linux-arm
    1.10 -slitaz-arm.*
    1.11 -vdisk.img
    1.12 -packages.list
    1.13 +rpi/
     2.1 --- a/Makefile	Mon Mar 03 16:32:33 2014 +0000
     2.2 +++ b/Makefile	Wed Mar 05 23:39:50 2014 +0100
     2.3 @@ -7,7 +7,10 @@
     2.4  
     2.5  install:
     2.6  	install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
     2.7 +	#install -m 0755 -d $(DESTDIR)$(PREFIX)/share/slitaz-arm
     2.8  	install -m 0755 sat $(DESTDIR)$(PREFIX)/bin
     2.9 +	install -m 0755 spi $(DESTDIR)$(PREFIX)/bin
    2.10  
    2.11  uninstall:
    2.12  	rm -f $(DESTDIR)$(PREFIX)/bin/sat
    2.13 +	rm -f $(DESTDIR)$(PREFIX)/bin/spi
     3.1 --- a/rootfs/etc/init.d/rcS	Mon Mar 03 16:32:33 2014 +0000
     3.2 +++ b/rootfs/etc/init.d/rcS	Wed Mar 05 23:39:50 2014 +0100
     3.3 @@ -7,7 +7,7 @@
     3.4  # run scripts and start daemons. This is a custom script for ARM to get
     3.5  # a faster boot under Qemu and skip things like handling cdrom.
     3.6  #
     3.7 -# Copyright (C) 2012 SliTaz ARM - BSD License
     3.8 +# Copyright (C) 2012-2014 SliTaz ARM - BSD License
     3.9  #
    3.10  . /lib/libtaz.sh
    3.11  . /etc/rcS.conf
    3.12 @@ -17,29 +17,24 @@
    3.13  
    3.14  echo $(colorize 34 "Processing: /etc/init.d/rcS")
    3.15  
    3.16 -# Mount /proc
    3.17 -echo -n "Mounting proc filesystem on: /proc"
    3.18 -mount proc
    3.19 -status
    3.20 +# Mount all from: /etc/fstab
    3.21 +echo "Mounting filesystems in fstab..."
    3.22 +mount -a
    3.23 +
    3.24 +# Be quiet
    3.25 +echo "0 0 0 0" > /proc/sys/kernel/printk
    3.26  
    3.27  # Mount /run as tmpfs so runtime data are not written to disk
    3.28  echo -n "Mounting tmpfs filesystem on: /run"
    3.29  mount -t tmpfs tmpfs /run
    3.30  status
    3.31  
    3.32 -# Mount all from: /etc/fstab
    3.33 -echo "Mounting filesystems in fstab..."
    3.34 -mount -a
    3.35 -
    3.36  # Populate /dev
    3.37  echo -n "Creating device nodes..."
    3.38  mdev -s
    3.39  echo "/sbin/mdev" > /proc/sys/kernel/hotplug
    3.40  status
    3.41  
    3.42 -# Be quiet
    3.43 -echo "0 0 0 0" > /proc/sys/kernel/printk
    3.44 -
    3.45  # Clean up
    3.46  echo -n "Cleaning up the system..."
    3.47  rm -rf /tmp /var/run && ln -s /run /var/run
     4.1 --- a/sat	Mon Mar 03 16:32:33 2014 +0000
     4.2 +++ b/sat	Wed Mar 05 23:39:50 2014 +0100
     4.3 @@ -22,6 +22,10 @@
     4.4  # http://mirror.slitaz.org/packages/cooking/arm/
     4.5  mirror="http://cook.slitaz.org/cross/arm/packages/"
     4.6  
     4.7 +#
     4.8 +# Functions
     4.9 +#
    4.10 +
    4.11  # Help and usage
    4.12  usage() {
    4.13  	cat << EOT
    4.14 @@ -40,6 +44,7 @@
    4.15  $(boldify "Options:")
    4.16    --spk      Clean or include Spk package manager in the distro
    4.17    --kmap     Include the system keymap config in the distro
    4.18 +  --noinit   Dont create the compressed initramfs
    4.19    --work=    Path to work dir with packages and rootfs
    4.20    --size=    Specify optional vdisk size (default 20Mb)
    4.21    --init=    Specify the initramfs compression: gz bz2 xz
    4.22 @@ -82,8 +87,8 @@
    4.23  		# Get --flavor= packages lists
    4.24  		if [ "$flavor" ]; then
    4.25  			echo -n "Getting $flavor packages.list..."
    4.26 -			cp $flavors/$flavor/packages.list ${data} 2>/dev/null &&
    4.27 -			cp $flavors/$flavor/flavor.conf ${data} 2>/dev/null
    4.28 +			cp -f $flavors/$flavor/packages.list ${data} 2>/dev/null &&
    4.29 +			cp -f $flavors/$flavor/flavor.conf ${data} 2>/dev/null
    4.30  			status
    4.31  		fi
    4.32  
    4.33 @@ -145,8 +150,11 @@
    4.34  			mv -f ${rootfs}/boot/linux-* ${distro}/linux-arm
    4.35  			chmod -x ${distro}/linux-arm
    4.36  		else
    4.37 -			echo -n "Missing Kernel directory: rootfs/boot/"; false
    4.38 -			status
    4.39 +			# RPi use a custom Kernel: --rpi
    4.40 +			if [ ! "$rpi" ]; then
    4.41 +				echo -n "Missing Kernel directory: rootfs/boot/"; false
    4.42 +				status
    4.43 +			fi
    4.44  		fi
    4.45  
    4.46  		# SLITAZ_ARCH
    4.47 @@ -217,16 +225,18 @@
    4.48  		fi
    4.49  
    4.50  		# Rootfs cpio: gzip xz --> /usr/lib/slitaz/liblive.sh ???
    4.51 -		echo -n "Compressing initramfs: $initramfs"
    4.52 -		case "$initramfs" in
    4.53 -			*.bz2) find . | cpio -o -H newc | bzip2 > ../$initramfs ;;
    4.54 -			*.gz) find . | cpio -o -H newc | gzip -9 > ../$initramfs ;;
    4.55 -			*.xz) find . | cpio -o -H newc | xz -9 --format=lzma > ../$initramfs ;;
    4.56 -		esac
    4.57 +		if [ ! "$noinit" ]; then
    4.58 +			echo -n "Compressing initramfs: $initramfs"
    4.59 +			case "$initramfs" in
    4.60 +				*.bz2) find . | cpio -o -H newc | bzip2 > ../$initramfs ;;
    4.61 +				*.gz) find . | cpio -o -H newc | gzip -9 > ../$initramfs ;;
    4.62 +				*.xz) find . | cpio -o -H newc | xz -9 --format=lzma > ../$initramfs ;;
    4.63 +			esac
    4.64 +		fi
    4.65  		
    4.66  		# Summary
    4.67  		status
    4.68 -		separator && echo ""
    4.69 +		separator && newline
    4.70  		boldify "SliTaz ARM distro summary"
    4.71  		separator
    4.72  		time=$(($(date +%s) - $time))
    4.73 @@ -300,21 +310,21 @@
    4.74  		# Lets use and HD in Qemu to store files|packages|whatever
    4.75  		vdisk="vdisk.img"
    4.76  		: ${size=20}
    4.77 +		newline
    4.78  		echo "Creating virtual disk: $vdisk"
    4.79  		cd $work
    4.80  		dd if=/dev/zero of=$vdisk bs=1M count=$size
    4.81  		#mkfs.ext3 -q -T ext3 -L "SliTaz" -F $vdisk 
    4.82  		# Partition
    4.83  		echo "Creating partition with: fdisk"
    4.84 -		echo "
    4.85 +		fdisk ${vdisk} >/dev/null << EOT
    4.86  o
    4.87  n
    4.88  p
    4.89  1
    4.90 -
    4.91 -
    4.92 -w" \
    4.93 -		| fdisk $vdisk >/dev/null 2>/dev/null && newline ;;
    4.94 +w
    4.95 +EOT
    4.96 +		newline ;;
    4.97  	
    4.98  	emu)
    4.99  		cd $work