Arrigo Marchiori | 29 Jun 2012 15:38
Picon
Favicon
Gravatar

Creating code slice before disk image in nanobsd

Hello list,

the attached patch to nanobsd.sh should build the code image before
the full disk, that is the opposite of the current behavior (at least
in 8-STABLE and previous releases).

These are the two modifications introduced by the patch:

 1- use of gpart instead of fdisk, from this thread:
 http://lists.freebsd.org/pipermail/freebsd-embedded/2012-April/001542.html ;

 2- code slice (_.disk.image) built before full disk (_.disk.full).

I could not test the attachment extensively; I am looking forward to
your help for this.

The parameters were changed as follows:

 -i : now means ``do not create _.disk.full''

 -f : now means ``do not create _.disk.image'' and implies -i

Keep reading below for detailed information about the changes.

There is a new function: calculate_partitioning() that creates the
file ${NANO_OBJ}/_.partitioning. This file contains the start sector
and the length for every partition, one for each line.

The new function create_i386_code_slice() takes the first entry of the
_.partitioning file to get the size of the code partition. The rest is
(Continue reading)


Gmane