Hi all,
I'm working on my first LinuxBios install on a Via Epia MII 12000 and am having some problems with filo. I seem to have everything built mostly correct, as I'm able to get to the filo boot prompt and invoke memtest86 (with VGA) from an iso9660 fs on hdc. When trying to boot off of the onboard CF (hde) I get the following error:
boot: hde1:/bzImage console=ttyS0,115200 malloc_diag: alloc: 368 bytes (5 blocks), free: 16008 bytes (1 blocks) malloc_diag: alloc: 384 bytes (6 blocks), free: 15992 bytes (1 blocks) file_open: dev=hde1, path=/bzImage find_ide_controller: PCI IDE #1 not found IDE channel 2 not found devopen: failed to open ide malloc_diag: alloc: 368 bytes (5 blocks), free: 16008 bytes (1 blocks) malloc_diag: alloc: 320 bytes (4 blocks), free: 16056 bytes (1 blocks) boot: hde1:/bzImage console=ttyS0,115200
My filo Config and a complete debug log is attached. I suspect that my problem is with my filo build rather than linuxbios, though I've checked my config against all the examples and documentation I could find, and nothing jumps out at me. I'm running filo r32 and linuxbios r2567. Anyone point me in the right direction?
Thanks,
John
# !!! NOTE !!! # Do NOT add spaces or comments at the end of option lines. # It confuses some versions of make.
# Use grub instead of autoboot? #USE_GRUB = 1
# Grub menu.lst path #MENULST_FILE = "hda3:/boot/filo/menu.lst" # Via Epia-MII CF boot: #MENULST_FILE = "hde1:/boot/filo/menu.lst"
# time before default menu.lst is chosen. Set to 0 to ignore #MENULST_TIMEOUT = 0
# Image filename for automatic boot and optional command line parameter AUTOBOOT_FILE = "hde1:/bzImage console=ttyS0,115200" #AUTOBOOT_FILE = "hda1:/vmlinuz root=/dev/hda1 console=tty0 console=ttyS0,115200" #AUTOBOOT_FILE = "mem@0xfff80000" #AUTOBOOT_FILE = "hde1@0" #AUTOBOOT_FILE = "uda1:/vmlinuz.elf"
# Time in second before booting AUTOBOOT_FILE AUTOBOOT_DELAY = 2
# Driver for hard disk, CompactFlash, and CD-ROM on IDE bus IDE_DISK = 1
# Add a short delay when polling status registers # (required on some broken SATA controllers) # NOTE: Slows down access significantly, so disable # whenever possible. #IDE_DISK_POLL_DELAY = 1
# Use PCMCIA compact flash on Via Epia MII10000 and MII6000E # This device is referred to as hde. PCMCIA_CF = 1
# Driver for USB Storage USB_DISK = 1
# VGA text console #VGA_CONSOLE = 1 #PC_KEYBOARD = 1
# Serial console SERIAL_CONSOLE = 1 SERIAL_IOBASE = 0x3f8 # if SERIAL_SPEED is commented out, the speed will not be changed. #SERIAL_SPEED = 115200
# Filesystems FSYS_EXT2FS = 1 FSYS_FAT = 1 #FSYS_JFS = 1 #FSYS_MINIX = 1 #FSYS_REISERFS = 1 #FSYS_XFS = 1 FSYS_ISO9660 = 1
# Support for boot disk image in bootable CD-ROM (El Torito) ELTORITO = 1
# PCI support SUPPORT_PCI = 1
# Enable this to scan PCI busses above bus 0 # AMD64 based boards do need this. PCI_BRUTE_SCAN = 1
# Sound support (needs SUPPORT_PCI) #SUPPORT_SOUND = 1
# Sound drivers #VIA_SOUND = 1
# Debugging DEBUG_ALL = 1 #DEBUG_ELFBOOT = 1 #DEBUG_ELFNOTE = 1 #DEBUG_LINUXBIOS = 1 #DEBUG_MALLOC = 1 #DEBUG_MULTIBOOT = 1 #DEBUG_SEGMENT = 1 #DEBUG_SYS_INFO = 1 #DEBUG_TIMER = 1 #DEBUG_BLOCKDEV = 1 #DEBUG_PCI = 1 #DEBUG_VIA_SOUND = 1 #DEBUG_LINUXLOAD = 1 #DEBUG_IDE = 1 #DEBUG_USB = 1 #DEBUG_ELTORITO = 1
# i386 options
# Loader for standard Linux kernel image, a.k.a. /vmlinuz LINUX_LOADER = 1
# Boot FILO from Multiboot loader (eg. GRUB) #MULTIBOOT_IMAGE = 1
On Mon, Mar 05, 2007 at 09:36:50PM -0500, John Koleszar wrote:
When trying to boot off of the onboard CF (hde)
[..]
My filo Config and a complete debug log is attached. I suspect that my problem is with my filo build rather than linuxbios
There was no way to both use the CF slot as a boot device in FILO, and as the root device for the kernel when I was working on the MII back in September. I spent some time on it but did not see a simple solution.
Linux did not like the Ricoh bridge when set up so that FILO could use it.
While hacking on this problem Linux or FILO would just give errors when trying to talk to the card. There are documented problems with the Ricoh bridge. (2.6 PCMCIA HOWTO/FAQ)
I decided to work around the problem and got a CF->IDE adapter so that the CF is hda.
//Peter
* Peter Stuge stuge-linuxbios@cdy.org [070306 13:36]:
There was no way to both use the CF slot as a boot device in FILO, and as the root device for the kernel when I was working on the MII back in September. I spent some time on it but did not see a simple solution.
How would a complex solution look like? Can we fix this in FILO? I don't want to implement pcmcia hot plugging though ;)
Linux did not like the Ricoh bridge when set up so that FILO could use it.
Can we reset it, before jumping to the kernel?
I decided to work around the problem and got a CF->IDE adapter so that the CF is hda.
Yeah, me too ;)
Peter Stuge wrote:
On Mon, Mar 05, 2007 at 09:36:50PM -0500, John Koleszar wrote:
When trying to boot off of the onboard CF (hde)
[..]
My filo Config and a complete debug log is attached. I suspect that my problem is with my filo build rather than linuxbios
There was no way to both use the CF slot as a boot device in FILO, and as the root device for the kernel when I was working on the MII back in September. I spent some time on it but did not see a simple solution.
Linux did not like the Ricoh bridge when set up so that FILO could use it.
While hacking on this problem Linux or FILO would just give errors when trying to talk to the card. There are documented problems with the Ricoh bridge. (2.6 PCMCIA HOWTO/FAQ)
I decided to work around the problem and got a CF->IDE adapter so that the CF is hda.
Interesting. I'll be sure to post my notes if and when I do get it working then. I'd still like to keep hacking on this, as it's a far more elegant solution than going the adapter route. I was under the impression that it worked by preventing the kernel from probing for ide2 so that it wouldn't overwrite the config done by linuxbios, but I obviously haven't gotten that far yet. As for my current issue, I just read something that leads me to believe that I need to disable PCI support in filo, but I won't be able to try until later tonight.
My environment right now consists of flashrom and my rom image on my CF card, which I access from a gentoo livecd. I can't get El-Torito boot working either (same issue as this[1] thread), so my development cycles are pretty long atm.
[1] http://linuxbios.org/pipermail/linuxbios/2007-January/018102.html
Thanks for the heads up.
John
On Tue, Mar 06, 2007 at 08:19:01AM -0500, John Koleszar wrote:
I'd still like to keep hacking on this, as it's a far more elegant solution than going the adapter route.
Absolutely agreed. :)
I was under the impression that it worked by preventing the kernel from probing for ide2 so that it wouldn't overwrite the config done by linuxbios, but I obviously haven't gotten that far yet.
Here are the threads from when I was working on this:
First one, mentions that I fried a CF card: http://www.linuxbios.org/pipermail/linuxbios/2006-September/015594.html
Discussion on the Ricoh bridge and Linux: http://www.linuxbios.org/pipermail/linuxbios/2006-September/015633.html
After some hacking I discovered that the fried CF was in fact OK and that there were bad bits somewhere: http://www.linuxbios.org/pipermail/linuxbios/2006-September/015793.html
From reading up on this again it seems that using the CF slot as a
plain IDE device will in fact work, but I did not want to do that because the card could be unplugged after boot and Linux would surely not like that. (At the very least, the slot would stop working until reboot, not good enough.)
Linux pcmcia did not start the CF slot until after udevstart was run, so initramfs/initrd was required for root on CF.
I discussed this on linux-pcmcia and it seems that in the 2.6.18rc7 kernel I was using the CF card just wasn't added to the kernel drivers, but it has been added since.
I'd like to try this with a recent kernel, it may just work now.
As for my current issue, I just read something that leads me to believe that I need to disable PCI support in filo, but I won't be able to try until later tonight.
Yes, that is correct. From my FILO Config:
IDE_DISK=1 PCMCIA_CF=1 #SUPPORT_PCI=1
Re long cycles, I suggest using an Etherboot payload. You can even send FILO as a boot image to Etherboot, and experimenting with kernel parameters becomes simple.
dhcpd.conf: subnet 192.168.3.0 netmask 255.255.255.0 { range dynamic-bootp 192.168.3.25 192.168.3.99; option routers 192.168.3.1; option domain-name-servers 192.168.3.1; if substring (option vendor-class-identifier, 0, 9) = "PXEClient" { filename "/eb-5.4.1-via-rhine.zpxe"; } else if substring (option vendor-class-identifier, 0, 9) = "Etherboot" { filename "/boot.elf"; option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff; } }
Starting tftpd from the shell: (make sure to use hpa-tftp) in.tftpd -l -s -p -u root /root/epia
//Peter
Peter Stuge wrote:
Here are the threads from when I was working on this:
Thanks for the pointers. My initial plan had been to just use the card in IDE mode, since I don't really need the hotplug support for my application. I do need pcmcia support though for a wlan card, so I was a bit worried about how that interaction would go. I hadn't considered trying to access the card in pcmcia mode - that seems like it should Just Work.
Re long cycles, I suggest using an Etherboot payload. You can even send FILO as a boot image to Etherboot, and experimenting with kernel parameters becomes simple.
Hmm.. I'm not sure I can use Etherboot for this FILO problem - if it's the PCI config that wipes out the PCMCIA bridge config set up by linuxbios, won't Etherboot also wipe the bridge config when it sets up the bus to talk to the NIC, leaving FILO unable to see the CF (regardless of the SUPPORT_PCI setting)?
To be sure, Etherboot will likely be useful when I get to building a kernel/initramfs. FILO booting Etherboot would be particularly interesting to me, assuming I'm right about Etherboot booting FILO above.
Thanks,
John
just out of curiosity, can you disable SUPPORT_PCI?
that was the fix for bochs/qemu. The "compatibility chain" might make this work.
ron