diff options
| -rw-r--r-- | schulung_tools/notes/HOWTO-uboot-qemu.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/schulung_tools/notes/HOWTO-uboot-qemu.txt b/schulung_tools/notes/HOWTO-uboot-qemu.txt new file mode 100644 index 0000000..752f42f --- /dev/null +++ b/schulung_tools/notes/HOWTO-uboot-qemu.txt @@ -0,0 +1,41 @@ +#!/bin/sh + +# +# A quick HOWTO to get u-boot up and running with qemu. +# +# For more detailed explanations and a LOT of examples, see the knowledge +# base article: +# +# http://lx-dokuwiki.lab.linutronix.de/03_knowledge/01_internal/u-boot/qemu +# + +export CROSS_COMPILE=/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- + +make vexpress_ca9x4_defconfig +make -j 8 u-boot.bin + +TEXT_BASE=`grep CONFIG_SYS_TEXT_BASE u-boot.cfg | awk '{print $3}'` + +./tools/mkimage -A arm -C none -T kernel -O linux -d u-boot.bin \ + -a $TEXT_BASE -e $TEXT_BASE u-boot.uimg + +QEMU_AUDIO_DRV="none" qemu-system-arm -M vexpress-a9 -nographic \ + -kernel u-boot.uimg -net nic -net user,tftp=`pwd` + +# Assuming the following files in the current working directory of the host: +# - zImage +# - vexpress-v2p-ca9.dtb +# - initramfs.uimg +# +# the following U-Boot commands can load/boot the kernel: +# +# dhcp 0x61000000 vexpress-v2p-ca9.dtb +# dhcp 0x61100000 initramfs.uimg +# dhcp 0x62100000 zImage +# setenv bootargs loglevel=7 console=ttyAMA0,115200 ip=dhcp +# bootz 0x62100000 0x61100000 0x61000000 + +# NOTE: The initramfs.uimg can be created from a cpio.gz with: +# +# ./tools/mkimage -A arm -C none -T ramdisk -O linux \ +# -d initramfs.cpio.gz initramfs.uimg |
