There's two variables added to Makefile.crunch:
SMALLPROG If 1, add SMALLPROG=1 to CRUNCHENV. [default: 1]
This can be used by various Makefiles to
determine if a `small' version of the program
is required.
SMALLPROG_INET6 If 1 and SMALLPROG == 1, add SMALLPROG_INET6=1
to CRUNCHENV. [default: 0]
This can be used by various Makefiles to
determine if the `small' version has INET6
support enabled.
Only enable SMALLPROG_INET6 for programs on the ramdisks that have INET6 in
the appropriate kernel, and cleanup INET6 setting.
(Note: this means that sysinst won't get INET6 support if the kernel
it's running on doesn't have it).
This change saves a fair bit of space on various install images
(including i386 ramdisk-{ps2,small,tiny}) that didn't have INET6 in
the kernel but were unconditionally getting INET6 support in their tools.
delete csh, netstat, tset, and vi to reduce GOT size.
otherwise, libc.a and other objects which was not compiled with -xgot
won't link. (in general, you can't mix -xgot and no -xgot binaries.)
current GOT size is 0000f590 (see below).
10 .got 0000f590 10010360 10010360 00269360 2**4
CONTENTS, ALLOC, LOAD, DATA
symbols into locals, but relocs are left in place (rather than attempting
to resolve-in-place with "ld -r", even with "-Bsymbolic").
Standard MIPS code will generate CALL16 relocs for function calls, but
the linker forbids such relocs from being used to call local symbols (such
as those turned "local" by objcopy). So, rather than battle the toolchain
uphill, work around it for the moment by forcing 32-bit GOT references with
the assembler option "-xgot".
This will be fixed in a more clean manner in the future.
dependent files:
- Use infrastructure from distrib/common to build file system images with
crunchgen-ed programs from a list file.
- Non root ("UNPRIVED") builds from a read-only source tree are possible,
as makefs(8) replaces vnconfig(8)/vnd use, devices are generated using
common/makedev2spec.awk, etc.
- Cross builds should be possible, except that some ports need cross-compile
host tool versions of installboot and any appropriate host disk labelling
tools.
XXX: pmax, sparc and vax need fixing for this!
- This code has NOT YET BEEN TESTED on most of the ports.
It should work, but it is extremely likely that the file system
parameters may need tweaking to get things to fit.
See MAKEFS_FLAGS in sparc/miniroot/Makefile.inc for an example.
If assistance is required, please ask!