Hi,
attached is my work on ADLO.
Changes: 1, use macros for frequently used functions (LOAD_SEG, CMOS_OUT, PCI_OUT) 2, store loader size at end (no 1kb limit) 3, change the copy routine to support 128kb images 4, createpayload utility, which concatenates the ELF header, the loader and BIOS
Together with bochsbios.diff, this made it possible to use the latest 128kb big bios images from Bochs.
After talking with Stefan, it turned out that the enable/disable shadowing inside ADLO are really machine specific, thus this method is not really welcomed.
The new segment support in LAR made the following changes possible:
1, store ADLO in segment0 ("current ADLO" without the copy routine) 2, store the bios in segment1
Thus LinuxBIOS will copy the BIOS to the desired location and the 300byte ADLO will just set up the following:
1, clean up the interrupt vectors 2, set some CMOS variables 3, switch back to 16bit real mode 4, jump to the bios
This works fine now. Inside QEMU. A nice shadow disable/enable should be implemented inside LinuxBIOS, and the lar segment loader should disable it when infering with a region which is shadowed.
The linuxbios.diff is needed to turn on LAR segment support.
What is needed to be done: 1, shadowing in linuxbios 2, reading linuxbios tables for memory size in adlo 3, implementing a better logic in bochsbios regarding the boot devices (currently it can only try one device, hardcoded in cmos)
Regarding 2, is there a simpler way than reading all the MEM entries in the linuxbios tables?
-- Alex Beregszaszi
On Wed, 2007-09-05 at 01:06 +0200, Alex Beregszaszi wrote:
Hi,
attached is my work on ADLO.
One more note:
normal/payload/segment0 (290 bytes, lzma compressed to 185 bytes @0x50) normal/payload/segment1 (131072 bytes, lzma compressed to 25353 bytes @0x160)
25kb is not bad, leaves plenty of space for lbmenu, efi, grub.
Also the BIOS* images in adlo2.tar.gz are compiled from the latest Bochs CVS but with some patches applied. They have lot of debug turned on, which will be written on serial.
Of course the stock CVS with the bochsbios.diff will work.
-- Alex Beregszaszi
can someone with an XP license try to recreate Alex's fine work? The more people we get to try this, the better!
thanks
ron
Hi,
On Tue, 2007-09-04 at 21:23 -0700, ron minnich wrote:
can someone with an XP license try to recreate Alex's fine work? The more people we get to try this, the better!
You can try this with a standard GRUB, any Linux / BSD installation, or the better: with FreeDOS.
-- Alex
Hi,
On Tue, 2007-09-04 at 21:23 -0700, ron minnich wrote:
can someone with an XP license try to recreate Alex's fine work? The more people we get to try this, the better!
I'm interested in trying this on my machine, but I have a couple of questions for you.
1. Can I use LinuxBIOS -> FILO -> ADLO? a. It seems like since ADLO is an elf file, this should work, but I get an error "Unsupported file format" b. This would be the easiest path for me, since I wouldn't have to re-flash my ROM 2. Where do I set the boot drive in the CMOS (as per the README)?
Thanks, Myles
You can try this with a standard GRUB, any Linux / BSD installation, or the better: with FreeDOS.
-- Alex
Hi,
On Tue, 2007-09-04 at 21:23 -0700, ron minnich wrote:
can someone with an XP license try to recreate Alex's fine work? The more people we get to try this, the better!
I'm interested in trying this on my machine, but I have a couple of questions for you.
- Can I use LinuxBIOS -> FILO -> ADLO? a. It seems like since ADLO is an elf file, this should work, but I
get an error "Unsupported file format" b. This would be the easiest path for me, since I wouldn't have to re-flash my ROM
I am not familiar how FILO loads and starts an image, but one thing comes to my mind: the ELF is a minimalistic one, with lar in mind, it has only program headers and no section headers. Maybe this is a problem for FILO.
Do the old ADLO images loaded for you?
- Where do I set the boot drive in the CMOS (as per the README)?
The README and every description file comes from the original source.
; III) tell BOCHS' BIOS we want to boot from hdd. ; 0x00 - floppy ; 0x02 - hdd ; In future there will be 'fd failover'option in bochs.
;CMOS_OUT(#0x3d, #0x02)
Uncomment this field in loader.s to boot from HDD.
Logic for boot device priority must be implemented in Bochs BIOS, currently it will try the device it is told to and stop if that is not working.
-- Alex
Hi,
On Tue, 2007-09-04 at 21:23 -0700, ron minnich wrote:
can someone with an XP license try to recreate Alex's fine work? The more people we get to try this, the better!
I'm interested in trying this on my machine, but I have a couple of questions for you.
- Can I use LinuxBIOS -> FILO -> ADLO? a. It seems like since ADLO is an elf file, this should work, but I
get an error "Unsupported file format" b. This would be the easiest path for me, since I wouldn't have to re-flash my ROM
I am not familiar how FILO loads and starts an image, but one thing comes to my mind: the ELF is a minimalistic one, with lar in mind, it has only program headers and no section headers. Maybe this is a problem for FILO.
Do the old ADLO images loaded for you?
I used your BIOS-bochs-legacy with the 64k elf header from the repository and your BIOS-bochs-latest with the 129k elf header.
Here is the output from the serial console for the 64k version:
hdb1:/boot/adlo.legacy.elf hda: LBA: IC35L020AVER07-0 hdb: LBA: WDC WD800JB-00JJC0 Mounted ext2fs Loading image... Loaded 66560 bytes in 55ms (1210KB/s) Jumping to entry point... BIOS entry. FATAL: Keyboard error:31
With the 129k version I get no output from the BIOS:
Enter boot: hdb1:/boot/adlo.elf hda: LBA: IC35L020AVER07-0 hdb: LBA: WDC WD800JB-00JJC0 Mounted ext2fs Loading image... Loaded 132096 bytes in 111ms (1190KB/s) Jumping to entry point...
Both of these got farther than the simpler elf.
Myles
Where can I get the bcc that's required to compile ADLO?
I just used your images, but if I need to change something then bcc will come in handy.
Thanks, Myles
Hi,
Do you think this new version of ADLO is able of booting Windows XP the way it is? Should I add my modifications to it ? (xpboot.diff)
On 9/5/07, ron minnich rminnich@gmail.com wrote:
can someone with an XP license try to recreate Alex's fine work? The more people we get to try this, the better!
thanks
ron
-- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios