Hi there,
I am trying to build a LinuxBIOS setup to turn an Epia-M board into a NAS server and am stuck on the configuration.
FILO is built and tested (with grub).
I've now checked out LinuxBIOSv2, and am trying to use this configuration:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# cat ../Config.lb target epia-m
mainboard via/epia-m
option MAXIMUM_CONSOLE_LOGLEVEL=8 option DEFAULT_CONSOLE_LOGLEVEL=8 option CONFIG_CONSOLE_SERIAL8250=1
option ROM_SIZE=256*1024 option HAVE_OPTION_TABLE=1 option CONFIG_ROM_PAYLOAD=1 option HAVE_FALLBACK_BOOT=0
option _RAMBASE=0x00004000
romimage "normal" option USE_FALLBACK_IMAGE=0 option ROM_IMAGE_SIZE=0x30000 option LINUXBIOS_EXTRA_VERSION=".0-Normal" option PAYLOAD_SIZE=0xc000 payload /root/filo-0.5/filo.elf end
buildrom ./linuxbios.rom ROM_SIZE "normal"
However trying to build it gives me:
./romcc -mcpu=c3 ... (snip lots of -Is and -Ds) /root/LinuxBIOSv2/src/mainboard/via/epia-m/auto.c -o auto.inc earlymtrr.c:23.0: "XIP_ROM_BASE is not a multiple of XIP_ROM_SIZE" make[1]: *** [auto.inc] Error 1 make[1]: Leaving directory `/root/LinuxBIOSv2/targets/via/epia-m/epia-m/normal'
I'm assuming something elementary is missing from the config but I'm not sure where to look next.
Can someone point me in the right direction? I will happily update the HOWTO in exchange :)
cheers,
Matthew Bloch wrote:
Hi there,
I am trying to build a LinuxBIOS setup to turn an Epia-M board into a NAS server and am stuck on the configuration.
FILO is built and tested (with grub).
I've now checked out LinuxBIOSv2, and am trying to use this configuration:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# cat ../Config.lb target epia-m
mainboard via/epia-m
option MAXIMUM_CONSOLE_LOGLEVEL=8 option DEFAULT_CONSOLE_LOGLEVEL=8 option CONFIG_CONSOLE_SERIAL8250=1
option ROM_SIZE=256*1024 option HAVE_OPTION_TABLE=1 option CONFIG_ROM_PAYLOAD=1 option HAVE_FALLBACK_BOOT=0
option _RAMBASE=0x00004000
romimage "normal" option USE_FALLBACK_IMAGE=0 option ROM_IMAGE_SIZE=0x30000 option LINUXBIOS_EXTRA_VERSION=".0-Normal" option PAYLOAD_SIZE=0xc000 payload /root/filo-0.5/filo.elf end
buildrom ./linuxbios.rom ROM_SIZE "normal"
First off, can't do this. You must have a fallback image, normal is optional.
However trying to build it gives me:
./romcc -mcpu=c3 ... (snip lots of -Is and -Ds) /root/LinuxBIOSv2/src/mainboard/via/epia-m/auto.c -o auto.inc earlymtrr.c:23.0: "XIP_ROM_BASE is not a multiple of XIP_ROM_SIZE"
This is exactly as it says. In src/mainboard/via/epia-m/Config.lb, there should be an XIP_ROM_SIZE and XIP_ROM_BASE, the base must be a multiple of the size. I had a bit of trouble working around this myself at one point, I think I determined that I just couldn't have a VGA rom and only the fallback boot, having both seemed to straighten things out.
-Corey
make[1]: *** [auto.inc] Error 1 make[1]: Leaving directory `/root/LinuxBIOSv2/targets/via/epia-m/epia-m/normal'
I'm assuming something elementary is missing from the config but I'm not sure where to look next.
Can someone point me in the right direction? I will happily update the HOWTO in exchange :)
cheers,
Corey Osgood wrote: [snip]
This is exactly as it says. In src/mainboard/via/epia-m/Config.lb, there should be an XIP_ROM_SIZE and XIP_ROM_BASE, the base must be a multiple of the size. I had a bit of trouble working around this myself at one point, I think I determined that I just couldn't have a VGA rom and only the fallback boot, having both seemed to straighten things out.
So just to be clear we officially have no idea how to make a VGA BIOS as detailed in the HOWTO any more :) Using the Config.vga.filo gives the same error, so I'll give up on VGA as well.
Now the Config.filo.lb template gives me a working linuxbios.rom file - however I had to rebuild filo to get it under about 65K. (General question) Is it just a quirk of the build system that I have to put two copies of the same BIOS image onto the flash? Under what failure condition is the "fallback" used? Surely the most useful fallback would be the vendor BIOS, which of course wouldn't fit ..?
Anyhow I'm happy that the ROM ought to work as I've tested the new FILO from my GRUB, so I'm now trying to flash it:
Here's me verifying the vendor BIOS:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom -v /root/oldbios Calibrating delay loop... ok No LinuxBIOS table found. Found chipset "VT8235": Enabling flash write... OK. Found board "VIA EPIA M/MII/...": Enabling flash write... OK. SST39SF020A found at physical address: 0xfffc0000 Flash part is SST39SF020A (256 KB) Flash image seems to be a legacy BIOS. Disabling checks. Verifying flash - VERIFIED
Okay so now I'll try to flash the new one:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom linuxbios.rom Calibrating delay loop... ok No LinuxBIOS table found. Found chipset "VT8235": Enabling flash write... OK. Found board "VIA EPIA M/MII/...": Enabling flash write... OK. SST39SF020A found at physical address: 0xfffc0000 Flash part is SST39SF020A (256 KB) Note: If the following flash access fails, you might need to specify -m <vendor>:<mainboard>
Hmmm, no signs of success or failure, will try to verify:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom -v linuxbios.rom Calibrating delay loop... ok No LinuxBIOS table found. Found chipset "VT8235": Enabling flash write... OK. Found board "VIA EPIA M/MII/...": Enabling flash write... OK. SST39SF020A found at physical address: 0xfffc0000 Flash part is SST39SF020A (256 KB) Note: If the following flash access fails, you might need to specify -m <vendor>:<mainboard> Verifying flash - FAILED
Looks like something bad happened, or nothing, let's see...
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom -v /root/oldbios Calibrating delay loop... ok No LinuxBIOS table found. Found chipset "VT8235": Enabling flash write... OK. Found board "VIA EPIA M/MII/...": Enabling flash write... OK. SST39SF020A found at physical address: 0xfffc0000 Flash part is SST39SF020A (256 KB) Flash image seems to be a legacy BIOS. Disabling checks. Verifying flash - VERIFIED
Ah, so nothing happened! Any idea why this didn't work?
Thanks,
Matthew Bloch wrote:
Corey Osgood wrote: [snip]
This is exactly as it says. In src/mainboard/via/epia-m/Config.lb, there should be an XIP_ROM_SIZE and XIP_ROM_BASE, the base must be a multiple of the size. I had a bit of trouble working around this myself at one point, I think I determined that I just couldn't have a VGA rom and only the fallback boot, having both seemed to straighten things out.
So just to be clear we officially have no idea how to make a VGA BIOS as detailed in the HOWTO any more :) Using the Config.vga.filo gives the same error, so I'll give up on VGA as well.
What I meant was I needed normal+fallback+vga, that did the trick for me at the time, but I can't recall why. For some reason having a fallback image size of 256k - vgarom size screwed up the XIP size calculation, perhaps because the vga rom wasn't exactly 64k?
Now the Config.filo.lb template gives me a working linuxbios.rom file - however I had to rebuild filo to get it under about 65K. (General question) Is it just a quirk of the build system that I have to put two copies of the same BIOS image onto the flash? Under what failure condition is the "fallback" used? Surely the most useful fallback would be the vendor BIOS, which of course wouldn't fit ..?
Fallback can be for any variety of things. For example, you could set it up so that there's no or reduced serial output during a normal boot, but a full spew during fallback, or else you could use a different payload for fallback.
Anyhow I'm happy that the ROM ought to work as I've tested the new FILO from my GRUB, so I'm now trying to flash it:
Here's me verifying the vendor BIOS:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom -v /root/oldbios Calibrating delay loop... ok No LinuxBIOS table found. Found chipset "VT8235": Enabling flash write... OK. Found board "VIA EPIA M/MII/...": Enabling flash write... OK. SST39SF020A found at physical address: 0xfffc0000 Flash part is SST39SF020A (256 KB) Flash image seems to be a legacy BIOS. Disabling checks. Verifying flash - VERIFIED
Okay so now I'll try to flash the new one:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom linuxbios.rom Calibrating delay loop... ok No LinuxBIOS table found. Found chipset "VT8235": Enabling flash write... OK. Found board "VIA EPIA M/MII/...": Enabling flash write... OK. SST39SF020A found at physical address: 0xfffc0000 Flash part is SST39SF020A (256 KB) Note: If the following flash access fails, you might need to specify -m <vendor>:<mainboard>
Hmmm, no signs of success or failure, will try to verify:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom -v linuxbios.rom Calibrating delay loop... ok No LinuxBIOS table found. Found chipset "VT8235": Enabling flash write... OK. Found board "VIA EPIA M/MII/...": Enabling flash write... OK. SST39SF020A found at physical address: 0xfffc0000 Flash part is SST39SF020A (256 KB) Note: If the following flash access fails, you might need to specify -m <vendor>:<mainboard> Verifying flash - FAILED
Looks like something bad happened, or nothing, let's see...
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom -v /root/oldbios Calibrating delay loop... ok No LinuxBIOS table found. Found chipset "VT8235": Enabling flash write... OK. Found board "VIA EPIA M/MII/...": Enabling flash write... OK. SST39SF020A found at physical address: 0xfffc0000 Flash part is SST39SF020A (256 KB) Flash image seems to be a legacy BIOS. Disabling checks. Verifying flash - VERIFIED
Ah, so nothing happened! Any idea why this didn't work?
Thanks
There may be some sort of flash protection in place, check your vendor bios for a "Flash protect" option. I have this on my jetway and it gives the same effect, but via's a whole different beast. Does the vendor bios still verify? Peter Stuge should know more, hopefully he'll jump in soon.
-Corey
Corey Osgood wrote:
Matthew Bloch wrote:
Corey Osgood wrote: [snip]
This is exactly as it says. In src/mainboard/via/epia-m/Config.lb, there should be an XIP_ROM_SIZE and XIP_ROM_BASE, the base must be a multiple of the size. I had a bit of trouble working around this myself at one point, I think I determined that I just couldn't have a VGA rom and only the fallback boot, having both seemed to straighten things out.
So just to be clear we officially have no idea how to make a VGA BIOS as detailed in the HOWTO any more :) Using the Config.vga.filo gives the same error, so I'll give up on VGA as well.
What I meant was I needed normal+fallback+vga, that did the trick for me at the time, but I can't recall why. For some reason having a fallback image size of 256k - vgarom size screwed up the XIP size calculation, perhaps because the vga rom wasn't exactly 64k?
Do you have a working Config.lb I could look at?
[snip]
Fallback can be for any variety of things. For example, you could set it up so that there's no or reduced serial output during a normal boot, but a full spew during fallback, or else you could use a different payload for fallback.
Ah okay, under what circumstances does the fallback run?
[snip]
There may be some sort of flash protection in place, check your vendor bios for a "Flash protect" option. I have this on my jetway and it gives the same effect, but via's a whole different beast. Does the vendor bios still verify? Peter Stuge should know more, hopefully he'll jump in soon.
I cut & pasted this program: http://linuxbios.org/pipermail/linuxbios/2004-March/007257.html and it seems to have flashed without trouble (both the program itself and flashrom said the new BIOS was verified, hooray).
Despite my earlier test I'm hesitant to reboot as I've no backstop in case I brick it - will review my options for recover, possibly purchase a backup chip and pop back in a few days :)
cheers,
Matthew Bloch wrote:
Corey Osgood wrote:
Matthew Bloch wrote:
Corey Osgood wrote: [snip]
This is exactly as it says. In src/mainboard/via/epia-m/Config.lb, there should be an XIP_ROM_SIZE and XIP_ROM_BASE, the base must be a multiple of the size. I had a bit of trouble working around this myself at one point, I think I determined that I just couldn't have a VGA rom and only the fallback boot, having both seemed to straighten things out.
So just to be clear we officially have no idea how to make a VGA BIOS as detailed in the HOWTO any more :) Using the Config.vga.filo gives the same error, so I'll give up on VGA as well.
What I meant was I needed normal+fallback+vga, that did the trick for me at the time, but I can't recall why. For some reason having a fallback image size of 256k - vgarom size screwed up the XIP size calculation, perhaps because the vga rom wasn't exactly 64k?
Do you have a working Config.lb I could look at?
Sorry, no. It was for a pcchips board with the same chipset that I never got going. I don't think I have the code any more.
[snip]
Fallback can be for any variety of things. For example, you could set it up so that there's no or reduced serial output during a normal boot, but a full spew during fallback, or else you could use a different payload for fallback.
Ah okay, under what circumstances does the fallback run?
IIRC, 3 sequential reboots or one failed boot by the normal image.
[snip]
There may be some sort of flash protection in place, check your vendor bios for a "Flash protect" option. I have this on my jetway and it gives the same effect, but via's a whole different beast. Does the vendor bios still verify? Peter Stuge should know more, hopefully he'll jump in soon.
I cut & pasted this program: http://linuxbios.org/pipermail/linuxbios/2004-March/007257.html and it seems to have flashed without trouble (both the program itself and flashrom said the new BIOS was verified, hooray).
Good find! This should get into flashrom.
Despite my earlier test I'm hesitant to reboot as I've no backstop in case I brick it - will review my options for recover, possibly purchase a backup chip and pop back in a few days :)
cheers,
Yeah, that's definitely the best practice. There's really no option for recovery if something goes wrong, except to hotswap and flash the chip in another system.
-Corey
Corey Osgood wrote:
Yeah, that's definitely the best practice. There's really no option for recovery if something goes wrong, except to hotswap and flash the chip in another system.
Hm, I do have another epia-m in a soon-to-be-redundant server in London and this gave me hope: http://www.viaarena.com/default.aspx?PageID=5&ArticleID=37 But I think I will buy a BIOS Savior so I can try a few botch jobs with impunity :)
Matthew Bloch wrote:
Corey Osgood wrote:
Yeah, that's definitely the best practice. There's really no option for recovery if something goes wrong, except to hotswap and flash the chip in another system.
Hm, I do have another epia-m in a soon-to-be-redundant server in London and this gave me hope: http://www.viaarena.com/default.aspx?PageID=5&ArticleID=37 But I think I will buy a BIOS Savior so I can try a few botch jobs with impunity :)
You'd need an RD1-PL IIRC, and they're sold out every place I know of, and IOSS has stopped manufacturing them. You can check the compatibility list at ioss.com.tw to be sure. This might be helpful as well: http://www.linuxbios.org/pipermail/linuxbios/2007-April/019809.html
-Corey
Corey Osgood wrote:
You'd need an RD1-PL IIRC, and they're sold out every place I know of, and IOSS has stopped manufacturing them. You can check the compatibility list at ioss.com.tw to be sure. This might be helpful as well: http://www.linuxbios.org/pipermail/linuxbios/2007-April/019809.html
Oh, that's a shame, I'd just sent an order. I like the coloured handles. Well that does leave only one option for recovery which is the spare board & hot plug. Went ahead and flashed without success and was all ready to pack up with a glum face for the evening (hadn't even bothered with a serial cable) ... but on a tip from the linuxbios/EPIA wiki page, replaced my 256MB stick with 512MB and after a few seconds of hard drive clicking it came up on the network! Hooray! So from a cold boot, the board is now available on the network in about 30s - lame of course, I need to dig out a flash drive to fix that :) I'm sure there's room for improvement but I should at least dig out a serial cable before I try to optimise this too much more.
Thanks a lot,
On Mon, Aug 27, 2007 at 11:34:21PM +0100, Matthew Bloch wrote:
Okay so now I'll try to flash the new one:
mnas:~/LinuxBIOSv2/targets/via/epia-m/epia-m# flashrom linuxbios.rom
Add -w to actually write.
We should add a message to flashrom in case no action option is specified. (-v, -r or -w)
On Mon, Aug 27, 2007 at 07:31:12PM -0500, Corey Osgood wrote:
Do you have a working Config.lb I could look at?
Sorry, no. It was for a pcchips board with the same chipset that I never got going. I don't think I have the code any more.
I'm afraid I've lost my working configs too.
I cut & pasted this program: http://linuxbios.org/pipermail/linuxbios/2004-March/007257.html
Good find! This should get into flashrom.
flashrom does support the board, just needs -w. :)
On Tue, Aug 28, 2007 at 01:11:36AM +0100, Matthew Bloch wrote:
I like the coloured handles. Well that does leave only one option for recovery which is the spare board & hot plug.
You can hot swap flash chips on your one EPIA-M board too - you don't really need a second board, just more flash chips, as long as you have a backup of the factory BIOS..
Went ahead and flashed
..well, ok. :)
wiki page, replaced my 256MB stick with 512MB and after a few seconds of hard drive clicking it came up on the network! Hooray! So from a cold boot, the board is now available on the network in about 30s - lame of course, I need to dig out a flash drive to fix that :) I'm sure there's room for improvement
Yep, I've gotten a 600MHz EPIA-MII to 10-or-so seconds with a fairly fat kernel. (A bunch of extra drivers that need time to init.)
but I should at least dig out a serial cable before I try to optimise this too much more.
Yes, definately. And if you're going to profile the boot by timestamping serial output - make sure you don't use a buffering terminal emulator such as minicom.
Instead I suggest xc or picocom.
//Peter