]> git.ozlabs.org Git - yaboot.git/commitdiff
Commit yaboot 1.3.6-pre1
authorEthan Benson <erbenson@alaska.net>
Wed, 27 Mar 2002 13:37:21 +0000 (13:37 +0000)
committerEthan Benson <erbenson@alaska.net>
Wed, 27 Mar 2002 13:37:21 +0000 (13:37 +0000)
Commit yaboot 1.3.6-pre1.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-13

20 files changed:
ChangeLog
Makefile
README
THANKS
TODO
changelog
doc/README.rs6000
doc/examples/simpleboot.chrp
doc/examples/yaboot.conf.multi-boot
doc/examples/yaboot.conf.rs6000 [new file with mode: 0644]
doc/examples/yaboot.conf.rs6k [deleted file]
etc/yaboot.conf
man.patch
man/mkofboot.8
man/yaboot.8
man/ybin.8
second/file.c
second/yaboot.c
ybin/yabootconfig
ybin/ybin

index 7ab6753ce8b502d179de8bcb011f60f679b1c354..ca2a3a70f7a3f80012d22bee3bab1f1793c12029 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,31 @@
 # tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3
 #
 
 # tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3
 #
 
+2002-03-27 13:37:21 GMT        Ethan Benson <erbenson@alaska.net>      patch-13
+
+    Summary:
+      Commit yaboot 1.3.6-pre1
+    Revision:
+      yaboot--devel--1.3--patch-13
+
+    Commit yaboot 1.3.6-pre1.
+
+    modified files:
+     ChangeLog Makefile README THANKS TODO changelog
+     doc/README.rs6000 doc/examples/simpleboot.chrp
+     doc/examples/yaboot.conf.multi-boot
+     doc/examples/yaboot.conf.rs6000 etc/yaboot.conf man.patch
+     man/mkofboot.8 man/yaboot.8 man/ybin.8 second/file.c
+     second/yaboot.c ybin/yabootconfig ybin/ybin
+
+    renamed files:
+     doc/examples/.arch-ids/yaboot.conf.rs6k.id
+       ==> doc/examples/.arch-ids/yaboot.conf.rs6000.id
+     doc/examples/yaboot.conf.rs6k
+       ==> doc/examples/yaboot.conf.rs6000
+
+
+
 2002-03-27 13:30:47 GMT        Ethan Benson <erbenson@alaska.net>      patch-12
 
     Summary:
 2002-03-27 13:30:47 GMT        Ethan Benson <erbenson@alaska.net>      patch-12
 
     Summary:
index 6681ac46beee3cfd0de8f79b2301659ba16adf64..ac1f0b12080c9e56702bed4558b7731c122d1ac0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 
 include Config
 
 
 include Config
 
-VERSION = 1.3.5
+VERSION = 1.3.6pre1
 # Debug mode (spam/verbose)
 DEBUG = 0
 # make install vars
 # Debug mode (spam/verbose)
 DEBUG = 0
 # make install vars
diff --git a/README b/README
index 01bcd36138a3331bb2da627735d017b051ad9fff..51ab6edd5a2eccecd9db88fa5e8d6cd568e2b56b 100644 (file)
--- a/README
+++ b/README
 Yaboot  -- PowerPC GNU/Linux OpenFirmware bootloader
 Yaboot  -- PowerPC GNU/Linux OpenFirmware bootloader
---------------------------------------------
+-------------------------------------------------------------------
 
 Please read the "COPYING" file for licence informations.
 
 
 Please read the "COPYING" file for licence informations.
 
-   Copyright (C) 2000 Benjamin Herrenschmidt
-
-   portions based on "poof"
-
-   Copyright (C) 1999 Marius Vollmer
-
-   portions based on "quik"
-   
-   Copyright (C) 1996 Paul Mackerras.
-
-   PPC64 support & Misc fixes by Peter Bergner, David Engebretsen
-   
-
---------------------------------------------
+-------------------------------------------------------------------
 
 Yaboot is an OpenFirmware bootloader for Open Firmware based
 
 Yaboot is an OpenFirmware bootloader for Open Firmware based
