Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Feb 2013 16:32:34 +0100
From:      Kristof Provost <kristof@sigsegv.be>
To:        John Elder <johnsstephenelder@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: How to create Img file
Message-ID:  <20130204153234.GK71256@thebe.jupiter.sigsegv.be>
In-Reply-To: <CA%2B2R0XOcKXQVAwgfahsLJ7YXupE72F1nGKid=minvAtP%2BbxhDg@mail.gmail.com>
References:  <CA%2B2R0XOcKXQVAwgfahsLJ7YXupE72F1nGKid=minvAtP%2BbxhDg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2013-02-04 21:30:17 (+0800), John Elder <johnsstephenelder@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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130204153234.GK71256>