I'm trying to run hello world program on u-boot (ver: u-boot-2010.03-rc3) for ARM on QEMU (ver: qemu-2.5.0)
So far, i have created
-Hello_World.bin
-HelloWorld.uimg using mkimage
-then combined Hello_World and U-Boot binaries into a single image and got flash_hello.bin
Now, when i run the below command,
./arm-softmmu/qemu-system-arm -M versatilepb -m 128M -serial stdio -kernel flash_hello.bin
QEMU popup is blank and when I enter bootm command with address of the kernel image
I'm getting following output on screen. Can anyone help me with this. Thanks in advance.
U-Boot 2010.03-rc3 (Mar 30 2016 - 19:35:25) DRAM: 0 kB Flash: 64 MB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: SMC91111-0 VersatilePB # bootm 0x24E10 ## Booting kernel from Legacy Image at 00024e10 ... Image Name: Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 140 Bytes = 0.1 kB Load Address: 00100000 Entry Point: 00100000 Loading Kernel Image ... OK OK Starting kernel ... C� �������� <= This is the output instead of hello world
Contents of Helloworld.c:
volatile unsigned int * const UART0DR = (unsigned int *)0x101f1000;
void print_uart0(const char *s) {
while(*s != '\0') { /* Loop until end of string */
*UART0DR = (unsigned int)(*s); /* Transmit char */
s++; /* Next char */
}
}
void c_entry() {
print_uart0("Hello world!\n");
}
`