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 --
[EMAIL PROTECTED]> cat ./testtimes
#!/bin/ksh
if [[ -f out ]]; then rm out; fi
ksh -c 'echo "str1" > out; echo "str2" >> out; echo "str3" >> out'
rm out
ksh -c '(echo "str1"; echo "str2"; echo "str3") > out'
[EMAIL PROTECTED]> truss -d -f -t exec,exit -a ./testtimes
Base time stamp: 1181695883.1637 [ Tue Jun 12 17:51:23 PDT 2007 ]
12215: 0.0000 execve("/usr/bin/ksh", 0x08046EBC, 0x08046EC8) argc = 2
12215: argv: /bin/ksh ./testtimes
12216: 0.0076 execve("/usr/bin/rm", 0x0809498C, 0x08094A88) argc = 2
12216: argv: rm out
12216: 0.0092 _exit(0)
12218: 0.0136 execve("/usr/bin/ksh", 0x0809495C, 0x08094A50) argc = 3
12218: argv: ksh -c
12218: echo "str1" > out; echo "str2" >> out; echo "str3" >> out
12218: 0.0161 _exit(0)
12220: 0.0206 execve("/usr/bin/rm", 0x0809490C, 0x080949F8) argc = 2
12220: argv: rm out
12220: 0.0222 _exit(0)
12222: 0.0265 execve("/usr/bin/ksh", 0x0809494C, 0x08094A40) argc = 3
12222: argv: ksh -c (echo "str1"; echo "str2"; echo "str3") > out
12222: 0.0287 _exit(0)
12215: 0.0294 _exit(0)
[EMAIL PROTECTED]> expr 161 - 136
25
[EMAIL PROTECTED]> expr 287 - 265
22
It's hard to work up much of a lather about this, for me...
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code