summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Traut <manut@linutronix.de>2015-02-05 10:18:34 +0100
committerManuel Traut <manut@linutronix.de>2015-02-05 10:18:34 +0100
commit81aec52914ec6d604b624c0e169a8b75d960bb8d (patch)
treec9f2e78d9af4c2569fc33de8c7c110c4baf4b7b0
parentd5e6d7167ddd31529a2c05bddc77f25f740ee03c (diff)
lx-trainer: add documentation and scripts
this moves also the elbe-xml into a lx-trainer directory. Signed-off-by: Manuel Traut <manut@linutronix.de>
-rw-r--r--.gitignore1
-rw-r--r--lx-trainer-vm/README30
-rwxr-xr-xlx-trainer-vm/dd-dual.sh40
-rwxr-xr-xlx-trainer-vm/dd-single.sh14
-rw-r--r--lx-trainer-vm/lx-trainer-vm.xml (renamed from lx-trainer-vm.xml)0
-rwxr-xr-xlx-trainer-vm/update-home.sh23
6 files changed, 107 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 0dcf5a9..0e07b00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,5 +29,4 @@ kconfig-frontends/
.config
.config.old
log.txt
-lx-trainer-vm
build
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 <manut@linutronix.de>
+
+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.xml b/lx-trainer-vm/lx-trainer-vm.xml
index 1746a8b..1746a8b 100644
--- a/lx-trainer-vm.xml
+++ b/lx-trainer-vm/lx-trainer-vm.xml
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