-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the boot usb option #209
Conversation
Having support for booting from USB in Bochs would be nice, but I think it doesn't make sense to apply these changes to master until there is BIOS support for it. With SeaBIOS booting from USB should work, but I never tried it and I don't know how it is implemented. This pull request should be postponed until after release 2.8. Otherwise users may try the new config choice and reporting issues here. |
Agreed. However, BIOS support is currently a work in progress, though it may be a little while. Also, I have been told, and agree to, that small frequent PRs are much more advisable than a single large PR, hence this PR.
Without mandatory user intervention, how do you tell SeaBIOS to boot the USB? Unless I am mistaken, there is no current way in Bochs to tell SeaBIOS or any BIOS for that matter, to boot the USB (without mandatory user intervention, which requires the user to know how to intervene).
Agreed. I have no problem with this.
If it is not included in the documentation yet (.bochsrc, user.dbk, etc.), only those that read and keep up with these PRs would know to try it, and in doing so, would know that it isn't available yet. Anyway, just my opinion. It is more difficult for me to maintain and have a code base that is not in sync with the Bochs master, so I was hoping that small simple PRs would be accepted. It makes it easier on both me and the Bochs master to keep track of these small changes rather than one large change. However, do as you feel best. I will manage. Thanks. |
Just curious if this PR will ever be merged. I have the source to the referenced BIOS ready to post somewhere, I am simply waiting for the ability to boot from USB, the initial reason I wrote the BIOS. Just curious. |
The USB boot option only makes sense with a BIOS that supports it. I suggest to add the new BIOS sources as new repository inside of "bochs-emu" just like I did it with the LGPL'd VGABIOS. Then we could add the binary in the bochs/bios folder. You may also have a look at the current status of the USB debugger. I made it work with plugins support and started porting it to GTK. |
The source code to my BIOS is at https://github.com/fysnet/i440fx. I think it will be easier for me to maintain there since I have write permission there and not here. Feel free to include the |
Since it's on Github, it should be okay for now. I just tried to compile the BIOS here, but since I'm on Linux, I'm using nbasm with wine. It fails to compile, but I don't know whether or not it's a wine issue. I can open an issue on your page, so can look for a workaround. Now it would be possible to apply the USB boot option, but I don't know whether or not the new BIOS can be included in the Bochs tree. The LGPL license has no restrictions for the type of usage, but if I understand correctly, nbasm and software created with it are for non-commercial usage only. |
This allows the
usb
option to be used in theboot:
parameter. Of course there is not support for booting from a USB, but this allows for a (probably much) further down the road addition.This will break the current bios when booting from a network. However, the bios is already broken in this manner, especially when
BX_ELTORITO_BOOT
is not defined. The current bios code assumes and hard codes the BEV entry to 4. However, if theBX_ELTORITO_BOOT
define is missing, the BEV will be added to the third entry, not the fourth entry.For the BIOS to be updated correctly, things like the following will need to be updated instead of hard coded to
[4]
.Bochs/bochs/bios/rombios.c
Line 2205 in 54961f0
The following will need to be not hard coded to 4.
Bochs/bochs/bios/rombios.c
Lines 2253 to 2257 in 54961f0
The following will need "usb" added.
Bochs/bochs/bios/rombios.c
Line 2102 in 54961f0
The following assumes the next entry will be the fourth entry, not checking to see if
BX_ELTORITO_BOOT
was defined.Bochs/bochs/bios/rombios.c
Lines 10851 to 10857 in 54961f0
The following comment will need to be updated.
Bochs/bochs/bios/rombios.c
Lines 8365 to 8371 in 54961f0
As well as a few other fixes and updates.
This PR simply allows the value of '4' (
BX_BOOT_USB
) to be placed in the boot sequence options, moving the network (BX_BOOT_NETWORK
) to the next number.The boot sequence option still only allows three parameters.
boot: cdrom, floppy, disk
or
boot: cdrom, usb, disk
I don't think it is necessary to add a fourth.