2005-07-12 Hollis Blanchard <hollis@penguinppc.org>

* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
	device path and resulting ihandle.
	(grub_ofdisk_close): dprintf the ihandle being closed.
	(grub_ofdisk_read): dprintf function parameters.
	* kern/mm.c (grub_mm_init_region): Likewise.
	* loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
	(grub_linux_boot): dprintf the Linux entry point, initrd address and
	size, and boot arguments.
	(grub_rescue_cmd_linux): dprintf each ELF segment's address and size
	before loading into memory.
	(grub_rescue_cmd_initrd): dprintf the initrd's address and size
	before loading into memory.
This commit is contained in:
hollisb 2005-07-12 22:36:43 +00:00
parent 7ef504d8e0
commit 09f9923fbb
7 changed files with 145 additions and 138 deletions

View file

@ -1,3 +1,18 @@
2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
device path and resulting ihandle.
(grub_ofdisk_close): dprintf the ihandle being closed.
(grub_ofdisk_read): dprintf function parameters.
* kern/mm.c (grub_mm_init_region): Likewise.
* loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
(grub_linux_boot): dprintf the Linux entry point, initrd address and
size, and boot arguments.
(grub_rescue_cmd_linux): dprintf each ELF segment's address and size
before loading into memory.
(grub_rescue_cmd_initrd): dprintf the initrd's address and size
before loading into memory.
2005-07-12 Yoshinori K. Okuji <okuji@enbug.org> 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
* kern/mm.c: Added much documentation. * kern/mm.c: Added much documentation.

145
configure vendored
View file

@ -951,7 +951,7 @@ esac
else else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi fi
cd $ac_popdir cd "$ac_popdir"
done done
fi fi
@ -1986,8 +1986,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2045,8 +2044,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2162,8 +2160,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2217,8 +2214,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2263,8 +2259,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2308,8 +2303,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2399,8 +2393,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2429,8 +2422,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2500,8 +2492,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2553,8 +2544,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2625,8 +2615,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2678,8 +2667,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2756,8 +2744,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2820,8 +2807,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2938,8 +2924,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -2995,8 +2980,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -3072,8 +3056,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -3129,8 +3112,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -3186,8 +3168,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -3268,8 +3249,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -3325,8 +3305,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4212,8 +4191,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4255,8 +4233,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4313,8 +4290,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4690,8 +4666,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4861,8 +4836,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4927,8 +4901,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4990,8 +4963,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5031,8 +5003,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5088,8 +5059,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5129,8 +5099,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5194,8 +5163,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5226,10 +5194,8 @@ See \`config.log' for more details." >&2;}
esac esac
else else
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
See \`config.log' for more details." >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
@ -5341,8 +5307,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5404,8 +5369,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5445,8 +5409,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5502,8 +5465,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5543,8 +5505,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5608,8 +5569,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5640,10 +5600,8 @@ See \`config.log' for more details." >&2;}
esac esac
else else
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
See \`config.log' for more details." >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
@ -5765,8 +5723,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5869,8 +5826,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -6732,11 +6688,6 @@ esac
*) ac_INSTALL=$ac_top_builddir$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac esac
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
# Let's still pretend it is `configure' which instantiates (i.e., don't # Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read: # use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */ # /* config.h. Generated by config.status. */
@ -6775,6 +6726,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;; fi;;
esac esac
done` || { (exit 1); exit 1; } done` || { (exit 1); exit 1; }
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub sed "$ac_vpsub

View file

