tech-toolchain archive

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

Re: Help with src/distrib



On Sat, May 03, 2008 at 04:08:11AM +0900, Izumi Tsutsui wrote:

> ad%NetBSD.org@localhost wrote:
> 
> > The part I am stuck with is hooking it into the build, so that the module
> > gets built and put onto the root of the install CD-ROMs. The collection of
> > Makefiles under src/distrib is impenetrable to me.. Does anyone have
> > experience with this?
> 
> Like this? (a bit ugly though; maybe we should ask lukem)

I came up with something similar but it doesn't use "instkernel" - the kernel
isn't compressed. I don't know if it works yet.

http://www.netbsd.org/~ad/distrib.diff

I think instkernel could probably be used if the kmod stuff is a seperate
target that gets built after the ramdisks. Now the ramdisks get built first,
then the kernels.

> +KERN_TARGETS=        GENERIC -
> +
> +.for _K _F in ${KERN_TARGETS}
> +_KERNEL:=${_K}
> +.if (${_KERNEL:M*/*} != "")
> +_KERNNAME.${_K}.${_F}:= ${_K}
> +.else
> +_KERNNAME.${_K}.${_F}:=      ${KERNOBJDIR}/${_K}/netbsd
> +.endif
> +
> +_FILENAME:=${_F}
> +.if ${_FILENAME} == "-"
> +_KERNEL.${_K}.${_F}:=   netbsd-${_K}
> +.else
> +_KERNEL.${_K}.${_F}:=   ${_F}
> +.endif
> +
> +${_KERNEL.${_K}.${_F}}.gz: ${_KERNNAME.${_K}.${_F}}
> +     ${_MKTARGET_CREATE}
> +     -rm -f ${.TARGET}
> +     gzip -9c ${.ALLSRC} > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
> +
> +CLEANFILES+=    ${_KERNEL.${_K}.${_F}}.gz ${_KERNEL.${_K}.${_F}}.tmp
> +
> +.endfor
> +

*shudder*

Thanks,
Andrew


Home | Main Index | Thread Index | Old Index