From f4ebbd9f7ea23e3f0fcbe098754580c220894628 Mon Sep 17 00:00:00 2001 From: Ethan Benson Date: Mon, 25 Mar 2002 07:43:37 +0000 Subject: [PATCH 1/1] Commit yaboot 1.3.0 Commit yaboot 1.3.0. git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-1 --- BUGS | 1 + COPYING | 340 ++++++ ChangeLog | 141 +++ INSTALL | 23 + Makefile | 199 ++++ README | 421 +++++++ README.man.patch | 4 + THANKS | 17 + TODO | 13 + changelog | 621 ++++++++++ doc/README.ofboot | 47 + doc/README.ofpath | 25 + doc/README.rs6000 | 80 ++ doc/examples/README.dualboot.chrp | 26 + doc/examples/README.mbicons | 9 + doc/examples/README.simpleboot.chrp | 37 + doc/examples/dualboot.chrp | 68 ++ doc/examples/large-penguin.mbicon | 259 +++++ doc/examples/simpleboot.chrp | 62 + doc/examples/yaboot.conf.multi-boot | 112 ++ doc/examples/yaboot.conf.rs6k | 72 ++ etc/yaboot.conf | 81 ++ first/ofboot | 345 ++++++ include/asm/elf.h | 57 + include/asm/ppc_asm.tmpl | 66 ++ include/asm/processor.h | 142 +++ include/bootinfo.h | 41 + include/byteorder.h | 13 + include/cfg.h | 32 + include/cmdline.h | 31 + include/ctype.h | 54 + include/et/com_err.c | 120 ++ include/et/com_err.h | 40 + include/ext2fs/bitops.h | 603 ++++++++++ include/ext2fs/ext2_err.h | 94 ++ include/ext2fs/ext2_io.h | 94 ++ include/ext2fs/ext2fs.h | 989 ++++++++++++++++ include/fdisk-part.h | 28 + include/file.h | 90 ++ include/fs.h | 70 ++ include/gui.h | 3 + include/linux/elf.h | 607 ++++++++++ include/linux/ext2_fs.h | 624 ++++++++++ include/linux/iso_fs.h | 177 +++ include/linux/stat.h | 45 + include/linux/types.h | 1 + include/mac-part.h | 45 + include/md5.h | 30 + include/partition.h | 47 + include/prom.h | 102 ++ include/reiserfs/reiserfs.h | 405 +++++++ include/setjm2.h | 101 ++ include/setjmp.h | 39 + include/stdlib.h | 24 + include/string.h | 35 + include/swab.h | 25 + include/types.h | 60 + include/video.h | 6 + include/yaboot.h | 20 + lib/ctype.c | 46 + lib/libext2fs.a | Bin 0 -> 1348436 bytes lib/malloc.c | 110 ++ lib/nosys.c | 5 + lib/string.S | 245 ++++ lib/strstr.c | 119 ++ lib/strtol.c | 140 +++ lib/vsprintf.c | 396 +++++++ man.patch | 132 +++ man/bootstrap.8 | 272 +++++ man/mkofboot.8 | 249 ++++ man/ofpath.8 | 87 ++ man/yaboot.8 | 132 +++ man/yaboot.conf.5 | 635 ++++++++++ man/yabootconfig.8 | 137 +++ man/ybin.8 | 262 +++++ second/cache.S | 68 ++ second/cfg.c | 457 ++++++++ second/cmdline.c | 82 ++ second/crt0.S | 32 + second/file.c | 259 +++++ second/fs.c | 51 + second/fs_ext2.c | 604 ++++++++++ second/fs_iso.c | 77 ++ second/fs_of.c | 241 ++++ second/fs_reiserfs.c | 1025 ++++++++++++++++ second/gui/colormap.c | 108 ++ second/gui/effects.c | 95 ++ second/gui/pcx.c | 31 + second/gui/video.c | 147 +++ second/iso_util.c | 86 ++ second/md5.c | 380 ++++++ second/partition.c | 284 +++++ second/prom.c | 559 +++++++++ second/setjmp.S | 56 + second/yaboot.c | 1465 +++++++++++++++++++++++ util/addnote.c | 163 +++ util/elfextract.c | 106 ++ ybin/mkofboot | 1 + ybin/ofpath | 831 +++++++++++++ ybin/yabootconfig | 635 ++++++++++ ybin/ybin | 1677 +++++++++++++++++++++++++++ 101 files changed, 20450 insertions(+) create mode 100644 BUGS create mode 100644 COPYING create mode 100644 INSTALL create mode 100644 Makefile create mode 100644 README create mode 100644 README.man.patch create mode 100644 THANKS create mode 100644 TODO create mode 100644 changelog create mode 100644 doc/README.ofboot create mode 100644 doc/README.ofpath create mode 100644 doc/README.rs6000 create mode 100644 doc/examples/README.dualboot.chrp create mode 100644 doc/examples/README.mbicons create mode 100644 doc/examples/README.simpleboot.chrp create mode 100644 doc/examples/dualboot.chrp create mode 100644 doc/examples/large-penguin.mbicon create mode 100644 doc/examples/simpleboot.chrp create mode 100644 doc/examples/yaboot.conf.multi-boot create mode 100644 doc/examples/yaboot.conf.rs6k create mode 100644 etc/yaboot.conf create mode 100644 first/ofboot create mode 100644 include/asm/elf.h create mode 100644 include/asm/ppc_asm.tmpl create mode 100644 include/asm/processor.h create mode 100644 include/bootinfo.h create mode 100644 include/byteorder.h create mode 100644 include/cfg.h create mode 100644 include/cmdline.h create mode 100644 include/ctype.h create mode 100644 include/et/com_err.c create mode 100644 include/et/com_err.h create mode 100644 include/ext2fs/bitops.h create mode 100644 include/ext2fs/ext2_err.h create mode 100644 include/ext2fs/ext2_io.h create mode 100644 include/ext2fs/ext2fs.h create mode 100644 include/fdisk-part.h create mode 100644 include/file.h create mode 100644 include/fs.h create mode 100644 include/gui.h create mode 100644 include/linux/elf.h create mode 100644 include/linux/ext2_fs.h create mode 100644 include/linux/iso_fs.h create mode 100644 include/linux/stat.h create mode 100644 include/linux/types.h create mode 100644 include/mac-part.h create mode 100644 include/md5.h create mode 100644 include/partition.h create mode 100644 include/prom.h create mode 100644 include/reiserfs/reiserfs.h create mode 100644 include/setjm2.h create mode 100644 include/setjmp.h create mode 100644 include/stdlib.h create mode 100644 include/string.h create mode 100644 include/swab.h create mode 100644 include/types.h create mode 100644 include/video.h create mode 100644 include/yaboot.h create mode 100644 lib/ctype.c create mode 100644 lib/libext2fs.a create mode 100644 lib/malloc.c create mode 100644 lib/nosys.c create mode 100644 lib/string.S create mode 100644 lib/strstr.c create mode 100644 lib/strtol.c create mode 100644 lib/vsprintf.c create mode 100644 man.patch create mode 100644 man/bootstrap.8 create mode 100644 man/mkofboot.8 create mode 100644 man/ofpath.8 create mode 100644 man/yaboot.8 create mode 100644 man/yaboot.conf.5 create mode 100644 man/yabootconfig.8 create mode 100644 man/ybin.8 create mode 100644 second/cache.S create mode 100644 second/cfg.c create mode 100644 second/cmdline.c create mode 100644 second/crt0.S create mode 100644 second/file.c create mode 100644 second/fs.c create mode 100644 second/fs_ext2.c create mode 100644 second/fs_iso.c create mode 100644 second/fs_of.c create mode 100644 second/fs_reiserfs.c create mode 100644 second/gui/colormap.c create mode 100644 second/gui/effects.c create mode 100644 second/gui/pcx.c create mode 100644 second/gui/video.c create mode 100644 second/iso_util.c create mode 100644 second/md5.c create mode 100644 second/partition.c create mode 100644 second/prom.c create mode 100644 second/setjmp.S create mode 100644 second/yaboot.c create mode 100644 util/addnote.c create mode 100644 util/elfextract.c create mode 120000 ybin/mkofboot create mode 100755 ybin/ofpath create mode 100755 ybin/yabootconfig create mode 100755 ybin/ybin diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..b33068d --- /dev/null +++ b/BUGS @@ -0,0 +1 @@ +Bugs? what bugs? if you find one let me know. send to: erbenson@alaska.net diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog index 50a9638..f096b15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,3 +2,144 @@ # tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3 # +2002-03-25 07:43:37 GMT Ethan Benson patch-1 + + Summary: + Commit yaboot 1.3.0 + Revision: + yaboot--devel--1.3--patch-1 + + Commit yaboot 1.3.0. + + new files: + .arch-ids/BUGS.id .arch-ids/COPYING.id .arch-ids/INSTALL.id + .arch-ids/Makefile.id .arch-ids/README.id + .arch-ids/README.man.patch.id .arch-ids/THANKS.id + .arch-ids/TODO.id .arch-ids/changelog.id doc/.arch-ids/=id + doc/.arch-ids/README.ofboot.id doc/.arch-ids/README.ofpath.id + doc/.arch-ids/README.rs6000.id doc/examples/.arch-ids/=id + doc/examples/.arch-ids/README.dualboot.chrp.id + doc/examples/.arch-ids/README.mbicons.id + doc/examples/.arch-ids/README.simpleboot.chrp.id + doc/examples/.arch-ids/dualboot.chrp.id + doc/examples/.arch-ids/large-penguin.mbicon.id + doc/examples/.arch-ids/simpleboot.chrp.id + doc/examples/.arch-ids/yaboot.conf.multi-boot.id + doc/examples/.arch-ids/yaboot.conf.rs6k.id etc/.arch-ids/=id + etc/.arch-ids/yaboot.conf.id first/.arch-ids/=id + first/.arch-ids/ofboot.id include/.arch-ids/=id + include/asm/.arch-ids/=id include/asm/.arch-ids/elf.h.id + include/asm/.arch-ids/ppc_asm.tmpl.id + include/asm/.arch-ids/processor.h.id + include/.arch-ids/bootinfo.h.id + include/.arch-ids/byteorder.h.id include/.arch-ids/cfg.h.id + include/.arch-ids/cmdline.h.id include/.arch-ids/ctype.h.id + include/et/.arch-ids/=id include/et/.arch-ids/com_err.c.id + include/et/.arch-ids/com_err.h.id include/ext2fs/.arch-ids/=id + include/ext2fs/.arch-ids/bitops.h.id + include/ext2fs/.arch-ids/ext2_err.h.id + include/ext2fs/.arch-ids/ext2_io.h.id + include/ext2fs/.arch-ids/ext2fs.h.id + include/.arch-ids/fdisk-part.h.id include/.arch-ids/file.h.id + include/.arch-ids/fs.h.id include/.arch-ids/gui.h.id + include/linux/.arch-ids/=id include/linux/.arch-ids/elf.h.id + include/linux/.arch-ids/ext2_fs.h.id + include/linux/.arch-ids/iso_fs.h.id + include/linux/.arch-ids/stat.h.id + include/linux/.arch-ids/types.h.id + include/.arch-ids/mac-part.h.id include/.arch-ids/md5.h.id + include/.arch-ids/partition.h.id include/.arch-ids/prom.h.id + include/reiserfs/.arch-ids/=id + include/reiserfs/.arch-ids/reiserfs.h.id + include/.arch-ids/setjm2.h.id include/.arch-ids/setjmp.h.id + include/.arch-ids/stdlib.h.id include/.arch-ids/string.h.id + include/.arch-ids/swab.h.id include/.arch-ids/types.h.id + include/.arch-ids/video.h.id include/.arch-ids/yaboot.h.id + lib/.arch-ids/=id lib/.arch-ids/ctype.c.id + lib/.arch-ids/libext2fs.a.id lib/.arch-ids/malloc.c.id + lib/.arch-ids/nosys.c.id lib/.arch-ids/string.S.id + lib/.arch-ids/strstr.c.id lib/.arch-ids/strtol.c.id + lib/.arch-ids/vsprintf.c.id man/.arch-ids/=id + man/.arch-ids/bootstrap.8.id man/.arch-ids/mkofboot.8.id + man/.arch-ids/ofpath.8.id man/.arch-ids/yaboot.8.id + man/.arch-ids/yaboot.conf.5.id man/.arch-ids/yabootconfig.8.id + man/.arch-ids/ybin.8.id .arch-ids/man.patch.id + second/.arch-ids/=id second/.arch-ids/cache.S.id + second/.arch-ids/cfg.c.id second/.arch-ids/cmdline.c.id + second/.arch-ids/crt0.S.id second/.arch-ids/file.c.id + second/.arch-ids/fs.c.id second/.arch-ids/fs_ext2.c.id + second/.arch-ids/fs_iso.c.id second/.arch-ids/fs_of.c.id + second/.arch-ids/fs_reiserfs.c.id second/gui/.arch-ids/=id + second/gui/.arch-ids/colormap.c.id + second/gui/.arch-ids/effects.c.id + second/gui/.arch-ids/pcx.c.id second/gui/.arch-ids/video.c.id + second/.arch-ids/iso_util.c.id second/.arch-ids/md5.c.id + second/.arch-ids/partition.c.id second/.arch-ids/prom.c.id + second/.arch-ids/setjmp.S.id second/.arch-ids/yaboot.c.id + util/.arch-ids/=id util/.arch-ids/addnote.c.id + util/.arch-ids/elfextract.c.id ybin/.arch-ids/=id + ybin/.arch-ids/mkofboot.id ybin/.arch-ids/ofpath.id + ybin/.arch-ids/yabootconfig.id ybin/.arch-ids/ybin.id BUGS + COPYING INSTALL Makefile README README.man.patch THANKS TODO + changelog doc/README.ofboot doc/README.ofpath + doc/README.rs6000 doc/examples/README.dualboot.chrp + doc/examples/README.mbicons + doc/examples/README.simpleboot.chrp doc/examples/dualboot.chrp + doc/examples/large-penguin.mbicon doc/examples/simpleboot.chrp + doc/examples/yaboot.conf.multi-boot + doc/examples/yaboot.conf.rs6k etc/yaboot.conf first/ofboot + include/asm/elf.h include/asm/ppc_asm.tmpl + include/asm/processor.h include/bootinfo.h include/byteorder.h + include/cfg.h include/cmdline.h include/ctype.h + include/et/com_err.c include/et/com_err.h + include/ext2fs/bitops.h include/ext2fs/ext2_err.h + include/ext2fs/ext2_io.h include/ext2fs/ext2fs.h + include/fdisk-part.h include/file.h include/fs.h include/gui.h + include/linux/elf.h include/linux/ext2_fs.h + include/linux/iso_fs.h include/linux/stat.h + include/linux/types.h include/mac-part.h include/md5.h + include/partition.h include/prom.h include/reiserfs/reiserfs.h + include/setjm2.h include/setjmp.h include/stdlib.h + include/string.h include/swab.h include/types.h + include/video.h include/yaboot.h lib/ctype.c lib/libext2fs.a + lib/malloc.c lib/nosys.c lib/string.S lib/strstr.c + lib/strtol.c lib/vsprintf.c man/bootstrap.8 man/mkofboot.8 + man/ofpath.8 man/yaboot.8 man/yaboot.conf.5 man/yabootconfig.8 + man/ybin.8 man.patch second/cache.S second/cfg.c + second/cmdline.c second/crt0.S second/file.c second/fs.c + second/fs_ext2.c second/fs_iso.c second/fs_of.c + second/fs_reiserfs.c second/gui/colormap.c + second/gui/effects.c second/gui/pcx.c second/gui/video.c + second/iso_util.c second/md5.c second/partition.c + second/prom.c second/setjmp.S second/yaboot.c util/addnote.c + util/elfextract.c ybin/mkofboot ybin/ofpath ybin/yabootconfig + ybin/ybin + + modified files: + ChangeLog + + new directories: + doc/.arch-ids doc/examples/.arch-ids etc/.arch-ids + first/.arch-ids include/.arch-ids include/asm/.arch-ids + include/et/.arch-ids include/ext2fs/.arch-ids + include/linux/.arch-ids include/reiserfs/.arch-ids + lib/.arch-ids man/.arch-ids second/.arch-ids + second/gui/.arch-ids util/.arch-ids ybin/.arch-ids doc + doc/examples etc first include include/asm include/et + include/ext2fs include/linux include/reiserfs lib man second + second/gui util ybin + + +2002-03-25 03:28:42 GMT Ethan Benson base-0 + + Summary: + Create yaboot arch repo + Revision: + yaboot--devel--1.3--base-0 + + Create yaboot arch repo. + + new files: + ./.arch-ids/ChangeLog.id ./ChangeLog + + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..87d8a3b --- /dev/null +++ b/INSTALL @@ -0,0 +1,23 @@ + +The fastest way to install ybin and yaboot is to run `make install'. + +This will install the man pages in /usr/local/man by default and +ybin/mkofboot in /usr/local/sbin. yaboot and ofboot will be +installed in /usr/local/lib/yaboot/. + +you may change the install paths by setting variables ROOT, PREFIX and +MANDIR to make. ie make ROOT=/ PREFIX=/usr MANDIR=/share/man (this is only +intended for package maintainers.) + +yaboot can be installed where you like but +/usr/local/lib/yaboot/yaboot is the first default location ybin will +look, followed by /usr/lib/yaboot/yaboot. + +ybin needs hfsutils version 3.2.6 or later. + +The man pages should be installed in /usr/local/man/man?/. The *.8.gz +pages should be in /usr/local/man/man8/ and the *.5.gz page should be +in /usr/local/man/man5/. + +If you need to remove ybin (say if your installing a debian package or +.rpm) you can do so by issuing the command `make deinstall'. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..94ce349 --- /dev/null +++ b/Makefile @@ -0,0 +1,199 @@ +## Configuration section + +VERSION = 1.3 +# Debug mode (verbose) +DEBUG = 0 +ROOT = +PREFIX = usr/local +MANDIR = man +GETROOT = fakeroot + +# Enable text colors +CONFIG_COLOR_TEXT = y +# Enable colormap setup +CONFIG_SET_COLORMAP = y +# Enable splash screen +CONFIG_SPLASH_SCREEN = n +# Enable md5 passwords +USE_MD5_PASSWORDS = y + +# We use fixed addresses to avoid overlap when relocating +# and other trouble with initrd + +# Load the bootstrap at 2Mb +TEXTADDR = 0x200000 +# Malloc block at 3Mb -> 4Mb +MALLOCADDR = 0x300000 +MALLOCSIZE = 0x100000 +# Load kernel at 20Mb and ramdisk just after +KERNELADDR = 0x01400000 + +# Set this to the prefix of your cross-compiler, if you have one. +# Else leave it empty. +# +CROSS = + +# The flags for the target compiler. +# +CFLAGS = -Os -nostdinc -Wall -isystem `gcc -print-file-name=include` -fsigned-char +CFLAGS += -DVERSION=\"${VERSION}\" #" +CFLAGS += -DTEXTADDR=$(TEXTADDR) -DDEBUG=$(DEBUG) +CFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE) +CFLAGS += -DKERNELADDR=$(KERNELADDR) +CFLAGS += -I ./include + +ifeq ($(CONFIG_COLOR_TEXT),y) +CFLAGS += -DCONFIG_COLOR_TEXT +endif + +ifeq ($(CONFIG_SET_COLORMAP),y) +CFLAGS += -DCONFIG_SET_COLORMAP +endif + +ifeq ($(CONFIG_SPLASH_SCREEN),y) +CFLAGS += -DCONFIG_SPLASH_SCREEN +endif + +ifeq ($(USE_MD5_PASSWORDS),y) +CFLAGS += -DUSE_MD5_PASSWORDS +endif + +# Link flags +# +LFLAGS = -Ttext $(TEXTADDR) -Bstatic + +# Libraries +# +LLIBS = lib/libext2fs.a +#LLIBS = -l ext2fs + +# For compiling build-tools that run on the host. +# +HOSTCC = gcc +HOSTCFLAGS = -I/usr/include $(CFLAGS) + +## End of configuration section + +OBJS = second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o \ + second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o \ + second/fs_of.o second/fs_ext2.o second/fs_reiserfs.o second/fs_iso.o second/iso_util.o \ + lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o + +ifeq ($(CONFIG_SPLASH_SCREEN),y) +OBJS += second/gui/effects.o second/gui/colormap.o second/gui/video.o second/gui/pcx.o +endif + +ifeq ($(USE_MD5_PASSWORDS),y) +OBJS += second/md5.o +endif + +CC = $(CROSS)gcc +LD = $(CROSS)ld +AS = $(CROSS)as +OBJCOPY = $(CROSS)objcopy + +all: yaboot addnote mkofboot + +lgcc = `$(CC) -print-libgcc-file-name` + +yaboot: $(OBJS) + $(LD) $(LFLAGS) $(OBJS) $(LLIBS) $(lgcc) -o second/$@ + chmod -x second/yaboot + +addnote: + $(HOSTCC) $(HOSTCFLAGS) -o util/addnote util/addnote.c + +elfextract: + $(HOSTCC) $(HOSTCFLAGS) -o util/elfextract util/elfextract.c + +mkofboot: + ln -sf ybin ybin/mkofboot + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +%.o: %.S + $(CC) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $< + +dep: + makedepend -Iinclude *.c lib/*.c util/*.c gui/*.c + +bindist: all + mkdir ../yaboot-binary-${VERSION} + ${GETROOT} make ROOT=../yaboot-binary-${VERSION} install + mkdir -p -m 755 ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot + cp -a COPYING ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/COPYING + cp -a README ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/README + ${GETROOT} tar -C ../yaboot-binary-${VERSION} -zcvpf ../yaboot-binary-${VERSION}.tar.gz . + rm -rf ../yaboot-binary-${VERSION} + +clean: + rm -f second/yaboot util/addnote util/elfextract $(OBJS) + find . -name '#*' | xargs rm -f + find . -name '.#*' | xargs rm -f + find . -name '*~' | xargs rm -f + rm -rf man.deb + chmod 755 ybin/ybin ybin/ofpath ybin/yabootconfig + chmod -R u+rwX,go=rX . + chmod a-w COPYING + +install: all + @strip second/yaboot + @strip --remove-section=.comment second/yaboot + @strip util/addnote + @strip --remove-section=.comment --remove-section=.note util/addnote + install -d -o root -g root -m 0755 ${ROOT}/etc/ + install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/sbin/ + install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib + install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib/yaboot + install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man5/ + install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man8/ + install -o root -g root -m 0644 second/yaboot ${ROOT}/$(PREFIX)/lib/yaboot + install -o root -g root -m 0755 util/addnote ${ROOT}/${PREFIX}/lib/yaboot/addnote + install -o root -g root -m 0644 first/ofboot ${ROOT}/${PREFIX}/lib/yaboot/ofboot + install -o root -g root -m 0755 ybin/ofpath ${ROOT}/${PREFIX}/sbin/ofpath + install -o root -g root -m 0755 ybin/ybin ${ROOT}/${PREFIX}/sbin/ybin + install -o root -g root -m 0755 ybin/yabootconfig ${ROOT}/${PREFIX}/sbin/yabootconfig + rm -f ${ROOT}/${PREFIX}/sbin/mkofboot + ln -s ybin ${ROOT}/${PREFIX}/sbin/mkofboot + @gzip -9 man/*.[58] + install -o root -g root -m 0644 man/bootstrap.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/bootstrap.8.gz + install -o root -g root -m 0644 man/mkofboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/mkofboot.8.gz + install -o root -g root -m 0644 man/ofpath.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/ofpath.8.gz + install -o root -g root -m 0644 man/yaboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/yaboot.8.gz + install -o root -g root -m 0644 man/yabootconfig.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/yabootconfig.8.gz + install -o root -g root -m 0644 man/ybin.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/ybin.8.gz + install -o root -g root -m 0644 man/yaboot.conf.5.gz ${ROOT}/${PREFIX}/${MANDIR}/man5/yaboot.conf.5.gz + @gunzip man/*.gz + @[ ! -e ${ROOT}/etc/yaboot.conf ] && install -o root -g root -m 0644 etc/yaboot.conf ${ROOT}/etc/yaboot.conf + @echo + @echo "Installation successful." + @echo + @echo "An example /etc/yaboot.conf has been installed (unless /etc/yaboot.conf already existed" + @echo "You may either alter that file to match your system, or alternatively run yabootconfig" + @echo "yabootconfig will generate a simple and valid /etc/yaboot.conf for your system" + @echo + +deinstall: + rm -f ${ROOT}/${PREFIX}/sbin/ofpath + rm -f ${ROOT}/${PREFIX}/sbin/ybin + rm -f ${ROOT}/${PREFIX}/sbin/yabootconfig + rm -f ${ROOT}/${PREFIX}/sbin/mkofboot + rm -f ${ROOT}/${PREFIX}/lib/yaboot/yaboot + rm -f ${ROOT}/${PREFIX}/lib/yaboot/ofboot + rm -f ${ROOT}/${PREFIX}/lib/yaboot/addnote + @rmdir ${ROOT}/${PREFIX}/lib/yaboot || true + rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/bootstrap.8.gz + rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/mkofboot.8.gz + rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/ofpath.8.gz + rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/yaboot.8.gz + rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/yabootconfig.8.gz + rm -f ${ROOT}/${PREFIX}/${MANDIR}/man8/ybin.8.gz + rm -f ${ROOT}/${PREFIX}/${MANDIR}/man5/yaboot.conf.5.gz + @if [ -L ${ROOT}/boot/yaboot -a ! -e ${ROOT}/boot/yaboot ] ; then rm -f ${ROOT}/boot/yaboot ; fi + @if [ -L ${ROOT}/boot/ofboot.b -a ! -e ${ROOT}/boot/ofboot.b ] ; then rm -f ${ROOT}/boot/ofboot.b ; fi + @echo + @echo "Deinstall successful." + @echo "${ROOT}/etc/yaboot.conf has not been removed, you may remove it yourself if you wish." + +uninstall: deinstall diff --git a/README b/README new file mode 100644 index 0000000..01bcd36 --- /dev/null +++ b/README @@ -0,0 +1,421 @@ +Yaboot -- PowerPC GNU/Linux OpenFirmware bootloader +-------------------------------------------- + +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 +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 + +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 ,\\: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. + +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 +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. + +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. + +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. + +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. + +darwin= + +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 +ofpath utility to determine the OpenFirmware device path. + +enablecdboot + +This option adds an entry to the multiboot menu to boot from the CDROM +drive. + +enablenetboot + +This option adds an entry to the mulitboot menu to boot from the +network. + +enableofboot + +This option adds an entry to the multiboot menu to boot into an +OpenFirmware prompt. + +defaultos= + +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. + +delay= + +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. + +fgcolor=string + +Specifies the foreground (text) color used by yaboot(8) 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 +white. + +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 +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 + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +=========================================================================== diff --git a/README.man.patch b/README.man.patch new file mode 100644 index 0000000..445ae22 --- /dev/null +++ b/README.man.patch @@ -0,0 +1,4 @@ +This patch is only meant to be used by package maintainers (debian or +redhat), it changes references to /usr/local/lib/yaboot to +/usr/lib/yaboot in the man pages. This way the man pages will better +reflect the real locations for packaged version of yaboot/ybin. diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..630a169 --- /dev/null +++ b/THANKS @@ -0,0 +1,17 @@ +In no particular order: + + * Daniel Jacobowitz for Debian packaging, advice and busybox help. + * Benjamin Herrenschmidt for yaboot and great work on the kernel. + * Charles Stevenson for adding color config support to yaboot. + * Chris Emerson for the Forth code in ofboot. + * iNOUE Koich! for advice and help [re]writing ofboot's Forth code. + * Segher Boessenkool for help with ofboot's Forth code, and the new penguin icon. + * Tom Rini for adding devfs support to ofpath. + * Eric Peden for writing the yaboot FAQ. + * Nicholas Humfrey for the badge icons in ofboot. + * Hollis Blanchard YellowDog/RPM packaging. + * Brad Midgley for Turbolinux/RPM packaging. + * Olaf Hering for figuring out how to map SCSI /dev nodes to OF paths. + * Josh Huber for PowerBook1998 ofpath support. + * Ian the T for donating shell access to add 8600 support to ofpath. + * anyone i left out! diff --git a/TODO b/TODO new file mode 100644 index 0000000..c2d7f5a --- /dev/null +++ b/TODO @@ -0,0 +1,13 @@ + +* Add nvram updating support for IBM hardware. This requires ofpath + to support these machines. It also requires a compatible nvsetenv + or equivilent. + +* Validate yaboot options before proceeding. (need better config parsing) + +* Password protection for insecure menu options (MacOS). + +* Figure out all the crap with CHRP netbooting, probably have to remove + hard-coding of ":0" after a net devuce path + +* Support for compressed images diff --git a/changelog b/changelog new file mode 100644 index 0000000..7eb52a6 --- /dev/null +++ b/changelog @@ -0,0 +1,621 @@ +2001-09-20 Ethan Benson + + * Version 1.3 + + * Merging of ybin and yaboot source trees, this is now the + official upstream yaboot/ybin source tree. + + * yaboot: + - Various ppc64 & chrp fixes by Peter Bergner, fix fdisk partition + handling. + - Fix netboot (was broken by reiserfs patch) + +2001-08-26 Ethan Benson + + * Version 1.2.6 + + * ofpath became broken on non-scsi systems due to quoting fix. + +2001-08-20 Ethan Benson + + * Version 1.2.5 + + * Fix broken quoting uncovered by debian's current /bin/ash. + +2001-08-06 Ethan Benson + + * Version 1.2.4 + + * ofboot: remove tag as it was causing the + OpenFirmware multibooter to crash. + + * mkofboot: zero first 800K of bootstrap partition before creating + filesystem. + + * yaboot: + - Version 1.2.3 + - Supports using an md5 hash as well as plaintext password. (me) + - Fix again system.map loading. That also fix an old pending bug + we had where yaboot could pass random values for system.map, + causing the kernel to mark random pages reserved. (BenH) + - IBM CHRP fixes. (Peter Bergner) + - Add reiserfs support (Jeff Mahoney) + +2001-06-30 Ethan Benson + + * Version 1.2.3 + + * ofpath: + - Version 1.0 + - Add support for IBM CHRP, thanks to Marco d'Itri for testing. + - Use real wc if available, this speeds up ofpath slightly for scsi. + - Make variables local to their function unless they need to be global. + + * ybin: + - If installing on IBM CHRP run addnote on yaboot binary before installing. + - Reword some error/verbose messages + - Make variables local to their function unless they need to be global. + +2001-06-24 Ethan Benson + + * Version 1.2.2 + + * yabootconfig: + - Now works with braindamaged versions of pdisk. + - Add --kernel-args switch which allows boot-floppies to easily + add an append= line if needed. + +2001-06-01 Ethan Benson + + * Version 1.2.1 + + * Fix test for strict posix/SUS echo behavior. + + * Check for printf built into the shell. + + * yabootconfig: check for and attempt to deal with cross device symlinks. + +2001-05-28 Ethan Benson + + * Version 1.2 + + * Added yabootconfig, a script to build a valid /etc/yaboot.conf + + * ybin: + - Detect IBM CHRP hardware and disable nvram update automatically + - Automatically run yabootconfig if /etc/yaboot.conf is missing + - Check for PATH_PREFIX environment variable and add all bin and + sbin directories from under it to PATH. This is for boot-floppies. + - Add bsd= to list of multiboot options. + + * ofboot: bump maximum number of OSes to 8. + + * ofpath: + - No longer report bogus paths for non-existent scsi devices. + - Fix bug where garbage characters were mixed with the + OpenFirmware device path. + - Fix broken Wallstreet PowerBook support. + - Add support for silly devfs naming convention, Thanks to Tom Rini. + +2001-05-06 Ethan Benson + + * Version 1.1.1 + + * ofboot: + - Hopefully fix random and rare booting problem when chainloading + other OSes. Thanks to Segher Boessenkool for the fix. + - Add volume name which shows up in the OpenFirmware multiboot + screen. + - It is now possible to replace the badge icon for the multiboot + screen, see examples/README.mbicon. + + * yaboot: + - Version 1.2.1 + - Includes my previous 1.1.1-eb3 patches for password protection and single-key. + + * Various spelling errors and clarifications to man pages. Thanks to sword. + +2001-04-26 Ethan Benson + + * Version 1.1 + + * ofpath: + - Version 0.8 + - Add support for Performa 6400_200, PowerMac 4400, and the clones. + - Removed `No such file or directory' errors when system has no + scsi at all. + + * ybin: + - If delay= is not set use value of timeout= (converted to + seconds) instead. + - Removed command line options --type, --creator, and long + obsolete and deprecated --conffile. The config file options + hfstype and hfscreator are still there. + - Removed long obsolete and deprecated bootconf= config option. + - Removed some old now unneeded debug cruft. + + * yaboot: + - Include version 1.1.1-eb3, this includes the following changes + - Adds password protection capabilities. + - Add `single-key' option from silo. + + * Documentation: + - Rewrote the yaboot.conf man page, now derived from silo.conf(5) + +2001-03-22 Ethan Benson + + * Version 1.0 + + * ybin: + - Fix a few bugs that occured when magicboot= was not used. + - Add basic support for IBM style bootstrap partitions. These + partitions have yaboot dded directly to them. See the yaboot.conf + man page regarding fstype for more info, also + examples/yaboot.conf.rs6k. + - Don't require that ofpath be installed if its not needed. + + * Documentation: + - Added examples/yaboot.conf.rs6k + - Man page updates for IBM support. + +2001-02-19 Ethan Benson + + * Version 0.31 + + * ofpath: + - Quiet shell error when run on non-PowerMac (but still + PowerPC) hardware. + - Properly recognize more OldWorld PowerMac G3s. + - Fix OldWorld detection for kernels < 2.2.17 + - Require that /proc be mounted. + + * ybin: + - Fix OldWorld detection for kernels < 2.2.17 + - Make the `not bootable on OldWorld' warning very loud and + obnoxious. + - Change PATH to make /usr/local the last component instead of + the first. + - Make the text/background color in the boot menu configurable, + see the yaboot.conf(5) man page for details. + - Change default foreground color to white per yaboot 1.0. + - Remove support for obsolete /etc/ybin.conf. + + * Documentation: + - Clarified the `partition=' variable in the yaboot.conf man page + and correct an error in the example in that man page. + - Added more comments to included yaboot.conf examples. + + * yaboot: + - Include version 1.1.1 + - Includes color support + +2000-11-18 Ethan Benson + + * Version 0.30 + + * ybin: add `brokenosx' option, when used with macosx= ybin makes + the MacOSX menu entry execute \System\Library\CoreServices\BootX + directly instead of using \\:tbxi. This is necessary for + people who insist on installing OSX on HFS+ instead of UFS, since + MacOS deblesses HFS+ OSX partitions. + +2000-10-28 Ethan Benson + + * Version 0.29 (the brown paper bag release) + + * The yaboot.conf man page was broken. + + * While were at it, include yaboot 0.9 binary (compiled -Os, + stripped) + +2000-10-24 Ethan Benson + + * Version 0.28 + + * ybin: Add mntpoint= option, this allows ybin to install the + bootstrap into an already mounted filesystem. This is NOT + recommended unless you know what your doing. + + * ybin: fixed generation of ofboot.b so it will work with nobless + and usemount. + +2000-10-20 Ethan Benson + + * Version 0.27 + + * ofboot: fixed problem where text was not visible on some newer iMacs. + + * ybin: Now warn the user when they are using ybin on an OldWorld + PowerMac. (it will still work since its possible to make newworld + bootable disks on an OldWorld mac) + + * ofpath: Now works on oldworld macs under 2.4 kernels. + + * Added check for packaged versions of ybin to the Makefile and + warn user about them. + +2000-09-23 Ethan Benson + + * Version 0.26 + + * ofboot: completely rewrote the generator script, it is now more + extendable and supports more menu options. More thanks to iNOUE + Koich! for the continuing help on OpenFirmware issues!! + + * ybin: added options for mulitboot menu: now can create a menu + with options for GNU/Linux, MacOS, MacOSX, Darwin, and booting off + a CDROM, from the network, and even directly into an OpenFirmware + prompt. + + * ybin: some errors were sent to stdout instead of stderr, fixed. + + * ofpath: refuse to run on anything but GNU/Linux. (for now anyway) + +2000-09-18 Ethan Benson + + * Version 0.25 + + * ofboot: now changes the background color to black and the text + color to cyan like yaboot. Thanks to again to iNOUE Koich! + +2000-09-16 Ethan Benson + + * Version 0.24 + + * ofboot: many bugs in the Forth code fixed. code should now be + compliant to the OpenFirmware spec. Also add CD boot menu option. + (add enablecdboot to /etc/yaboot.conf) Thanks to iNOUE Koich! for + the Forth code. + +2000-09-13 Ethan Benson + + * Version 0.23 + + * ybin: now hard code the target filename for ofboot, its always + installed as ofboot.b on the bootstrap partition. This eliminates + ambiguity when someone tries a different script with different name. + + * ybin: all debugging output goes to stderr now. + +2000-09-09 Ethan Benson + + * Version 0.22 + + * ofboot.b renamed to ofboot. (.b means boot block which this is not) + + * yaboot and ofboot are now installed in /usr/local/lib/yaboot/ + instead of /boot, since these files are never directly accessed by + the firmware it is not really appropriate to keep them in /boot. + make install will create backwords compatibility symlinks when + installing over an older version of ybin so nothing should break. + IMPORTANT: you should run mkofboot on a dedicated bootstrap + partition to purge old filenames. + + * Man pages updated to reflect new file locations. Also include a + patch to change the paths to /usr/lib/yaboot for Debian and redhat + package maintainers. + + * ybin: now checks two places for a default value for install= + /usr/local/lib/yaboot/yaboot, /usr/lib/yaboot/yaboot. + +2000-09-02 Ethan Benson + + * Version 0.21 + + * ybin: fixed nvram update so it uses a real filename instead of + \\:tbxi when nobless is set in /etc/yaboot.conf. (\\: means find + file in blessed directory). + + * ofpath: more oldworld machines supported. Now supports 7200, + 7300, 8600, 9500, Gossamer G3, PowerBook 1998, PowerBook 3400 (and + possibly 2400). + +2000-08-31 Ethan Benson + + * Version 0.20 + + * ybin: check for Newworld compatible nvsetenv and if found will + automatically update the OpenFirmware boot-device variable in + nvram. + + * ofpath: support some oldworld machines. (this does not mean + ybin/yaboot supports oldworld). Also silence a harmless error on + machines lacking a CDROM. + + * ofboot.b: added more machines to + +2000-08-25 Ethan Benson + + * Version 0.19 + + * Added PowerMac3,2 and PowerMac3,3 to ofboot.b scripts. Fixes + Debian bug #69870 + +2000-08-22 Ethan Benson + + * Version 0.18 + + * ofboot.b: changed the yaboot boot commands to boot yaboot by + filename rather then file type. Booting by file type did not work + reliably on all machines. + + * ybin: hard code the target filename for yaboot, regardless of + the source filename (from install=) the target filename on the + bootstrap partition will always be "yaboot.b". + + * Added ofpath utility, this is a rewrite of the show_of_path.sh + utility written by Olaf Hering. Ofpath works with /bin/ash and on + stripped down systems such as the Debian boot floppies. Also + wrote a small man page for this utility. + + * ybin: automatically use ofpath to find the OpenFirmware device + path when ofpath= is not defined in /etc/yaboot.conf. Ybin will + also use ofpath when macos= or macosx= are set to unix device + nodes (ie /dev/hda11), these options can still be set to + OpenFirmware paths as well. + + * Makefile: minor cleanup, added installation of ofpath + utility/man page as well as a deinstall rule. + +2000-08-13 Ethan Benson + + * Version 0.17 + + * Yaboot 0.7 binary included. + + * ybin: fix bug where ybin would fail if the bootstrap files + included an "_" in the filename. (actually its a workaround for + hfsutils brain-damage) + + * ofboot.b: completely rewritten. Now includes shell script code + to allow ybin to configure it based on config options in + /etc/yaboot.conf instead of requiring the user to edit it + themselves. Additionally this new script will display a REAL boot + menu when dual booting is configured. It is capable of dual or + tri booting GNU/Linux (yaboot), MacOS 8.*/9.* and MacOSX. This + new ofboot.b script should *NOT* be edited by the user, and thus + should NOT be marked as a conffile in Debian and redhat packages. + These packages should now install ofboot.b in /boot instead of + /etc since it is no longer a config file. WARNING: The Forth code + in this script has not been tested on all machines and may not be + universally compatible. Thanks to Chris Emerson for writing the + Forth code. + + * yaboot.conf: new options: ofboot= macos= macosx= delay= + defaultos=. See the yaboot.conf man page for details. + + * Now include a Makefile to handle installation, only make install + is defined. Removed install-sh. + + * mkofboot is now distributed and installed as a symlink instead + of a hardlink. + + * Man page updates. + +2000-04-25 Ethan Benson + + * Version 0.16 + + * menu_ofboot.b: fixed bug where the yaboot line was missing the + boot command, this prevented it from booting yaboot. + +2000-04-25 Ethan Benson + + * Version 0.15 + + * Merge quik's bootstrap(8) man page with ybin's ofboot(8) man + page and rename it back to bootstrap(8). This also solves the + conflict with quik. In a more useful way IMO. + +2000-04-24 Ethan Benson + + * Version 0.14 + + * Ship man pages uncompressed, gzip them in install-sh instead, + this allows for easier patching by debian maintainers if need be. + + * Rename bootstrap(8) man page to ofboot(8) so ybin does not + conflict with quik. + +2000-04-23 Ethan Benson + + * Version 0.13 + + * Rewrote the config file parsing yet again to remove dependencies + on tr, and awk. This allows ybin to function on minimal systems + such as boot/rescue floppies. This also pretty much solves the + slowness problem. Thanks to Daniel Jacobwitz for the help. + + * Made changes to remove dependencies on basename and wc. Again + this is to allow ybin to work on boot floppies. + + * Changed all calls to grep to stop using GNU extensions, this is + so ybin will work properly with the minimal version of grep + included in busybox. + + * Added signal handling so ybin/mkofboot will cleanup after + themselves if killed with signals 1 2 3 or 15. + + * Added OS Badge icons to the ofboot.b scripts. On G4 machines + you can hold down the option key and get a graphical boot selector + with one button for each bootable partition, the button with the + penguin icon is the bootstrap partition. Thanks to Nicholas + Humfrey for creating the Badge icon. + + * Minor updates to the man pages. + +2000-04-19 Ethan Benson + + * Version 0.12 + + * Now include yaboot binary in ybin distribution. + + * Include a install-sh script to install everything. + + * Use of the separate ybin.conf file is deprecated. Use + /etc/yaboot.conf instead. + + * Removed the so called kludge options, without being able to + bless the root directory they were just useless bloat. + + * Removed useless --readonly option, it was already default (as it + should be) + + * Deprecated bootconf options since the yaboot.conf is the same + config ybin uses. (it is still there and works but that may change) + + * Changed configuration file format to be more like quik/lilo: + bootfile= is now install= (--bootfile is now --install), wrapper= + is now magicboot=, usemount, protect, and hide are now just a + keyword options, if they are present in the configuration file + they are turned on, if they are not present they are turned off. + bless= is now the nobless keyword option, since bless is default + this one changed names. + + * ybin: no longer need to specify -C /dev/null if you don't have a + configuration file in /etc/. If this is the case ybin will generate + a generic yaboot.conf to install on the bootstrap partition. + + * More changes to the configuration parsing to improve speed, the + format change also helped the speed problem. + + * Added man pages for ybin, mkofboot, yaboot, yaboot.conf and + bootstrap. + + * More general fixes/cleanup/tweaks. + +2000-03-13 Ethan Benson + + * Version 0.11 + + * Added command line options to both scripts, try --help. This + makes the ybin.conf file optional if you wish (-C /dev/null) + + * Changed the way the config file is parsed, no longer source it + with the shell, this allows ybin.conf to be merged with + yaboot.conf at which point yaboot can live with unknown options in + its config file. + + * Use /etc/ybin.conf if it exists, if not use /etc/yaboot.conf for + ybin configuration. + + * Merged ybin and mkofboot into one script, mkofboot shared 90% of + of its code with ybin anyway and this will make them much easier + to maintain. mkofboot is now a hard link to ybin (or a symlink if + you prefer, both will work) + + * Added an experimental feature to generate a yaboot.conf on the + fly based on command line options. The defaults should be + workable on a Debian system with an internal ATA disk, with the + root partition being the 3rd on the disk. Depends on mktemp for + creating the temporary file, Debian's mktemp is secure against + race conditions, use with caution if your distribution lacks a + secure mktemp utility. This option is activated with -c auto. + + * No longer depends on bash. Works with Debian's + /bin/ash. Interpreter is now set to /bin/sh. + + * Assorted cleanup, minor bug fixes. + + * Added example yaboot.conf. + +2000-02-04 Ethan Benson + + * Version 0.10 + + * Added a simple multi-boot menu written by Benjamin Herrenschmidt. + +2000-01-17 Ethan Benson + + * Version 0.9 + + * mkofboot was still broken. :-( + + +2000-01-14 Ethan Benson + + * Version 0.8 + + * Added a basic CHRP script ofboot.b to work around the problem of + OF refusing to load `tbxi' files unless they contain a CHRP boot + header. See README.ofboot.b for details. + + * Updated default ybin.conf to install ofboot.b by default. + +2000-01-13 Ethan Benson + + * Version 0.7 + + * mkofboot: Check for hformat was broken. + +2000-01-12 Ethan Benson + + * Version 0.6 + + * mkofboot: Fixed problem where it was insisting that mkdosfs be + present even when using hfs filesystems if usemount=yes. + + * mkofboot: Added proper checks for hformat or mkdosfs. + +2000-01-09 Ethan Benson + + * Version 0.5 + + * First public release. + + * Add TODO and BUGS files. + + * mkofboot: Check to see if usemount=yes, and if so make sure we + are root before proceeding to erase the partition. + + * ybin: Removed useless echo line. + +2000-01-05 Ethan Benson + + * Version 0.4 + + * ybin (util_install): Fully support OF `wrappers' now: if a + wrapper is defined in the configuration file then the wrapper is + given the HFS file type specified instead of the bootfile, the + bootfile's type is set to "boot". + + * ybin: New configuration option `bless' when yes and are using + hfsutils we will `bless' the root directory of the bootstrap + filesystem so OF should be able to find and boot the system + without reconfiguration. + + * mkofboot/ybin (checkconf): Add validation for the new `bless' + option. Also add check that the wrapper, if defined, exists and we + have permission to it. + +2000-01-04 Ethan Benson + + * Version 0.3. + + * ybin (util_install): Quote the filetype/creator arguments to + hattrib to prevent the shell from interpreting any meta-characters + in some cases. Also no longer try and set metadata on wrapper if + there is no wrapper. + + * mkofboot: When creating hfs or dos filesystems give them volume + label of "bootstrap". + +2000-01-03 Ethan Benson + + * Version 0.2. + + * mkofboot: added -w switch to grep when checking if a filesystem + is already mounted to prevent erroneous positive matches. + + * ybin (util_install): Add check to make sure that the target + device is not mounted as a filesystem before mucking with it. + + * Added changelog. + +2000-01-01 Ethan Benson + + * Version 0.1. + + * first version. + +End: diff --git a/doc/README.ofboot b/doc/README.ofboot new file mode 100644 index 0000000..5d7bb33 --- /dev/null +++ b/doc/README.ofboot @@ -0,0 +1,47 @@ +This is a new OpenFirmware CHRP script designed to be automatically +configured by ybin. It is more robust then previous CHRP scripts, it +includes the following capabilities: + +* Multibooting GNU/Linux, MacOS 8.* or 9.* MacOSX, Darwin, direct from +* CDROM, Network and into an OpenFirmware prompt. + +* Presenting a real menu of OS choices. + +* Automatic configuration by ybin. This script should NOT be edited + by the user. It should also not be used without ybin, its not + directly useable by OpenFirmware. + +* Configurable colors. (see the yaboot.conf(5) man page). + +The multiboot menu is only presented when an extra OS is defined in +/etc/yaboot.conf, otherwise this script loads yaboot without any user +interaction. + +To enable a multi boot menu add bsd=ofpath and/or macos=ofpath and/or +macosx=ofpath, and/or darwin=ofpath where ofpath is the OpenFirmware +device path to the MacOS or MacOSX boot partition. Example: +macos=hd:10 you can also specify a unix device node, ie: /dev/hda5, +and ybin will translate it automatically using ofpath. + +This script when presenting a dual boot menu will wait for a defined +number of seconds before automatically booting the default OS. Both +this delay and the default OS can be configured in /etc/yaboot.conf. + +The delay is configured by adding delay=seconds. Unlike timeout this +is in seconds rather then 10ths of seconds. This option has no effect +on the yaboot boot: prompt timeout. If delay= is not set, ybin will +translate the value of timeout= to seconds and use that. + +The default OS is configured by adding defaultos=macos. There is only +four values that are acceptable: linux, bsd, macos, macosx and darwin. The +default is linux. This should not be confused with yaboot's +`default=' variable. + +The name and letter used to load MacOS or MacOSX (M and X +respectively) cannot be be configured. (others are D for Darwin, C +for CDROM, N for network, and O for OpenFirmware) + +The Forth code in this script was written by Chris Emerson and iNOUE Koich!. + +This script has only been formally tested on a Rev 1 Blue G3, a G4, +and an ibook, please report any incompatibilities. diff --git a/doc/README.ofpath b/doc/README.ofpath new file mode 100644 index 0000000..2d5b9f8 --- /dev/null +++ b/doc/README.ofpath @@ -0,0 +1,25 @@ +This utility is used to find the OpenFirmware device path to a unix +device node (ie /dev/hda2). + +Ofpath will work on Newworld PowerMacs only if yaboot is used as the +bootloader, it will not work on newworld macs booted with BootX. + +Ofpath will also work on most Oldworld PowerMacs, unlike Newworld, it +will work on BootX booted Oldworld machines. Note that oldworld +support is not well tested and may not give accurate results. + +ofpath supports the following command line switches: + + --debug print boring junk only useful for debugging + -h, --help display this help and exit + -V, --version output version information and exit + +Ybin will use this utility automatically to find the OpenFirmware +device path when macos=, macosx= are set to unix device nodes in +/etc/yaboot.conf, and/or if ofboot= is not defined. + +ofpath is based on show_of_path.sh written by Olaf Hering, this +version unlike show_of_path.sh works with /bin/ash and is fully +functional on stripped down systems such as boot or rescue floppies. +It has been tested on the Debian GNU/Linux 2.2 (potato) boot +floppies. diff --git a/doc/README.rs6000 b/doc/README.rs6000 new file mode 100644 index 0000000..67dd904 --- /dev/null +++ b/doc/README.rs6000 @@ -0,0 +1,80 @@ +RS/6000 yaboot Notes +--------------------- + +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. + This partition must be less than 10MB. + + Recommended partition configuration: + /dev/sda1 : PREP Boot. Type 0x41. Size = 4 MB + /dev/sda2 : Linux swap. Type 0x82. Size = 128 MB + /dev/sda3 : Linux native. Type 0x83. + +B. Building & Installation: + 1. See the partitioning section for notes & examples on how to configure + your system partitions when installing Linux. + 2. Build yaboot by doing: + make clean; make + 3. Install yaboot by doing (as root): + dd if=yaboot of=/dev/sdax + where x is the boot partition; for example: dd if=yaboot of=/dev/sda1 + 4. Make a yaboot.conf file in /etc/yaboot.conf + +C. Configuration File (/etc/yaboot.conf): + 1. See the ybin documentation for the full range of options. + 2. Options tested on an RS/6000 include: + timeout =