Port-dreamcast archive

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

Re: DC dev: requirements?



> And I can't see anything else offhand that needs Windows,
> leaving me wondering why it's listed.

Probably the document writer knew only that way?
"The typical NetBSD style we did not document/advertise it"
but you can always update any documents.

FYI, cdrtools binaries on NetBSD (or even on Cygwin) are enough.

---
# dumb Makefile that documents/advertises "we can create it"

KERNEL_BIN?=netbsd-GENERIC_MD.bin
FTP_HOST?=ftp.NetBSD.org
#FTP_PATH=pub/NetBSD/NetBSD-5.1
FTP_PATH=pub/NetBSD/NetBSD-5.1_RC4
#FTP_PATH?=pub/NetBSD-daily/netbsd-5/201009290000Z
#FTP_PATH?=pub/NetBSD-daily/HEAD/201009290000Z

SCRAMBLE_C_URL?=http://mc.pp.se/dc/files/scramble.c
MAKEIP_TAR_GZ_URL?=http://mc.pp.se/dc/files/makeip.tar.gz

FTP?=   ftp
#FTP=   tnftp

CDRDEV?= /dev/rcd0d
#CDRDEV= /dev/rcd1d
#CDRDEV= /dev/rcd0c
#CDRSPEED?= 16
CDRSPEED?= 4

CDRECORD?= cdrecord
CDRECORD_OPT?= -dev=${CDRDEV} -speed=${CDRSPEED} driveropts=burnfree
MKISOFS?= mkisofs

all:    bootcd

bootcd: data.raw audio.raw
        ${CDRECORD} ${CDRECORD_OPT} -multi -audio audio.raw
        ${CDRECORD} ${CDRECORD_OPT} -multi -xa data.raw
        # see cdrecord(1) man page about -xa vs -xa1 options

audio.raw:
        dd if=/dev/zero bs=2352 count=300 of=${.TARGET}

data.raw: IP.BIN data.iso
        ( cat IP.BIN ; dd if=data.iso bs=2048 skip=16 ) > ${.TARGET}

data.iso: 1ST_READ.BIN
        ${MKISOFS} -l -C 0,11702 -o ${.TARGET} 1ST_READ.BIN

1ST_READ.BIN: scramble ${KERNEL_BIN}
        ./scramble ${KERNEL_BIN} ${.TARGET}

${KERNEL_BIN}: ${KERNEL_BIN}.gz
        zcat ${KERNEL_BIN}.gz > ${KERNEL_BIN}

${KERNEL_BIN}.gz:
        ${FTP} ftp://${FTP_HOST}/${FTP_PATH}/dreamcast/binary/kernel/${.TARGET}

scramble: scramble.c
        cc -O -o ${.TARGET} scramble.c

scramble.c:
        ${FTP} ${SCRAMBLE_C_URL}

IP.BIN: makeip
        ./makeip ip.txt IP.BIN

makeip: makeip.tar.gz
        tar -zxf makeip.tar.gz
        cc -O -o makeip makeip.c

makeip.tar.gz:
        ${FTP} ${MAKEIP_TAR_GZ_URL}

clean:
        rm -f data.raw data.iso audio.raw 1ST_READ.BIN

cleandir:
        ${MAKE} clean
        rm -f ${KERNEL_BIN}
        rm -f IP.BIN
        rm -f makeip scramble
        rm -f IP.TMPL ip.txt makeip.c

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index