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

conditional for pkg-list, sparc needs two cdrom-initrd



For sparc, I've found I need to build two separate cd-initrd.gz's: one
for sun4cdm (sparc32) and another for sun4u (sparc64).  Currently this
means running "fakeroot make clean && sparc?? fakeroot make image"
twice for sparc and moving the created files, once for each of sparc32
and sparc64.  Is there a better way of doing this?  Will we be able to
automate it?  (sparc32 machines may not be able to build sparc64
initrd, but sparc64 can build sparc32.)  How do other subarch machines
implement making multiple initrds to be combined on a single cd?

I've implemented a very limied contional in (my copy of) pkg-list:

#if ${kernel:Version} =~ /REGEX/
#endif

This will allow things to be included into pkg-lists only for some
kernel versions.  This is needed for sparc: the sparc32 kernels have
scsi compliled in and don't do ide, the sparc64 kernels have both ide
and scsi as module packages.  (only one kernel package is in each
sparc initrd.)

Only REGEX is non-literal in the above, it is a (perl) regular
expression that the kernel version must match for the lines between
the #if and #endif to be used.

Another way of doing this would be to allow ${kernel:Version}
substition on #include, or to have pkg-list search for kernel-version
specific files.

Does this sound reasoable, is there a better way of doing this, or
should I implement one of the alternatives?

-- 
Blars Blarson			blarson@blars.org
				http://www.blars.org/blars.html
With Microsoft, failure is not an option.  It is a standard feature.



Reply to: