Roland Mainz wrote:
Joe Bonasera wrote:
... However I couldn't go any further. Any hints? For once, from the usual
/platform/.../unix grub
menu.lst entries I deduce that unix is the os kernel to be loaded by grub, but
as dboot is what grub
really understands, then dboot must somehow be embedded into unix, right?
Yes - The magic mostly happens from the usr/src/uts/i86pc/unix Makefile --
$(DBOOT_O): $(DBOOT_BIN)
@echo " .data" > $(DBOOT_S)
@echo " .globl dboot_image" >> $(DBOOT_S)
@echo "dboot_image:" >> $(DBOOT_S)
$(ELFEXTRACT) $(DBOOT_BIN) >> $(DBOOT_S)
$(COMPILE.s) -o $(DBOOT_O) $(DBOOT_S)
Ahhgllrrr... sorry for the offtopic rant...
... but is anyone interested to sponsor a patch to cleanup such things,
e.g. turn the code above into
-- snip --
@ ( echo " .data" \
echo " .globl dboot_image" \
echo "dboot_image:" \
) > "$(DBOOT_S)"
$(ELFEXTRACT) $(DBOOT_BIN)
-- snip --
, please (I've saw such stuff several times in OS/Net (see
http://mail.opensolaris.org/pipermail/shell-discuss/2007-June/000465.html
why the construct above is... uhm... not nice... ;-( )) ?
If the complaint is efficiency, it's seems a pretty minor one. These
rules are executed at most 4 times in a full debug+non-debug build.
I much prefer the simpler existing code. I'm not a shell or make
expert and don't even understand w/o going to read through man pages
how the 2nd set of code is equivalent. How does the output of ELFEXTRACT
get into $(DBOOT_S) .. or did you only mean to change the echo lines?
Joe
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code