I'm booting linuxbios with a adlo/bochs payload on a VIA EPIA 800. I have also disabled vga in bochs so thatit does not hang when vgabios is not present. Bochs will load about 10% of the time when rebooting the system. The rest of the time it will hang.
I am quite certain that it is somewhere in bochs where the problem exists since I can load etherboot from linuxbios without issue. The times bochs does load from linux generally hangs shortly after lilo loads the kernel.
What I am wondering is if anyone else has had this problem and come up with a workaround, or knows the reason, or atleast where I should look more closely.
Welcome to elfboot, the open sourced starter. January 2002, Eric Biederman. Version 1.2
POST: 0xf8 37:init_bytes() - zkernel_start:0xfffc0000 zkernel_mask:0x0000ffff Found ELF candiate at offset 0 New segment addr 0x7c00 size 0x20400 offset 0x100 filesize 0x20400 (cleaned up) New segment addr 0x7c00 size 0x20400 offset 0x100 filesize 0x20400 Loading Segment: addr: 0x00000000077649d8 memsz: 0x0000000000020400 filesz: 0x00000 Jumping to boot code at 0x7c00 POST: 0xfe
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Mon, 9 Jun 2003, Brian G. Rhodes wrote:
I am quite certain that it is somewhere in bochs where the problem exists since I can load etherboot from linuxbios without issue. The times bochs does load from linux generally hangs shortly after lilo loads the kernel.
I had this problem. This is why I explictly list which motherboards it works with.
The only way I was able to fix i was to try differnet motherboard.
my personal theory is that it is problem with ram timing and that just bios badly supported that motherboard. but it is just a guess. so your guess is as good as mine.
tell me more.
Are you always booting from power-on or just reset? Hard or soft reset?
ron
Ron,
I'm always doing a hard reset. When using linuxbios I am unable to do a soft reset with this board. The last POST code I get when it does happen to work is 0x77 (from bochs) which is at the end of the keyboard init code. One thing I have not tried is using etherboot to load adlo/bochs from the had disk, but I really do not think that the step before bochs is the issue.
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Mon, 9 Jun 2003, ron minnich wrote:
tell me more.
Are you always booting from power-on or just reset? Hard or soft reset?
ron
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
next question, why are you using BOCHS? If it is only for VGA support then you might want to try the alternative.
ron
I am using BOCHS because I need to be able to load an initrd, and it looked like the most straight forward way of doing so. Is there another way to accomplish that?
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Mon, 9 Jun 2003, ron minnich wrote:
next question, why are you using BOCHS? If it is only for VGA support then you might want to try the alternative.
ron
On Mon, Jun 09, 2003 at 11:31:47PM -0500, Brian G. Rhodes wrote:
I am using BOCHS because I need to be able to load an initrd, and it looked like the most straight forward way of doing so. Is there another way to accomplish that?
"--initrd" option to mkelfImage adds initrd to ELF boot image, which can be loaded by Etherboot or BOOT_IDE of LinuxBIOS.
-- Takeshi
SONE,
I had not been able to find any documentation on BOOT_IDE, so I tried using Eric's mkelfImage with etherboot and the ide_disk loader. The only problem I have there is it requires me to leave an empty chunk of disk at the beginning of the drive to place the elf kernel+initrd image. That doesn't inherently cause the problem, but the fact that I can't just leave an empty space at the beginning, but rather have to create an unformatted partition does.
It requires changing both the initrd, any software which uses devices directly, and the installer. Using an elf loader and a kernel+initrd image is a suitable fallback position, but something which is more of a drop in replacement on the eeprom is still a goal for me.
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Tue, 10 Jun 2003, SONE Takeshi wrote:
On Mon, Jun 09, 2003 at 11:31:47PM -0500, Brian G. Rhodes wrote:
I am using BOCHS because I need to be able to load an initrd, and it looked like the most straight forward way of doing so. Is there another way to accomplish that?
"--initrd" option to mkelfImage adds initrd to ELF boot image, which can be loaded by Etherboot or BOOT_IDE of LinuxBIOS.
-- Takeshi
On Tue, 10 Jun 2003, SONE Takeshi wrote:
"--initrd" option to mkelfImage adds initrd to ELF boot image, which can be loaded by Etherboot or BOOT_IDE of LinuxBIOS.
yes, I forgot to mention that with the new 1 MB 82802ac parts, I can put linuxbios, kernel and initrd directly into FLASH.
ron
Ron,
Those are intel flash parts correct? My initrd is 1.3MB right now. I'm not using it for libraries. I am using it to set up the root filesystem.
It mounts hda1 which has a tarball containing the fs for the root fs. extracts that to a ramdisk, switches teh root device, and exits. I would love to boot the kernel from flash, but it's not to be.
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Tue, 10 Jun 2003, ron minnich wrote:
On Tue, 10 Jun 2003, SONE Takeshi wrote:
"--initrd" option to mkelfImage adds initrd to ELF boot image, which can be loaded by Etherboot or BOOT_IDE of LinuxBIOS.
yes, I forgot to mention that with the new 1 MB 82802ac parts, I can put linuxbios, kernel and initrd directly into FLASH.
ron
On Tue, 10 Jun 2003, Brian G. Rhodes wrote:
Those are intel flash parts correct? My initrd is 1.3MB right now. I'm not using it for libraries. I am using it to set up the root filesystem.
yes, you are too big. Is there an problem with kernel in flash, which mounts hda1 and does all those things you mentioned?
Why is that initrd so big?
ron
The initrd is 3MB uncompressed. I require a few utilities (bash, echo, mount, tar, and umount).
When the system boots and loads the initrd, it mounts hda1 which contains a root tarball. It then extracts the tar into the ramdisk. So it requires a few system libraries. c, ld, dl, rt (tar), termcap, pthread.
I think what I am going to do is just use linuxbios + etherboot to boot an elf image from the ide disk, and move the partitions down.
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Tue, 10 Jun 2003, ron minnich wrote:
On Tue, 10 Jun 2003, Brian G. Rhodes wrote:
Those are intel flash parts correct? My initrd is 1.3MB right now. I'm not using it for libraries. I am using it to set up the root filesystem.
yes, you are too big. Is there an problem with kernel in flash, which mounts hda1 and does all those things you mentioned?
Why is that initrd so big?
ron
On Tue, 10 Jun 2003, Brian G. Rhodes wrote:
I think what I am going to do is just use linuxbios + etherboot to boot an elf image from the ide disk, and move the partitions down.
you can do that, but another option is to have linuxbios+linux kexec an elf image from the disk. This allows you to (e.g.) put the elf image on an ext3 partition, for example.
ron
I think what I am going to do is just use linuxbios + etherboot to boot an elf image from the ide disk, and move the partitions down.
You can also use the etherboot 5.0.6 ide patch solution, which contains file system support (ext2, ext3, and vfat) so you don't have to move your partitions. I store it at http://www.missl.cs.umd.edu/~agnew/
------------------ Adam Agnew Independent Contractor www.adamagnew.com
Hi Brian,
The initrd is 3MB uncompressed. I require a few utilities (bash, echo, mount, tar, and umount).
Have you tried busybox and uclibc? You can safe quite alot storage area.
-Andrew
Andrew,
I settled on linuxbios with etherboot and Adam Agnew's polled ide patch for etherboot using mkelfImage to create the ELF binary with the kernel and initrd.
Here is the code I added to handle PCI bridge cards in newpci.c in pci_assign_irqs
else { u16 x;
pci_read_config_word(pdev, PCI_CLASS_DEVICE, &x); if (x == PCI_CLASS_BRIDGE_PCI) {
printk_debug("PCI device is a bridge\n"); // cross bridge if (pdev->children) { struct pci_dev *cdev; printk_debug("PCI devices behind bridge. Bus %d\n", pdev->secondary);
cdev = pdev->children; while (cdev) { pci_assign_irqs(pdev->secondary, PCI_SLOT(cdev->devfn), pIntAtoD); cdev = cdev->next; } } } }
And included pci_ids.h...
I am still not getting interrupts on any cards I put in the PCI slot on the EPIA.
Bus 0, device 20, function 0: PCI bridge: Hint Corp HB1-SE33 PCI-PCI Bridge (rev 20). Master Capable. Latency=64. Bus 2, device 0, function 0: Multimedia controller: Sigma Designs, Inc. EM840x REALmagic DVD/MPEG-2 Audio/V. IRQ 5. Master Capable. Latency=64. Non-prefetchable 32 bit memory at 0xfe700000 [0xfe7fffff]. Bus 2, device 4, function 0: Multimedia controller: Sigma Designs, Inc. EM840x REALmagic DVD/MPEG-2 Audio/V. IRQ 5. Master Capable. Latency=64. Non-prefetchable 32 bit memory at 0xfe800000 [0xfe8fffff]. Bus 2, device 8, function 0: Multimedia controller: Sigma Designs, Inc. EM840x REALmagic DVD/MPEG-2 Audio/V. IRQ 5. Master Capable. Latency=64. Non-prefetchable 32 bit memory at 0xfe900000 [0xfe9fffff]. Bus 2, device 12, function 0: Multimedia controller: Sigma Designs, Inc. EM840x REALmagic DVD/MPEG-2 Audio/V. IRQ 5. Master Capable. Latency=64. Non-prefetchable 32 bit memory at 0xfea00000 [0xfeafffff].
cat /proc/interrupts CPU0 0: 38836 XT-PIC timer 1: 2 XT-PIC keyboard 2: 0 XT-PIC cascade 4: 8370 XT-PIC serial 5: 0 XT-PIC Harmony, Harmony, Harmony, Harmony 11: 216 XT-PIC eth0 14: 944 XT-PIC ide0 15: 15 XT-PIC ide1 NMI: 0 ERR: 0
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Wed, 11 Jun 2003, Andrew Ip wrote:
Hi Brian,
The initrd is 3MB uncompressed. I require a few utilities (bash, echo, mount, tar, and umount).
Have you tried busybox and uclibc? You can safe quite alot storage area.
-Andrew
-- Andrew Ip Email: aip@cwlinux.com Tel: (852) 2542 2046 Fax: (852) 2542 2036 Mobile: (852) 9201 9866
Cwlinux Limited Unit 202B 2/F Lai Cheong Factory Building, 479-479A Castle Peak Road, Lai Chi Kok, Kowloon, Hong Kong.
Tel: (852)2542 2046 Fax: (852)2542 2036
For public pgp key, please obtain it from http://www.keyserver.net/en.
* Brian G. Rhodes bgr@gw.linespeed.net [030610 17:49]:
The initrd is 3MB uncompressed. I require a few utilities (bash, echo, mount, tar, and umount).
Some of the stuff is probably implemented in busybox, which is a lot smaller than bash, mount, umount,... Also, using dietlibc or uclibc might give you quite a win. Static binaries compiled with those are often smaller than dynamic glibc binaries.
Best regards, Stefan Reinauer
"Brian G. Rhodes" bgr@gw.linespeed.net writes:
I am using BOCHS because I need to be able to load an initrd, and it looked like the most straight forward way of doing so. Is there another way to accomplish that?
mkelfImage handles initrds just fine.
Eric
Hi Brian, Your mail server refuses mail from Japan! So, to answer your question in the personal mail, the debug level and gcc version problems happened only when I was modifying the code, and there is no such problem with curernt code, at least for me.
On Mon, Jun 09, 2003 at 06:15:56PM -0500, Brian G. Rhodes wrote:
I'm booting linuxbios with a adlo/bochs payload on a VIA EPIA 800. I have also disabled vga in bochs so thatit does not hang when vgabios is not present. Bochs will load about 10% of the time when rebooting the system. The rest of the time it will hang.
I think Andrew Ip has similar problem with his EPIA.
I think Bochs BIOS and VGA BIOS are running with cache on. Try changing mem.basek value from 768 to 1024 in northbridge.c, it will report 0xC0000-0xFFFFF area as no ram, so it will not cached.
Also, VGA BIOS from EPIA BIOS version 0109 is reported to NOT work. If you have problem with VGA BIOS, try latest image.
-- Takeshi
I think Andrew Ip has similar problem with his EPIA. I think Bochs BIOS and VGA BIOS are running with cache on. Try changing mem.basek value from 768 to 1024 in northbridge.c, it will report 0xC0000-0xFFFFF area as no ram, so it will not cached.
I have got it fix when enabling VIDEO_CONSOLE, IIRC. As Ron said, you probably don't need ADLO when you don't need video console.
-Andrew