From 81aec52914ec6d604b624c0e169a8b75d960bb8d Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Thu, 5 Feb 2015 10:18:34 +0100 Subject: lx-trainer: add documentation and scripts this moves also the elbe-xml into a lx-trainer directory. Signed-off-by: Manuel Traut --- lx-trainer-vm/README | 30 ++++++ lx-trainer-vm/dd-dual.sh | 40 ++++++++ lx-trainer-vm/dd-single.sh | 14 +++ lx-trainer-vm/lx-trainer-vm.xml | 214 ++++++++++++++++++++++++++++++++++++++++ lx-trainer-vm/update-home.sh | 23 +++++ 5 files changed, 321 insertions(+) create mode 100644 lx-trainer-vm/README create mode 100755 lx-trainer-vm/dd-dual.sh create mode 100755 lx-trainer-vm/dd-single.sh create mode 100644 lx-trainer-vm/lx-trainer-vm.xml create mode 100755 lx-trainer-vm/update-home.sh (limited to 'lx-trainer-vm') diff --git a/lx-trainer-vm/README b/lx-trainer-vm/README new file mode 100644 index 0000000..f1c255e --- /dev/null +++ b/lx-trainer-vm/README @@ -0,0 +1,30 @@ +lx-trainer +========== +v2015-02-05 +Manuel Traut + +lx-trainer is our disk image for all trainings. + +To build the image, a modified elbe initvm is needed. +The default disk-size of 20GB is not enough! + +ELBE generates just the first partition. However the +system is configured that there is a second partition +mounted by label 'home' on '/home'. This was made to +reduce the time needed to 'dd' the image to the disks. + +E.g. i added the following content for the yocto training: +---- + % ls home-overlay/devel/yocto/ + downloads pres_lx-trainer-vm.pdf pres_yocto-basic.pdf + meta-mini pres_yocto-advanced.pdf pres_yocto-intro.pdf +---- + +The dd scirpts provided here are just examples how to put +the image on (multiple) usb hard-drives and add the home +partition. They should be used as templates and need modifications +to fit on your environment. + +The update-home script is used to update just the '/home' +partition. E.g. collect the disks after the first training +day, and add some stuff for the 2nd day. diff --git a/lx-trainer-vm/dd-dual.sh b/lx-trainer-vm/dd-dual.sh new file mode 100755 index 0000000..606ba17 --- /dev/null +++ b/lx-trainer-vm/dd-dual.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# delete mbr +dd if=/dev/zero of=/dev/sdb bs=512 count=1 +dd if=/dev/zero of=/dev/sdc bs=512 count=1 +dd if=/dev/zero of=/dev/sdd bs=512 count=1 + +cat build-dm/lx-trainer.img | tee \ + >(dd of=/dev/sdb) \ + >(dd of=/dev/sdc) \ + | dd of=/dev/sdd + +sync + +echo -e "n\np\n\n\n\nw" | fdisk /dev/sdb +echo -e "n\np\n\n\n\nw" | fdisk /dev/sdc +echo -e "n\np\n\n\n\nw" | fdisk /dev/sdd +partprobe + +mkfs.ext4 -F -L lxhome /dev/sdb2 +mkfs.ext4 -F -L lxhome /dev/sdc2 +mkfs.ext4 -F -L lxhome /dev/sdd2 + +mount /dev/sdb2 /mnt +mkdir /mnt/devel +chown 1000:1000 /mnt/devel +cp -a home-overlay/* /mnt/ +umount /mnt + +mount /dev/sdc2 /mnt +mkdir /mnt/devel +chown 1000:1000 /mnt/devel +cp -a home-overlay/* /mnt/ +umount /mnt + +mount /dev/sdd2 /mnt +mkdir /mnt/devel +chown 1000:1000 /mnt/devel +cp -a home-overlay/* /mnt/ +umount /mnt diff --git a/lx-trainer-vm/dd-single.sh b/lx-trainer-vm/dd-single.sh new file mode 100755 index 0000000..fb66814 --- /dev/null +++ b/lx-trainer-vm/dd-single.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +dd if=build/lx-trainer.img of=/dev/sdb + +echo -e "n\np\n\n\n\nw" | fdisk /dev/sdb +partprobe + +mkfs.ext4 -F -L lxhome /dev/sdb2 + +mount /dev/sdb2 /mnt +mkdir /mnt/devel +chown 1000:1000 /mnt/devel +cp -a home-overlay/* /mnt/ +umount /mnt diff --git a/lx-trainer-vm/lx-trainer-vm.xml b/lx-trainer-vm/lx-trainer-vm.xml new file mode 100644 index 0000000..1746a8b --- /dev/null +++ b/lx-trainer-vm/lx-trainer-vm.xml @@ -0,0 +1,214 @@ + + + amd64 + + ftp.de.debian.org + /debian + http + + + + http://debian.linutronix.de/elbe-testing wheezy main + + + http://debian.linutronix.de/elbe-testing wheezy main + + + + + + wheezy + + + lx-training + 1 + + can be used for linutronix trainigs. use as usb hd or + use this command to generate a vmware image: + qemu-img convert -O vmdk lx-trainer.img lx-trainer.vmdk + + amd64 + + ftp.de.debian.org + /debian + http + + + + http://192.168.0.153/debian jessie contrib non-free + + + http://192.168.0.153/debian jessie contrib non-free + + + + + http://debian.linutronix.de/elbe-testing jessie main + + + http://debian.linutronix.de/elbe-testing jessie main + + + + + + jessie + + + lx-training + tec.linutronix.de + root + ttyS0,115200 + + + lx-trainer.img + 16GiB + + + remain + + + + + + + + + / + + ext4 + -i 0 + + + + + /home + + ext4 + -i 0 + + + + none + /sys/kernel/debug + + debugfs + + + + + var/cache/apt/archives/*.deb + wget http://releases.linaro.org/14.11/components/toolchain/binaries/arm-linux-gnueabi/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabi.tar.xz + tar xJf gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabi.tar.xz -C /opt + rm gcc-linaro-*.tar.xz + wget http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-cpp-kepler-SR2-linux-gtk-x86_64.tar.gz + tar xzf eclipse-cpp-*.tar.gz -C /opt + rm eclipse-cpp-*.tar.gz + /opt/yocto + git clone -b daisy git://git.yoctoproject.org/poky.git /opt/yocto/poky.git + git clone -b daisy git://git.yoctoproject.org/meta-ti /opt/yocto/meta-ti.git + devel + + + grub-pc + linux-image-amd64 + linux-image-amd64-dbg + linux-headers-amd64 + linux-tools + firmware-linux + + + openssh-client + openssh-server + less + bash + vim-nox + emacs-nox + mc + diffstat + quilt + git + gedit + gksu + + + bootchart2 + pybootchartgui + kexec-tools + + inkscape + + + mtd-utils + qemu-system + qemu-user + build-essential + autoconf + automake + u-boot-tools + libncurses5-dev + bc + nfs-kernel-server + tftpd-hpa + duma + strace + ltrace + gdb + + + elbe + elbe-doc + elbe-control + qemu-kvm + reprepro + debmirror + apache2 + devscripts + dh-make + minicom + sudo + screen + rsync + + + acl + attr + tomoyo-tools + selinux-basics + selinux-utils + selinux-policy-default + selinux-policy-dev + openvpn + easy-rsa + + + openjdk-7-jdk + + + python-django + python-django-south + unzip + texinfo + chrpath + libsdl1.2-dev + + + lightdm + mate-desktop-environment-extras + mate-gnome-main-menu-applet + mate-themes + pluma + xterm + xinit + locales + xserver-xorg + network-manager-gnome + wireshark + xxxterm + gitk + + + evince + + + diff --git a/lx-trainer-vm/update-home.sh b/lx-trainer-vm/update-home.sh new file mode 100755 index 0000000..2bdbf37 --- /dev/null +++ b/lx-trainer-vm/update-home.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +mkfs.ext4 -F -L lxhome /dev/sde2 +mkfs.ext4 -F -L lxhome /dev/sdc2 +mkfs.ext4 -F -L lxhome /dev/sdd2 + +mount /dev/sde2 /mnt +mkdir /mnt/devel +chown 1000:1000 /mnt/devel +cp -a home-overlay/* /mnt/ +umount /mnt + +mount /dev/sdc2 /mnt +mkdir /mnt/devel +chown 1000:1000 /mnt/devel +cp -a home-overlay/* /mnt/ +umount /mnt + +mount /dev/sdd2 /mnt +mkdir /mnt/devel +chown 1000:1000 /mnt/devel +cp -a home-overlay/* /mnt/ +umount /mnt -- cgit v1.2.3