Yaboot for Pegasos's openfirmware
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Estrayk
    Posts: 142 from 2003/12/30
    From: Spain!
    Config: PegasosII G4/1000, 256MB DDR400, VooDoo 3000 AGP
  • »10.05.04 - 22:08
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Acill
    Posts: 1926 from 2003/10/19
    From: Port Hueneme, Ca.
    That does look like a great thing to have for our systems. Coders???? How hard would this be to port? Isnt the OF based on linux to start with?
    Powermac Dual 2.0 GHZ G5 PCI-X (Registration #1894)
    Powerbook 1.67GHZ
    Powermac Dual 2.0 GHZ G5 PCIE (Registration #6130)
    A4000T CSPPC, Mediator
    Need Repairs, upgrades or a recap in the USA? Visit my website at http://www.acill.com
  • »11.05.04 - 00:27
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    nels664868
    Posts: 117 from 2003/12/28
    From: Fort Myers, Fl...
    Hi Acill,
    Quote:

    Isnt the OF based on linux to start with?

    NO! According to the Smartfirmware manual, it is based on the Forth programming language.

    nels
    Ask Dr. Stupid,
    Dear Dr. Stupid,
    Why do we have to go to school?
    That's a very good question. It's becuse your parents are
    ALIENS!!! When your at school they shed there human skins and
    breathe drier lint! hahahaha!
  • »11.05.04 - 00:46
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    dholm
    Posts: 296 from 2003/9/1
    From: Malmo, Sweden
    It's not that difficult at all to port. The current yaboot works on the Pegasos but it only supports Mac disklabels and therefore does not recognise any partitions. It is just a matter of adding Sven Luther's parted-code to it.

    The problem as usual is that unless someone is paid to do it, porting yaboot is a matter of how much time you have to spend on it, and of course interest.
  • »11.05.04 - 03:08
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    It wouldn't be worth it, the latest firmware supports enough Forth to enable boot menus (text, keyboard selection), why do you need a dedicated boot loader when the OpenFirmware is capable of bootstrapping standard compressed kernels anyway?

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »11.05.04 - 13:49
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    GK_LKA
    Posts: 481 from 2004/3/28
    From: Hungary
    Is it? How?
    [ GK / LKA Team ]
  • »11.05.04 - 14:37
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    Get a book on Forth and just code up a menu ;)

    There's a very very very very very similar thing
    in the FreeBSD tree (loader.4th)

    The keyword to make it boot is "$boot" I think.
    Just push the boot line onto the stack and run
    $boot.

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »11.05.04 - 14:42
    Profile Visit Website
  • Moderator
    gunne
    Posts: 441 from 2003/2/25
    From: Sweden
    Hi

    I little bit got the feeling that people doesn't see all the possibilitys thats in the smart firmware we have on our Pegasos. You can load files from local, you can load files over a network, you can write your own alias, there is also a small simple text-editor involved in the firmware, which you can use for writing small scripts.

    Well, there is no graphics-like menues, but with a such menu you can only do the things that menu offer you, nothing else.

    If there will be menus added to the firmware in the future, it would be nice if not the prompt we have now will be hidden.

    Maybe I'm wrong, and yes, I haven't tried everything in the firmware, but some parts I have tried. And yes I like the way it is, with just a somewhat unix-like prompt and nothing else.

    Gunne
    Best wishes, Gunne
  • »11.05.04 - 14:52
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    There are some image-related extensions possibly in the next firmware update.

    But you're right, people just don't get it! OpenFirmware is VERY flexible, as is the Forth language implementation that goes with it. You can look for keyboard input, set variables, allocate memory, find devices, you have to remember that THE EXACT SAME LANGUAGE is used to drive things like SCSI cards and Mac graphics cards - it's more than just a shell prompt.

    Just like the computers we used to have as kids, your Pegasos boots into a full 32bit programming language interpreter, but is woefully underused -in this day and age, now, instead of..

    LOAD *,8,1

    it's..

    boot ide:0

    :)

    The IEEE1275 specs are available on Sun's FTP somewhere or another, and IBM list the CHRP specifications similarly (more hardware than firmware specification, but still a good read)

    Some hints would be to use "begin while repeat"
    loops, with key? (check if there's a key in the buffer) and key (put the key value on the stack) and then put the correct line on the stack ("/pci/ide/disk@0,0:1 vmlinuz-blah root=/dev/hda2" or whatever) and $boot it.

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »11.05.04 - 15:29
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Acill
    Posts: 1926 from 2003/10/19
    From: Port Hueneme, Ca.
    I agree that our OF isnt used to its fullest, but the docs for it are a bit simple. If someone would write a complete set of docs telling how to use it better maybe more would do so. I for one would love to learn more about it. Is such documentation even out? The stuff on the beta2 FTP is real simple.
    Powermac Dual 2.0 GHZ G5 PCI-X (Registration #1894)
    Powerbook 1.67GHZ
    Powermac Dual 2.0 GHZ G5 PCIE (Registration #6130)
    A4000T CSPPC, Mediator
    Need Repairs, upgrades or a recap in the USA? Visit my website at http://www.acill.com
  • »11.05.04 - 15:49
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 159 from 2003/10/24
    From: Portland Orego...
    I agree completely. An actual manual on how to use/program the OF would be of great help. At minimum links to everything that needs to be read to do the same thing.

    @ Neko
    If you have links that you can post that would be greatly appriciated.

    @bbrv (hopefully you'll read this)
    We need some better documentation!!
    --Mithalas
  • »11.05.04 - 16:10
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 159 from 2003/10/24
    From: Portland Orego...
    Thanks Neko!
    --Mithalas
  • »11.05.04 - 16:57
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    To run a Forth script, you can simply save it to a disk that OF can read (FFS or ext2, for example) and then "boot" from it.

    For example if you had it on your MorphOS boot disk, you could perform:

    boot ide:0 my-menu-script

    This is the part where I, and Genesi, waive all responsibility for user-defined scripts damaging boards.

    You code that stuff at your own risk, don't do anything quirky with the nvram ;)

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »11.05.04 - 17:41
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dholm
    Posts: 296 from 2003/9/1
    From: Malmo, Sweden
    There are several reasons why we would want yaboot. The 1.5MB limit of initrd images is the biggest reason imo, another is that kernel 2.6 doesn't seem to support compiling boot commands into the kernel. The option is there but it doesn't seem to parse it on boot.
  • »11.05.04 - 18:56
    Profile Visit Website
  • Just looking around
    Posts: 2 from 2004/4/17
    @ Mithalas.

    Here is another document from Sun about Open firmware. The Openboot 3.x Command Reference Manual

    http://docs.sun.com/db/doc/806-1377-10?q=openboot

    If you search for Openboot on their website you will find some more.
  • »11.05.04 - 20:09
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 159 from 2003/10/24
    From: Portland Orego...
    @reboot

    Thanks. Openboot good to know. :)
    --Mithalas
  • »11.05.04 - 20:26
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    David:

    If you could create a boot menu right on OpenFirmware that booted with the correct arguments when you press a key.. like..

    1. MorphOS
    2. Debian Sarge
    3. Gentoo 2004.1

    - wouldn't that completely negate all uses of yaboot? yaboot won't remove the 1.5MB initrd image and it won't magically make kernel options get passed (get someone to fix the bloody kernel!). The user still has to enter them into yaboot configuration :)

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »11.05.04 - 20:54
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dholm
    Posts: 296 from 2003/9/1
    From: Malmo, Sweden
    As I understand it, the size is limited by SmartFirmware. On Apple we do not have this problem as the initrd image is loaded by yaboot and not the firmware.
    There are of course many other important features in yaboot such as the ability to boot from XFS etc.
  • »11.05.04 - 21:10
    Profile Visit Website
  • Moderator
    gunne
    Posts: 441 from 2003/2/25
    From: Sweden
    dholm:

    Why must the kernel in Linux be that *big* ?

    I would like to say, that I have nothing against if yaboot is an option, but Nekos's suggestion seems very nice, with ready-made aliases, or what it means ?

    Gunne
    Best wishes, Gunne
  • »11.05.04 - 21:21
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dholm
    Posts: 296 from 2003/9/1
    From: Malmo, Sweden
    Because you might want to have support for many drivers and filesystems. The XFS module alone is about 580K in size. I had to remove JFS support from Gentoo 2004.1 because it wouldn't fit.
  • »11.05.04 - 22:49
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    The code for directory listing and reading files from XFS is 580K in size?!

    Anyway, supporting a billion filesystems could be one reason to port it, but you could always add them to the Pegasos OF if they were of a reasonable size.

    You could add them to yaboot too, I mean, what happens if someone makes a new filesystem now for Linux, neither yaboot or Pegasos OF will support it.. what will you do? :)

    It currently boots from FFS, SFS, ext2 & 3, UFS (BSD) and FAT, and pretty much every potential disk partitioning type (BSD disklabels, MBR, RDB..).. isn't that good enough? :)

    Gentoo used to specify a seperate /boot partition in the manual, I think it still does.. what's the problem just making this an ext2 filesystem at the beginning of your disk? :)
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »11.05.04 - 23:13
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    dholm
    Posts: 296 from 2003/9/1
    From: Malmo, Sweden
    There is much more involved in a filesystem than listing the contents and reading files. Things like journalling, quotas, access control lists etc etc. XFS also has this neat thing called realtime mode where you dedicate a part of the partition that is only used as a large linear cache, for instance when working with large files such as digital video editing (XFS was designed by SGI and is the default filesystem in Irix).
    As far as Linux goes it doesn't matter what filesystems SmartFirmware support, it still has to have it's own drivers. XFS is the largest module I know of.

    Here is a benchmark of different filesystems for Linux which was conducted recently.

    Even having a /boot filesystem does not help when you have to load a kernel with a large initrd image. I guess it's possible to add the capabilities to load the initrd to SmartFirmware but imho it would be much easier to add RDB partition support to yaboot.

    Edit:
    I don't think too many features should be crammed into SmartFirmware. Special cases such as the Linux initrd is better handled by a specialised bootloader. When OpenBeOS is ported SmartFirmware would have to support BeFS, etc. In my opinion it should stick to a small subset of required drivers that can be easily managed, and kept rock solid. Special features should be handled by bootloaders. As for the firmware it's not up to me to make any decisions. But, my point is, porting yaboot is a good idea in the long run, and since it's open source we can add all kinds of odd features to it if someone wants to, something we cannot do with the firmware(?).

    The solution is not to build a smaller kernel or put the modules elsewhere etc. That is just a temporary work-around until we can port yaboot.

    I'm off to bed now, haven't slept for almost 40 hours now. :-(
  • »11.05.04 - 23:54
    Profile Visit Website
  • Moderator
    gunne
    Posts: 441 from 2003/2/25
    From: Sweden
    Ok, I still dont get it vhy its beter to have it compiled into the kernel ? Who decides this by the way ?

    Why not compile X-Windows and the whole system right into the kernel... :-)))

    Sorry, just joking. ! ;-)

    But you are very welcome to explain for me.

    The benefit from my point of view to not have filesystems, for instance, compiled into the kernel is that if you not intend to use a filesystem then its better its not loaded, and perhaps best not installed at all. If you not intend to use sound then its no idea to load any sound-module, and perhaps not install it either.

    And if you intend to use the XFS filesystem, then maybe ext3 is better to leave out ?

    That is, keep the kernel as small as possible. And the installer should give options about what you want to install, if you not intend to use cd's, then perhaps its best to not install any cdrom filesystem.

    I of course get the thing to have a 'default install' is to prefer, that install thats what a normal computer user probably would like to use, maybe XFS not is needed in this default install. But the installer should also give options, perhaps if you dont want x-windows installed on the systen, you can just leave it out. This is what the maintainer of the system should decide.

    This has also been a benefit with the Amiga, from my point of view, in the past. That if you want you can just bring up a bootshell and nothing more, and do what you want to do from there. The same is with MorphOS, there is a somewhat default, but if you want you can have a much cleaner system.

    And Im still for options... !

    Gunne
    Best wishes, Gunne
  • »12.05.04 - 08:42
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Bifford
    Posts: 276 from 2003/2/24
    From: Wiltshire, UK
    Firstly I want the current OF to be able to boot from PFS2/3 harddrives. "almost all" formats just isnt so when this one is a major format thats not supported.

    Secondly - you say "go ahead and play with the OF commands" - yeah right! We have been told at every step of the way that doing just that is blasted dangerous and could very well knacker the OF up to such a degree that we would have to send it back to be repaired!

    I want a bootup system like the (dare I say it) "proper" Amigas where you can hold the mice buttons (or esc or someat) down to get a menu system where you can do stuff. Hell - even something like my old Amstrad CPC464 where it didnt matter what you typed, you couldnt do any damage whatsoever!

    Having an OF that is inherantly "liable" to be damaged is not good for anyone. And I still don't understand why the hell the Pegasos does not have an equivelant of a "BIOS reset" jumper set!

    TTFN
    Bifford
    (Venting his spleen) (where the hell did tht saying come from anyway!!!?? ;-)
    ========
    Bifford the Youngest

    My Website at: www.whiteharegames.co.uk/
  • »12.05.04 - 09:40
    Profile Visit Website