Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Script to create bootable arm images?



> On Jun 24, 2022, at 4:49 PM, Greg Troxel <gdt%lexort.com@localhost> wrote:
> 
> As someone on the outside, I think it would be good to have checked-in
> scripts with comments about what they depend on.   I can see that those
> that do this think that's unnecessary, but also that it is documentation
> of the process for almost everybody else.

To pick up this thread, I have never figured out how the images on armbsd.org are being made.  However, it is clear that we can improve the standard build system to make it automatic to create any set of bootable images.  I propose the patch below to do this, and would greatly appreciate review and comments.

The goal is to allow, but not require, individual developers to automatically populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg with board-specific bootable images.  This would also allow, but again not require, the build farms to include those images in official release repositories, which might make it easier for users to test or adopt NetBSD on platforms that currently do not provide official bootable images.

Here is my more formal rationale (e.g., likely future commit message):

Release builds for arm platforms create compressed images in
${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg.  However, in some
cases, e.g., armv7.img.gz, they are not bootable.  Consequently, boot
blocks must be manually installed in the images, which is an extra
barrier for testing systems or adopting NetBSD.  This has prompted
creation of external repositories, e.g., armbsd.org, to host a
collection of bootable images.  However, this does not ease the burden
on developers compiling their own systems; for them, manual
installation of boot blocks is still required.

For arm platforms, etc/etc.evbarm/Makefile.inc contains the commands
used to create system images.  Because installboot(8) can write boot
blocks directly to system images, a loop through possible boards can
create a series of bootable images during the normal build process.

In the case of many arm platforms, installboot(8) uses U-Boot boot
blocks, which are not part of the NetBSD source code.  Developers can,
however, install as many U-Boot boot blocks as desired, either in the
default location of /usr/pkg/share/u-boot or in a set of directories
pointed to by the U-Boot search path, the INSTALLBOOT_UBOOT_PATHS
environment variable.  For each board with an available boot block, a
board-specific bootable image will be created in
${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg.  If a boot block is
not available, which is the typical situation currently, no additional
image will be created.

This facility creates opportunities to build bootable images for any
number of boards within the scope of a standard release build.
However, that is not required and will not occur without the
intervention of installing U-Boot boot blocks prior to the build.

Cheers,
Brook


Attachment: bootable-images.diff
Description: Binary data



Home | Main Index | Thread Index | Old Index