Subject: Re: Relevance of IS09660 apple extensions for makefs
To: None <tech-kern@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 07/12/2007 12:33:14
On Thu, Jul 12, 2007 at 10:18:33PM +0900, Izumi Tsutsui wrote:
> martin@duskware.de wrote:
> 
> > > On the other hand, to boot NetBSD/mac68k kernel from any
> > > devices you have to execute the "Booter" tool on MacOS and
> > > to put a binary file onto CD-ROM as a executable.
> > 
> > You are right, but we don't seem to do that (yet). I agree that we should ;-)
> 
> I think the following line:
> >> MKISOFS_ARGS.${image}+= -apple --macbin -map ${.CURDIR}/hfsmap.lst
> in src/distrib/cdrom/Makefile (which uses mkisofs) does it.
> 
> If we really want to do it without third-party mkisofs but
> with our native makefs(8), we have to implement the extension.

FWIW, we do not need to replicate all of mkisofs's of command-line
options for controlling Apple Extensions.  I believe it will suffice for
NetBSD's purposes to add to makefs an option that tells it to write Apple
Extensions, and then to extend the mtree(8) format for metalogs so that
we can use vendor-specific keywords in the format vendor.keyword=value.
A makefs command could be as simple as:

makefs -t cd9660 -o rockridge,appleext -F metalog cdrom.iso cdrom/.

Files in the metalog will need to be marked with their Apple Type and
Creator, for example:

/set uname=root gname=wheel mode=0644 apple.creator=ttxt apple.type=TEXT
./Mkfs_1.47.sea.hqx type=file uname=root gname=wheel mode=0644 \
    apple.creator=BnHq apple.type=TEXT

Let a user mimic mkisofs's --macbin and -map options by writing a script
to preprocess their metalog.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933 ext 24