Current-Users archive

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

Re: IMAGEMB settings

> In the install-image and live-image (as it uses install-image)
> build targets the common Makefile sets IMAGEMB to be 2048.
> In the i386 platform it sets this down to 512 (and 550 on amd64).
> Is there a reason that these platforms are unable to use the
> default 2048?

Not quite:

>> distrib/common/bootimage/Makefile.bootimage:IMAGEMB?=        2048            
>> # 2048MB
>> distrib/i386/installimage/Makefile:IMAGEMB=  512                     # for 
>> all installation binaries
>> distrib/i386/liveimage/usbimage/Makefile:IMAGEMB=    1536                    
>> # 2GB USB flash memories aren't 2GiB

- the default IMAGEMB in distrib/common/bootimage/Makefile.bootimage
  is 2048, for emulators with spaces for possible major packages
  like firefox + emacs + perl/ruby/python/GTK2+/SDL etc.
  (too large GB numbers might flood objdir on build hosts)

- for installimage, no free space is required (it just wastes time of dd)
  so it's 512 (or 550) to fit required installation binary sets

- for USB images, some damn^Wdumb sticks have only ~1,950,000,000 bytes
  (~1850MB) so the size is smaller (currently 1536MB) than emu images

> More importantly is that the value can't be overridden as it's
> defined with "IMAGEMB=512" instead of "IMAGEMB?=512".

IMAGEMB is used to pass the size value from image dependent Makefiles
to common Makefile.bootimage so it isn't user configurable.

But for usbimage and emulmages it might be worth to have extra
USBIMAGEMB and EMUIMAGEMB configuration variables:
USBIMAGEMB?=    1536

> In my build I'd also like to also augment SPEC_EXTRA too.
> Is there a mechanism for extending that too?

What type of image are you trying to customize?

SPEC_EXTRA and IMGFILE_EXTRA are just hack for install-image
(which requires files not in binary sets) to (re)use live-image
infrastructures, and these values are not expected configurable
by users via mk.conf(5) or environment variables.

If you are trying to build your own liveimage with your own files,
probably it's easier to create your own directory in
distrib/i386/customimage with custom Makefile copied and modified
from distirb/i386/installimage/Makefile and

Izumi Tsutsui

Home | Main Index | Thread Index | Old Index