@ -63,13 +63,17 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PARTITION_0)) if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PARTITION_0))
grub_strcat (devpath, ":0"); grub_strcat (devpath, ":0");
grub_dprintf ("disk", "Opening `%s'.\n", devpath);
grub_ieee1275_open (devpath, &dev_ihandle); grub_ieee1275_open (devpath, &dev_ihandle);
if (! dev_ihandle) if (! dev_ihandle)
{ {
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't open device"); grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't open device");
goto fail; goto fail;
} }
grub_dprintf ("disk", "Opened `%s' as handle 0x%x.\n", devpath, dev_ihandle);
if (grub_ieee1275_finddevice (devpath, &dev)) if (grub_ieee1275_finddevice (devpath, &dev))
{ {
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't read device properties"); grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't read device properties");
@ -112,6 +116,8 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
static void static void
grub_ofdisk_close (grub_disk_t disk) grub_ofdisk_close (grub_disk_t disk)
{ {
grub_dprintf ("disk", "Closing handle 0x%x.\n",
(grub_ieee1275_ihandle_t) disk->data);
grub_ieee1275_close ((grub_ieee1275_ihandle_t) disk->data); grub_ieee1275_close ((grub_ieee1275_ihandle_t) disk->data);
} }
@ -123,6 +129,10 @@ grub_ofdisk_read (grub_disk_t disk, unsigned long sector,
int actual; int actual;
unsigned long long pos; unsigned long long pos;
grub_dprintf ("disk",
"Reading handle 0x%x: sector 0x%lx, size 0x%lx, buf %p.\n",
(grub_ieee1275_ihandle_t) disk->data, sector, size, buf);
pos = (unsigned long long) sector * 512UL; pos = (unsigned long long) sector * 512UL;
grub_ieee1275_seek ((grub_ieee1275_ihandle_t) disk->data, (int) (pos >> 32), grub_ieee1275_seek ((grub_ieee1275_ihandle_t) disk->data, (int) (pos >> 32),

View file

@ -137,10 +137,8 @@ grub_mm_init_region (void *addr, grub_size_t size)
grub_mm_header_t h; grub_mm_header_t h;
grub_mm_region_t r, *p, q; grub_mm_region_t r, *p, q;
#if 0 grub_dprintf ("mem", "Using memory for heap: addr=%p, size=%u\n", addr, size);
grub_printf ("%s:%d: addr=%p, size=%u\n", __FILE__, __LINE__, addr, size);
#endif
/* If this region is too small, ignore it. */ /* If this region is too small, ignore it. */
if (size < GRUB_MM_ALIGN * 2) if (size < GRUB_MM_ALIGN * 2)
return; return;

View file

@ -48,11 +48,17 @@ grub_linux_boot (void)
{ {
kernel_entry_t linuxmain; kernel_entry_t linuxmain;
grub_size_t actual; grub_size_t actual;
/* Set the command line arguments. */ /* Set the command line arguments. */
grub_ieee1275_set_property (grub_ieee1275_chosen, "bootargs", linux_args, grub_ieee1275_set_property (grub_ieee1275_chosen, "bootargs", linux_args,
grub_strlen (linux_args) + 1, &actual); grub_strlen (linux_args) + 1, &actual);
grub_dprintf ("loader", "Entry point: 0x%x\n", linux_addr);
grub_dprintf ("loader", "Initrd at: 0x%x, size 0x%x\n", initrd_addr,
initrd_size);
grub_dprintf ("loader", "Boot arguments: %s\n", linux_args);
grub_dprintf ("loader", "Jumping to Linux...\n");
/* Boot the kernel. */ /* Boot the kernel. */
linuxmain = (kernel_entry_t) linux_addr; linuxmain = (kernel_entry_t) linux_addr;
linuxmain ((void *) initrd_addr, initrd_size, grub_ieee1275_entry_fn, 0, 0); linuxmain ((void *) initrd_addr, initrd_size, grub_ieee1275_entry_fn, 0, 0);
@ -65,16 +71,16 @@ grub_linux_release_mem (void)
{ {
grub_free (linux_args); grub_free (linux_args);
linux_args = 0; linux_args = 0;
if (linux_addr && grub_ieee1275_release (linux_addr, linux_size)) if (linux_addr && grub_ieee1275_release (linux_addr, linux_size))
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not release memory"); return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not release memory");
if (initrd_addr && grub_ieee1275_release (initrd_addr, initrd_size)) if (initrd_addr && grub_ieee1275_release (initrd_addr, initrd_size))
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not release memory"); return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not release memory");
linux_addr = 0; linux_addr = 0;
initrd_addr = 0; initrd_addr = 0;
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
} }
@ -82,12 +88,12 @@ static grub_err_t
grub_linux_unload (void) grub_linux_unload (void)
{ {
grub_err_t err; grub_err_t err;
err = grub_linux_release_mem (); err = grub_linux_release_mem ();
grub_dl_unref (my_mod); grub_dl_unref (my_mod);
loaded = 0; loaded = 0;
return err; return err;
} }
@ -97,12 +103,12 @@ grub_rescue_cmd_linux (int argc, char *argv[])
grub_file_t file = 0; grub_file_t file = 0;
Elf32_Ehdr ehdr; Elf32_Ehdr ehdr;
Elf32_Phdr *phdrs = 0; Elf32_Phdr *phdrs = 0;
int i; int i;
int offset = 0; int offset = 0;
grub_addr_t entry; grub_addr_t entry;
int found_addr = 0; int found_addr = 0;
int size; int size;
grub_dl_ref (my_mod); grub_dl_ref (my_mod);
if (argc == 0) if (argc == 0)
@ -110,23 +116,23 @@ grub_rescue_cmd_linux (int argc, char *argv[])
grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified"); grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
goto fail; goto fail;
} }
file = grub_file_open (argv[0]); file = grub_file_open (argv[0]);
if (! file) if (! file)
goto fail; goto fail;
if (grub_file_read (file, (char *) &ehdr, sizeof (ehdr)) != sizeof (ehdr)) if (grub_file_read (file, (char *) &ehdr, sizeof (ehdr)) != sizeof (ehdr))
{ {
grub_error (GRUB_ERR_READ_ERROR, "cannot read the linux elf header"); grub_error (GRUB_ERR_READ_ERROR, "cannot read the linux elf header");
goto fail; goto fail;
} }
if (grub_dl_check_header (&ehdr, sizeof(ehdr))) if (grub_dl_check_header (&ehdr, sizeof(ehdr)))
{ {
grub_error (GRUB_ERR_UNKNOWN_OS, "No valid ELF header found"); grub_error (GRUB_ERR_UNKNOWN_OS, "No valid ELF header found");
goto fail; goto fail;
} }
if (ehdr.e_type != ET_EXEC) if (ehdr.e_type != ET_EXEC)
{ {
grub_error (GRUB_ERR_UNKNOWN_OS, grub_error (GRUB_ERR_UNKNOWN_OS,
@ -146,10 +152,10 @@ grub_rescue_cmd_linux (int argc, char *argv[])
phdrs = (Elf32_Phdr *) grub_malloc (ehdr.e_phnum * ehdr.e_phentsize); phdrs = (Elf32_Phdr *) grub_malloc (ehdr.e_phnum * ehdr.e_phentsize);
grub_file_read (file, (void *) phdrs, ehdr.e_phnum * ehdr.e_phentsize); grub_file_read (file, (void *) phdrs, ehdr.e_phnum * ehdr.e_phentsize);
/* Release the previously used memory. */ /* Release the previously used memory. */
grub_loader_unset (); grub_loader_unset ();
/* Determine the amount of memory that is required. */ /* Determine the amount of memory that is required. */
linux_size = 0; linux_size = 0;
for (i = 0; i < ehdr.e_phnum; i++) for (i = 0; i < ehdr.e_phnum; i++)
@ -158,10 +164,10 @@ grub_rescue_cmd_linux (int argc, char *argv[])
/* XXX: Is this calculation correct? */ /* XXX: Is this calculation correct? */
linux_size += phdr->p_memsz + phdr->p_filesz; linux_size += phdr->p_memsz + phdr->p_filesz;
} }
/* Reserve memory for the kernel. */ /* Reserve memory for the kernel. */
linux_size += 0x100000; linux_size += 0x100000;
/* For some vmlinux kernels the address set above won't work. Just /* For some vmlinux kernels the address set above won't work. Just
try some other addresses just like yaboot does. */ try some other addresses just like yaboot does. */
for (linux_addr = entry; linux_addr < entry + 200 * 0x100000; linux_addr += 0x100000) for (linux_addr = entry; linux_addr < entry + 200 * 0x100000; linux_addr += 0x100000)
@ -177,7 +183,7 @@ grub_rescue_cmd_linux (int argc, char *argv[])
goto fail; goto fail;
} }
entry = linux_addr; entry = linux_addr;
/* Load every loadable segment in memory. */ /* Load every loadable segment in memory. */
for (i = 0; i < ehdr.e_phnum; i++) for (i = 0; i < ehdr.e_phnum; i++)
{ {
@ -185,43 +191,48 @@ grub_rescue_cmd_linux (int argc, char *argv[])
if (phdr->p_type == PT_LOAD) if (phdr->p_type == PT_LOAD)
{ {
void *segment_addr = ((char *) entry) + offset;
if (grub_file_seek (file, phdr->p_offset) == -1) if (grub_file_seek (file, phdr->p_offset) == -1)
{ {
grub_error (GRUB_ERR_BAD_OS, "Invalid offset in program header"); grub_error (GRUB_ERR_BAD_OS, "Invalid offset in program header");
goto fail; goto fail;
} }
if (grub_file_read (file, (void *) (((char *) entry) + offset) , phdr->p_filesz) grub_dprintf ("loader", "Loading segment %d at %p, size 0x%x\n", i,
segment_addr, phdr->p_filesz);
if (grub_file_read (file, segment_addr, phdr->p_filesz)
!= (grub_ssize_t) phdr->p_filesz) != (grub_ssize_t) phdr->p_filesz)
goto fail; goto fail;
if (phdr->p_filesz < phdr->p_memsz) if (phdr->p_filesz < phdr->p_memsz)
grub_memset ((char *) (((char *) entry) + offset) + phdr->p_filesz, 0, grub_memset ((char *) (((char *) entry) + offset) + phdr->p_filesz, 0,
phdr->p_memsz - phdr->p_filesz); phdr->p_memsz - phdr->p_filesz);
offset += phdr->p_filesz; offset += phdr->p_filesz;
} }
} }
size = 0; size = 0;
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
size += grub_strlen (argv[i]); size += grub_strlen (argv[i]);
linux_args = grub_malloc (size + argc + 1); linux_args = grub_malloc (size + argc + 1);
if (!linux_args) if (!linux_args)
goto fail; goto fail;
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
{ {
grub_strcat (linux_args, argv[i]); grub_strcat (linux_args, argv[i]);
grub_strcat (linux_args, " "); grub_strcat (linux_args, " ");
} }
fail: fail:
if (file) if (file)
grub_file_close (file); grub_file_close (file);
grub_free (phdrs); grub_free (phdrs);
if (grub_errno != GRUB_ERR_NONE) if (grub_errno != GRUB_ERR_NONE)
@ -236,7 +247,7 @@ grub_rescue_cmd_linux (int argc, char *argv[])
initrd_addr = 0; initrd_addr = 0;
loaded = 1; loaded = 1;
} }
return; return;
} }
@ -246,13 +257,13 @@ grub_rescue_cmd_initrd (int argc, char *argv[])
grub_file_t file = 0; grub_file_t file = 0;
grub_ssize_t size; grub_ssize_t size;
grub_addr_t addr; grub_addr_t addr;
if (argc == 0) if (argc == 0)
{ {
grub_error (GRUB_ERR_BAD_ARGUMENT, "no initrd specified"); grub_error (GRUB_ERR_BAD_ARGUMENT, "no initrd specified");
goto fail; goto fail;
} }
if (!loaded) if (!loaded)
{ {
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first."); grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
@ -262,26 +273,28 @@ grub_rescue_cmd_initrd (int argc, char *argv[])
file = grub_file_open (argv[0]); file = grub_file_open (argv[0]);
if (! file) if (! file)
goto fail; goto fail;
addr = linux_addr + linux_size; addr = linux_addr + linux_size;
size = grub_file_size (file); size = grub_file_size (file);
if (grub_claimmap (addr, size) == -1) if (grub_claimmap (addr, size) == -1)
{ {
grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not claim memory"); grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not claim memory");
goto fail; goto fail;
} }
grub_dprintf ("loader", "Loading initrd at 0x%x, size 0x%x\n", addr, size);
if (grub_file_read (file, (void *) addr, size) != size) if (grub_file_read (file, (void *) addr, size) != size)
{ {
grub_ieee1275_release (addr, size); grub_ieee1275_release (addr, size);
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file"); grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
goto fail; goto fail;
} }
initrd_addr = addr; initrd_addr = addr;
initrd_size = size; initrd_size = size;
fail: fail:
if (file) if (file)
grub_file_close (file); grub_file_close (file);

View file

@ -116,14 +116,24 @@ apple_partition_map_iterate (grub_disk_t disk,
sizeof (struct grub_apple_part), (char *) &apart)) sizeof (struct grub_apple_part), (char *) &apart))
return grub_errno; return grub_errno;
if (apart.magic != GRUB_APPLE_PART_MAGIC) if (apart.magic != GRUB_APPLE_PART_MAGIC)
break; {
grub_dprintf ("partition",
"partition %d: bad magic (found 0x%x; wanted 0x%x\n",
partno, apart.magic, GRUB_APPLE_PART_MAGIC);
break;
}
part.start = apart.first_phys_block; part.start = apart.first_phys_block;
part.len = apart.blockcnt; part.len = apart.blockcnt;
part.offset = pos; part.offset = pos;
part.index = partno; part.index = partno;
grub_dprintf ("partition",
"partition %d: name %s, type %s, start 0x%x, len 0x%x\n",
partno, apart.partname, apart.parttype,
apart.first_phys_block, apart.blockcnt);
if (hook (&part)) if (hook (&part))
return grub_errno; return grub_errno;

View file

@ -135,6 +135,10 @@ pc_partition_map_iterate (grub_disk_t disk,
pcdata.dos_type = e->type; pcdata.dos_type = e->type;
pcdata.bsd_type = -1; pcdata.bsd_type = -1;
grub_dprintf ("partition",
"partition %d: flag 0x%x, type 0x%x, start 0x%lx, len 0x%lx\n",
p.index, e->flag, pcdata.dos_type, p.start, p.len);
/* If this partition is a normal one, call the hook. */ /* If this partition is a normal one, call the hook. */
if (! grub_pc_partition_is_empty (e->type) if (! grub_pc_partition_is_empty (e->type)
&& ! grub_pc_partition_is_extended (e->type)) && ! grub_pc_partition_is_extended (e->type))