1 1.2 tsutsui # $NetBSD: Makefile,v 1.2 2026/01/18 14:56:16 tsutsui Exp $ 2 1.1 tsutsui 3 1.1 tsutsui LIVEIMGBASE= NetBSD-${DISTRIBVER}-luna68k-live # gives ${IMGBASE}.img 4 1.1 tsutsui 5 1.1 tsutsui .include <bsd.own.mk> 6 1.1 tsutsui 7 1.1 tsutsui LIVEIMAGEMB?= 1536 # < 2GB is preferred for SCSI emulators that use FAT32 8 1.1 tsutsui MDBOOTPARTMB?= 8 # as PART_BOOT in sysinst/arch/luna68k/md.h 9 1.1 tsutsui 10 1.1 tsutsui USE_MBR= no 11 1.1 tsutsui USE_GPT= no 12 1.1 tsutsui USE_MDBOOTPART= yes 13 1.1 tsutsui USE_SUNLABEL= yes 14 1.1 tsutsui 15 1.1 tsutsui DISKPROTO_IN= ${.CURDIR}/diskproto.in 16 1.1 tsutsui FSTAB_IN= ${.CURDIR}/fstab.in 17 1.1 tsutsui SPEC_EXTRA= ${.CURDIR}/spec.in 18 1.1 tsutsui 19 1.1 tsutsui .include "${.CURDIR}/../../common/bootimage/Makefile.liveimage" 20 1.1 tsutsui 21 1.1 tsutsui MDBOOTPARTFILES= ${WORKDIR}/usr/mdec/boot 22 1.1 tsutsui MDBOOTPARTMAKEFSOPTIONS= -t ffs -o version=0,bsize=4096,fsize=512,density=2048 23 1.1 tsutsui SPEC_BOOT= spec.boot 24 1.1 tsutsui CLEANFILES+= ${SPEC_BOOT} 25 1.1 tsutsui 26 1.1 tsutsui ${MDBOOTPARTFILES}: ${TARGETFS} 27 1.1 tsutsui # ${MDBOOTPARTFILES} are assumed extracted during to ${WORKDIR} 28 1.1 tsutsui # from binary sets during ${TARGETFS} image build 29 1.1 tsutsui 30 1.1 tsutsui ${WORKMDBOOTPART}: ${TARGETFS} ${MDBOOTPARTFILES} 31 1.1 tsutsui @echo create MD boot partition for bootstrap files... 32 1.1 tsutsui @${MKDIR} ${MKDIRPERM} ${WORKMDBOOTPARTDIR} 33 1.1 tsutsui rm -f ${SPEC_BOOT} 34 1.1 tsutsui cp ${.CURDIR}/spec.boot.in ${SPEC_BOOT} 35 1.1 tsutsui @echo Copying files for MD boot partition... 36 1.1 tsutsui .for f in ${MDBOOTPARTFILES} 37 1.1 tsutsui @if [ ! -f ${f} ]; then \ 38 1.1 tsutsui echo "${f} in MDBOOTPARTFILES not found, aborting"; \ 39 1.1 tsutsui false; \ 40 1.1 tsutsui fi 41 1.1 tsutsui ${INSTALL} ${COPY} -m 0644 ${f} ${WORKMDBOOTPARTDIR} 42 1.1 tsutsui echo "./$$(basename ${f}) type=file uname=root gname=wheel mode=0644" \ 43 1.1 tsutsui >> ${SPEC_BOOT} 44 1.1 tsutsui .endfor 45 1.1 tsutsui ${RM} -f ${WORKMDBOOTPART} 46 1.1 tsutsui ${TOOL_MAKEFS} -M ${MDBOOTPARTMB}m -m ${MDBOOTPARTMB}m \ 47 1.2 tsutsui -xx -F ${SPEC_BOOT} -N ${WORKDIR}/etc \ 48 1.1 tsutsui -B ${TARGET_ENDIANNESS} \ 49 1.1 tsutsui ${MAKEFS_TIMESTAMP} \ 50 1.1 tsutsui ${MDBOOTPARTMAKEFSOPTIONS} \ 51 1.1 tsutsui ${WORKMDBOOTPART} ${WORKMDBOOTPARTDIR} 52