How to create Img file

Kristof Provost kristof at sigsegv.be
Mon Feb 4 15:32:38 UTC 2013


On 2013-02-04 21:30:17 (+0800), John Elder <johnsstephenelder at gmail.com> wrote:
> If I have make build finished, how can I create img file and flash to the
> arm machine?

That depends on what image format your bootloader understands.
In /usr/obj/arm/arm/usr/src/sys/<BOARDNAME>/ you'll find kernel and
kernel.bin. The first is the ELF image, the second is a binary image
which can be executed directly.

For U-boot for example, I do the following:
mkimage -A arm -O freebsd -a 0x00900000 -n FreeBSD -T kernel -C none \
        -d /usr/obj/arm.arm/usr/src/sys/OPENRD-CL/kernel.bin \
        /usr/obj/arm.arm/usr/src/sys/OPENRD-CL/uImage

This is only the kernel image of course. If you want to build an image
with a kernel and rootfs you might want to look at nanobsd(8).

Regards,
Kristof



More information about the freebsd-arm mailing list