-machines. It is known to work on "NewWorld" class powermacs
-(iMac and all machines released after it), RS/6000, and possibly
-other OF based CHRP machines.
-"OldWorld" PowerMacs (with the old MacOS ROM buit-in) are not
-supported.
-
-ybin Written by Ethan Benson <erbenson@alaska.net>
-
-ybin (YaBoot INstaller) was created so that there could be a lilo/quik
-style bootloader installer for PowerPC based machines which require
-bootstrap partitions rather then a traditional bootblock (ie all
-`NewWorld' Macintoshes).  It is designed to install yaboot, an
-OpenFirmware bootloader for GNU/Linux written by Benjamin
-Herrenschmidt.  When ybin is configured correctly you can simply type
-ybin, and the bootloader and its configuration file will be
-installed/updated on the bootstrap partition without any further user
-intervention.
-
-ybin also supports IBM PowerPC hardware which requires a slightly
-different bootstrap partition setup, yaboot is directly dded to the
-partition instead of copied to a filesystem on the partition.  For
-these machines add fstype=raw to your /etc/yaboot.conf.  See
-examples/yaboot.conf.rs6k for an example configuration.
-
-Both ybin and mkofboot are shell scripts (compatible with ash, sh,
-bash).  These are the first real scripts that I have written with any
-sort of complexity, so don't be too brutal if they are ugly and
-inefficient. ;-) Suggestions on how to do things better are welcome.
-
-ybin can update a bootstrap filesystem either on a block device or a
-ordinary file (as in a image of a filesystem.) 
-
-Unless you use the usemount (or --mount) option it does not
-necessarily need to be run as root, but it probably will, unless you
-changed device permissions or are only updating an image.
-
-mkofboot is a companion script (actually a symlink to ybin) to
-initialise the bootstrap partition and then run ybin to install the
-bootloader on it.  It uses the same configuration file as ybin to find
-the device to use. It will validate the configuration file before
-actually creating the filesystem. It will also confirm you want to
-continue before proceeding unless called with the -f or --force
-switch.
-
-(>= 0.18): ofpath utility now included which can usually find the
-OpenFirmware device path that corresponds with a unix device node in
-/dev/.  Ybin will use this utility automatically to find the path to
-the bootstrap partition and to any defined macos/macosx partitions.
-NOTE: ofpath may not work with all SCSI cards/drivers. 
-IMPORTANT: ofpath will NOT work if you boot your machine with BootX.
-
-ofpath is based on the utility `show_of_path.sh' written by Olaf
-Hering. 
-
-(>= 0.20): ybin will now check for the new nvsetenv that is
-compatible with Newworld PowerMacs, and if found it will automatically
-update the boot-device variable in nvram to that of the bootstrap
-partition.  This feature can be disabled by passing the --nonvram
-switch to ybin or by adding `nonvram' to /etc/yaboot.conf.  This
-feature works in both the userland and `usemount' modes.  In userland
-mode ybin sets the boot-device variable to <path>,\\:tbxi, for example
-if your bootstrap partition is /dev/hda2 boot-device will be set to
-hd:2,\\:tbxi, in `usemount' mode it would be set to hd:2,ofboot (or
-hd:2,yaboot if you don't have magicboot= set.)
-
-NEW (>= 0.31): The ofboot script now has configurable colors, you can
-change the foreground (text) and background colors it will use with
-the fgcolor= and bgcolor= options in yaboot.conf, see below for
-details.  Yaboot 1.0 and later also supports these options. 
+machines. It is known to work on "NewWorld" class powermacs (iMac and
+all machines released after it), RS/6000, and possibly other OF based
+CHRP machines. "OldWorld" PowerMacs (with the built-in MacOS ROM)
+are not supported.
+
+This README serves as a quick-start introduction to yaboot and its
+installation utilities. For a more complete usage and installation
+guide, see yaboot-howto.html/index.en.html in the same folder where
+this README is located, or else inside the doc folder in this
+directory. For documentation about all the options available, see the
+man pages (bootstrap, yaboot, yaboot.conf, ybin, mkofboot, ofpath,
+yabootconfig).
+
+
+-------------------------------------------------------------------
+Bootloader Installation Utilities  
+ybin, mkofboot, ofpath, yabootconfig
+Written by Ethan Benson <erbenson@alaska.net>
+-------------------------------------------------------------------
+
+ybin (YaBoot INstaller) and mkofboot
+-------------------------------------------------------------------
+
+ybin is a lilo/quik style bootloader installer for PowerPC based
+machines which require a bootstrap partition rather than a traditional
+bootblock (i.e. all `NewWorld' Macintoshes). When ybin is configured
+correctly you can simply type ybin at the command line as root, and
+the bootloader and its configuration file will be installed or updated
+on the bootstrap partition without any further user intervention.
+
+ybin also supports IBM PowerPC hardware which requires a slightly different
+bootstrap partition setup. For these machines, ybin uses dd to write yaboot
+directly to the partition instead of copying it to a filesystem on the
+partition. ybin will add the requisite .note section to yaboot prior to
+installation (IBM CHRP only).
+
+mkofboot is a companion script (actually a symlink to ybin) which
+initializes the bootstrap partition prior to running ybin to install
+the bootloader on it. mkofboot will confirm you want to continue
+before proceeding unless called with the -f or --force switch. This
+is in contrast to ybin, which is non destructive except that it
+overwrites any existing yaboot files (yaboot and yaboot.conf) at the
+root level of the bootstrap filesystem.
+
+mkofboot and ybin both refer to the same configuration file (normally
+yaboot.conf) to determine where the bootstrap files will be placed. 
 
 IMPORTANT: The bootstrap partition should never be mounted anywhere on
 your filesystem, ybin and mkofboot will check if it is and refuse to
 
 IMPORTANT: The bootstrap partition should never be mounted anywhere on
 your filesystem, ybin and mkofboot will check if it is and refuse to
-operate on it if its mounted.  It is not necessary to keep anything
+operate on it if it is mounted.  It is not necessary to keep anything
 but the boot loader on the bootstrap partition, yaboot will load the
 but the boot loader on the bootstrap partition, yaboot will load the
-kernel from your ext2fs root partition so do not mount the bootstrap
-partition on top of /boot.
-
-ybin now fully supports command line switches, see ybin --help for
-information on these.
-
-NEW: ybin can now generate a basic yaboot.conf on the fly that you may
-customise with command line options:
-
-      --device               yaboot auto configuration: sets the OF boot device
-                               default: hd:
-      --partition            yaboot auto configuration: sets the partition 
-                               number of the root partition. default: 3
-      --timeout              yaboot auto configuration: sets the time yaboot
-                               will wait for user input before booting default
-                               image default: 20 (2 seconds)
-      --image                yaboot auto configuration: sets the path to the 
-                               kernel image. default: /vmlinux
-      --label                yaboot auto configuration: sets the image label
-                               default: Linux
-      --root                 yaboot auto configuration: sets the root device
-                               default: /dev/hda3
-
-This is experimental but appears to work ok. 
-
-A much better method of generating an /etc/yaboot.conf is to run
-yabootconfig however.
+kernel from your root partition (which can be an ext2/3, XFS, or
+ReiserFS filesystem). Do not mount the bootstrap partition on top of
+/boot.
+
+ybin can update a bootstrap filesystem either on a block device or in
+an ordinary file (as in an image of a filesystem.) 
 
 NOTE: You must have a secure mktemp program otherwise ybin will be
 vulnerable to race conditions.  Debian's mktemp qualifies I don't know
 about the other distributions, you have been warned. The temp file is
 created in /tmp by default but ybin will respect the $TMPDIR
 
 NOTE: You must have a secure mktemp program otherwise ybin will be
 vulnerable to race conditions.  Debian's mktemp qualifies I don't know
 about the other distributions, you have been warned. The temp file is
 created in /tmp by default but ybin will respect the $TMPDIR
-environment variable. 
-
-Configuration file documentation:
-
-ybin will verify the configuration file is sane and valid
-before proceeding.
-
-IMPORTANT: The configuration file format as of version 0.12 has
-changed, see below for the current format, note some options have been
-removed. as with version 0.11 ybin allows you to put spaces around the
-= eg: boot = /dev/hda3 (however this prevents spaces from being
-embedded in the options themselves) As of version 0.12 the separate
-ybin.conf file is deprecated, instead ybin's options should be placed
-in /etc/yaboot.conf, you must have yaboot 0.6 or later for this to
-work.  Ybin will no longer use the obsolete /etc/ybin.conf.
-
-The kludge, and kludgedir options have been removed. The bootconf
-option has been deprecated since yaboot and ybin both use
-/etc/yaboot.conf (or whatever config file is specified to the -C
-switch).
-
-boot= (same as -b or --boot)
-
-This option defines what device the bootstrap partition is.  It also
-be a regular file if you are creating a filesystem image for some
-reason. It is safe to specify a MacOS boot partition as long as you DO
-NOT use mkofboot.  ybin is non destructive except that is overwrites
-any existing yaboot files (yaboot and yaboot.conf) at the root level
-of the bootstrap filesystem. The default config file has this set to
-"unconfigured which will cause ybin to complain about you not reading
-the docs, it is the only option you should need to change for ybin to
-work. Example boot=/dev/hda2
-
-ofboot= (same as -o or --ofboot) 
-
-This option defines the OpenFirmware device path to the bootstrap
-partition.  This is needed so the first stage ofboot loader can be
-configured properly.  It should include the OpenFirmware path
-including the partition number (but not a filename). Example: if your
-bootstrap partition is /dev/hda2 the OF path will likely be hd:2.
-As of ybin 0.18 you no longer are required to specify this option, if
-left undefined ybin will attempt to figure out the OpenFirmware path
-automatically using the ofpath utility.  You should only need to
-define this option if ofpath fails.
-
-install= (same as -i or --install)
-
-The full pathname to the yaboot OpenFirmware executable file.  This
-file will be copied to the root level of the bootstrap partition, its
-filename will not be changed. The default is
-/usr/local/lib/yaboot/yaboot, or if that does not exist
-/usr/lib/yaboot/yaboot.
+environment variable.
 
 
-magicboot= (same as -m or --magicboot)
 
 
-The full pathname to any OF CHRP script file. If this is defined then
-it will be given the HFS filetype defined below and the bootfile will
-be given type "boot" instead, if we set two files to `tbxi' we may get
-unpredictable results from OF.  A wrapper file would generally only be
-needed if you have a OF script that creates a nice boot menu or
-possibly adds a option to the newer ibook boot screens. IMPORTANT: it
-appears that OF will only load `tbxi' files if they have a CHRP script
-embedded, so this option is now on by default and will install the
-included basic script that just loads the yaboot executable. (at least
-until/if yaboot gets a embedded script) If you later change your mind
-about using an OF wrapper you will have to delete it manually from the
-bootstrap partition, ybin will not and cannot do it for you. If the
-partition is a dedicated bootstrap partition you can run mkofboot to
-remove it (and anything else).  This should be set to
-/usr/local/lib/yaboot/ofboot which is the new first stage loader
-configured automatically by ybin from options in /etc/yaboot.conf.
-
-bsd= 
-
-The OpenFirmware or unix device path to a NetBSD or OpenBSD bootstrap
-partition, this partition must already have the BSD ofwboot.elf
-bootloader installed in the root directory.  When you define this
-option you will be presented with a simple menu at bootup allowing you
-to hit L to boot GNU/Linux or B to boot BSD (along with other choices
-if configured).  This will only work if you are using the new
-/usr/local/lib/yaboot/ofboot script.  When this is set to a unix
-device node (ie /dev/hda11) then ybin will use the ofpath utility to
-determine the OpenFirmware device path.
-
-macos= 
-
-The OpenFirmware or unix device path to a MacOS 8.* or 9.* boot
-partition.  When you define this option you will be presented with a
-simple menu at bootup allowing you to hit L to boot GNU/Linux or M to
-boot MacOS (along with other choices if configured).  This will only
-work if you are using the new /usr/local/lib/yaboot/ofboot script.
-When this is set to a unix device node (ie /dev/hda11) then ybin will
-use the ofpath utility to determine the OpenFirmware device path.
-
-macosx= 
-
-The OpenFirmware or unix device path to a MacOS X boot partition.
-When you define this option you will be presented with a simple menu
-at bootup allowing you to hit L to boot GNU/Linux or X to boot MacOSX
-(along with other choices if configured).  This will only work if you
-are using the new /usr/local/lib/yaboot/ofboot script.  
-When this is set to a unix device node (ie /dev/hda11) then ybin will
-use the ofpath utility to determine the OpenFirmware device path.
+ofpath
+-------------------------------------------------------------------
 
 
-brokenosx
+The included ofpath utility can usually determine the OpenFirmware
+device path that corresponds with a unix device node in /dev/.  Ybin
+uses this utility to find the path to the bootstrap partition and to
+any defined macos/macosx partitions. ofpath is based on the utility
+`show_of_path.sh' written by Olaf Hering.
 
 
-This option causes the menu entry for MacOSX to execute
-\System\Library\CoreServices\BootX from the macosx=device instead of
-the usual \\:tbxi.  This is necessary if OSX is installed onto an HFS+
-filesystem instead of UFS. When OSX is installed on an HFS+ filesystem
-MacOS will mount and debless the OSX partition.  Add this option if
-the OSX menu entry breaks after booting MacOS.  You should not use
-this option if OSX is installed on a UFS filesystem, for UFS installs
-you specify the OSX bootstrap partition which is protected against
-MacOS.
 
 
-darwin=
+NOTE: ofpath may not work with all SCSI cards/drivers.
+
+IMPORTANT: ofpath will NOT work on NewWorld Powermacs if the machine
+was booted with BootX.
+
+
+yabootconfig
+-------------------------------------------------------------------
+
+Yabootconfig creates a default configuration file and then runs mkofboot to
+complete the bootloader installation. yabootconfig reads the running
+system's /etc/fstab to determine the kernel location, and detects the
+location of the 800k Apple_Bootstrap partition. It will also find IBM
+CHRP bootstrap partitions (type 0x41 PReP Boot).
+
+
+
+Yaboot.conf Configuration File
+-------------------------------------------------------------------
+
+yaboot.conf configuration file settings are covered in detail in `man
+yaboot.conf'. Avoid the use of spaces in the config file, except in
+comment lines or inside quotes. Here are the essential settings.
+
+
+boot=
+Example:   boot=/dev/hda2
+
+This required setting defines the bootstrap partition device.  It can
+also be a regular file if you are creating a filesystem image for some
+reason. The default config file has this set to ``unconfigured'' which
+will cause ybin to complain about you not reading the docs, it is the
+only option you should need to change for ybin to work. Be sure you
+include the partition number at the end, it should never be something
+like /dev/hda. 
+
 
 
-The OpenFirmware or unix device path to a Darwin boot partition.  When
-you define this option you will be presented with a simple menu at
-bootup allowing you to hit L to boot GNU/Linux or D to boot Darwin
-(along with other choices if configured).  This will only work if you
-are using the new /usr/local/lib/yaboot/ofboot script.  When this is
-set to a unix device node (ie /dev/hda11) then ybin will use the
+install= 
+Example:  install=/usr/lib/yaboot/yaboot or /usr/local/lib/yaboot/yaboot
+
+The full pathname to the yaboot OpenFirmware executable file. The
+default is shown above. This file will be copied to the root level of
+the bootstrap partition. Note: If you are installing an alternative
+bootloader, its filename will be changed to yaboot when it is copied
+(to match what the first stage bootloader expects to be loading).
+
+
+partition=
+Example:   partition=3
+
+The partition number on which the kernel image is located. By default,
+this partition is assumed to be on the same device from which yaboot
+was loaded. If needed, device= can be used to explicitly specify the 
+device.
+
+
+image=
+Examples:  image=/vmlinux  or  image=/boot/vmlinux-2.2.19-pmac
+
+The path to the image from the root level of the partition (remember
+that yaboot is unaware of mountpoints).  Don't forget to include the
+leading slash when specifying the image path (image=vmlinux will
+probably fail).
+
+
+root=
+Example:   root=/dev/hda3
+
+The Linux device name for the root partition. This parameter is
+passed to the kernel when it starts up to let it know where its root
+filesystem is located. Refer to the yaboot.conf man page for details
+on kernel image options such as append=, initrd=, and initrd-size=.
+
+
+magicboot= (same as -m or --magicboot)
+Example:   /usr/local/lib/yaboot/ofboot 
+
+Identifies the first stage loader. The example shown is the default. The
+ofboot script it refers to is included with and configured automatically by
+ybin from options in /etc/yaboot.conf. The magicboot= can be the full
+pathname to any OF CHRP script file. Since some newer OpenFirmware
+implementations appear to require a CHRP script, the magicboot= setting is
+highly recommended. If you don't include magicboot=, then yaboot itself will
+be the active bootfile.  magicboot= cannot be used on IBM CHRP.
+
+
+Boot Menu Options
+-------------------------------------------------------------------
+
+The following options work only if you have specified the magicboot= option.
+Each option specifies an OpenFirmware or unix device path to another
+operating system's boot partition.  When you define one of these options you
+will be presented with a simple menu at bootup allowing you to hit `l' to
+boot GNU/Linux or another letter to boot the other OS (see below). These
+letters are typed without a shift key (the boot menu is case sensitive).
+When set to a unix device node such as /dev/hda11 then ybin will use the
 ofpath utility to determine the OpenFirmware device path.
 
 ofpath utility to determine the OpenFirmware device path.
 
-enablecdboot
+  Option       Letter  Operating System Type
+  ---------    ------  ---------------------------------------------
+  bsd=           b     NetBSD or OpenBSD root partition (you must 
+                          have the BSD ofwboot bootloader 
+                          installed at /usr/local/lib/yaboot/ofwboot)
+
+  macos=         m     MacOS 8.* or 9.* bootable partition
 
 
-This option adds an entry to the multiboot menu to boot from the CDROM
-drive.
+  macosx=        x     MacOS X boot partition (also see brokenosx)
 
 
-enablenetboot
+  darwin=        d     Darwin boot partition
 
 
-This option adds an entry to the mulitboot menu to boot from the
-network.
+  enablecdboot   c     Boot from the CDROM drive
 
 
-enableofboot
+  enablenetboot  n     Boot from the network
 
 
-This option adds an entry to the multiboot menu to boot into an
-OpenFirmware prompt.
+  enableofboot   o     Display an OpenFirmware prompt
 
 
-defaultos= 
+  defaultos=           The default OS to load (linux, bsd, macos, 
+                          darwin or macosx.
 
 
-The name of the default OS to load.  This can be linux, bsd, macos or
-macosx. This option controls what the first stage ofboot loader will
-boot by default after the delay elapses.  This is only relevant if you
-are using the new /usr/local/lib/yaboot/ofboot script and you have
-defined bsd= and/or macos= and/or macosx= in /etc/yaboot.conf.
+brokenosx
+
+This option causes the menu entry for MacOSX to execute
+\System\Library\CoreServices\BootX from the macosx=device instead of
+the usual \\:tbxi.  This is necessary if OSX is installed onto an HFS+
+filesystem instead of UFS. When OSX is installed on an HFS+ filesystem
+MacOS will mount and debless the OSX partition.  Add this option if
+the OSX menu entry breaks after booting MacOS.  You should not use
+this option if OSX is installed on a UFS filesystem, for UFS installs
+you specify the OSX bootstrap partition which is protected against
+MacOS.
 
 delay= 
 
 delay= 
+Example:  delay=5
 
 The time in seconds that the first stage ofboot loader will wait for
 
 The time in seconds that the first stage ofboot loader will wait for
-you to choose L for GNU/Linux,M for MacOS, or X for MacOSX before
-booting the default OS defined in defaultos=.  If not set the value of
-timeout= (converted to seconds) will be used.
-
-usemount (same as -M or --mount)
-
-Whether or not to use the standard mount and umount utilities (and
-thus kernel space filesystem drivers instead of userspace utilities
-that manipulate the partition directly (through the device file). If
-this option is present ybin will insist that you be root. Note that
-using this option will prevent ybin from setting HFS attributes on the
-boot files (such as type and creator).  This option is here mainly to
-allow ybin's use even if you do not have hfsutils. Default: no
-IMPORTANT: It is not possible to bless the filesystem when mounted
-this way, you will thus have to manually configure OF to make your
-system bootable.
-
-mntpoint= 
-
-Requires `usemount' this works exactly like usemount does except it
-does not mount the bootstrap partition but rather installs the
-bootloader into the directory defined as the mountpoint.  The pathname
-MUST be clean, ie no embedded spaces or metacharacters.  The directory
-may not be more then one subdirectory deep from the root of the
-partition (not necessarily the unix /).  You must not have a trailing
-/ either.  This option is NOT recommended since it has the same
-limitations as usemount, your system will not be bootable by
-OpenFirmware, it will only be manually bootable or bootable if you
-change the boot-device variable to the direct pathname to the
-bootloader (which ybin will attempt to do). 
-
-fstype= (same as --filesystem)
-
-This defines what kind of filesystem exists (or created by mkofboot)
-on the bootstrap partition.  Possible options are hfs and msdos (if
-anyone can figure out how to get OF to execute a file on a ISO
-filesystem I will add that too) Note that if you use msdos filesystem
-you must have a DOS style partition table and not a Apple partition
-map. (it also requires that usemount be yes) yaboot may not yet
-support this configuration.  The "raw" type causes ybin or mkofboot to
-copy the bootloader (value of install=) to the bootstrap without any
-filesystem. CAUTION: this will destroy any data or filesystem on the
-bootstrap partition (value of boot=) if you specify something like
-boot=/dev/sda you will destroy the partition table and lose ALL data
-on the disk.  Default: hfs
-
-hfstype=
-
-This defines the 4 character code that should be given to the bootfile
-(the bootconf file will always be given type "conf") The main purpose
-of this is to make OF think its loading a MacOSROM image file and boot
-the system into GNU/Linux from the bootstrap partition as
-automatically as it would MacOS.  In order for this to work you should
-set this to `tbxi' (the default in the included config file). If you
-have specified a OF wrapper (see above) then it will be given this
-filetype and the bootfile will be given type "boot" instead.  NOTE:
-This appears to not work unless the bootfile has a CHRP boot script
-embedded in the header, at the moment yaboot lacks this script, see
-README.ofboot for more details. Default: tbxi
-
-hfscreator=
-
-This defines the 4 character creator code that should be given to both
-the bootfile and the bootconf files. This is largely pointless but if
-you use MacOS you could configure it so you have a pretty icon on the
-bootloader files. Default: UNIX
-
-nobless (same as --nobless)
-
-This prevents ybin from "blessing" the root directory of the bootstrap
-partition.  This is Macspeak for "bootable directory" on the MacOS the
-System Folder is "blessed".  Blessing the root directory will allow OF
-to find the bootstrap partition and load the bootloader automatically
-without reconfiguration (assuming the bootstrap partition is on the
-default disk (internal IDE in most cases). You should probably only
-set this if you are keeping the bootloader on a MacOS boot partition.
-
-protect (same as --protect)
-
-This defines whether the read-only bit should be set on the boot
-files, this is mostly pointless but slightly discourages
-tampering/deleting of the bootloader files if the bootstrap partition
-is mounted by MacOS.  (hide below really would do a better job of
-that) This option will work with both msdos and hfs filesystems.  It
-also works whether you have the usemount option set or not. 
-
-hide (same as --hide)
-
-This defines whether or not the HFS invisible bit should be set on the
-boot files. This is a stronger way to make sure nobody fscks up your
-bootloader on the MacOS side of things.  (A better option is a
-dedicated bootstrap partition with its partition type set to
-Apple_Bootstrap which is acceptable to OF but MacOS will refuse to mount
-it.) This option is ignored for msdos filesystems and will only work
-if usemount is not set.
-
-nonvram (same as --nonvram)
-
-This option prevents ybin from using nvsetenv to set the OpenFirmware
-boot-device variable in nvram.  This is currently required for IBM
-machines.  NOTE: you should not use this option when dual booting
-MacOS, it will cause the MacOS boot menu entries to fail on some
-machines.
+you to choose a letter before booting the default OS defined in
+defaultos=.  If not set, the value of timeout= (converted to seconds)
+will be used.
+
+
+Colors
+-------------------------------------------------------------------
 
 fgcolor=string
 
 
 fgcolor=string
 
-Specifies the foreground (text) color used by yaboot(8) and the
+Specifies the foreground (text) color used by yaboot and the
 multiboot menu.  Available colors are: black, blue, light-blue, green,
 light-green, cyan, light-cyan, red, light-red, purple, light- purple,
 brown, light-gray, dark-gray, yellow, and white.  The default is
 multiboot menu.  Available colors are: black, blue, light-blue, green,
 light-green, cyan, light-cyan, red, light-red, purple, light- purple,
 brown, light-gray, dark-gray, yellow, and white.  The default is
@@ -391,18 +234,14 @@ white.
 
 bgcolor=string
 
 
 bgcolor=string
 
-Specifies the background color used by yaboot(8) and the mulitboot
-menu.  Available colors are: black, blue, light-blue, green,
-light-green, cyan, light-cyan, red, light-red, purple, light-purple,
-brown, light-gray, dark-gray, yellow, and white.  The default is
+Specifies the background color used by yaboot and the multiboot
+menu.  Available colors are the same as fgcolor. The default is
 black.
 
 black.
 
-ybin does not make any validations of the yaboot specific options,
-that is up to you to make sure yaboot is configured correctly.
 
 ===========================================================================
 
 
 ===========================================================================
 
-Copyright (C) 2001 Ethan Benson
+Copyright (C) 2000, 2001 Ethan Benson
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
diff --git a/THANKS b/THANKS
index ee15c5b535ed095de63c1630b894fc1fd45f8f92..1596e19de3e38892ef4604d54427a4dd89288adf 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -8,7 +8,7 @@ In no particular order:
  * iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp> for advice and help [re]writing ofboot's Forth code.
  * Segher Boessenkool <segher@chello.nl> for help with ofboot's Forth code, and the new penguin icon.
  * Tom Rini <trini@kernel.crashing.org> for adding devfs support to ofpath.
  * iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp> for advice and help [re]writing ofboot's Forth code.
  * Segher Boessenkool <segher@chello.nl> for help with ofboot's Forth code, and the new penguin icon.
  * Tom Rini <trini@kernel.crashing.org> for adding devfs support to ofpath.
- * Chris Tillman <tillman@azstarnet.com> for writing the yaboot-howto.
+ * Chris Tillman <tillman@azstarnet.com> for writing the yaboot-howto, documentation improvement.
  * Eric Peden <ericpeden@homemail.com> for writing the yaboot FAQ.
  * Nicholas Humfrey <njh399@ecs.soton.ac.uk> for the badge icons in ofboot.
  * Hollis Blanchard <hollis+@andrew.cmu.edu> YellowDog/RPM packaging.
  * Eric Peden <ericpeden@homemail.com> for writing the yaboot FAQ.
  * Nicholas Humfrey <njh399@ecs.soton.ac.uk> for the badge icons in ofboot.
  * Hollis Blanchard <hollis+@andrew.cmu.edu> YellowDog/RPM packaging.
diff --git a/TODO b/TODO
index 086c9437be235b96a19043f3bfd5098c6301814e..1f609b2cfccb2bc57fba9e88060eeb35fd001596 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,8 @@
+* Interactive shell mode for yaboot, similar to the grub shell.
 
 * Add nvram updating support for IBM hardware.  This requires ofpath
 
 * Add nvram updating support for IBM hardware.  This requires ofpath
-   to support these machines.  It also requires a compatible nvsetenv
-   or equivilent. 
+  to support these machines.  It also requires a compatible nvsetenv
+  or equivilent. 
 
 * Validate yaboot options before proceeding. (need better config parsing)
 
 
 * Validate yaboot options before proceeding. (need better config parsing)
 
@@ -11,6 +12,6 @@
   as simple as it sounds)
 
 * Figure out all the crap with CHRP netbooting, probably have to remove
   as simple as it sounds)
 
 * Figure out all the crap with CHRP netbooting, probably have to remove
-  hard-coding of ":0" after a net devuce path (done as of 1.3.4?)
+  hard-coding of ":0" after a net device path (done as of 1.3.4?)
 
 * Support for compressed images
 
 * Support for compressed images
index 2448b2db83ea580d8189f83c95c2564b8f04de1b..95f14e7a16b0d848d7d40d3a9d0575bda18a7dac 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,24 @@
+2001-11-21  Ethan Benson  <erbenson@alaska.net>
+
+       * Version 1.3.6pre1
+
+       * The "IBM needs to test prereleases" release.
+
+       * New IGNORE^H^H^H^H^H^HREADME, thanks to Chris Tillman for
+         cleaning up the pile of cruft that this thing was.
+
+       * ybin:
+         - Automatically use fstype=raw on IBM CHRP, it no longer needs
+           to be explicitly set in /etc/yaboot.conf.
+         - Deprecate ybin's yaboot.conf auto-generation, use yabootconfig
+           instead.
+
+       * yaboot:
+         - Fix device path parsing to support devices containing a comma,
+           but not including a filename.
+         - Fix IBM CHRP support.
+         - Add support for zImage.initrd (Peter Bergner).
+
 2001-10-28  Ethan Benson  <erbenson@alaska.net>
 
        * Version 1.3.5
 2001-10-28  Ethan Benson  <erbenson@alaska.net>
 
        * Version 1.3.5
index 75c810c0b78b9c189d3deb49c047f3f85dfd3e2e..342b99c03264938cbf137573049abe439d13557e 100644 (file)
@@ -3,8 +3,6 @@ RS/6000 yaboot Notes
 
 A. System Partitioning:
    1. Only FDISK partitioning has been tested on the RS/6000.
 
 A. System Partitioning:
    1. Only FDISK partitioning has been tested on the RS/6000.
-      However, yaboot does support mac partitions on a mac, so they should
-      work on an RS/6000 if you really want to go that route.
    2. Extended FDISK partitions have not been tested and are not expected to
       work at this time.
    3. yaboot must be installed by itself in a bootable partition of type 0x41.
    2. Extended FDISK partitions have not been tested and are not expected to
       work at this time.
    3. yaboot must be installed by itself in a bootable partition of type 0x41.
index af176e8d2486444dedeee17e0f6557f20a6540a5..fa5cfee49e9893f79fa2d74ff73436ffde9a9bf6 100644 (file)
@@ -6,7 +6,8 @@ MacRISC
 GNU/Linux PPC bootloader
 </DESCRIPTION>
 <BOOT-SCRIPT>
 GNU/Linux PPC bootloader
 </DESCRIPTION>
 <BOOT-SCRIPT>
-boot hd:,\\yaboot
+load-base release-load-area
+boot hd:2,\\yaboot
 </BOOT-SCRIPT>
 <OS-BADGE-ICONS>
 1010
 </BOOT-SCRIPT>
 <OS-BADGE-ICONS>
 1010
index 0bbeaeb2c7b6f801322717797d69d7d3731cf44e..b7bebf2f94ea7f3b8597af11e8e2c144b8622605 100644 (file)
@@ -54,7 +54,7 @@ bgcolor=green
 
 ## Password supplied as an md5 hash, see above
 
 
 ## Password supplied as an md5 hash, see above
 
-#password=$1$saltstri$WHZcnT3IOdSrMvizOq7Ht1
+#password=$1$saltstrg$HnJ/gcM3oKhNbnzUPgXTD/
 
 ## A password is only required to boot an image specified here if
 ## parameters are specified on the command line or if the user enters
 
 ## A password is only required to boot an image specified here if
 ## parameters are specified on the command line or if the user enters
@@ -86,9 +86,9 @@ image=/vmlinux.old
 ## The {macos,macosx,darwin} variables can be either a unix /dev node or an
 ## OpenFirmware path, as shown here:
 
 ## The {macos,macosx,darwin} variables can be either a unix /dev node or an
 ## OpenFirmware path, as shown here:
 
-## if you have the bsd bootloader installed on ybin bootstrap
-## partition as ofwboot.elf
-bsd=/dev/sda2
+## BSD root partition with bsd kernel at /bsd.  you must have the BSD
+## bootloader ofwboot installed at /usr/local/lib/yaboot/ofwboot
+bsd=/dev/sda5
 
 ## unix node
 macos=/dev/sda8
 
 ## unix node
 macos=/dev/sda8
diff --git a/doc/examples/yaboot.conf.rs6000 b/doc/examples/yaboot.conf.rs6000
new file mode 100644 (file)
index 0000000..af1b8f5
--- /dev/null
@@ -0,0 +1,67 @@
+## Example yaboot.conf for ybin and yaboot >= 0.6
+## see man yaboot.conf for more details.
+
+## Change `unconfigured' to your bootstrap partition ie: /dev/hda2
+boot=unconfigured
+
+## device is the OpenFirmware device path to the disk containing
+## kernel images.  if your disk is /dev/hda you can find the
+## OpenFirmware path by running the command: ofpath /dev/hda DO NOT
+## specify a partition number for this!  This is generally not
+## necessary for IBM hardware
+
+#device=hd:
+
+## partition is the partition number where the kernel images are
+## located.  The kernel images should be on your root filesystem, so
+## this is usually the same partition number as your root filesystem.
+## so if root = /dev/hda3 (the 3rd partition) then you should have
+## partition=3  This *MUST* be set correct or yaboot won't boot!  This
+## option can be either set globally as shown here, or per image in
+## the image= sections
+
+partition=3
+
+## timeout is the amount of time in tenths of a second that yaboot
+## will wait before booting the default kernel image (the first image=
+## section in this config file or the value of default=).  
+
+timeout=20
+install=/usr/local/lib/yaboot/yaboot
+
+## nonvram is required for IBM hardware currently since ofpath does
+## not support them, it is also probably not necessary.
+
+nonvram
+
+## Password supplied in plaintext, required for yaboot to boot, unless
+## restricted is also present (see below).  Be sure to
+## chmod 600 /etc/yaboot.conf if you set this!
+
+#password=secret
+
+## Password supplied as an md5 hash, see above
+
+#password=$1$saltstrg$HnJ/gcM3oKhNbnzUPgXTD/
+
+## A password is only required to boot an image specified here if
+## parameters are specified on the command line or if the user enters
+## an image is not specified in the configuration file at all (ie.
+## arbitrary file load).  restricted can also be placed in an image
+## section in that case any image not including the restricted keyword
+## will be fully password protected.
+
+#restricted
+
+## image is the kernel itself, commonly kept in / but also commonly
+## found in /boot.  Note that /boot should generally not be its own
+## partition on powerpcs, its not necessary and complicates things.
+## Make sure /boot is on the partition specified by partition= see
+## above.  /boot should never be an HFS filesystem.  You may point
+## image= to a symbolic link so long as the symlink does not cross
+## partition boundries.
+
+image=/vmlinux
+       label=Linux
+       root=/dev/sda3
+       read-only
diff --git a/doc/examples/yaboot.conf.rs6k b/doc/examples/yaboot.conf.rs6k
deleted file mode 100644 (file)
index b9f9a44..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-## Example yaboot.conf for ybin and yaboot >= 0.6
-## see man yaboot.conf for more details.
-
-## Change `unconfigured' to your bootstrap partition ie: /dev/hda2
-boot=unconfigured
-
-## fstype=raw is what makes ybin dd yaboot to the bootstrap partition
-## instead of using a filesystem. 
-
-fstype=raw
-
-## device is the OpenFirmware device path to the disk containing
-## kernel images.  if your disk is /dev/hda you can find the
-## OpenFirmware path by running the command: ofpath /dev/hda DO NOT
-## specify a partition number for this!  This is generally not
-## necessary for IBM hardware
-
-#device=hd:
-
-## partition is the partition number where the kernel images are
-## located.  The kernel images should be on your root filesystem, so
-## this is usually the same partition number as your root filesystem.
-## so if root = /dev/hda3 (the 3rd partition) then you should have
-## partition=3  This *MUST* be set correct or yaboot won't boot!  This
-## option can be either set globally as shown here, or per image in
-## the image= sections
-
-partition=3
-
-## timeout is the amount of time in tenths of a second that yaboot
-## will wait before booting the default kernel image (the first image=
-## section in this config file or the value of default=).  
-
-timeout=20
-install=/usr/local/lib/yaboot/yaboot
-
-## nonvram is required for IBM hardware currently since ofpath does
-## not support them, it is also probably not necessary.
-
-nonvram
-
-## Password supplied in plaintext, required for yaboot to boot, unless
-## restricted is also present (see below).  Be sure to
-## chmod 600 /etc/yaboot.conf if you set this!
-
-#password=secret
-
-## Password supplied as an md5 hash, see above
-
-#password=$1$saltstri$WHZcnT3IOdSrMvizOq7Ht1
-
-## A password is only required to boot an image specified here if
-## parameters are specified on the command line or if the user enters
-## an image is not specified in the configuration file at all (ie.
-## arbitrary file load).  restricted can also be placed in an image
-## section in that case any image not including the restricted keyword
-## will be fully password protected.
-
-#restricted
-
-## image is the kernel itself, commonly kept in / but also commonly
-## found in /boot.  Note that /boot should generally not be its own
-## partition on powerpcs, its not necessary and complicates things.
-## Make sure /boot is on the partition specified by partition= see
-## above.  /boot should never be an HFS filesystem.  You may point
-## image= to a symbolic link so long as the symlink does not cross
-## partition boundries.
-
-image=/vmlinux
-       label=Linux
-       root=/dev/sda3
-       read-only
index 5d19f9478efad77a28220e95a91aba3df2b3acc3..5709b07332c922328becf41f57f6aed1bc731762 100644 (file)
@@ -51,7 +51,7 @@ magicboot=/usr/local/lib/yaboot/ofboot
 
 ## Password supplied as an md5 hash, see above
 
 
 ## Password supplied as an md5 hash, see above
 
-#password=$1$saltstri$WHZcnT3IOdSrMvizOq7Ht1
+#password=$1$saltstrg$HnJ/gcM3oKhNbnzUPgXTD/
 
 ## A password is only required to boot an image specified here if
 ## parameters are specified on the command line or if the user enters
 
 ## A password is only required to boot an image specified here if
 ## parameters are specified on the command line or if the user enters
index 3071ed9f1075744f6a3dd7f4ae9014f9aa7aca20..5e4e6befa14886478ae9fc5ba73d1a4603369eaf 100644 (file)
--- a/man.patch
+++ b/man.patch
@@ -1,7 +1,7 @@
 diff -urN -x CVS man/mkofboot.8 man.deb/mkofboot.8
 diff -urN -x CVS man/mkofboot.8 man.deb/mkofboot.8
---- man/mkofboot.8     Thu May 24 04:32:54 2001
-+++ man.deb/mkofboot.8 Sun Oct 28 00:09:54 2001
-@@ -94,7 +94,7 @@
+--- man/mkofboot.8     Wed Nov 21 04:08:07 2001
++++ man.deb/mkofboot.8 Wed Nov 21 04:09:00 2001
+@@ -88,7 +88,7 @@
  .TP
  .BR \-i ,\  \-\-install\ \fIboot-file
  Use \fIboot-file\fR as the primary boot loader executable, instead of
  .TP
  .BR \-i ,\  \-\-install\ \fIboot-file
  Use \fIboot-file\fR as the primary boot loader executable, instead of
@@ -10,7 +10,7 @@ diff -urN -x CVS man/mkofboot.8 man.deb/mkofboot.8
  .TP
  .BR \-C ,\  \-\-config\ \fIconfig-file
  Use \fIconfig-file\fR as the \fBmkofboot\fR/\fByaboot\fR(8) configuration
  .TP
  .BR \-C ,\  \-\-config\ \fIconfig-file
  Use \fIconfig-file\fR as the \fBmkofboot\fR/\fByaboot\fR(8) configuration
-@@ -200,8 +200,8 @@
+@@ -162,8 +162,8 @@
  Print out the version number and exit.
  .SH FILES
  .nf
  Print out the version number and exit.
  .SH FILES
  .nf
@@ -21,7 +21,7 @@ diff -urN -x CVS man/mkofboot.8 man.deb/mkofboot.8
  /etc/yaboot.conf \- boot loader/mkofboot configuration file
  .fi
  .SH ENVIRONMENT
  /etc/yaboot.conf \- boot loader/mkofboot configuration file
  .fi
  .SH ENVIRONMENT
-@@ -218,7 +218,7 @@
+@@ -179,7 +179,7 @@
  program otherwise \fBmkofboot\fR will be vulnerable to race conditions.
  The Debian mktemp is derived from OpenBSD and thus should be secure.
  
  program otherwise \fBmkofboot\fR will be vulnerable to race conditions.
  The Debian mktemp is derived from OpenBSD and thus should be secure.
  
@@ -32,7 +32,7 @@ diff -urN -x CVS man/mkofboot.8 man.deb/mkofboot.8
  writable by anyone but root since a different \fIofboot\fR script could be
 diff -urN -x CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
 --- man/yaboot.conf.5  Sun Oct 28 00:09:33 2001
  writable by anyone but root since a different \fIofboot\fR script could be
 diff -urN -x CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
 --- man/yaboot.conf.5  Sun Oct 28 00:09:33 2001
-+++ man.deb/yaboot.conf.5      Sun Oct 28 00:09:54 2001
++++ man.deb/yaboot.conf.5      Wed Nov 21 04:09:00 2001
 @@ -136,7 +136,7 @@
    boot=/dev/hda2
    device=hd:
 @@ -136,7 +136,7 @@
    boot=/dev/hda2
    device=hd:
@@ -99,9 +99,9 @@ diff -urN -x CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
  bgcolor=green
  default=Linux
 diff -urN -x CVS man/ybin.8 man.deb/ybin.8
  bgcolor=green
  default=Linux
 diff -urN -x CVS man/ybin.8 man.deb/ybin.8
---- man/ybin.8 Thu May 24 04:33:16 2001
-+++ man.deb/ybin.8     Sun Oct 28 00:09:54 2001
-@@ -109,7 +109,7 @@
+--- man/ybin.8 Wed Nov 21 04:08:35 2001
++++ man.deb/ybin.8     Wed Nov 21 04:09:00 2001
+@@ -103,7 +103,7 @@
  .TP
  .BR \-i ,\  \-\-install\ \fIboot-file
  Use \fIboot-file\fR as the primary boot loader executable, instead of
  .TP
  .BR \-i ,\  \-\-install\ \fIboot-file
  Use \fIboot-file\fR as the primary boot loader executable, instead of
@@ -110,7 +110,7 @@ diff -urN -x CVS man/ybin.8 man.deb/ybin.8
  .TP
  .BR \-C ,\  \-\-config\ \fIconfig-file
  Use \fIconfig-file\fR as the \fBybin\fR/\fByaboot\fR(8) configuration
  .TP
  .BR \-C ,\  \-\-config\ \fIconfig-file
  Use \fIconfig-file\fR as the \fBybin\fR/\fByaboot\fR(8) configuration
-@@ -214,8 +214,8 @@
+@@ -176,8 +176,8 @@
  Print out the version number and exit.
  .SH FILES
  .nf
  Print out the version number and exit.
  .SH FILES
  .nf
@@ -121,7 +121,7 @@ diff -urN -x CVS man/ybin.8 man.deb/ybin.8
  /etc/yaboot.conf \- boot loader/ybin configuration file
  .fi
  .SH ENVIRONMENT
  /etc/yaboot.conf \- boot loader/ybin configuration file
  .fi
  .SH ENVIRONMENT
-@@ -232,7 +232,7 @@
+@@ -193,7 +193,7 @@
  program, otherwise \fBybin\fR will be vulnerable to race conditions.
  The Debian mktemp is derived from OpenBSD and thus should be secure.
  
  program, otherwise \fBybin\fR will be vulnerable to race conditions.
  The Debian mktemp is derived from OpenBSD and thus should be secure.
  
index 09e2a4824f5418d6c0cee743120cfe06069c1142..f04fd00284acf78db4a600bccf486b4d74ad33e4 100644 (file)
@@ -17,7 +17,7 @@
 .\" along with this program; if not, write to the Free Software                
 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 .\"
 .\" along with this program; if not, write to the Free Software                
 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 .\"
-.TH MKOFBOOT 8 "28 April 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.TH MKOFBOOT 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
 .SH NAME
 .B mkofboot
 \- format bootstrap partition and install the yaboot boot loader
 .SH NAME
 .B mkofboot
 \- format bootstrap partition and install the yaboot boot loader
 .RB [ \ \-\-hide\  ]
 .RB [ \ \-\-protect\  ]
 .RB [ \ \-\-nonvram\  ]
 .RB [ \ \-\-hide\  ]
 .RB [ \ \-\-protect\  ]
 .RB [ \ \-\-nonvram\  ]
-.RB [ \ \-\-device\ \fIOF-dev\  ]
-.RB [ \ \-\-partition\ \fIroot-part-#\  ]
-.RB [ \ \-\-timeout\ \fItimeout\  ]
-.RB [ \ \-\-image\ \fIkernel\  ]
-.RB [ \ \-\-label\ \fIlabel\  ]
-.RB [ \ \-\-root\ \fIroot-dev\  ]
 .RB [ \ \-\-force\  ]
 .RB [ \ \-v | \-\-verbose\  ]
 .RB [ \ \-\-debug\  ]
 .RB [ \ \-\-force\  ]
 .RB [ \ \-v | \-\-verbose\  ]
 .RB [ \ \-\-debug\  ]
@@ -151,38 +145,6 @@ HFS and MSDOS filesystems.
 Prevent \fBmkofboot\fR from setting the OpenFirmware boot-device
 variable with \fBnvsetenv\fR(8).
 .TP
 Prevent \fBmkofboot\fR from setting the OpenFirmware boot-device
 variable with \fBnvsetenv\fR(8).
 .TP
-.BR \-\-device\ \fIopenfirmware-dev-path
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the OpenFirmware device of the disk the system will boot
-from.  The default is \*(lqhd:\*(rq.
-.TP
-.BR \-\-partition\ \fIroot-partition-number
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the partition number of the root filesystem.  Mac partition
-tables are considered a partition themselves, so the first real
-partition will be 2, usually the \fBbootstrap\fR(8) partition, followed
-by the root partition, number 3.
-.TP
-.BR \-\-timeout\ \fItimeout
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the timeout value in tenths of a second.  The timeout is how
-long \fByaboot\fR(8) will wait before booting the default (first listed)
-image.
-.TP
-.BR \-\-image\ \fIkernel-image
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the path to the default kernel to be booted.
-.TP
-.BR \-\-label\ \fIlabel
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the label used to boot the above kernel image.  The default
-is Linux.
-.TP
-.BR \-\-root\ \fIroot-device
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the Linux device of the root partition.  This is passed to
-the kernel at boot time.  The default is \fI/dev/hda3\fR.
-.TP
 .BR \-v ,\  \-\-verbose
 This option causes \fBmkofboot\fR to be more verbose as it proceeds.
 .TP
 .BR \-v ,\  \-\-verbose
 This option causes \fBmkofboot\fR to be more verbose as it proceeds.
 .TP
@@ -210,8 +172,7 @@ Print out the version number and exit.
 .br
 The temporary directory \fBmkofboot\fR will use.
 .SH SECURITY
 .br
 The temporary directory \fBmkofboot\fR will use.
 .SH SECURITY
-The \fByaboot.conf\fR(5) auto generation requires a temporary file, this
-file is created with
+Temporary files are created with
 .BR mktemp (1)
 it is important that your system use a secure 
 .BR mktemp (1)
 .BR mktemp (1)
 it is important that your system use a secure 
 .BR mktemp (1)
@@ -235,8 +196,6 @@ hardware.
 was written by Benjamin Herrenschmidt.
 .SH REPORTING BUGS
 Report bugs to <erbenson@alaska.net>
 was written by Benjamin Herrenschmidt.
 .SH REPORTING BUGS
 Report bugs to <erbenson@alaska.net>
-.br
-Report bugs in \fByaboot\fR(8) to <benh@kernel.crashing.org>
 .SH SEE ALSO
 .BR bootstrap (8),
 .BR hfsutils (1),
 .SH SEE ALSO
 .BR bootstrap (8),
 .BR hfsutils (1),
index f7126a41fe9d652403e4d858a9f7f753ae915a2c..803767ecb9b37d9c5d1d0e0d353007c8f571b1de 100644 (file)
@@ -1,6 +1,6 @@
 .\" Hey Emacs! This file is -*- nroff -*- source.
 .\"
 .\" Hey Emacs! This file is -*- nroff -*- source.
 .\"
-.TH YABOOT 8 "28 April 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.TH YABOOT 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
 .SH NAME
 .B yaboot
 \- PowerMac OpenFirmware boot loader
 .SH NAME
 .B yaboot
 \- PowerMac OpenFirmware boot loader
@@ -124,8 +124,7 @@ This man page was written by Ethan Benson <erbenson@alaska.net>.
 .B yaboot
 was written by Benjamin Herrenschmidt <benh@kernel.crashing.org>.
 .SH REPORTING BUGS
 .B yaboot
 was written by Benjamin Herrenschmidt <benh@kernel.crashing.org>.
 .SH REPORTING BUGS
-Bugs in \fByaboot\fR should be reported to Benjamin Herrenschmidt
-<benh@kernel.crashing.org>.
+Bugs in \fByaboot\fR should be reported to Ethan Benson <erbenson@alaska.net>
 .SH SEE ALSO
 .BR bootstrap (8),
 .BR yaboot.conf (5),
 .SH SEE ALSO
 .BR bootstrap (8),
 .BR yaboot.conf (5),
index 7489f94560571e4d71f44fdd8cd8beceb8edb4be..98e437105a3a962a7ce62803ba0240f5e67490fe 100644 (file)
@@ -17,7 +17,7 @@
 .\" along with this program; if not, write to the Free Software                
 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 .\"
 .\" along with this program; if not, write to the Free Software                
 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 .\"
-.TH YBIN 8 "27 April 2001" "GNU/Linux PowerPC" "System Manager's Manual"
+.TH YBIN 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
 .SH NAME
 .B ybin
 \- install the yaboot boot loader to a bootstrap partition.
 .SH NAME
 .B ybin
 \- install the yaboot boot loader to a bootstrap partition.
 .RB [ \ \-\-hide\  ]
 .RB [ \ \-\-protect\  ]
 .RB [ \ \-\-nonvram\  ]
 .RB [ \ \-\-hide\  ]
 .RB [ \ \-\-protect\  ]
 .RB [ \ \-\-nonvram\  ]
-.RB [ \ \-\-device\ \fIOF-dev\  ]
-.RB [ \ \-\-partition\ \fIroot-part-#\  ]
-.RB [ \ \-\-timeout\ \fItimeout\  ]
-.RB [ \ \-\-image\ \fIkernel\  ]
-.RB [ \ \-\-label\ \fIlabel\  ]
-.RB [ \ \-\-root\ \fIroot-dev\  ]
 .RB [ \ \-\-force\  ]
 .RB [ \ \-v | \-\-verbose\  ]
 .RB [ \ \-\-debug\  ]
 .RB [ \ \-\-force\  ]
 .RB [ \ \-v | \-\-verbose\  ]
 .RB [ \ \-\-debug\  ]
@@ -73,7 +67,7 @@ NewWorld compatible version of \fBnvsetenv\fR(8) is available.
 .B Ybin 
 requires that the 
 .BR bootstrap (8)
 .B Ybin 
 requires that the 
 .BR bootstrap (8)
-partition have an HFS or MSDOS filesystem already on it.  For IBM
+partition have an HFS filesystem already on it.  For IBM
 hardware there is no filesystem on the \fBbootstrap\fR(8) partition,
 in this case use fstype=raw.  When using the raw filesystem type
 \fBybin\fR requires that an ELF binary have already been installed on
 hardware there is no filesystem on the \fBbootstrap\fR(8) partition,
 in this case use fstype=raw.  When using the raw filesystem type
 \fBybin\fR requires that an ELF binary have already been installed on
@@ -165,38 +159,6 @@ HFS and MSDOS filesystems.
 Prevent \fBybin\fR from setting the OpenFirmware boot-device
 variable with \fBnvsetenv\fR(8).
 .TP
 Prevent \fBybin\fR from setting the OpenFirmware boot-device
 variable with \fBnvsetenv\fR(8).
 .TP
-.BR \-\-device\ \fIopenfirmware-dev-path
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the OpenFirmware device of the disk the system will boot
-from.  The default is \*(lqhd:\*(rq.
-.TP
-.BR \-\-partition\ \fIroot-partition-number
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the partition number of the root filesystem.  Mac partition
-tables are considered a partition themselves, so the first real
-partition will be 2, usually the \fBbootstrap\fR(8) partition, followed
-by the root partition, number 3.
-.TP
-.BR \-\-timeout\ \fItimeout
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the timeout value in tenths of a second.  The timeout is how
-long \fByaboot\fR(8) will wait before booting the default (first listed)
-image.
-.TP
-.BR \-\-image\ \fIkernel-image
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the path to the default kernel to be booted.
-.TP
-.BR \-\-label\ \fIlabel
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the label used to boot the above kernel image.  The default
-is Linux.
-.TP
-.BR \-\-root\ \fIroot-device
-This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
-specifies the Linux device for the root partition, this is passed to
-the kernel at boot time.  The default is \fI/dev/hda3\fR.
-.TP
 .BR \-v ,\  \-\-verbose
 This option causes \fBybin\fR to be more verbose as it proceeds.
 .TP
 .BR \-v ,\  \-\-verbose
 This option causes \fBybin\fR to be more verbose as it proceeds.
 .TP
@@ -224,8 +186,7 @@ Print out the version number and exit.
 .br
 The temporary directory \fBybin\fR will use.
 .SH SECURITY
 .br
 The temporary directory \fBybin\fR will use.
 .SH SECURITY
-The \fByaboot.conf\fR(5) auto generation requires a temporary file, this
-file is created with
+Temporary files are created with
 .BR mktemp (1).
 It is important that your system use a secure 
 .BR mktemp (1)
 .BR mktemp (1).
 It is important that your system use a secure 
 .BR mktemp (1)
@@ -249,8 +210,6 @@ and this man page was written by Ethan Benson.
 was written by Benjamin Herrenschmidt.
 .SH REPORTING BUGS
 Report bugs to <erbenson@alaska.net>
 was written by Benjamin Herrenschmidt.
 .SH REPORTING BUGS
 Report bugs to <erbenson@alaska.net>
-.br
-Report bugs in \fByaboot\fR(8) to <benh@kernel.crashing.org>
 .SH SEE ALSO
 .BR bootstrap (8),
 .BR hfsutils (1),
 .SH SEE ALSO
 .BR bootstrap (8),
 .BR hfsutils (1),
index 3c98be1e7f46bd16a89b0dc915c9bd4f2afe173d..b88706977b7dad3b54db7ebc95ecb647c6dd81d2 100644 (file)
@@ -33,33 +33,65 @@ extern char bootdevice[1024];
 /* This function follows the device path in the devtree and separates
    the device name, partition number, and other datas (mostly file name)
    the string passed in parameters is changed since 0 are put in place
 /* This function follows the device path in the devtree and separates
    the device name, partition number, and other datas (mostly file name)
    the string passed in parameters is changed since 0 are put in place
-   of some separators to terminate the various strings
- */
+   of some separators to terminate the various strings.  
+
+   when a default device is supplied imagepath will be assumed to be a
+   plain filename unless it contains a : otherwise if defaultdev is
+   NULL imagepath will be assumed to be a device path.
+
+   returns 1 on success 0 on failure.
+
+   Supported examples:
+    - /pci@80000000/pci-bridge@d/ADPT,2930CU@2/@1:4
+    - /pci@80000000/pci-bridge@d/ADPT,2930CU@2/@1:4,/boot/vmlinux
+    - hd:3,/boot/vmlinux
+    - enet:10.0.0.1,/tftpboot/vmlinux
+    - enet:,/tftpboot/vmlinux
+    - enet:bootp
+    - enet:0
+   Supported only if defdevice == NULL
+    - disc
+    - any other device path lacking a :
+   Unsupported examples:
+    - hd:2,\\:tbxi <- no filename will be detected due to the extra :
+    - enet:192.168.2.1,bootme,c-iaddr,g-iaddr,subnet-mask,bootp-retries,tftp-retries */
 
 int
 parse_device_path(char *imagepath, char *defdevice, int defpart,
                  char *deffile, struct boot_fspec_t *result)
 {
      char *ptr;
 
 int
 parse_device_path(char *imagepath, char *defdevice, int defpart,
                  char *deffile, struct boot_fspec_t *result)
 {
      char *ptr;
-     char *ipath = strdup(imagepath);
-     char *defdev = strdup(defdevice);
+     char *ipath = NULL;
+     char *defdev = NULL;
 
      result->dev = NULL;
      result->part = -1;
      result->file = NULL;
 
 
      result->dev = NULL;
      result->part = -1;
      result->file = NULL;
 
-     if (!strstr(defdev, "ethernet") && !strstr(defdev, "enet")) {
-         if ((ptr = strrchr(defdev, ':')) != NULL)
-              *ptr = 0; /* remove trailing : from defdevice if necessary */
-     }
-
      if (!imagepath)
      if (!imagepath)
-         goto punt;
+         return 0;
+     else
+         ipath = strdup(imagepath);
+
+     if (defdevice)
+         defdev = strdup(defdevice);
+
+     if (defdev) {
+         if (!strstr(defdev, "ethernet") && !strstr(defdev, "enet")) {
+              if ((ptr = strrchr(defdev, ':')) != NULL)
+                   *ptr = 0; /* remove trailing : from defdevice if necessary */
+         }
+     }
 
      if ((ptr = strrchr(ipath, ',')) != NULL) {
 
      if ((ptr = strrchr(ipath, ',')) != NULL) {
-         result->file = strdup(ptr+1);
-         /* Trim the filename off */
-         *ptr = 0;
+         char *colon = strrchr(ipath, ':');
+         /* If a ':' occurs *after* a ',', then we assume that there is
+            no filename */
+         if (!colon || colon < ptr) {
+              result->file = strdup(ptr+1);
+              /* Trim the filename off */
+              *ptr = 0;
+         }
      }
 
      if (strstr(ipath, "ethernet") || strstr(ipath, "enet"))
      }
 
      if (strstr(ipath, "ethernet") || strstr(ipath, "enet"))
@@ -73,14 +105,15 @@ parse_device_path(char *imagepath, char *defdevice, int defpart,
          result->dev = strdup(ipath);
          if (*(ptr+1))
               result->part = simple_strtol(ptr+1, NULL, 10);
          result->dev = strdup(ipath);
          if (*(ptr+1))
               result->part = simple_strtol(ptr+1, NULL, 10);
+     } else if (!defdev) {
+         result->dev = strdup(ipath); 
      } else if (strlen(ipath)) {
           result->file = strdup(ipath);
      } else {
          return 0;
      }
      } else if (strlen(ipath)) {
           result->file = strdup(ipath);
      } else {
          return 0;
      }
-     
-punt:
-     if (!result->dev)
+
+     if (!result->dev && defdev)
          result->dev = strdup(defdev);
      
      if (result->part < 0)
          result->dev = strdup(defdev);
      
      if (result->part < 0)
@@ -88,7 +121,10 @@ punt:
      
      if (!result->file)
          result->file = strdup(deffile);
      
      if (!result->file)
          result->file = strdup(deffile);
+
      free(ipath);
      free(ipath);
+     if (defdev)
+         free(defdev);
      return 1;
 }
 
      return 1;
 }
 
index 6eabb427dc20863f73b0d1bfa1d38d9eba89a070..7b7bcdb208e7ba4e70d54bec88b93dd9e34eef5d 100644 (file)
@@ -108,6 +108,7 @@ char bootdevice[1024];
 char *password = NULL;
 struct boot_fspec_t boot;
 int _machine = _MACH_Pmac;
 char *password = NULL;
 struct boot_fspec_t boot;
 int _machine = _MACH_Pmac;
+int flat_vmlinux;
 
 #ifdef CONFIG_COLOR_TEXT
 
 
 #ifdef CONFIG_COLOR_TEXT
 
@@ -332,10 +333,10 @@ load_config_file(char *device, char* path, int partition)
      }
 
      /* Build the path to the file */
      }
 
      /* Build the path to the file */
-     if (path)
-         strcpy(conf_path, path);
-     else if ( _machine == _MACH_chrp )
+     if (_machine == _MACH_chrp)
          strcpy(conf_path, "/etc/");
          strcpy(conf_path, "/etc/");
+     else if (path && *path)
+         strcpy(conf_path, path);
      else
          conf_path[0] = 0;
      strcat(conf_path, CONFIG_FILE_NAME);
      else
          conf_path[0] = 0;
      strcat(conf_path, CONFIG_FILE_NAME);
@@ -873,9 +874,9 @@ yaboot_text_ui(void)
          file.fs->close(&file);
          memset(&file, 0, sizeof(file));
 
          file.fs->close(&file);
          memset(&file, 0, sizeof(file));
 
-         /* If sysmap, load it
+         /* If sysmap, load it (only if booting a vmlinux).
           */
           */
-         if (params.sysmap.file) {
+         if (flat_vmlinux && params.sysmap.file) {
               prom_printf("Loading System.map ...\n");
               if(strlen(boot.file) && !strcmp(boot.file,"\\\\") && params.sysmap.file[0] != '/'
                  && params.sysmap.file[0] != '\\') {
               prom_printf("Loading System.map ...\n");
               if(strlen(boot.file) && !strcmp(boot.file,"\\\\") && params.sysmap.file[0] != '/'
                  && params.sysmap.file[0] != '\\') {
@@ -921,10 +922,11 @@ yaboot_text_ui(void)
               }
          }
 
               }
          }
 
-         /* If ramdisk, load it. For now, we can't tell the size it will be
-          * so we claim an arbitrary amount of 4Mb
+         /* If ramdisk, load it (only if booting a vmlinux).  For now, we
+          * can't tell the size it will be so we claim an arbitrary amount
+          * of 4Mb.
           */
           */
-         if (params.rd.file) {
+         if (flat_vmlinux && params.rd.file) {
               if(strlen(boot.file) && !strcmp(boot.file,"\\\\") && params.rd.file[0] != '/'
                  && params.kernel.file[0] != '\\')
               {
               if(strlen(boot.file) && !strcmp(boot.file,"\\\\") && params.rd.file[0] != '/'
                  && params.kernel.file[0] != '\\')
               {
@@ -987,47 +989,49 @@ yaboot_text_ui(void)
          flush_icache_range ((long)loadinfo.base, (long)loadinfo.base+loadinfo.memsize);
          DEBUG_F(" done\n");
 
          flush_icache_range ((long)loadinfo.base, (long)loadinfo.base+loadinfo.memsize);
          DEBUG_F(" done\n");
 
-/* 
- * Fill mew boot infos
- *
- * The birec is low on memory, probably inside the malloc pool, so
- * we don't write it earlier. At this point, we should not use anything
- * coming from the malloc pool
- */
-         birec = (struct bi_record *)_ALIGN(loadinfo.filesize+(1<<20)-1,(1<<20));
-
-/* We make sure it's mapped. We map only 64k for now, it's plenty enough
- * we don't claim since this precise memory range may already be claimed
- * by the malloc pool
- */
-         prom_map (birec, birec, 0x10000);
-         DEBUG_F("birec at %p\n", birec);
-         DEBUG_SLEEP;
-
-         birec->tag = BI_FIRST;
-         birec->size = sizeof(struct bi_record);
-         birec = (struct bi_record *)((unsigned long)birec + birec->size);
+         if (flat_vmlinux) {
+              /* 
+               * Fill new boot infos (only if booting a vmlinux).
+               *
+               * The birec is low on memory, probably inside the malloc pool,
+               * so we don't write it earlier. At this point, we should not
+               * use anything coming from the malloc pool.
+               */
+              birec = (struct bi_record *)_ALIGN(loadinfo.filesize+(1<<20)-1,(1<<20));
+
+              /* We make sure it's mapped. We map only 64k for now, it's
+               * plenty enough we don't claim since this precise memory
+               * range may already be claimed by the malloc pool.
+               */
+              prom_map (birec, birec, 0x10000);
+              DEBUG_F("birec at %p\n", birec);
+              DEBUG_SLEEP;
+
+              birec->tag = BI_FIRST;
+              birec->size = sizeof(struct bi_record);
+              birec = (struct bi_record *)((ulong)birec + birec->size);
        
        
-         birec->tag = BI_BOOTLOADER_ID;
-         sprintf( (char *)birec->data, "yaboot");
-         birec->size = sizeof(struct bi_record) + strlen("yaboot") + 1;
-         birec = (struct bi_record *)((unsigned long)birec + birec->size);
+              birec->tag = BI_BOOTLOADER_ID;
+              sprintf( (char *)birec->data, "yaboot");
+              birec->size = sizeof(struct bi_record) + strlen("yaboot") + 1;
+              birec = (struct bi_record *)((ulong)birec + birec->size);
        
        
-         birec->tag = BI_MACHTYPE;
-         birec->data[0] = _machine;
-         birec->size = sizeof(struct bi_record) + sizeof(unsigned long);
-         birec = (struct bi_record *)((unsigned long)birec + birec->size);
-
-         if (sysmap_base) {
-              birec->tag = BI_SYSMAP;
-              birec->data[0] = (unsigned long)sysmap_base;
-              birec->data[1] = sysmap_size;
-              birec->size = sizeof(struct bi_record) + sizeof(unsigned long)*2;
-              birec = (struct bi_record *)((unsigned long)birec + birec->size);
-         }
-         birec->tag = BI_LAST;
-         birec->size = sizeof(struct bi_record);
-         birec = (struct bi_record *)((unsigned long)birec + birec->size);
+              birec->tag = BI_MACHTYPE;
+              birec->data[0] = _machine;
+              birec->size = sizeof(struct bi_record) + sizeof(ulong);
+              birec = (struct bi_record *)((ulong)birec + birec->size);
+
+              if (sysmap_base) {
+                   birec->tag = BI_SYSMAP;
+                   birec->data[0] = (ulong)sysmap_base;
+                   birec->data[1] = sysmap_size;
+                   birec->size = sizeof(struct bi_record) + sizeof(ulong)*2;
+                   birec = (struct bi_record *)((ulong)birec + birec->size);
+              }
+              birec->tag = BI_LAST;
+              birec->size = sizeof(struct bi_record);
+              birec = (struct bi_record *)((ulong)birec + birec->size);
+          }
 
           /* compute the kernel's entry point. */
          kernel_entry = loadinfo.base + loadinfo.entry - loadinfo.load_loc;
 
           /* compute the kernel's entry point. */
          kernel_entry = loadinfo.base + loadinfo.entry - loadinfo.load_loc;
@@ -1133,11 +1137,21 @@ load_elf32(struct boot_file_t *file, loadinfo_t *loadinfo)
      /* Claim OF memory */
      DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
 
      /* Claim OF memory */
      DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
 
+     /* Determine whether we are trying to boot a vmlinux or some
+      * other binary image (eg, zImage).  We load vmlinux's at
+      * KERNELADDR and all other binaries at their e_entry value.
+      */
+     if (e->e_entry == KERNEL_LINK_ADDR_PPC32) {
+          flat_vmlinux = 1;
+          loadaddr = KERNELADDR;
+     } else {
+          flat_vmlinux = 0;
+          loadaddr = e->e_entry;
+     }
+
      /* On some systems, loadaddr may already be claimed, so try some
       * other nearby addresses before giving up.
       */
      /* On some systems, loadaddr may already be claimed, so try some
       * other nearby addresses before giving up.
       */
-     loadaddr = (e->e_entry == KERNEL_LINK_ADDR_PPC32 ||
-                e->e_entry == 0) ? KERNELADDR : e->e_entry;
      for(addr=loadaddr; addr <= loadaddr * 8 ;addr+=0x100000) {
          loadinfo->base = prom_claim((void *)addr, loadinfo->memsize, 0);
          if (loadinfo->base != (void *)-1) break;
      for(addr=loadaddr; addr <= loadaddr * 8 ;addr+=0x100000) {
          loadinfo->base = prom_claim((void *)addr, loadinfo->memsize, 0);
          if (loadinfo->base != (void *)-1) break;
@@ -1262,10 +1276,21 @@ load_elf64(struct boot_file_t *file, loadinfo_t *loadinfo)
      /* Claim OF memory */
      DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
 
      /* Claim OF memory */
      DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
 
+     /* Determine whether we are trying to boot a vmlinux or some
+      * other binary image (eg, zImage).  We load vmlinux's at
+      * KERNELADDR and all other binaries at their e_entry value.
+      */
+     if (e->e_entry == KERNEL_LINK_ADDR_PPC64) {
+          flat_vmlinux = 1;
+          loadaddr = KERNELADDR;
+     } else {
+          flat_vmlinux = 0;
+          loadaddr = e->e_entry;
+     }
+
      /* On some systems, loadaddr may already be claimed, so try some
       * other nearby addresses before giving up.
       */
      /* On some systems, loadaddr may already be claimed, so try some
       * other nearby addresses before giving up.
       */
-     loadaddr = (e->e_entry == KERNEL_LINK_ADDR_PPC64) ? KERNELADDR : e->e_entry;
      for(addr=loadaddr; addr <= loadaddr * 8 ;addr+=0x100000) {
          loadinfo->base = prom_claim((void *)addr, loadinfo->memsize, 0);
          if (loadinfo->base != (void *)-1) break;
      for(addr=loadaddr; addr <= loadaddr * 8 ;addr+=0x100000) {
          loadinfo->base = prom_claim((void *)addr, loadinfo->memsize, 0);
          if (loadinfo->base != (void *)-1) break;
@@ -1424,15 +1449,16 @@ yaboot_main(void)
        
      prom_get_chosen("bootpath", bootdevice, sizeof(bootdevice));
      DEBUG_F("/chosen/bootpath = %s\n", bootdevice);
        
      prom_get_chosen("bootpath", bootdevice, sizeof(bootdevice));
      DEBUG_F("/chosen/bootpath = %s\n", bootdevice);
-     if (bootdevice[0] == 0)
+     if (bootdevice[0] == 0) {
          prom_get_options("boot-device", bootdevice, sizeof(bootdevice));
          prom_get_options("boot-device", bootdevice, sizeof(bootdevice));
+         DEBUG_F("boot-device = %s\n", bootdevice);
+     }
      if (bootdevice[0] == 0) {
          prom_printf("Couldn't determine boot device\n");
          return -1;
      }
 
      if (bootdevice[0] == 0) {
          prom_printf("Couldn't determine boot device\n");
          return -1;
      }
 
-     if (!parse_device_path(bootdevice, (_machine == _MACH_Pmac) ? "hd" : "disc",
-                           -1, "", &boot)) {
+     if (!parse_device_path(bootdevice, NULL, -1, "", &boot)) {
          prom_printf("%s: Unable to parse\n", bootdevice);
          return -1;
      }
          prom_printf("%s: Unable to parse\n", bootdevice);
          return -1;
      }
@@ -1458,7 +1484,7 @@ yaboot_main(void)
                    strcat(boot.file, "\\");
          }
      }
                    strcat(boot.file, "\\");
          }
      }
-     DEBUG_F("After path fixup: dev=%s, part=%d, file=%s\n",
+     DEBUG_F("After pmac path kludgeup: dev=%s, part=%d, file=%s\n",
             boot.dev, boot.part, boot.file);
 
      useconf = load_config_file(boot.dev, boot.file, boot.part);
             boot.dev, boot.part, boot.file);
 
      useconf = load_config_file(boot.dev, boot.file, boot.part);
index 80c1799e8db1c30da0162207d57d05b99b0a2c70..0fc5c5e50fc0039257e763ea7c15606ae9bad17c 100755 (executable)
@@ -27,7 +27,7 @@ if [ -n "$PATH_PREFIX" ] ; then
     PATH="${PATH}:${PATH_PREFIX}/sbin:${PATH_PREFIX}/bin:${PATH_PREFIX}/usr/sbin:${PATH_PREFIX}/usr/bin:${PATH_PREFIX}/usr/local/sbin:${PATH_PREFIX}/usr/local/bin"
 fi
 PRG="${0##*/}"
     PATH="${PATH}:${PATH_PREFIX}/sbin:${PATH_PREFIX}/bin:${PATH_PREFIX}/usr/sbin:${PATH_PREFIX}/usr/bin:${PATH_PREFIX}/usr/local/sbin:${PATH_PREFIX}/usr/local/bin"
 fi
 PRG="${0##*/}"
-VERSION=1.0.4
+VERSION=1.0.5
 CHROOT=/
 ## $CONFIG is relative to $CHROOT
 CONFIG=etc/yaboot.conf
 CHROOT=/
 ## $CONFIG is relative to $CHROOT
 CONFIG=etc/yaboot.conf
@@ -508,11 +508,6 @@ if (cat /proc/cpuinfo 2>/dev/null | grep -q pmac-generation 2> /dev/null) ; then
     fi
 fi
 
     fi
 fi
 
-## IBM hardware needs fstype=raw for ybin
-if (cat /proc/cpuinfo 2>/dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
-    FSTYPE="\nfstype=raw"
-fi
-
 ## if there is a separate /boot partition we must strip off the /boot
 ## mountpoint or else yaboot will not find the kernel.
 if [ "$KERNDIR" != "$CHROOT" ] ; then
 ## if there is a separate /boot partition we must strip off the /boot
 ## mountpoint or else yaboot will not find the kernel.
 if [ "$KERNDIR" != "$CHROOT" ] ; then
@@ -575,7 +570,7 @@ GLOBAL="## yaboot.conf generated by $PRG $VERSION
 ${HEADER}##
 ## For a dual-boot menu, add one or more of: 
 ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ\n
 ${HEADER}##
 ## For a dual-boot menu, add one or more of: 
 ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ\n
-boot=${BOOT}${FSTYPE:-}${DEVICE:-}
+boot=${BOOT}${DEVICE:-}
 partition=$PARTITION
 root=$ROOT
 timeout=30
 partition=$PARTITION
 root=$ROOT
 timeout=30
index 0b11e239e3f3cc385a36dc11af651c85d0ee3fa9..ebb6e16560ce516a04c8565b89f3d42f028cd6c0 100755 (executable)
--- a/ybin/ybin
+++ b/ybin/ybin
@@ -28,7 +28,7 @@ if [ -n "$PATH_PREFIX" ] ; then
 fi
 PRG="${0##*/}"
 SIGINT="$PRG: Interrupt caught ... exiting"
 fi
 PRG="${0##*/}"
 SIGINT="$PRG: Interrupt caught ... exiting"
-VERSION=1.3.5
+VERSION=1.3.6pre1
 DEBUG=0
 VERBOSE=0
 TMP="${TMPDIR:-/tmp}"
 DEBUG=0
 VERBOSE=0
 TMP="${TMPDIR:-/tmp}"
@@ -65,7 +65,11 @@ fi
 
 ## defaults
 usemount=no
 
 ## defaults
 usemount=no
-fstype=hfs
+if (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
+    fstype=raw
+else
+    fstype=hfs
+fi
 hfstype=tbxi
 hfscreator=UNIX
 bless=yes
 hfstype=tbxi
 hfscreator=UNIX
 bless=yes
@@ -166,19 +170,6 @@ Update/install bootloader onto a bootstrap partition.
                                this is useful of you don't want them to be
                                visible from MacOS.
       --nonvram              do not update the boot-device variable in nvram.
                                this is useful of you don't want them to be
                                visible from MacOS.
       --nonvram              do not update the boot-device variable in nvram.
-      --device               yaboot auto configuration: sets the OF boot device
-                              default: hd:
-      --partition            yaboot auto configuration: sets the partition
-                              number of the root partition. default: 3
-      --timeout              yaboot auto configuration: sets the time yaboot
-                              will wait for user input before booting default
-                               image default: 40 (4 seconds)
-      --image                yaboot auto configuration: sets the path to the
-                              kernel image. default: /vmlinux
-      --label                yaboot auto configuration: sets the image label
-                               default: Linux
-      --root                 yaboot auto configuration: sets the root device
-                               default: /dev/hda3
       --force                don't ever ask for confirmation
   -v, --verbose              make $PRG more verbose
       --debug                print boring junk only useful for debugging
       --force                don't ever ask for confirmation
   -v, --verbose              make $PRG more verbose
       --debug                print boring junk only useful for debugging
@@ -1440,6 +1431,7 @@ if [ $# != 0 ] ; then
                if [ -n "$2" ] ; then
                    device="$2"
                    bootconf=auto
                if [ -n "$2" ] ; then
                    device="$2"
                    bootconf=auto
+                   echo 1>&2 "$PRG: WARNING: Deprecated option --device"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1451,6 +1443,7 @@ if [ $# != 0 ] ; then
                if [ -n "$2" ] ; then
                    timeout="$2"
                    bootconf=auto
                if [ -n "$2" ] ; then
                    timeout="$2"
                    bootconf=auto
+                   echo 1>&2 "$PRG: WARNING: Deprecated option --device"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1462,6 +1455,7 @@ if [ $# != 0 ] ; then
                if [ -n "$2" ] ; then
                    image="$2"
                    bootconf=auto
                if [ -n "$2" ] ; then
                    image="$2"
                    bootconf=auto
+                   echo 1>&2 "$PRG: WARNING: Deprecated option --device"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1473,6 +1467,7 @@ if [ $# != 0 ] ; then
                if [ -n "$2" ] ; then
                    label="$2"
                    bootconf=auto
                if [ -n "$2" ] ; then
                    label="$2"
                    bootconf=auto
+                   echo 1>&2 "$PRG: WARNING: Deprecated option --device"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1484,6 +1479,7 @@ if [ $# != 0 ] ; then
                if [ -n "$2" ] ; then
                    partition="$2"
                    bootconf=auto
                if [ -n "$2" ] ; then
                    partition="$2"
                    bootconf=auto
+                   echo 1>&2 "$PRG: WARNING: Deprecated option --device"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1495,6 +1491,7 @@ if [ $# != 0 ] ; then
                if [ -n "$2" ] ; then
                    root="$2"
                    bootconf=auto
                if [ -n "$2" ] ; then
                    root="$2"
                    bootconf=auto
+                   echo 1>&2 "$PRG: WARNING: Deprecated option --device"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"
                    shift 2
                else
                    echo 1>&2 "$PRG: option requires an argument $1"