summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced/TUTORIAL.bash
diff options
context:
space:
mode:
Diffstat (limited to 'distribution/yocto-advanced/TUTORIAL.bash')
-rwxr-xr-xdistribution/yocto-advanced/TUTORIAL.bash47
1 files changed, 47 insertions, 0 deletions
diff --git a/distribution/yocto-advanced/TUTORIAL.bash b/distribution/yocto-advanced/TUTORIAL.bash
new file mode 100755
index 0000000..ecdf805
--- /dev/null
+++ b/distribution/yocto-advanced/TUTORIAL.bash
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+#
+# This script shows the steps for building and executing qemu, the boot files,
+# and root filesystems.
+#
+
+
+# make meta-schulung-extended a git repository (optional)
+#
+#cd meta-schulung-extended
+#git init
+#git add .
+#git commit -a -m 'initial commit'
+#cd ..
+
+# get a local copy of poky
+git clone -b krogoth git://git.yoctoproject.org/poky.git
+
+# setup (and switch to) the build environment
+cd poky
+TEMPLATECONF=../meta-schulung-extended/conf source ./oe-init-build-env ../build-schulung
+
+# build qemu, u-boot/kernel/devicetree, root filesystem
+bitbake qemu-native qemu-boot-files core-image-schulung meta-ide-support
+
+# start the core image in qemu
+DEPLOY=tmp/deploy/images/vexpress
+SD=$DEPLOY/core-image-schulung-vexpress.ext4
+UBOOT=$DEPLOY/u-boot.uimg
+QEMU_AUDIO_DRV=none \
+ ./tmp/work/armv7ahf-neon-poky-linux-gnueabi/meta-ide-support/1.0-r3/recipe-sysroot-native/usr/bin/qemu-system-arm \
+ -M vexpress-a9 \
+ -m 128 \
+ -nographic \
+ -net nic -net user,tftp=$DEPLOY \
+ -drive file=${SD},if=sd,format=raw \
+ -kernel $UBOOT
+
+
+
+# from the U-Boot prompt:
+# => dhcp 0x64000000 image.fit
+# => setenv bootargs console=ttyAMA0,115200 root=/dev/mmcblk0
+# => bootm 0x64000000
+
+# either run "poweroff" or powercut virtual machine with "CTRL-a, x"