Subject: Booting NetBSD using U-Boot
To: None <,,>
From: Chan-youn Park <>
List: tech-kern
Date: 04/26/2005 15:02:57
Hi. I'm working on a Sandpoint-based diskless platform.=20

When I boot NetBSD ELF image using U-Boot, a universal bootloader for
PowerPC and other platforms, I see the following message.
[ netbsd symbol table has bad start address 0x1 ]
I think that it occurs because proper boot arguments are not given to
NetBSD kernel.

I booted NetBSD kernel using U-Boot command 'bootelf', which I think
just executes an ELF-formated executable image. But a kernel image is
not just an executable file, so it seems that to boot the kernel
properly, I should use U-Boot command 'bootm', which executes an image
according to the header of the image, which is made from a utility
'mkimage' given along with U-Boot.

Well, so when I've tried to use that tool, I could see the following option=
Usage: ./mkimage -l image
          -l =3D=3D> list image header information
       ./mkimage -A arch -O os -T type -C comp -a addr -e ep -n name
-d data_file[:data_file...] image
          -A =3D=3D> set architecture to 'arch'
          -O =3D=3D> set operating system to 'os'
          -T =3D=3D> set image type to 'type'
          -C =3D=3D> set compression type 'comp'
          -a =3D=3D> set load address to 'addr' (hex)
          -e =3D=3D> set entry point to 'ep' (hex)
          -n =3D=3D> set image name to 'name'
          -d =3D=3D> use image data from 'datafile'
          -x =3D=3D> set XIP (execute in place)
Some options are obvious, but for -a, -e, -x, I have no idea. When I
left that option as blanks and made an image, it would not boot, with
following messages.
## Booting image at 00500000 ...
   Image Name:
   Image Type:   PowerPC NetBSD Kernel Image (uncompressed)
   Data Size:    1694127 Bytes =3D  1.6 MB
   Load Address: 00500000
   Entry Point:  00500000
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
## Transferring control to NetBSD stage-2 loader (at address 00500000) ...
NIP: 00500000 XER: 00000000 LR: 07FD3514 REGS: 07f1fc80 TRAP: 0700 DAR: 005=
MSR: 00083032 EE: 0 PR: 0 FP: 1 ME: 1 IR/DR: 11

GPR00: 07FD34FC 07F1FD70 FFFFFF1F 07F1FFC8 00000000 07FEC538 07FEC538 00000=
GPR08: 00000001 00000020 FFFFFFFF 07FEC6A4 00000000 00000000 07FF0000 080C0=
GPR16: 00000000 00000000 00000000 00000001 00000000 07FD4318 00000000 07FEC=
GPR24: 07F40278 00000002 07FD4318 00500040 00500000 07F1FF94 07FF0B68 07FEC=
Call backtrace:
Program Check Exception
Can somebody help me? And does an ELF image work with U-Boot and its mkimag=