NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/45153: build.sh target live-image wanted
The following reply was made to PR toolchain/45153; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: toolchain/45153: build.sh target live-image wanted
Date: Sat, 6 Aug 2011 20:26:47 +0900
> ./build.sh live-image
> should build a bootable live image suitable for putting on a
> USB stick or CD (or other bootable media) where the arch allows it
I'm not sure what's the definition of "live-image" but
I've been using a dumb script which creates a bootable disk image
from snapshot binary sets for various emulators:
ftp://ftp.NetBSD.org/pub/NetBSD/misc/tsutsui/fsimage/mkbootimage-20110804.sh
So I've just convert it to use build.sh framework:
ftp://ftp.NetBSD.org/pub/NetBSD/misc/tsutsui/fsimage/liveimage-20110805.tar.gz
"build.sh -m i386 -U release live-image" will creates bootable image
for USB stick (root on sd0) and emulators (root on wd0).
Overview:
- main part is in src/distrib/common/liveimage/Makefile.liveimage:
- extract binary sets in releasedir/${RELEASEMACHINE}/binary/sets
- copy secondary boot into root (if necessary)
- create root file system by makefs(8)
- run installboot(8) (if necessary)
- prepare sectors for MBR label (if necessary)
- prepare swap
- write MBR partition (if necessary)
- write disklabel
- write sunlabel (in necessary)
- liveimage-20110805.diff includes diff against Makefiles and build.sh
to handle "build.sh live-image" as iso-image does
- Makefiles for following ${MACHINE}s are prepared
- i386 (for 2GB USB stick on real machine, and for qemu)
- amd64 (similar to i386, untested)
- pmax (for gxemul)
- sparc (for TME and qemu, untested)
- sparc64 (for TME, untested)
- sun2 (for TME, untested)
- sun3 (for TME)
- vax (for simh)
Known problems:
- can we really call images which just boot up to multiuser "live image"?
- needs better image names (rather than sun3emu.img etc.)
- too many dumb statements in Makefile.liveimage (needs sh and make gurus)
- makefs during building images fails if release binaries are built without
MKUNPRIVED=yes, (i.e. build.sh -U) because
destdir/etc/mtree/set.* must have permission info for makefs(8)
- images will be installed into releasedir, but they should not be included
in iso-image (i.e. distrib/common/Makefile.bootcd needs to be updated)
- race in ${MAKESUMS} in Makefile.liveimage if ${MACHINE} has multiple images
- and needs more thoughts and cleanup...
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index