Compiling U-Boot for use in QEMU (VersatilePB)
- Magnus Therning
Since I’m now working a bit with embedded systems I thought I’d take a look at compiling for one of the ARM-based machines that QEMU supports. I settled for VersatilePB after finding this old-ish article. Rather optimistically I thought that maybe, just maybe things had change in a year and that the limitation of flash was removed. How wrong I was.
I did find an easier way to get it working, though with the limitation that Linux has to be started via tftpboot
or some other network-based fashion. The patch looks like this:
--- u-boot.orig/src/u-boot-2011.12/include/configs/versatile.h
+++ u-boot/src/u-boot-2011.12/include/configs/versatile.h
@@ -31,6 +31,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_ARCH_VERSATILE_QEMU
+
/*
* High Level Configuration Options
* (easy to change)
Then just go ahead and modify the default boot argument (CONFIG_BOOTARGS
in the same file) to your hearts content to minimise the amount of manual work for booting.