Running PrettyOS from a BIOS chip



  • Good day Erhard,

    thank you very much for the PrettyOS !

    I tested your OS inside the Virtual Box --- PrettyOS is amazing! And,
    most importantly, it has a live floppy! Even today the floppies are
    still being used, for example - as virtual floppies inside the
    coreboot open source BIOS. Just imagine: your wonderful OS could be a
    part of someone's BIOS build! (for coreboot supported motherboard,
    maybe you have or could get one - see " Supported_Motherboards " page
    at coreboot wiki - https://www.coreboot.org/Supported_Motherboards )

    If you already have a coreboot-supported motherboard, or a real chance
    to get one, - wouldn't it be cool to be able to launch your own OS
    straight from the BIOS chip? 😉 With one simple command its possible
    to add any floppy to coreboot BIOS build - and then you see it as a
    boot entry! Multiple floppies could be added this way (as long as you
    have enough space left inside the BIOS flash chip, luckily LZMA
    compression could be used for the stored floppies to reduce their
    occupied size)

    I wish you good luck in your project, PrettyOS is awesome
    Also it has been listed amoung Top 10 Notable projects at OSDev wiki:
    http://wiki.osdev.org/Notable_Projects
    Would be happy to see its' story continued

    Best regards,
    Ivan Ivanov


  • Mod

    Dear Ivan,

    thank you for the link to http://wiki.osdev.org/Notable_Projects and for your helpful comment about launching our OS directly from a BIOS chip.

    It is interesting to see that PrettyOS can be found in this list of "Notable OS Projects".



  • Erhard Henkes schrieb:

    thank you for the link to http://wiki.osdev.org/Notable_Projects and for your helpful comment about launching our OS directly from a BIOS chip.

    It is interesting to see that PrettyOS can be found in this list of "Notable OS Projects"

    Yes, and it happened thanks to you continue developing PrettyOS !
    and PrettyOS became better than some older OS, that were abandoned
    by their creators and moved from Notable to http://wiki.osdev.org/Abandoned_Projects

    Now, from 175 hobby OS listed - about 100 are still active
    and being at the top 10 is a very good result for a PrettyOS 🙂
    Congratulations! Just keep developing it please , no abandon 😉

    More info for adding PrettyOS to a BIOS chip:

    to clarify: coreboot just initialises the hardware and then gives a control to "payload".
    Default "payload" is SeaBIOS - legacy style open source BIOS ;
    but could also be something else open source, like GRUB2 or even Linux kernel

    It is SeaBIOS which provides the BIOS calls and virtual floppy loading feature,
    that is why: who needs the floppy OS, should choose coreboot+SeaBIOS combination 👍

    So, the people build coreboot+SeaBIOS for their supported motherboard
    using this instruction - https://www.coreboot.org/Build_HOWTO - and
    after building it, they could use cbfstool from coreboot repository
    to add PrettyOS floppy to their open source coreboot+SeaBIOS build :

    ./build/cbfstool build/coreboot.rom add -f /home/user/pretty.img -n floppyimg/pretty.lzma -t raw -c lzma
    

    Where

    build/coreboot.rom - example path to the built BIOS
    /home/user/pretty.img - example path to PrettyOS floppy
    floppyimg/pretty.lzma - could be a path to PrettyOS compressed floppy at the coreboot filesystem inside a BIOS chip

    Then you can look at the new memory map of your BIOS :

    ./build/cbfstool build/coreboot.rom print
    

    it will print a table, which - among other things - should contain floppyimg/pretty.lzma

    LZMA compression is important because there is not many space inside BIOS chip.
    For example: my BIOS chip is 4 MB, from there it was 3.5 MB eaten by the bloated closed source UEFI.
    After I replaced the fat factory UEFI with a slim efficient coreboot+SeaBIOS,
    now there is just 1 MB occupied and 3 MB free space - but 3 MB is still not much 😃
    Without compression Pretty OS floppy is 1.44 MB, with compression - about 350 KB
    and it will be automatically uncompressed while booting before launching it

    Then, after we finally got this wonderful BIOS with PrettyOS floppy inside it
    (and maybe some other floppies also) now we need to flash it to our BIOS chip
    There are many instructions online, how to flash your BIOS directly to a chip,
    and sometimes it is possible without any soldering!

    Here is a great example of flashing a laptop SOIC8 shape BIOS chip:
    http://dangerousprototypes.com/docs/Flashing_a_BIOS_chip_with_Bus_Pirate
    Could use cheap tools in this instruction:

    CH341A programmer: just $3
    SOIC-8 test clip, to attach a programmer to BIOS chip: about $5

    So its less than $10 with free shipping from China (AliExpress or eBay)
    Connect these tools and use open source flashrom software for flashing the BIOS

    Please note that other computers, like desktop computers,
    instead of SOIC8 shape they could have another shape of BIOS chip
    and another adapter could be needed. So it is a good idea
    to check a shape of chip before getting any adapters 🙄

    Of course, for success your motherboard needs to be coreboot supported:
    https://www.coreboot.org/Supported_Motherboards
    because, as you see - with coreboot, a virtual floppy inside BIOS is very easy ;
    but with proprietary UEFI it is super difficult or even impossible (when not enough space)

    Example of a good coreboot supported computer - Lenovo G505S laptop ;
    it could have AMD A10-5750M quad core processor, possible to install 16 GB RAM,
    and sometimes I see this used laptop selling at eBay for very cheap price, just $100 for example

    If you have questions - I will be happy to help :p


Anmelden zum Antworten