From 22076fed840e7573b8076e57e0cda3591a7f8a3d Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Fri, 29 Apr 2011 15:20:52 +0200 Subject: updated debootstrap presentation Signed-off-by: Manuel Traut --- linux-basics/fromscratch_vs_debian/deb.sh | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 linux-basics/fromscratch_vs_debian/deb.sh (limited to 'linux-basics/fromscratch_vs_debian/deb.sh') diff --git a/linux-basics/fromscratch_vs_debian/deb.sh b/linux-basics/fromscratch_vs_debian/deb.sh new file mode 100755 index 0000000..2352c7f --- /dev/null +++ b/linux-basics/fromscratch_vs_debian/deb.sh @@ -0,0 +1,33 @@ +#fist stage, on host (pc) +sudo rm -rf debian-rfs + +sudo /usr/sbin/debootstrap --verbose \ + --arch armel \ + --include=mtd-utils \ + --foreign \ + squeeze \ + debian-rfs \ + http://debian.tu-bs.de/debian + +cd debian-rfs/ dev +mknod -m 622 console c 5 1 +mknod -m 622 tty0 c 4 0 +mknod -m 666 null c 1 3 +mknod -m 666 zero c 1 5 +mknod -m 666 ptmx c 5 2 +mknod -m 666 tty c 5 0 +mknod -m 444 random c 1 8 +mknod -m 444 urandom c 1 9 +cd - + +sudo mkfs.ext2 /dev/sdb2 +sudo mount /dev/sdb2 /mnt/usb +sudo cp -a debian-rfs/* /mnt/usb/ + +exit 0 + +#second stage, on target (beagleboard) +mkdir /proc /sys +mount -t proc none /proc +mount -t sysfs none /sys +/debootstrap/debootstrap --second-stage -- cgit v1.2.3 From 437a656acc7aa4276b27fef8582c13b29e50ac52 Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Fri, 29 Apr 2011 15:41:22 +0200 Subject: fix debootstrap script (add console, passwd) Signed-off-by: Manuel Traut --- beagle/uboot.txt | 7 +++++-- linux-basics/fromscratch_vs_debian/deb.sh | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'linux-basics/fromscratch_vs_debian/deb.sh') diff --git a/beagle/uboot.txt b/beagle/uboot.txt index 0c4d0b3..5ad36bf 100644 --- a/beagle/uboot.txt +++ b/beagle/uboot.txt @@ -1,5 +1,8 @@ setenv loadaddr 0x80200000 mmc init -fatload mmc1 1 ${loadaddr} uimage.old -setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p2 init=/bin/bash +fatload mmc1 1 ${loadaddr} uimage + +setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait +init=/bin/bash + bootm ${loadaddr} diff --git a/linux-basics/fromscratch_vs_debian/deb.sh b/linux-basics/fromscratch_vs_debian/deb.sh index 2352c7f..3a3457f 100755 --- a/linux-basics/fromscratch_vs_debian/deb.sh +++ b/linux-basics/fromscratch_vs_debian/deb.sh @@ -31,3 +31,6 @@ mkdir /proc /sys mount -t proc none /proc mount -t sysfs none /sys /debootstrap/debootstrap --second-stage +passwd +echo "T0:23:respawn:/sbin/getty -L ttyO2 115200 vt100" >> /etc/inittab +mount -o remount,ro /dev/mmcblk0p2 / -- cgit v1.2.3