debuggers.hg

annotate stubdom/grub.patches/00cvs @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 6f82840f173b
children
rev   line source
keir@18113 1 diff -uprN grub-0.97/acinclude.m4 grub/acinclude.m4
keir@18113 2 --- grub-0.97/acinclude.m4 2004-04-27 21:48:06.000000000 +0100
keir@18113 3 +++ grub/acinclude.m4 2007-11-05 01:29:46.000000000 +0000
keir@18113 4 @@ -57,7 +57,7 @@ else
keir@18113 5 fi
keir@18113 6 grub_cv_prog_objcopy_absolute=yes
keir@18113 7 for link_addr in 2000 8000 7C00; do
keir@18113 8 - if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
keir@18113 9 + if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
keir@18113 10 else
keir@18113 11 AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
keir@18113 12 fi
keir@18113 13 diff -uprN grub-0.97/ChangeLog grub/ChangeLog
keir@18113 14 --- grub-0.97/ChangeLog 2005-05-08 03:47:02.000000000 +0100
keir@18113 15 +++ grub/ChangeLog 2008-05-20 12:04:18.000000000 +0100
keir@18113 16 @@ -1,3 +1,127 @@
keir@18113 17 +2008-05-20 Robert Millan <rmh@aybabtu.com>
keir@18113 18 +
keir@18113 19 + * netboot/cs89x0.c: Fix license violation.
keir@18113 20 + * netboot/cs89x0.h: Likewise.
keir@18113 21 +
keir@18113 22 +2008-04-10 Pavel Roskin <proski@gnu.org>
keir@18113 23 +
keir@18113 24 + * configure.ac: Always use "_cv_" in cache variables for
keir@18113 25 + compatibility with Autoconf 2.62.
keir@18113 26 +
keir@18113 27 +2008-03-28 Robert Millan <rmh@aybabtu.com>
keir@18113 28 +
keir@18113 29 + Surpass 1 TiB disk addressing limit. Note: there are no plans to handle
keir@18113 30 + the 2 TiB disk limit in GRUB Legacy, since that would need considerable
keir@18113 31 + rework. If you have >2TiB disks, use GRUB 2 instead.
keir@18113 32 +
keir@18113 33 + * grub/asmstub.c (biosdisk): Add unsigned qualifier to `sector'.
keir@18113 34 + * stage2/bios.c (biosdisk): Likewise.
keir@18113 35 + * stage2/disk_io.c (rawread, devread, rawwrite, devwrite): Likewise.
keir@18113 36 + * stage2/shared.h (rawread, devread, rawwrite, devwrite): Likewise.
keir@18113 37 + * lib/device.c (get_drive_geometry): Replace BLKGETSIZE with
keir@18113 38 + BLKGETSIZE64.
keir@18113 39 +
keir@18113 40 +2007-10-29 Pavel Roskin <proski@gnu.org>
keir@18113 41 +
keir@18113 42 + * configure.ac: Test if '--build-id=none' is supported by the
keir@18113 43 + linker and add it to LDFLAGS if possible. Build ID causes
keir@18113 44 + objcopy to generate huge binary files.
keir@18113 45 + * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
keir@18113 46 + linking, so that build ID doesn't break the test.
keir@18113 47 + * stage1/Makefile.am: Preserve LDFLAGS, use stage1_exec_LDFLAGS.
keir@18113 48 +
keir@18113 49 +2007-02-22 Pavel Roskin <proski@gnu.org>
keir@18113 50 +
keir@18113 51 + * stage2/iso9660.h: Remove unnecessary packed attributes.
keir@18113 52 +
keir@18113 53 +2007-02-22 Robert Millan <rmh@aybabtu.com>
keir@18113 54 +
keir@18113 55 + * util/mkbimage: Update my email address, and remove my name from
keir@18113 56 + some places where unnecessary credit is given.
keir@18113 57 +
keir@18113 58 +2006-09-10 Pavel Roskin <proski@gnu.org>
keir@18113 59 +
keir@18113 60 + * netboot/natsemi.c: Fix compile error with gcc 4.1.1. Cast
keir@18113 61 + cannot make a variable volatile - it should be declared as such.
keir@18113 62 + * netboot/sis900.c: Likewise.
keir@18113 63 +
keir@18113 64 +2006-09-08 Pavel Roskin <proski@gnu.org>
keir@18113 65 +
keir@18113 66 + * netboot/etherboot.h: Remove incorrect extern declarations of
keir@18113 67 + the variables later declared static. Move BOOTP_DATA_ADDR ...
keir@18113 68 + * netboot/main.c: ... here. Eliminate end_of_rfc1533 - it's
keir@18113 69 + write-only.
keir@18113 70 +
keir@18113 71 +2006-06-24 Yoshinori K. Okuji <okuji@enbug.org>
keir@18113 72 +
keir@18113 73 + * docs/grub.texi: Changed the license term to the GNU Free
keir@18113 74 + Documentation License 1.2.
keir@18113 75 +
keir@18113 76 + * docs/multiboot.texi: Reformatted to show the license term
keir@18113 77 + and the version number explicitly.
keir@18113 78 +
keir@18113 79 + * docs/fdl.texi: New file.
keir@18113 80 +
keir@18113 81 + * docs/Makefile.am (grub_TEXINFOS): Added fdl.texi.
keir@18113 82 +
keir@18113 83 +2006-06-24 Robert Millan <robertmh@gnu.org>
keir@18113 84 +
keir@18113 85 + * lib/device.c (write_to_partition): /dev/ataraid/ and /dev/rd/
keir@18113 86 + partitions have a "p" prefix. Add it.
keir@18113 87 +
keir@18113 88 +2006-06-24 Robert Millan <robertmh@gnu.org>
keir@18113 89 +
keir@18113 90 + * lib/device.c (get_i2o_disk_name): New function.
keir@18113 91 + (init_device_map) [__linux__]: Add support for I2O devices.
keir@18113 92 +
keir@18113 93 +2006-05-02 Pavel Roskin <proski@gnu.org>
keir@18113 94 +
keir@18113 95 + * stage2/stage2.c (run_menu): Fix "savedefault" to save only top
keir@18113 96 + level menu positions. Remember current position when calling a
keir@18113 97 + submenu. Don't recalculate it when booting from a submenu.
keir@18113 98 +
keir@18113 99 + * grub/main.c (main): Make sure the boot drive number doesn't
keir@18113 100 + exceed 255.
keir@18113 101 +
keir@18113 102 +2006-05-02 Vesa Jaaskelainen <chaac@nic.fi>
keir@18113 103 +
keir@18113 104 + * stage2/shared.h (vbe_mode): Back ported aligment fix from GRUB 2
keir@18113 105 + to GRUB Legacy. Problem reported by Gerardo Richarte.
keir@18113 106 +
keir@18113 107 +2006-04-23 Robert Millan <robertmh@gnu.org>
keir@18113 108 +
keir@18113 109 + * grub/asmstub.c (get_diskinfo): Optimize sysctl routine.
keir@18113 110 +
keir@18113 111 +2006-04-20 Robert Millan <robertmh@gnu.org>
keir@18113 112 +
keir@18113 113 + Fixes for kernel of FreeBSD:
keir@18113 114 + * grub/asmstub.c (get_diskinfo): Toggle "kern.geom.debugflags" sysctl
keir@18113 115 + before opening a device for writing.
keir@18113 116 + * util/grub-install.in: Devices don't have this "r" prefix anymore.
keir@18113 117 +
keir@18113 118 +2006-04-16 Yoshinori K. Okuji <okuji@enbug.org>
keir@18113 119 +
keir@18113 120 + * docs/multiboot.texi: Correct the offset of address
keir@18113 121 + fields. Reported by Jeroen Dekkers.
keir@18113 122 +
keir@18113 123 +2006-03-21 Yoshinori K. Okuji <okuji@enbug.org>
keir@18113 124 +
keir@18113 125 + * stage2/builtins.c (setup_func): Specify the size of DEVICE to
keir@18113 126 + grub_strncat instead of a strange number 256. Reported by Vitaly
keir@18113 127 + Fertman <vitaly@namesys.com>.
keir@18113 128 +
keir@18113 129 +2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
keir@18113 130 +
keir@18113 131 + * docs/multiboot.texi: Fix a bug in the byte order of
keir@18113 132 + boot_device. I hope this won't affect any OS image.
keir@18113 133 + Increased the version number to 0.6.94.
keir@18113 134 +
keir@18113 135 +2005-09-28 Yoshinori K. Okuji <okuji@enbug.org>
keir@18113 136 +
keir@18113 137 + * stage2/boot.c (load_image): Even if an OS image is an ELF
keir@18113 138 + object, use the a.out kludge if MULTIBOOT_AOUT_KLUDGE is
keir@18113 139 + specified.
keir@18113 140 +
keir@18113 141 2005-05-08 Yoshinori K. Okuji <okuji@enbug.org>
keir@18113 142
keir@18113 143 * configure.ac (AC_INIT): Upgraded to 0.97.
keir@18113 144 diff -uprN grub-0.97/configure grub/configure
keir@18113 145 --- grub-0.97/configure 2005-05-08 03:48:12.000000000 +0100
keir@18113 146 +++ grub/configure 2007-11-05 01:29:46.000000000 +0000
keir@18113 147 @@ -3694,6 +3694,64 @@ if test "x$undef_flag" = xyes; then
keir@18113 148 CPPFLAGS="$CPPFLAGS -Wundef"
keir@18113 149 fi
keir@18113 150
keir@18113 151 +# Check if build ID can be disabled in the linker
keir@18113 152 +echo "$as_me:$LINENO: checking whether linker accepts \`--build-id=none'" >&5
keir@18113 153 +echo $ECHO_N "checking whether linker accepts \`--build-id=none'... $ECHO_C" >&6
keir@18113 154 +save_LDFLAGS="$LDFLAGS"
keir@18113 155 +LDFLAGS="$LDFLAGS -Wl,--build-id=none"
keir@18113 156 +cat >conftest.$ac_ext <<_ACEOF
keir@18113 157 +/* confdefs.h. */
keir@18113 158 +_ACEOF
keir@18113 159 +cat confdefs.h >>conftest.$ac_ext
keir@18113 160 +cat >>conftest.$ac_ext <<_ACEOF
keir@18113 161 +/* end confdefs.h. */
keir@18113 162 +
keir@18113 163 +int
keir@18113 164 +main ()
keir@18113 165 +{
keir@18113 166 +
keir@18113 167 + ;
keir@18113 168 + return 0;
keir@18113 169 +}
keir@18113 170 +_ACEOF
keir@18113 171 +rm -f conftest.$ac_objext conftest$ac_exeext
keir@18113 172 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
keir@18113 173 + (eval $ac_link) 2>conftest.er1
keir@18113 174 + ac_status=$?
keir@18113 175 + grep -v '^ *+' conftest.er1 >conftest.err
keir@18113 176 + rm -f conftest.er1
keir@18113 177 + cat conftest.err >&5
keir@18113 178 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
keir@18113 179 + (exit $ac_status); } &&
keir@18113 180 + { ac_try='test -z "$ac_c_werror_flag"
keir@18113 181 + || test ! -s conftest.err'
keir@18113 182 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
keir@18113 183 + (eval $ac_try) 2>&5
keir@18113 184 + ac_status=$?
keir@18113 185 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
keir@18113 186 + (exit $ac_status); }; } &&
keir@18113 187 + { ac_try='test -s conftest$ac_exeext'
keir@18113 188 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
keir@18113 189 + (eval $ac_try) 2>&5
keir@18113 190 + ac_status=$?
keir@18113 191 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
keir@18113 192 + (exit $ac_status); }; }; then
keir@18113 193 + build_id_flag=yes
keir@18113 194 +else
keir@18113 195 + echo "$as_me: failed program was:" >&5
keir@18113 196 +sed 's/^/| /' conftest.$ac_ext >&5
keir@18113 197 +
keir@18113 198 +build_id_flag=no
keir@18113 199 +fi
keir@18113 200 +rm -f conftest.err conftest.$ac_objext \
keir@18113 201 + conftest$ac_exeext conftest.$ac_ext
keir@18113 202 +echo "$as_me:$LINENO: result: $build_id_flag" >&5
keir@18113 203 +echo "${ECHO_T}$build_id_flag" >&6
keir@18113 204 +LDFLAGS="$save_LDFLAGS"
keir@18113 205 +if test "x$build_id_flag" = xyes; then
keir@18113 206 + LDFLAGS="$LDFLAGS -Wl,--build-id=none"
keir@18113 207 +fi
keir@18113 208 +
keir@18113 209 if test "x$with_binutils" != x; then
keir@18113 210 # Extract the first word of "objcopy", so it can be a program name with args.
keir@18113 211 set dummy objcopy; ac_word=$2
keir@18113 212 @@ -3892,7 +3950,7 @@ echo "$as_me: error: ${CC-cc} cannot com
keir@18113 213 fi
keir@18113 214 grub_cv_prog_objcopy_absolute=yes
keir@18113 215 for link_addr in 2000 8000 7C00; do
keir@18113 216 - if { ac_try='${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec'
keir@18113 217 + if { ac_try='${CC-cc} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec'
keir@18113 218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
keir@18113 219 (eval $ac_try) 2>&5
keir@18113 220 ac_status=$?
keir@18113 221 diff -uprN grub-0.97/configure.ac grub/configure.ac
keir@18113 222 --- grub-0.97/configure.ac 2005-05-08 03:36:03.000000000 +0100
keir@18113 223 +++ grub/configure.ac 2008-04-10 23:26:50.000000000 +0100
keir@18113 224 @@ -86,13 +86,13 @@ if test "x$ac_cv_prog_gcc" = xyes; then
keir@18113 225 fi
keir@18113 226 STAGE1_CFLAGS="-O2"
keir@18113 227 GRUB_CFLAGS="-O2"
keir@18113 228 - AC_CACHE_CHECK([whether optimization for size works], size_flag, [
keir@18113 229 + AC_CACHE_CHECK([whether optimization for size works], grub_cv_cc_Os, [
keir@18113 230 saved_CFLAGS=$CFLAGS
keir@18113 231 CFLAGS="-Os -g"
keir@18113 232 - AC_TRY_COMPILE(, , size_flag=yes, size_flag=no)
keir@18113 233 + AC_TRY_COMPILE(, , grub_cv_cc_Os=yes, grub_cv_cc_Os=no)
keir@18113 234 CFLAGS=$saved_CFLAGS
keir@18113 235 ])
keir@18113 236 - if test "x$size_flag" = xyes; then
keir@18113 237 + if test "x$grub_cv_cc_Os" = xyes; then
keir@18113 238 STAGE2_CFLAGS="-Os"
keir@18113 239 else
keir@18113 240 STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
keir@18113 241 @@ -100,16 +100,16 @@ if test "x$ac_cv_prog_gcc" = xyes; then
keir@18113 242 # OpenBSD has a GCC extension for protecting applications from
keir@18113 243 # stack smashing attacks, but GRUB doesn't want this feature.
keir@18113 244 AC_CACHE_CHECK([whether gcc has -fno-stack-protector],
keir@18113 245 - no_stack_protector_flag, [
keir@18113 246 + grub_cv_cc_no_stack_protector, [
keir@18113 247 saved_CFLAGS=$CFLAGS
keir@18113 248 CFLAGS="-fno-stack-protector"
keir@18113 249 AC_TRY_COMPILE(,
keir@18113 250 ,
keir@18113 251 - no_stack_protector_flag=yes,
keir@18113 252 - no_stack_protector_flag=no)
keir@18113 253 + grub_cv_cc_no_stack_protector=yes,
keir@18113 254 + grub_cv_cc_no_stack_protector=no)
keir@18113 255 CFLAGS=$saved_CFLAGS
keir@18113 256 ])
keir@18113 257 - if test "x$no_stack_protector_flag" = xyes; then
keir@18113 258 + if test "x$grub_cv_cc_no_stack_protector" = xyes; then
keir@18113 259 STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector"
keir@18113 260 fi
keir@18113 261 fi
keir@18113 262 @@ -123,33 +123,44 @@ AC_SUBST(GRUB_CFLAGS)
keir@18113 263 CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused -Wshadow"
keir@18113 264 CPPFLAGS="$CPPFLAGS -Wpointer-arith"
keir@18113 265
keir@18113 266 -AC_CACHE_CHECK([whether -Wundef works], undef_flag, [
keir@18113 267 +AC_CACHE_CHECK([whether -Wundef works], grub_cv_cc_Wundef, [
keir@18113 268 saved_CPPFLAGS="$CPPFLAGS"
keir@18113 269 CPPFLAGS="-Wundef"
keir@18113 270 - AC_TRY_COMPILE(, , undef_flag=yes, undef_flag=no)
keir@18113 271 + AC_TRY_COMPILE(, , grub_cv_cc_Wundef=yes, grub_cv_cc_Wundef=no)
keir@18113 272 CPPFLAGS="$saved_CPPFLAGS"
keir@18113 273 ])
keir@18113 274
keir@18113 275 # The options `-falign-*' are supported by gcc 3.0 or later.
keir@18113 276 # Probably it is sufficient to only check for -falign-loops.
keir@18113 277 -AC_CACHE_CHECK([whether -falign-loops works], [falign_loop_flag], [
keir@18113 278 +AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
keir@18113 279 saved_CPPFLAGS="$CPPFLAGS"
keir@18113 280 CPPFLAGS="-falign-loops=1"
keir@18113 281 - AC_TRY_COMPILE(, , [falign_loop_flag=yes], [falign_loop_flag=no])
keir@18113 282 + AC_TRY_COMPILE(, , [grub_cv_cc_falign_loop=yes], [grub_cv_cc_falign_loop=no])
keir@18113 283 CPPFLAGS="$saved_CPPFLAGS"
keir@18113 284 ])
keir@18113 285
keir@18113 286 # Force no alignment to save space.
keir@18113 287 -if test "x$falign_loop_flag" = xyes; then
keir@18113 288 +if test "x$grub_cv_cc_falign_loop" = xyes; then
keir@18113 289 CPPFLAGS="$CPPFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
keir@18113 290 else
keir@18113 291 CPPFLAGS="$CPPFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
keir@18113 292 fi
keir@18113 293
keir@18113 294 -if test "x$undef_flag" = xyes; then
keir@18113 295 +if test "x$grub_cv_cc_Wundef" = xyes; then
keir@18113 296 CPPFLAGS="$CPPFLAGS -Wundef"
keir@18113 297 fi
keir@18113 298
keir@18113 299 +# Check if build ID can be disabled in the linker
keir@18113 300 +AC_MSG_CHECKING([whether linker accepts `--build-id=none'])
keir@18113 301 +save_LDFLAGS="$LDFLAGS"
keir@18113 302 +LDFLAGS="$LDFLAGS -Wl,--build-id=none"
keir@18113 303 +AC_TRY_LINK(, , build_id_flag=yes, build_id_flag=no)
keir@18113 304 +AC_MSG_RESULT([$build_id_flag])
keir@18113 305 +LDFLAGS="$save_LDFLAGS"
keir@18113 306 +if test "x$build_id_flag" = xyes; then
keir@18113 307 + LDFLAGS="$LDFLAGS -Wl,--build-id=none"
keir@18113 308 +fi
keir@18113 309 +
keir@18113 310 if test "x$with_binutils" != x; then
keir@18113 311 dnl AC_PATH_TOOL(OBJCOPY, objcopy, , "$with_binutils:$PATH")
keir@18113 312 AC_PATH_PROG(OBJCOPY, objcopy, , "$with_binutils:$PATH")
keir@18113 313 diff -uprN grub-0.97/docs/grub.8 grub/docs/grub.8
keir@18113 314 --- grub-0.97/docs/grub.8 2005-05-08 03:48:56.000000000 +0100
keir@18113 315 +++ grub/docs/grub.8 2006-06-24 15:40:02.000000000 +0100
keir@18113 316 @@ -1,5 +1,5 @@
keir@18113 317 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
keir@18113 318 -.TH GRUB "8" "May 2005" "grub (GNU GRUB 0.97)" FSF
keir@18113 319 +.TH GRUB "8" "June 2006" "grub (GNU GRUB 0.97)" FSF
keir@18113 320 .SH NAME
keir@18113 321 grub \- the grub shell
keir@18113 322 .SH SYNOPSIS
keir@18113 323 diff -uprN grub-0.97/docs/grub-install.8 grub/docs/grub-install.8
keir@18113 324 --- grub-0.97/docs/grub-install.8 2005-05-08 03:48:56.000000000 +0100
keir@18113 325 +++ grub/docs/grub-install.8 2006-06-24 15:40:02.000000000 +0100
keir@18113 326 @@ -1,5 +1,5 @@
keir@18113 327 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
keir@18113 328 -.TH GRUB-INSTALL "8" "May 2005" "grub-install (GNU GRUB 0.97)" FSF
keir@18113 329 +.TH GRUB-INSTALL "8" "June 2006" "grub-install (GNU GRUB 0.97)" FSF
keir@18113 330 .SH NAME
keir@18113 331 grub-install \- install GRUB on your drive
keir@18113 332 .SH SYNOPSIS
keir@18113 333 diff -uprN grub-0.97/docs/grub-md5-crypt.8 grub/docs/grub-md5-crypt.8
keir@18113 334 --- grub-0.97/docs/grub-md5-crypt.8 2005-05-08 03:48:56.000000000 +0100
keir@18113 335 +++ grub/docs/grub-md5-crypt.8 2006-06-24 15:40:02.000000000 +0100
keir@18113 336 @@ -1,5 +1,5 @@
keir@18113 337 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
keir@18113 338 -.TH GRUB-MD5-CRYPT "8" "May 2005" "grub-md5-crypt (GNU GRUB )" FSF
keir@18113 339 +.TH GRUB-MD5-CRYPT "8" "June 2006" "grub-md5-crypt (GNU GRUB )" FSF
keir@18113 340 .SH NAME
keir@18113 341 grub-md5-crypt \- Encrypt a password in MD5 format
keir@18113 342 .SH SYNOPSIS
keir@18113 343 diff -uprN grub-0.97/docs/grub-terminfo.8 grub/docs/grub-terminfo.8
keir@18113 344 --- grub-0.97/docs/grub-terminfo.8 2005-05-08 03:48:56.000000000 +0100
keir@18113 345 +++ grub/docs/grub-terminfo.8 2006-06-24 15:40:02.000000000 +0100
keir@18113 346 @@ -1,5 +1,5 @@
keir@18113 347 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
keir@18113 348 -.TH GRUB-TERMINFO "8" "May 2005" "grub-terminfo (GNU GRUB 0.97)" FSF
keir@18113 349 +.TH GRUB-TERMINFO "8" "June 2006" "grub-terminfo (GNU GRUB 0.97)" FSF
keir@18113 350 .SH NAME
keir@18113 351 grub-terminfo \- Generate a terminfo command from a terminfo name
keir@18113 352 .SH SYNOPSIS
keir@18113 353 diff -uprN grub-0.97/docs/grub.texi grub/docs/grub.texi
keir@18113 354 --- grub-0.97/docs/grub.texi 2005-05-08 03:59:59.000000000 +0100
keir@18113 355 +++ grub/docs/grub.texi 2006-06-24 15:40:02.000000000 +0100
keir@18113 356 @@ -2,22 +2,41 @@
keir@18113 357 @c -*-texinfo-*-
keir@18113 358 @c %**start of header
keir@18113 359 @setfilename grub.info
keir@18113 360 -@settitle GRUB Manual
keir@18113 361 -@c %**end of header
keir@18113 362 -
keir@18113 363 @include version.texi
keir@18113 364 -
keir@18113 365 +@settitle GNU GRUB Manual @value{VERSION}
keir@18113 366 @c Unify all our little indices for now.
keir@18113 367 @syncodeindex fn cp
keir@18113 368 @syncodeindex vr cp
keir@18113 369 @syncodeindex ky cp
keir@18113 370 @syncodeindex pg cp
keir@18113 371 @syncodeindex tp cp
keir@18113 372 +@c %**end of header
keir@18113 373
keir@18113 374 @footnotestyle separate
keir@18113 375 @paragraphindent 3
keir@18113 376 @finalout
keir@18113 377
keir@18113 378 +@copying
keir@18113 379 +This manual is for GNU GRUB (version @value{VERSION},
keir@18113 380 +@value{UPDATED}).
keir@18113 381 +
keir@18113 382 +Copyright @copyright{} 1999,2000,2001,2002,2004,2006 Free Software Foundation, Inc.
keir@18113 383 +
keir@18113 384 +@quotation
keir@18113 385 +Permission is granted to copy, distribute and/or modify this document
keir@18113 386 +under the terms of the GNU Free Documentation License, Version 1.2 or
keir@18113 387 +any later version published by the Free Software Foundation; with no
keir@18113 388 +Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
keir@18113 389 +and with the Back-Cover Texts as in (a) below. A copy of the
keir@18113 390 +license is included in the section entitled ``GNU Free Documentation
keir@18113 391 +License.''
keir@18113 392 +
keir@18113 393 +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
keir@18113 394 +this GNU Manual, like GNU software. Copies published by the Free
keir@18113 395 +Software Foundation raise funds for GNU development.''
keir@18113 396 +@end quotation
keir@18113 397 +@end copying
keir@18113 398 +
keir@18113 399 @dircategory Kernel
keir@18113 400 @direntry
keir@18113 401 * GRUB: (grub). The GRand Unified Bootloader
keir@18113 402 @@ -34,53 +53,16 @@
keir@18113 403
keir@18113 404 @setchapternewpage odd
keir@18113 405
keir@18113 406 -@ifinfo
keir@18113 407 -Copyright @copyright{} 1999,2000,2001,2002,2004 Free Software Foundation, Inc.
keir@18113 408 -
keir@18113 409 -Permission is granted to make and distribute verbatim copies of
keir@18113 410 -this manual provided the copyright notice and this permission notice
keir@18113 411 -are preserved on all copies.
keir@18113 412 -
keir@18113 413 -@ignore
keir@18113 414 -Permission is granted to process this file through TeX and print the
keir@18113 415 -results, provided the printed document carries a copying permission
keir@18113 416 -notice identical to this one except for the removal of this paragraph
keir@18113 417 -(this paragraph not being relevant to the printed manual).
keir@18113 418 -
keir@18113 419 -@end ignore
keir@18113 420 -
keir@18113 421 -Permission is granted to copy and distribute modified versions of this
keir@18113 422 -manual under the conditions for verbatim copying, provided also that
keir@18113 423 -the entire resulting derived work is distributed under the terms of a
keir@18113 424 -permission notice identical to this one.
keir@18113 425 -
keir@18113 426 -Permission is granted to copy and distribute translations of this manual
keir@18113 427 -into another language, under the above conditions for modified versions.
keir@18113 428 -@end ifinfo
keir@18113 429 -
keir@18113 430 @titlepage
keir@18113 431 @sp 10
keir@18113 432 -@title the GRUB manual
keir@18113 433 +@title the GNU GRUB manual
keir@18113 434 @subtitle The GRand Unified Bootloader, version @value{VERSION}, @value{UPDATED}.
keir@18113 435 @author Gordon Matzigkeit
keir@18113 436 @author Yoshinori K. Okuji
keir@18113 437 @c The following two commands start the copyright page.
keir@18113 438 @page
keir@18113 439 @vskip 0pt plus 1filll
keir@18113 440 -Copyright @copyright{} 1999,2000,2001,2002,2004 Free Software Foundation, Inc.
keir@18113 441 -
keir@18113 442 -Permission is granted to make and distribute verbatim copies of
keir@18113 443 -this manual provided the copyright notice and this permission notice
keir@18113 444 -are preserved on all copies.
keir@18113 445 -Permission is granted to copy and distribute modified versions of this
keir@18113 446 -manual under the conditions for verbatim copying, provided that the entire
keir@18113 447 -resulting derived work is distributed under the terms of a permission
keir@18113 448 -notice identical to this one.
keir@18113 449 -
keir@18113 450 -Permission is granted to copy and distribute translations of this manual
keir@18113 451 -into another language, under the above conditions for modified versions,
keir@18113 452 -except that this permission notice may be stated in a translation approved
keir@18113 453 -by Free Software Foundation.
keir@18113 454 +@insertcopying
keir@18113 455 @end titlepage
keir@18113 456
keir@18113 457 @c Output the table of contents at the beginning.
keir@18113 458 @@ -91,12 +73,14 @@ by Free Software Foundation.
keir@18113 459
keir@18113 460 @ifnottex
keir@18113 461 @node Top
keir@18113 462 -@top GRUB manual
keir@18113 463 +@top GNU GRUB manual
keir@18113 464
keir@18113 465 This is the documentation of GNU GRUB, the GRand Unified Bootloader,
keir@18113 466 a flexible and powerful boot loader program for @sc{pc}s.
keir@18113 467
keir@18113 468 This edition documents version @value{VERSION}.
keir@18113 469 +
keir@18113 470 +@insertcopying
keir@18113 471 @end ifnottex
keir@18113 472
keir@18113 473 @menu
keir@18113 474 @@ -124,6 +108,7 @@ This edition documents version @value{VE
keir@18113 475 * Reporting bugs:: Where you should send a bug report
keir@18113 476 * Future:: Some future plans on GRUB
keir@18113 477 * Internals:: Hacking GRUB
keir@18113 478 +* Copying This Manual:: Copying This Manual
keir@18113 479 * Index::
keir@18113 480 @end menu
keir@18113 481
keir@18113 482 @@ -3965,6 +3950,16 @@ homepage}.
keir@18113 483 @include internals.texi
keir@18113 484
keir@18113 485
keir@18113 486 +@node Copying This Manual
keir@18113 487 +@appendix Copying This Manual
keir@18113 488 +
keir@18113 489 +@menu
keir@18113 490 +* GNU Free Documentation License:: License for copying this manual.
keir@18113 491 +@end menu
keir@18113 492 +
keir@18113 493 +@include fdl.texi
keir@18113 494 +
keir@18113 495 +
keir@18113 496 @node Index
keir@18113 497 @unnumbered Index
keir@18113 498
keir@18113 499 diff -uprN grub-0.97/docs/Makefile.am grub/docs/Makefile.am
keir@18113 500 --- grub-0.97/docs/Makefile.am 2003-07-09 12:45:35.000000000 +0100
keir@18113 501 +++ grub/docs/Makefile.am 2006-06-24 15:40:02.000000000 +0100
keir@18113 502 @@ -1,5 +1,5 @@
keir@18113 503 info_TEXINFOS = grub.texi multiboot.texi
keir@18113 504 -grub_TEXINFOS = internals.texi
keir@18113 505 +grub_TEXINFOS = internals.texi fdl.texi
keir@18113 506 EXAMPLES = boot.S kernel.c multiboot.h
keir@18113 507 multiboot_TEXINFOS = boot.S.texi kernel.c.texi multiboot.h.texi
keir@18113 508 man_MANS = grub.8 mbchk.1 grub-install.8 grub-md5-crypt.8 grub-terminfo.8
keir@18113 509 diff -uprN grub-0.97/docs/Makefile.in grub/docs/Makefile.in
keir@18113 510 --- grub-0.97/docs/Makefile.in 2005-05-08 03:42:34.000000000 +0100
keir@18113 511 +++ grub/docs/Makefile.in 2006-06-24 15:40:02.000000000 +0100
keir@18113 512 @@ -202,7 +202,7 @@ sharedstatedir = @sharedstatedir@
keir@18113 513 sysconfdir = @sysconfdir@
keir@18113 514 target_alias = @target_alias@
keir@18113 515 info_TEXINFOS = grub.texi multiboot.texi
keir@18113 516 -grub_TEXINFOS = internals.texi
keir@18113 517 +grub_TEXINFOS = internals.texi fdl.texi
keir@18113 518 EXAMPLES = boot.S kernel.c multiboot.h
keir@18113 519 multiboot_TEXINFOS = boot.S.texi kernel.c.texi multiboot.h.texi
keir@18113 520 man_MANS = grub.8 mbchk.1 grub-install.8 grub-md5-crypt.8 grub-terminfo.8
keir@18113 521 diff -uprN grub-0.97/docs/mbchk.1 grub/docs/mbchk.1
keir@18113 522 --- grub-0.97/docs/mbchk.1 2005-05-08 03:48:56.000000000 +0100
keir@18113 523 +++ grub/docs/mbchk.1 2006-06-24 15:40:02.000000000 +0100
keir@18113 524 @@ -1,5 +1,5 @@
keir@18113 525 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
keir@18113 526 -.TH MBCHK "1" "May 2005" "mbchk (GNU GRUB 0.97)" FSF
keir@18113 527 +.TH MBCHK "1" "June 2006" "mbchk (GNU GRUB 0.97)" FSF
keir@18113 528 .SH NAME
keir@18113 529 mbchk \- check the format of a Multiboot kernel
keir@18113 530 .SH SYNOPSIS
keir@18113 531 diff -uprN grub-0.97/docs/multiboot.texi grub/docs/multiboot.texi
keir@18113 532 --- grub-0.97/docs/multiboot.texi 2003-07-09 12:45:36.000000000 +0100
keir@18113 533 +++ grub/docs/multiboot.texi 2006-06-24 15:40:02.000000000 +0100
keir@18113 534 @@ -1,32 +1,28 @@
keir@18113 535 \input texinfo @c -*-texinfo-*-
keir@18113 536 -@c -*-texinfo-*-
keir@18113 537 @c %**start of header
keir@18113 538 @setfilename multiboot.info
keir@18113 539 -@settitle Multiboot Specification
keir@18113 540 -@c %**end of header
keir@18113 541 -
keir@18113 542 +@set VERSION 0.6.95
keir@18113 543 +@settitle Multiboot Specification version @value{VERSION}
keir@18113 544 @c Unify all our little indices for now.
keir@18113 545 @syncodeindex fn cp
keir@18113 546 @syncodeindex vr cp
keir@18113 547 @syncodeindex ky cp
keir@18113 548 @syncodeindex pg cp
keir@18113 549 @syncodeindex tp cp
keir@18113 550 +@c %**end of header
keir@18113 551
keir@18113 552 @footnotestyle separate
keir@18113 553 @paragraphindent 3
keir@18113 554 @finalout
keir@18113 555
keir@18113 556 +@copying
keir@18113 557 +Copyright @copyright{} 1995,96 Bryan Ford <baford@@cs.utah.edu>
keir@18113 558
keir@18113 559 -@dircategory Kernel
keir@18113 560 -@direntry
keir@18113 561 -* Multiboot Specification: (multiboot). Multiboot Specification.
keir@18113 562 -@end direntry
keir@18113 563 +Copyright @copyright{} 1995,96 Erich Stefan Boleyn <erich@@uruk.org>
keir@18113 564
keir@18113 565 -@ifinfo
keir@18113 566 -Copyright @copyright{} 1995, 96 Bryan Ford <baford@@cs.utah.edu>
keir@18113 567 -Copyright @copyright{} 1995, 96 Erich Stefan Boleyn <erich@@uruk.org>
keir@18113 568 -Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
keir@18113 569 +Copyright @copyright{} 1999,2000,2001,2002,2005,2006 Free Software Foundation, Inc.
keir@18113 570
keir@18113 571 +@quotation
keir@18113 572 Permission is granted to make and distribute verbatim copies of
keir@18113 573 this manual provided the copyright notice and this permission notice
keir@18113 574 are preserved on all copies.
keir@18113 575 @@ -36,7 +32,6 @@ Permission is granted to process this fi
keir@18113 576 results, provided the printed document carries a copying permission
keir@18113 577 notice identical to this one except for the removal of this paragraph
keir@18113 578 (this paragraph not being relevant to the printed manual).
keir@18113 579 -
keir@18113 580 @end ignore
keir@18113 581
keir@18113 582 Permission is granted to copy and distribute modified versions of this
keir@18113 583 @@ -45,31 +40,23 @@ the entire resulting derived work is dis
keir@18113 584 permission notice identical to this one.
keir@18113 585
keir@18113 586 Permission is granted to copy and distribute translations of this manual
keir@18113 587 -into another language, under the above conditions for modified versions.
keir@18113 588 -@end ifinfo
keir@18113 589 +into another language, under the above conditions for modified
keir@18113 590 +versions.
keir@18113 591 +@end quotation
keir@18113 592 +@end copying
keir@18113 593 +
keir@18113 594 +@dircategory Kernel
keir@18113 595 +@direntry
keir@18113 596 +* Multiboot Specification: (multiboot). Multiboot Specification.
keir@18113 597 +@end direntry
keir@18113 598
keir@18113 599 @titlepage
keir@18113 600 @sp 10
keir@18113 601 -@title The Multiboot Specification
keir@18113 602 +@title The Multiboot Specification version @value{VERSION}
keir@18113 603 @author Yoshinori K. Okuji, Bryan Ford, Erich Stefan Boleyn, Kunihiro Ishiguro
keir@18113 604 @page
keir@18113 605 -
keir@18113 606 @vskip 0pt plus 1filll
keir@18113 607 -Copyright @copyright{} 1995, 96 Bryan Ford <baford@@cs.utah.edu>
keir@18113 608 -Copyright @copyright{} 1995, 96 Erich Stefan Boleyn <erich@@uruk.org>
keir@18113 609 -Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
keir@18113 610 -
keir@18113 611 -Permission is granted to make and distribute verbatim copies of
keir@18113 612 -this manual provided the copyright notice and this permission notice
keir@18113 613 -are preserved on all copies.
keir@18113 614 -
keir@18113 615 -Permission is granted to copy and distribute modified versions of this
keir@18113 616 -manual under the conditions for verbatim copying, provided also that
keir@18113 617 -the entire resulting derived work is distributed under the terms of a
keir@18113 618 -permission notice identical to this one.
keir@18113 619 -
keir@18113 620 -Permission is granted to copy and distribute translations of this manual
keir@18113 621 -into another language, under the above conditions for modified versions.
keir@18113 622 +@insertcopying
keir@18113 623 @end titlepage
keir@18113 624
keir@18113 625 @finalout
keir@18113 626 @@ -80,7 +67,9 @@ into another language, under the above c
keir@18113 627 @top Multiboot Specification
keir@18113 628
keir@18113 629 This file documents Multiboot Specification, the proposal for the boot
keir@18113 630 -sequence standard. This edition documents version 0.6.93.
keir@18113 631 +sequence standard. This edition documents version @value{VERSION}.
keir@18113 632 +
keir@18113 633 +@insertcopying
keir@18113 634 @end ifnottex
keir@18113 635
keir@18113 636 @menu
keir@18113 637 @@ -426,7 +415,7 @@ mode table (@pxref{Boot information form
keir@18113 638 kernel.
keir@18113 639
keir@18113 640 If bit 16 in the @samp{flags} word is set, then the fields at offsets
keir@18113 641 -8-24 in the Multiboot header are valid, and the boot loader should use
keir@18113 642 +12-28 in the Multiboot header are valid, and the boot loader should use
keir@18113 643 them instead of the fields in the actual executable header to calculate
keir@18113 644 where to load the OS image. This information does not need to be
keir@18113 645 provided if the kernel image is in @sc{elf} format, but it @emph{must}
keir@18113 646 @@ -677,7 +666,7 @@ follows:
keir@18113 647 @example
keir@18113 648 @group
keir@18113 649 +-------+-------+-------+-------+
keir@18113 650 -| drive | part1 | part2 | part3 |
keir@18113 651 +| part3 | part2 | part1 | drive |
keir@18113 652 +-------+-------+-------+-------+
keir@18113 653 @end group
keir@18113 654 @end example
keir@18113 655 @@ -1197,6 +1186,17 @@ Rewritten, using more strict words.
keir@18113 656 @item
keir@18113 657 The maintainer changes to the GNU GRUB maintainer team
keir@18113 658 @email{bug-grub@@gnu.org}, from Bryan Ford and Erich Stefan Boleyn.
keir@18113 659 +
keir@18113 660 +@item
keir@18113 661 +The byte order of the @samp{boot_device} in Multiboot information is
keir@18113 662 +reversed. This was a mistake.
keir@18113 663 +
keir@18113 664 +@item
keir@18113 665 +The offset of the address fields were wrong.
keir@18113 666 +
keir@18113 667 +@item
keir@18113 668 +The format is adapted to a newer Texinfo, and the version number is
keir@18113 669 +specified more explicitly in the title.
keir@18113 670 @end itemize
keir@18113 671
keir@18113 672 @item 0.6
keir@18113 673 diff -uprN grub-0.97/grub/asmstub.c grub/grub/asmstub.c
keir@18113 674 --- grub-0.97/grub/asmstub.c 2005-02-16 20:45:14.000000000 +0000
keir@18113 675 +++ grub/grub/asmstub.c 2008-03-28 13:22:28.000000000 +0000
keir@18113 676 @@ -55,6 +55,10 @@ int grub_stage2 (void);
keir@18113 677 # endif /* ! BLKFLSBUF */
keir@18113 678 #endif /* __linux__ */
keir@18113 679
keir@18113 680 +#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
keir@18113 681 +# include <sys/sysctl.h>
keir@18113 682 +#endif
keir@18113 683 +
keir@18113 684 /* We want to prevent any circularararity in our stubs, as well as
keir@18113 685 libc name clashes. */
keir@18113 686 #define WITHOUT_LIBC_STUBS 1
keir@18113 687 @@ -777,7 +781,39 @@ get_diskinfo (int drive, struct geometry
keir@18113 688
keir@18113 689 /* Open read/write, or read-only if that failed. */
keir@18113 690 if (! read_only)
keir@18113 691 - disks[drive].flags = open (devname, O_RDWR);
keir@18113 692 + {
keir@18113 693 +/* By default, kernel of FreeBSD does not allow overwriting MBR */
keir@18113 694 +#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
keir@18113 695 +#define GEOM_SYSCTL "kern.geom.debugflags"
keir@18113 696 + int old_flags, flags;
keir@18113 697 + size_t sizeof_int = sizeof (int);
keir@18113 698 +
keir@18113 699 + if (sysctlbyname (GEOM_SYSCTL, &old_flags, &sizeof_int, NULL, 0) != 0)
keir@18113 700 + grub_printf ("failed to get " GEOM_SYSCTL "sysctl: %s\n", strerror (errno));
keir@18113 701 +
keir@18113 702 + if ((old_flags & 0x10) == 0)
keir@18113 703 + {
keir@18113 704 + /* "allow foot shooting", see geom(4) */
keir@18113 705 + flags = old_flags | 0x10;
keir@18113 706 +
keir@18113 707 + if (sysctlbyname (GEOM_SYSCTL, NULL, NULL, &flags, sizeof (int)) != 0)
keir@18113 708 + {
keir@18113 709 + flags = old_flags;
keir@18113 710 + grub_printf ("failed to set " GEOM_SYSCTL "sysctl: %s\n", strerror (errno));
keir@18113 711 + }
keir@18113 712 + }
keir@18113 713 + else
keir@18113 714 + flags = old_flags;
keir@18113 715 +#endif
keir@18113 716 + disks[drive].flags = open (devname, O_RDWR);
keir@18113 717 +#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
keir@18113 718 + if (flags != old_flags)
keir@18113 719 + {
keir@18113 720 + if (sysctlbyname (GEOM_SYSCTL, NULL, NULL, &old_flags, sizeof (int)) != 0)
keir@18113 721 + grub_printf ("failed to set " GEOM_SYSCTL "sysctl: %s\n", strerror (errno));
keir@18113 722 + }
keir@18113 723 +#endif
keir@18113 724 + }
keir@18113 725
keir@18113 726 if (disks[drive].flags == -1)
keir@18113 727 {
keir@18113 728 @@ -926,7 +962,7 @@ hex_dump (void *buf, size_t size)
keir@18113 729
keir@18113 730 int
keir@18113 731 biosdisk (int subfunc, int drive, struct geometry *geometry,
keir@18113 732 - int sector, int nsec, int segment)
keir@18113 733 + unsigned int sector, int nsec, int segment)
keir@18113 734 {
keir@18113 735 char *buf;
keir@18113 736 int fd = geometry->flags;
keir@18113 737 diff -uprN grub-0.97/grub/main.c grub/grub/main.c
keir@18113 738 --- grub-0.97/grub/main.c 2003-07-09 12:45:36.000000000 +0100
keir@18113 739 +++ grub/grub/main.c 2006-05-05 22:43:46.000000000 +0100
keir@18113 740 @@ -32,6 +32,7 @@ int grub_stage2 (void);
keir@18113 741 #define WITHOUT_LIBC_STUBS 1
keir@18113 742 #include <shared.h>
keir@18113 743 #include <term.h>
keir@18113 744 +#include <device.h>
keir@18113 745
keir@18113 746 char *program_name = 0;
keir@18113 747 int use_config_file = 1;
keir@18113 748 @@ -192,6 +193,12 @@ main (int argc, char **argv)
keir@18113 749 perror ("strtoul");
keir@18113 750 exit (1);
keir@18113 751 }
keir@18113 752 + if (boot_drive >= NUM_DISKS)
keir@18113 753 + {
keir@18113 754 + fprintf (stderr, "boot_drive should be from 0 to %d\n",
keir@18113 755 + NUM_DISKS - 1);
keir@18113 756 + exit (1);
keir@18113 757 + }
keir@18113 758 break;
keir@18113 759
keir@18113 760 case OPT_NO_CONFIG_FILE:
keir@18113 761 diff -uprN grub-0.97/lib/device.c grub/lib/device.c
keir@18113 762 --- grub-0.97/lib/device.c 2005-03-28 00:14:25.000000000 +0100
keir@18113 763 +++ grub/lib/device.c 2008-03-28 13:22:28.000000000 +0000
keir@18113 764 @@ -69,9 +69,9 @@ struct hd_geometry
keir@18113 765 # ifndef CDROM_GET_CAPABILITY
keir@18113 766 # define CDROM_GET_CAPABILITY 0x5331 /* get capabilities */
keir@18113 767 # endif /* ! CDROM_GET_CAPABILITY */
keir@18113 768 -# ifndef BLKGETSIZE
keir@18113 769 -# define BLKGETSIZE _IO(0x12,96) /* return device size */
keir@18113 770 -# endif /* ! BLKGETSIZE */
keir@18113 771 +# ifndef BLKGETSIZE64
keir@18113 772 +# define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size */
keir@18113 773 +# endif /* ! BLKGETSIZE64 */
keir@18113 774 #endif /* __linux__ */
keir@18113 775
keir@18113 776 /* Use __FreeBSD_kernel__ instead of __FreeBSD__ for compatibility with
keir@18113 777 @@ -152,19 +152,19 @@ get_drive_geometry (struct geometry *geo
keir@18113 778 /* Linux */
keir@18113 779 {
keir@18113 780 struct hd_geometry hdg;
keir@18113 781 - unsigned long nr;
keir@18113 782 + unsigned long long nr;
keir@18113 783
keir@18113 784 if (ioctl (fd, HDIO_GETGEO, &hdg))
keir@18113 785 goto fail;
keir@18113 786
keir@18113 787 - if (ioctl (fd, BLKGETSIZE, &nr))
keir@18113 788 + if (ioctl (fd, BLKGETSIZE64, &nr))
keir@18113 789 goto fail;
keir@18113 790
keir@18113 791 /* Got the geometry, so save it. */
keir@18113 792 geom->cylinders = hdg.cylinders;
keir@18113 793 geom->heads = hdg.heads;
keir@18113 794 geom->sectors = hdg.sectors;
keir@18113 795 - geom->total_sectors = nr;
keir@18113 796 + geom->total_sectors = nr / 512;
keir@18113 797
keir@18113 798 goto success;
keir@18113 799 }
keir@18113 800 @@ -407,6 +407,12 @@ get_ataraid_disk_name (char *name, int u
keir@18113 801 {
keir@18113 802 sprintf (name, "/dev/ataraid/d%c", unit + '0');
keir@18113 803 }
keir@18113 804 +
keir@18113 805 +static void
keir@18113 806 +get_i2o_disk_name (char *name, char unit)
keir@18113 807 +{
keir@18113 808 + sprintf (name, "/dev/i2o/hd%c", unit);
keir@18113 809 +}
keir@18113 810 #endif
keir@18113 811
keir@18113 812 /* Check if DEVICE can be read. If an error occurs, return zero,
keir@18113 813 @@ -801,6 +807,29 @@ init_device_map (char ***map, const char
keir@18113 814 }
keir@18113 815 }
keir@18113 816 }
keir@18113 817 +
keir@18113 818 + /* This is for I2O - we have /dev/i2o/hd<logical drive><partition> */
keir@18113 819 + {
keir@18113 820 + int unit;
keir@18113 821 +
keir@18113 822 + for (unit = 'a'; unit < 'f'; unit++)
keir@18113 823 + {
keir@18113 824 + char name[24];
keir@18113 825 +
keir@18113 826 + get_i2o_disk_name (name, unit);
keir@18113 827 + if (check_device (name))
keir@18113 828 + {
keir@18113 829 + (*map)[num_hd + 0x80] = strdup (name);
keir@18113 830 + assert ((*map)[num_hd + 0x80]);
keir@18113 831 +
keir@18113 832 + /* If the device map file is opened, write the map. */
keir@18113 833 + if (fp)
keir@18113 834 + fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
keir@18113 835 +
keir@18113 836 + num_hd++;
keir@18113 837 + }
keir@18113 838 + }
keir@18113 839 + }
keir@18113 840 #endif /* __linux__ */
keir@18113 841
keir@18113 842 /* OK, close the device map file if opened. */
keir@18113 843 @@ -861,6 +890,12 @@ write_to_partition (char **map, int driv
keir@18113 844 if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
keir@18113 845 strcpy (dev + strlen(dev) - 5, "/part");
keir@18113 846 }
keir@18113 847 + else
keir@18113 848 + {
keir@18113 849 + if ((strncmp (dev, "/dev/ataraid/", 13) == 0) ||
keir@18113 850 + (strncmp (dev, "/dev/rd/", 8) == 0))
keir@18113 851 + strcpy (dev + strlen(dev), "p");
keir@18113 852 + }
keir@18113 853 sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
keir@18113 854
keir@18113 855 /* Open the partition. */
keir@18113 856 diff -uprN grub-0.97/netboot/3c509.c grub/netboot/3c509.c
keir@18113 857 --- grub-0.97/netboot/3c509.c 2003-07-09 12:45:37.000000000 +0100
keir@18113 858 +++ grub/netboot/3c509.c 2002-01-02 21:56:40.000000000 +0000
keir@18113 859 @@ -18,7 +18,7 @@ Author: Martin Renters.
keir@18113 860
keir@18113 861 3c509 support added by Serge Babkin (babkin@hq.icb.chel.su)
keir@18113 862
keir@18113 863 -$Id: 3c509.c,v 1.4 2002/01/02 21:56:40 okuji Exp $
keir@18113 864 +$Id: 3c509.c 609 2002-01-02 21:56:40Z okuji $
keir@18113 865
keir@18113 866 ***************************************************************************/
keir@18113 867
keir@18113 868 diff -uprN grub-0.97/netboot/cs89x0.c grub/netboot/cs89x0.c
keir@18113 869 --- grub-0.97/netboot/cs89x0.c 2003-07-09 12:45:37.000000000 +0100
keir@18113 870 +++ grub/netboot/cs89x0.c 2008-05-20 12:04:18.000000000 +0100
keir@18113 871 @@ -1,3 +1,21 @@
keir@18113 872 +/**
keir@18113 873 + Per an email message from Russ Nelson <nelson@crynwr.com> on
keir@18113 874 + 18 March 2008 this file is now licensed under GPL Version 2.
keir@18113 875 +
keir@18113 876 + From: Russ Nelson <nelson@crynwr.com>
keir@18113 877 + Date: Tue, 18 Mar 2008 12:42:00 -0400
keir@18113 878 + Subject: Re: [Etherboot-developers] cs89x0 driver in etherboot
keir@18113 879 + -- quote from email
keir@18113 880 + As copyright holder, if I say it doesn't conflict with the GPL,
keir@18113 881 + then it doesn't conflict with the GPL.
keir@18113 882 +
keir@18113 883 + However, there's no point in causing people's brains to overheat,
keir@18113 884 + so yes, I grant permission for the code to be relicensed under the
keir@18113 885 + GPLv2. Please make sure that this change in licensing makes its
keir@18113 886 + way upstream. -russ
keir@18113 887 + -- quote from email
keir@18113 888 +**/
keir@18113 889 +
keir@18113 890 /* cs89x0.c: A Crystal Semiconductor CS89[02]0 driver for etherboot. */
keir@18113 891 /*
keir@18113 892 Permission is granted to distribute the enclosed cs89x0.[ch] driver
keir@18113 893 diff -uprN grub-0.97/netboot/cs89x0.h grub/netboot/cs89x0.h
keir@18113 894 --- grub-0.97/netboot/cs89x0.h 2003-07-09 12:45:37.000000000 +0100
keir@18113 895 +++ grub/netboot/cs89x0.h 2008-05-20 12:04:18.000000000 +0100
keir@18113 896 @@ -1,3 +1,21 @@
keir@18113 897 +/**
keir@18113 898 + Per an email message from Russ Nelson <nelson@crynwr.com> on
keir@18113 899 + 18 March 2008 this file is now licensed under GPL Version 2.
keir@18113 900 +
keir@18113 901 + From: Russ Nelson <nelson@crynwr.com>
keir@18113 902 + Date: Tue, 18 Mar 2008 12:42:00 -0400
keir@18113 903 + Subject: Re: [Etherboot-developers] cs89x0 driver in etherboot
keir@18113 904 + -- quote from email
keir@18113 905 + As copyright holder, if I say it doesn't conflict with the GPL,
keir@18113 906 + then it doesn't conflict with the GPL.
keir@18113 907 +
keir@18113 908 + However, there's no point in causing people's brains to overheat,
keir@18113 909 + so yes, I grant permission for the code to be relicensed under the
keir@18113 910 + GPLv2. Please make sure that this change in licensing makes its
keir@18113 911 + way upstream. -russ
keir@18113 912 + -- quote from email
keir@18113 913 +**/
keir@18113 914 +
keir@18113 915 /* Copyright, 1988-1992, Russell Nelson, Crynwr Software
keir@18113 916
keir@18113 917 This program is free software; you can redistribute it and/or modify
keir@18113 918 diff -uprN grub-0.97/netboot/etherboot.h grub/netboot/etherboot.h
keir@18113 919 --- grub-0.97/netboot/etherboot.h 2003-07-09 12:45:37.000000000 +0100
keir@18113 920 +++ grub/netboot/etherboot.h 2006-09-08 13:56:22.000000000 +0100
keir@18113 921 @@ -531,9 +531,6 @@ extern int ip_abort;
keir@18113 922 extern int network_ready;
keir@18113 923 extern struct rom_info rom;
keir@18113 924 extern struct arptable_t arptable[MAX_ARP];
keir@18113 925 -extern struct bootpd_t bootp_data;
keir@18113 926 -#define BOOTP_DATA_ADDR (&bootp_data)
keir@18113 927 -extern unsigned char *end_of_rfc1533;
keir@18113 928
keir@18113 929 /* config.c */
keir@18113 930 extern struct nic nic;
keir@18113 931 diff -uprN grub-0.97/netboot/main.c grub/netboot/main.c
keir@18113 932 --- grub-0.97/netboot/main.c 2004-05-20 23:19:33.000000000 +0100
keir@18113 933 +++ grub/netboot/main.c 2006-09-08 13:56:22.000000000 +0100
keir@18113 934 @@ -56,7 +56,8 @@ static int vendorext_isvalid;
keir@18113 935 static unsigned long netmask;
keir@18113 936 static struct bootpd_t bootp_data;
keir@18113 937 static unsigned long xid;
keir@18113 938 -static unsigned char *end_of_rfc1533 = NULL;
keir@18113 939 +
keir@18113 940 +#define BOOTP_DATA_ADDR (&bootp_data)
keir@18113 941
keir@18113 942 #ifndef NO_DHCP_SUPPORT
keir@18113 943 #endif /* NO_DHCP_SUPPORT */
keir@18113 944 @@ -967,7 +968,6 @@ decode_rfc1533 (unsigned char *p, int bl
keir@18113 945
keir@18113 946 if (block == 0)
keir@18113 947 {
keir@18113 948 - end_of_rfc1533 = NULL;
keir@18113 949 vendorext_isvalid = 0;
keir@18113 950
keir@18113 951 if (grub_memcmp (p, rfc1533_cookie, 4))
keir@18113 952 @@ -1021,7 +1021,7 @@ decode_rfc1533 (unsigned char *p, int bl
keir@18113 953 }
keir@18113 954 else if (c == RFC1533_END)
keir@18113 955 {
keir@18113 956 - end_of_rfc1533 = endp = p;
keir@18113 957 + endp = p;
keir@18113 958 continue;
keir@18113 959 }
keir@18113 960 else if (c == RFC1533_NETMASK)
keir@18113 961 diff -uprN grub-0.97/netboot/natsemi.c grub/netboot/natsemi.c
keir@18113 962 --- grub-0.97/netboot/natsemi.c 2003-07-09 12:45:38.000000000 +0100
keir@18113 963 +++ grub/netboot/natsemi.c 2006-09-10 08:26:10.000000000 +0100
keir@18113 964 @@ -608,7 +608,7 @@ natsemi_transmit(struct nic *nic,
keir@18113 965 const char *p) /* Packet */
keir@18113 966 {
keir@18113 967 u32 status, to, nstype;
keir@18113 968 - u32 tx_status;
keir@18113 969 + volatile u32 tx_status;
keir@18113 970
keir@18113 971 /* Stop the transmitter */
keir@18113 972 outl(TxOff, ioaddr + ChipCmd);
keir@18113 973 @@ -647,7 +647,7 @@ natsemi_transmit(struct nic *nic,
keir@18113 974
keir@18113 975 to = currticks() + TX_TIMEOUT;
keir@18113 976
keir@18113 977 - while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
keir@18113 978 + while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
keir@18113 979 /* wait */ ;
keir@18113 980
keir@18113 981 if (currticks() >= to) {
keir@18113 982 diff -uprN grub-0.97/netboot/sis900.c grub/netboot/sis900.c
keir@18113 983 --- grub-0.97/netboot/sis900.c 2003-07-09 12:45:38.000000000 +0100
keir@18113 984 +++ grub/netboot/sis900.c 2006-09-10 08:26:10.000000000 +0100
keir@18113 985 @@ -901,7 +901,7 @@ sis900_transmit(struct nic *nic,
keir@18113 986 const char *p) /* Packet */
keir@18113 987 {
keir@18113 988 u32 status, to, nstype;
keir@18113 989 - u32 tx_status;
keir@18113 990 + volatile u32 tx_status;
keir@18113 991
keir@18113 992 /* Stop the transmitter */
keir@18113 993 outl(TxDIS, ioaddr + cr);
keir@18113 994 @@ -940,7 +940,7 @@ sis900_transmit(struct nic *nic,
keir@18113 995
keir@18113 996 to = currticks() + TX_TIMEOUT;
keir@18113 997
keir@18113 998 - while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
keir@18113 999 + while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
keir@18113 1000 /* wait */ ;
keir@18113 1001
keir@18113 1002 if (currticks() >= to) {
keir@18113 1003 diff -uprN grub-0.97/netboot/sk_g16.c grub/netboot/sk_g16.c
keir@18113 1004 --- grub-0.97/netboot/sk_g16.c 2003-07-09 12:45:38.000000000 +0100
keir@18113 1005 +++ grub/netboot/sk_g16.c 2002-01-02 21:56:40.000000000 +0000
keir@18113 1006 @@ -13,12 +13,12 @@ Changes to make it work with Etherboot b
keir@18113 1007 *
keir@18113 1008 * Module : sk_g16.c
keir@18113 1009 *
keir@18113 1010 - * Version : $Revision: 1.4 $
keir@18113 1011 + * Version : $Revision: 609 $
keir@18113 1012 *
keir@18113 1013 * Author : Patrick J.D. Weichmann
keir@18113 1014 *
keir@18113 1015 * Date Created : 94/05/26
keir@18113 1016 - * Last Updated : $Date: 2002/01/02 21:56:40 $
keir@18113 1017 + * Last Updated : $Date: 2002-01-02 21:56:40 +0000 (mer 02 jan 2002) $
keir@18113 1018 *
keir@18113 1019 * Description : Schneider & Koch G16 Ethernet Device Driver for
keir@18113 1020 * Linux Kernel >= 1.1.22
keir@18113 1021 diff -uprN grub-0.97/netboot/sk_g16.h grub/netboot/sk_g16.h
keir@18113 1022 --- grub-0.97/netboot/sk_g16.h 2003-07-09 12:45:38.000000000 +0100
keir@18113 1023 +++ grub/netboot/sk_g16.h 2000-07-29 20:22:54.000000000 +0100
keir@18113 1024 @@ -4,7 +4,7 @@
keir@18113 1025 * of the GNU Public License, incorporated herein by reference.
keir@18113 1026 *
keir@18113 1027 * Module : sk_g16.h
keir@18113 1028 - * Version : $Revision: 1.3 $
keir@18113 1029 + * Version : $Revision: 388 $
keir@18113 1030 *
keir@18113 1031 * Author : M.Hipp (mhipp@student.uni-tuebingen.de)
keir@18113 1032 * changes by : Patrick J.D. Weichmann
keir@18113 1033 @@ -15,8 +15,8 @@
keir@18113 1034 * the am7990 (LANCE) chip used for writing a
keir@18113 1035 * network device driver which uses this chip
keir@18113 1036 *
keir@18113 1037 - * $Log: sk_g16.h,v $
keir@18113 1038 - * Revision 1.3 2000/07/29 19:22:54 okuji
keir@18113 1039 + * $Log$
keir@18113 1040 + * Revision 1.3 2000-07-29 19:22:54 okuji
keir@18113 1041 * update the network support to etherboot-4.6.4.
keir@18113 1042 *
keir@18113 1043 -*/
keir@18113 1044 diff -uprN grub-0.97/stage1/Makefile.am grub/stage1/Makefile.am
keir@18113 1045 --- grub-0.97/stage1/Makefile.am 2004-07-16 12:44:56.000000000 +0100
keir@18113 1046 +++ grub/stage1/Makefile.am 2007-11-05 01:29:46.000000000 +0000
keir@18113 1047 @@ -5,7 +5,7 @@ CLEANFILES = $(nodist_pkglib_DATA)
keir@18113 1048
keir@18113 1049 # We can't use builtins or standard includes.
keir@18113 1050 AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
keir@18113 1051 -LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
keir@18113 1052 +stage1_exec_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
keir@18113 1053
keir@18113 1054 noinst_PROGRAMS = stage1.exec
keir@18113 1055 stage1_exec_SOURCES = stage1.S stage1.h
keir@18113 1056 diff -uprN grub-0.97/stage1/Makefile.in grub/stage1/Makefile.in
keir@18113 1057 --- grub-0.97/stage1/Makefile.in 2005-05-08 03:42:36.000000000 +0100
keir@18113 1058 +++ grub/stage1/Makefile.in 2007-11-05 01:29:46.000000000 +0000
keir@18113 1059 @@ -110,7 +110,7 @@ INSTALL_DATA = @INSTALL_DATA@
keir@18113 1060 INSTALL_PROGRAM = @INSTALL_PROGRAM@
keir@18113 1061 INSTALL_SCRIPT = @INSTALL_SCRIPT@
keir@18113 1062 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
keir@18113 1063 -LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
keir@18113 1064 +LDFLAGS = @LDFLAGS@
keir@18113 1065 LIBOBJS = @LIBOBJS@
keir@18113 1066 LIBS = @LIBS@
keir@18113 1067 LTLIBOBJS = @LTLIBOBJS@
keir@18113 1068 @@ -188,6 +188,7 @@ CLEANFILES = $(nodist_pkglib_DATA)
keir@18113 1069
keir@18113 1070 # We can't use builtins or standard includes.
keir@18113 1071 AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
keir@18113 1072 +stage1_exec_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
keir@18113 1073 stage1_exec_SOURCES = stage1.S stage1.h
keir@18113 1074 SUFFIXES = .exec
keir@18113 1075 all: all-am
keir@18113 1076 diff -uprN grub-0.97/stage2/bios.c grub/stage2/bios.c
keir@18113 1077 --- grub-0.97/stage2/bios.c 2004-03-27 16:34:04.000000000 +0000
keir@18113 1078 +++ grub/stage2/bios.c 2008-03-28 13:22:28.000000000 +0000
keir@18113 1079 @@ -47,7 +47,7 @@ extern int get_diskinfo_floppy (int driv
keir@18113 1080 return the error number. Otherwise, return 0. */
keir@18113 1081 int
keir@18113 1082 biosdisk (int read, int drive, struct geometry *geometry,
keir@18113 1083 - int sector, int nsec, int segment)
keir@18113 1084 + unsigned int sector, int nsec, int segment)
keir@18113 1085 {
keir@18113 1086 int err;
keir@18113 1087
keir@18113 1088 diff -uprN grub-0.97/stage2/boot.c grub/stage2/boot.c
keir@18113 1089 --- grub-0.97/stage2/boot.c 2004-03-30 12:44:08.000000000 +0100
keir@18113 1090 +++ grub/stage2/boot.c 2005-09-28 22:47:55.000000000 +0100
keir@18113 1091 @@ -1,7 +1,7 @@
keir@18113 1092 /* boot.c - load and bootstrap a kernel */
keir@18113 1093 /*
keir@18113 1094 * GRUB -- GRand Unified Bootloader
keir@18113 1095 - * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
keir@18113 1096 + * Copyright (C) 1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
keir@18113 1097 *
keir@18113 1098 * This program is free software; you can redistribute it and/or modify
keir@18113 1099 * it under the terms of the GNU General Public License as published by
keir@18113 1100 @@ -96,7 +96,7 @@ load_image (char *kernel, char *arg, ker
keir@18113 1101 lh = (struct linux_kernel_header *) buffer;
keir@18113 1102
keir@18113 1103 /* ELF loading supported if multiboot, FreeBSD and NetBSD. */
keir@18113 1104 - if ((type == KERNEL_TYPE_MULTIBOOT
keir@18113 1105 + if (((type == KERNEL_TYPE_MULTIBOOT && ! (flags & MULTIBOOT_AOUT_KLUDGE))
keir@18113 1106 || pu.elf->e_ident[EI_OSABI] == ELFOSABI_FREEBSD
keir@18113 1107 || grub_strcmp (pu.elf->e_ident + EI_BRAND, "FreeBSD") == 0
keir@18113 1108 || suggested_type == KERNEL_TYPE_NETBSD)
keir@18113 1109 diff -uprN grub-0.97/stage2/builtins.c grub/stage2/builtins.c
keir@18113 1110 --- grub-0.97/stage2/builtins.c 2005-02-15 21:58:23.000000000 +0000
keir@18113 1111 +++ grub/stage2/builtins.c 2006-03-21 20:51:58.000000000 +0000
keir@18113 1112 @@ -3830,15 +3830,15 @@ setup_func (char *arg, int flags)
keir@18113 1113 {
keir@18113 1114 char tmp[16];
keir@18113 1115 grub_sprintf (tmp, ",%d", (partition >> 16) & 0xFF);
keir@18113 1116 - grub_strncat (device, tmp, 256);
keir@18113 1117 + grub_strncat (device, tmp, sizeof (device));
keir@18113 1118 }
keir@18113 1119 if ((partition & 0x00FF00) != 0x00FF00)
keir@18113 1120 {
keir@18113 1121 char tmp[16];
keir@18113 1122 grub_sprintf (tmp, ",%c", 'a' + ((partition >> 8) & 0xFF));
keir@18113 1123 - grub_strncat (device, tmp, 256);
keir@18113 1124 + grub_strncat (device, tmp, sizeof (device));
keir@18113 1125 }
keir@18113 1126 - grub_strncat (device, ")", 256);
keir@18113 1127 + grub_strncat (device, ")", sizeof (device));
keir@18113 1128 }
keir@18113 1129
keir@18113 1130 int embed_stage1_5 (char *stage1_5, int drive, int partition)
keir@18113 1131 diff -uprN grub-0.97/stage2/disk_io.c grub/stage2/disk_io.c
keir@18113 1132 --- grub-0.97/stage2/disk_io.c 2004-05-23 17:35:24.000000000 +0100
keir@18113 1133 +++ grub/stage2/disk_io.c 2008-03-28 13:22:28.000000000 +0000
keir@18113 1134 @@ -137,7 +137,7 @@ log2 (unsigned long word)
keir@18113 1135 }
keir@18113 1136
keir@18113 1137 int
keir@18113 1138 -rawread (int drive, int sector, int byte_offset, int byte_len, char *buf)
keir@18113 1139 +rawread (int drive, unsigned int sector, int byte_offset, int byte_len, char *buf)
keir@18113 1140 {
keir@18113 1141 int slen, sectors_per_vtrack;
keir@18113 1142 int sector_size_bits = log2 (buf_geom.sector_size);
keir@18113 1143 @@ -261,7 +261,7 @@ rawread (int drive, int sector, int byte
keir@18113 1144 */
keir@18113 1145 if (disk_read_func)
keir@18113 1146 {
keir@18113 1147 - int sector_num = sector;
keir@18113 1148 + unsigned int sector_num = sector;
keir@18113 1149 int length = buf_geom.sector_size - byte_offset;
keir@18113 1150 if (length > size)
keir@18113 1151 length = size;
keir@18113 1152 @@ -291,7 +291,7 @@ rawread (int drive, int sector, int byte
keir@18113 1153
keir@18113 1154
keir@18113 1155 int
keir@18113 1156 -devread (int sector, int byte_offset, int byte_len, char *buf)
keir@18113 1157 +devread (unsigned int sector, int byte_offset, int byte_len, char *buf)
keir@18113 1158 {
keir@18113 1159 /*
keir@18113 1160 * Check partition boundaries
keir@18113 1161 @@ -330,7 +330,7 @@ devread (int sector, int byte_offset, in
keir@18113 1162
keir@18113 1163 #ifndef STAGE1_5
keir@18113 1164 int
keir@18113 1165 -rawwrite (int drive, int sector, char *buf)
keir@18113 1166 +rawwrite (int drive, unsigned int sector, char *buf)
keir@18113 1167 {
keir@18113 1168 if (sector == 0)
keir@18113 1169 {
keir@18113 1170 @@ -363,7 +363,7 @@ rawwrite (int drive, int sector, char *b
keir@18113 1171 }
keir@18113 1172
keir@18113 1173 int
keir@18113 1174 -devwrite (int sector, int sector_count, char *buf)
keir@18113 1175 +devwrite (unsigned int sector, int sector_count, char *buf)
keir@18113 1176 {
keir@18113 1177 #if defined(GRUB_UTIL) && defined(__linux__)
keir@18113 1178 if (current_partition != 0xFFFFFF
keir@18113 1179 diff -uprN grub-0.97/stage2/fsys_ffs.c grub/stage2/fsys_ffs.c
keir@18113 1180 --- grub-0.97/stage2/fsys_ffs.c 2003-07-09 12:45:52.000000000 +0100
keir@18113 1181 +++ grub/stage2/fsys_ffs.c 2001-11-12 06:57:29.000000000 +0000
keir@18113 1182 @@ -50,7 +50,7 @@
keir@18113 1183 * the rights to redistribute these changes.
keir@18113 1184 *
keir@18113 1185 * from: Mach, Revision 2.2 92/04/04 11:35:49 rpd
keir@18113 1186 - * $Id: fsys_ffs.c,v 1.10 2001/11/12 06:57:29 okuji Exp $
keir@18113 1187 + * $Id: fsys_ffs.c 594 2001-11-12 06:57:29Z okuji $
keir@18113 1188 */
keir@18113 1189
keir@18113 1190 #ifdef FSYS_FFS
keir@18113 1191 diff -uprN grub-0.97/stage2/fsys_ufs2.c grub/stage2/fsys_ufs2.c
keir@18113 1192 --- grub-0.97/stage2/fsys_ufs2.c 2004-06-19 13:17:52.000000000 +0100
keir@18113 1193 +++ grub/stage2/fsys_ufs2.c 2004-06-19 13:17:52.000000000 +0100
keir@18113 1194 @@ -51,7 +51,7 @@
keir@18113 1195 * the rights to redistribute these changes.
keir@18113 1196 *
keir@18113 1197 * from: Mach, Revision 2.2 92/04/04 11:35:49 rpd
keir@18113 1198 - * $Id: fsys_ufs2.c,v 1.2 2004/06/19 12:17:52 okuji Exp $
keir@18113 1199 + * $Id: fsys_ufs2.c 841 2004-06-19 12:17:52Z okuji $
keir@18113 1200 */
keir@18113 1201
keir@18113 1202 #ifdef FSYS_UFS2
keir@18113 1203 diff -uprN grub-0.97/stage2/imgact_aout.h grub/stage2/imgact_aout.h
keir@18113 1204 --- grub-0.97/stage2/imgact_aout.h 2003-07-09 12:45:53.000000000 +0100
keir@18113 1205 +++ grub/stage2/imgact_aout.h 1999-06-24 01:03:29.000000000 +0100
keir@18113 1206 @@ -32,7 +32,7 @@
keir@18113 1207 * SUCH DAMAGE.
keir@18113 1208 *
keir@18113 1209 * from: @(#)exec.h 8.1 (Berkeley) 6/11/93
keir@18113 1210 - * $Id: imgact_aout.h,v 1.1 1999/06/24 00:03:22 okuji Exp $
keir@18113 1211 + * $Id: imgact_aout.h 98 1999-06-24 00:03:29Z okuji $
keir@18113 1212 */
keir@18113 1213 /*
keir@18113 1214 * 11/23/95 - Kludge to get "ntohl" null macro added. -- ESB
keir@18113 1215 diff -uprN grub-0.97/stage2/iso9660.h grub/stage2/iso9660.h
keir@18113 1216 --- grub-0.97/stage2/iso9660.h 2004-03-27 16:02:38.000000000 +0000
keir@18113 1217 +++ grub/stage2/iso9660.h 2007-02-22 23:40:25.000000000 +0000
keir@18113 1218 @@ -73,11 +73,11 @@ typedef union {
keir@18113 1219
keir@18113 1220 typedef struct __iso_16bit {
keir@18113 1221 u_int16_t l, b;
keir@18113 1222 -} iso_16bit_t __attribute__ ((packed));
keir@18113 1223 +} iso_16bit_t;
keir@18113 1224
keir@18113 1225 typedef struct __iso_32bit {
keir@18113 1226 u_int32_t l, b;
keir@18113 1227 -} iso_32bit_t __attribute__ ((packed));
keir@18113 1228 +} iso_32bit_t;
keir@18113 1229
keir@18113 1230 typedef u_int8_t iso_date_t[7];
keir@18113 1231
keir@18113 1232 diff -uprN grub-0.97/stage2/shared.h grub/stage2/shared.h
keir@18113 1233 --- grub-0.97/stage2/shared.h 2004-06-19 17:40:09.000000000 +0100
keir@18113 1234 +++ grub/stage2/shared.h 2008-03-28 13:22:28.000000000 +0000
keir@18113 1235 @@ -499,7 +499,11 @@ struct vbe_mode
keir@18113 1236 unsigned char linear_reserved_field_position;
keir@18113 1237 unsigned long max_pixel_clock;
keir@18113 1238
keir@18113 1239 - unsigned char reserved3[189];
keir@18113 1240 + /* Reserved field to make structure to be 256 bytes long, VESA BIOS
keir@18113 1241 + Extension 3.0 Specification says to reserve 189 bytes here but
keir@18113 1242 + that doesn't make structure to be 256 bytes. So additional one is
keir@18113 1243 + added here. */
keir@18113 1244 + unsigned char reserved3[189 + 1];
keir@18113 1245 } __attribute__ ((packed));
keir@18113 1246
keir@18113 1247
keir@18113 1248 @@ -807,7 +811,7 @@ int checkkey (void);
keir@18113 1249 /* Low-level disk I/O */
keir@18113 1250 int get_diskinfo (int drive, struct geometry *geometry);
keir@18113 1251 int biosdisk (int subfunc, int drive, struct geometry *geometry,
keir@18113 1252 - int sector, int nsec, int segment);
keir@18113 1253 + unsigned int sector, int nsec, int segment);
keir@18113 1254 void stop_floppy (void);
keir@18113 1255
keir@18113 1256 /* Command-line interface functions. */
keir@18113 1257 @@ -920,10 +924,10 @@ int gunzip_test_header (void);
keir@18113 1258 int gunzip_read (char *buf, int len);
keir@18113 1259 #endif /* NO_DECOMPRESSION */
keir@18113 1260
keir@18113 1261 -int rawread (int drive, int sector, int byte_offset, int byte_len, char *buf);
keir@18113 1262 -int devread (int sector, int byte_offset, int byte_len, char *buf);
keir@18113 1263 -int rawwrite (int drive, int sector, char *buf);
keir@18113 1264 -int devwrite (int sector, int sector_len, char *buf);
keir@18113 1265 +int rawread (int drive, unsigned int sector, int byte_offset, int byte_len, char *buf);
keir@18113 1266 +int devread (unsigned int sector, int byte_offset, int byte_len, char *buf);
keir@18113 1267 +int rawwrite (int drive, unsigned int sector, char *buf);
keir@18113 1268 +int devwrite (unsigned int sector, int sector_len, char *buf);
keir@18113 1269
keir@18113 1270 /* Parse a device string and initialize the global parameters. */
keir@18113 1271 char *set_device (char *device);
keir@18113 1272 diff -uprN grub-0.97/stage2/stage2.c grub/stage2/stage2.c
keir@18113 1273 --- grub-0.97/stage2/stage2.c 2005-03-19 17:51:57.000000000 +0000
keir@18113 1274 +++ grub/stage2/stage2.c 2006-05-05 23:06:31.000000000 +0100
keir@18113 1275 @@ -651,7 +651,10 @@ restart:
keir@18113 1276 *(new_heap++) = 0;
keir@18113 1277
keir@18113 1278 if (config_entries)
keir@18113 1279 - run_menu (heap, NULL, new_num_entries, new_heap, 0);
keir@18113 1280 + {
keir@18113 1281 + current_entryno = first_entry + entryno;
keir@18113 1282 + run_menu (heap, NULL, new_num_entries, new_heap, 0);
keir@18113 1283 + }
keir@18113 1284 else
keir@18113 1285 {
keir@18113 1286 cls ();
keir@18113 1287 @@ -727,7 +730,8 @@ restart:
keir@18113 1288 cur_entry = get_entry (config_entries, first_entry + entryno, 1);
keir@18113 1289
keir@18113 1290 /* Set CURRENT_ENTRYNO for the command "savedefault". */
keir@18113 1291 - current_entryno = first_entry + entryno;
keir@18113 1292 + if (config_entries)
keir@18113 1293 + current_entryno = first_entry + entryno;
keir@18113 1294
keir@18113 1295 if (run_script (cur_entry, heap))
keir@18113 1296 {
keir@18113 1297 diff -uprN grub-0.97/stage2/tparm.c grub/stage2/tparm.c
keir@18113 1298 --- grub-0.97/stage2/tparm.c 2003-07-09 12:45:53.000000000 +0100
keir@18113 1299 +++ grub/stage2/tparm.c 2002-11-29 20:39:24.000000000 +0000
keir@18113 1300 @@ -63,7 +63,7 @@ typedef char grub_bool;
keir@18113 1301 #define MAX_FORMAT_LEN 256
keir@18113 1302 #define max(a,b) ((a) > (b) ? (a) : (b))
keir@18113 1303
keir@18113 1304 -//MODULE_ID("$Id: tparm.c,v 1.1 2002/11/29 20:39:24 okuji Exp $")
keir@18113 1305 +//MODULE_ID("$Id: tparm.c 708 2002-11-29 20:39:24Z okuji $")
keir@18113 1306
keir@18113 1307 /*
keir@18113 1308 * char *
keir@18113 1309 diff -uprN grub-0.97/stamp-h.in grub/stamp-h.in
keir@18113 1310 --- grub-0.97/stamp-h.in 1970-01-01 01:00:00.000000000 +0100
keir@18113 1311 +++ grub/stamp-h.in 1999-09-13 14:32:31.000000000 +0100
keir@18113 1312 @@ -0,0 +1 @@
keir@18113 1313 +timestamp
keir@18113 1314 diff -uprN grub-0.97/THANKS grub/THANKS
keir@18113 1315 --- grub-0.97/THANKS 2005-05-08 03:17:43.000000000 +0100
keir@18113 1316 +++ grub/THANKS 2006-03-21 20:51:58.000000000 +0000
keir@18113 1317 @@ -121,3 +121,4 @@ Vesa Jaaskelainen <jaaskela@tietomyrsky.
keir@18113 1318 Yedidyah Bar-David <didi@post.tau.ac.il>
keir@18113 1319 Yury V. Umanets <umka@namesys.com>
keir@18113 1320 Yuri Zaporogets <yuriz@ukr.net>
keir@18113 1321 +Vitaly Fertman <vitaly@namesys.com>
keir@18113 1322 diff -uprN grub-0.97/util/grub-install.in grub/util/grub-install.in
keir@18113 1323 --- grub-0.97/util/grub-install.in 2004-07-24 19:57:31.000000000 +0100
keir@18113 1324 +++ grub/util/grub-install.in 2006-04-20 14:46:46.000000000 +0100
keir@18113 1325 @@ -112,8 +112,8 @@ convert () {
keir@18113 1326 tmp_disk=`echo "$1" | sed 's%\([sh]d[0-9]*\).*%\1%'`
keir@18113 1327 tmp_part=`echo "$1" | sed "s%$tmp_disk%%"` ;;
keir@18113 1328 freebsd* | kfreebsd*-gnu)
keir@18113 1329 - tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([saw]d[0-9]*\).*$%r\1%' \
keir@18113 1330 - | sed 's%r\{0,1\}\(da[0-9]*\).*$%r\1%'`
keir@18113 1331 + tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([saw]d[0-9]*\).*$%\1%' \
keir@18113 1332 + | sed 's%r\{0,1\}\(da[0-9]*\).*$%\1%'`
keir@18113 1333 tmp_part=`echo "$1" \
keir@18113 1334 | sed "s%.*/r\{0,1\}[saw]d[0-9]\(s[0-9]*[a-h]\)%\1%" \
keir@18113 1335 | sed "s%.*/r\{0,1\}da[0-9]\(s[0-9]*[a-h]\)%\1%"`
keir@18113 1336 diff -uprN grub-0.97/util/mkbimage grub/util/mkbimage
keir@18113 1337 --- grub-0.97/util/mkbimage 2004-07-24 19:57:31.000000000 +0100
keir@18113 1338 +++ grub/util/mkbimage 2007-02-22 16:01:03.000000000 +0000
keir@18113 1339 @@ -1,7 +1,7 @@
keir@18113 1340 #!/bin/sh
keir@18113 1341 # MaKe a Bootable IMAGE --- 1.44, 2.88 and El Torito no-emulation mode
keir@18113 1342 # C) 2001,2002,2003 Thierry Laronde <tlaronde@polynum.org>
keir@18113 1343 -# C) 2001,2002,2003 Robert Millan <robertmh@gnu.org>
keir@18113 1344 +# C) 2001,2002,2003 Robert Millan <rmh@aybabtu.com>
keir@18113 1345
keir@18113 1346
keir@18113 1347 # This program is free software; you can redistribute it and/or modify
keir@18113 1348 @@ -19,7 +19,7 @@
keir@18113 1349 # program's maintainer or write to: The Free Software Foundation,
keir@18113 1350 # Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
keir@18113 1351
keir@18113 1352 -# $Id: mkbimage,v 1.19 2004/07/21 14:43:04 robertmh Exp $
keir@18113 1353 +# $Id: mkbimage 1233 2007-02-22 16:01:03Z robertmh $
keir@18113 1354
keir@18113 1355 # Global variables
keir@18113 1356 tarfile=
keir@18113 1357 @@ -58,7 +58,7 @@ stage2_os_name=
keir@18113 1358
keir@18113 1359 # Name by which this script was invoked.
keir@18113 1360 program=`echo "$0" | sed -e 's/[^\/]*\///g'`
keir@18113 1361 -version_number='$Revision: 1.19 $'
keir@18113 1362 +version_number='$Revision: 1233 $'
keir@18113 1363
keir@18113 1364 usage="
keir@18113 1365 Usage: $program [-hVF] [-t TYPE] [-d DIRECTORY] [-s FS_TYPE] -f TAR_FILE
keir@18113 1366 @@ -94,15 +94,13 @@ Options:
keir@18113 1367 display Version information and exit
keir@18113 1368
keir@18113 1369 Copyright (c) 2001,2002,2003 Thierry Laronde <tlaronde@polynum.org>.
keir@18113 1370 -Copyright (c) 2001,2002 Robert Millan <zeratul2@wanadoo.es>.
keir@18113 1371 GPLed."
keir@18113 1372
keir@18113 1373 version="mkbimage $version_number
keir@18113 1374
keir@18113 1375 -Written by Thierry Laronde and Robert Millan.
keir@18113 1376 +Written by Thierry Laronde.
keir@18113 1377
keir@18113 1378 Copyright (c) 2001,2002,2003 Thierry Laronde <tlaronde@polynum.org>.
keir@18113 1379 -Copyright (c) 2001,2002,2003 Robert Millan <zeratul2@wanadoo.es>.
keir@18113 1380
keir@18113 1381 This is free software under the GPL version 2 or later; see the source for
keir@18113 1382 copying conditions. There is NO warranty, not even for MERCHANTABILITY or