Phani Babu Giddi | 1 Jan 05:36
Picon

flashrom on the host or target ?

Hello All,
 
I am trying to understand how to access the flash chip on the mainboard for the very first time. Most of the documentation on Linux BIOS talks about using "flashrom" but I am confused, are we suppose to use this on the target ( mainboard) or host. If its host are is there a way one can access the flash disk from the host, I have looked into the Hardware Tools that have been suggested for Linux BIOS but I could not find anything related to this. If flashrom utility is supposed to be used on the target, then how is that possible because there is no image on the flash device.
 
BIOS Saviour and other tools come into picuture if there is some thing already on the flash chip.
 
So am I suppose to select the payload as etherboot and then try flashing the device for the first time. Or else I am suppose to use an external programmer for this.
 
If we succeed in getting the BIOS with the payload into the flash device what about the root file system and partitions and any other info. The question might sound elementary to most of you but I would appreciate your help.
 
To summarize the question is about getting bare bones board up and running for the very first time.
 
Regards,
Phani
--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios
Corey Osgood | 1 Jan 08:07
Picon

Re: flashrom on the host or target ?

Phani Babu Giddi wrote:
> Hello All,
>  
> I am trying to understand how to access the flash chip on
> the mainboard for the very first time. Most of the documentation on
> Linux BIOS talks about using "flashrom" but I am confused, are we
> suppose to use this on the target ( mainboard) or host. If its host
> are is there a way one can access the flash disk from the host, I have
> looked into the Hardware Tools that have been suggested for Linux BIOS
> but I could not find anything related to this. If flashrom utility is
> supposed to be used on the target, then how is that possible because
> there is no image on the flash device.
>  
> BIOS Saviour and other tools come into picuture if there is some thing
> already on the flash chip.
>  
> So am I suppose to select the payload as etherboot and then try
> flashing the device for the first time. Or else I am suppose to use an
> external programmer for this.
>  
> If we succeed in getting the BIOS with the payload into the flash
> device what about the root file system and partitions and any other
> info. The question might sound elementary to most of you but I would
> appreciate your help.
>  
> To summarize the question is about getting bare bones board up and
> running for the very first time.
>  
> Regards,
> Phani

It doesn't matter. As long as you have the chip that you intend to flash
in the system you run flashrom on, and use compatible hardware (both
with the chip and flashrom), then you can flash literally any image onto
any flash chip. It doesn't matter if the system you use to flash has
completely different hardware then the image's intended target.

-Corey

PS Happy new year, everyone!

--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Phani Babu Giddi | 1 Jan 17:32
Picon

Fwd: flashrom on the host or target ?



---------- Forwarded message ----------
From: Phani Babu Giddi <phanig <at> gmail.com>
Date: Jan 1, 2008 8:29 AM
Subject: Re: [LinuxBIOS] flashrom on the host or target ?
To: Corey Osgood <corey.osgood <at> gmail.com>


Hi Corey,
 
Thanks for your reply but I am not clear. Let me list the steps, may be that will explain the problem I see.
 
1. I have a host target environment
2. I build Linux Kernel image with initrd on the host
3. I also build the root file system on the host
4. Now I build Linux BIOS and specify the Linux Kernel as payload.
5. So at this point I have the .bin/.rom for Linux BIOS and an image file for the root file system.
6. So my question was how do I get this on the flash device. Do I have to use an external programmer for this ? Because there is nothing on the target for me to run flashrom.
 
Regards,
Phani

On Dec 31, 2007 11:07 PM, Corey Osgood <corey.osgood <at> gmail.com> wrote:
Phani Babu Giddi wrote:
> Hello All,
>
> I am trying to understand how to access the flash chip on
> the mainboard for the very first time. Most of the documentation on
> Linux BIOS talks about using "flashrom" but I am confused, are we
> suppose to use this on the target ( mainboard) or host. If its host
> are is there a way one can access the flash disk from the host, I have
> looked into the Hardware Tools that have been suggested for Linux BIOS
> but I could not find anything related to this. If flashrom utility is
> supposed to be used on the target, then how is that possible because
> there is no image on the flash device.
>
> BIOS Saviour and other tools come into picuture if there is some thing
> already on the flash chip.
>
> So am I suppose to select the payload as etherboot and then try
> flashing the device for the first time. Or else I am suppose to use an
> external programmer for this.
>
> If we succeed in getting the BIOS with the payload into the flash
> device what about the root file system and partitions and any other
> info. The question might sound elementary to most of you but I would
> appreciate your help.
>
> To summarize the question is about getting bare bones board up and
> running for the very first time.
>
> Regards,
> Phani

It doesn't matter. As long as you have the chip that you intend to flash
in the system you run flashrom on, and use compatible hardware (both
with the chip and flashrom), then you can flash literally any image onto
any flash chip. It doesn't matter if the system you use to flash has
completely different hardware then the image's intended target.

-Corey

PS Happy new year, everyone!


--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios
Corey Osgood | 1 Jan 18:32
Picon

Re: flashrom on the host or target ?

Phani Babu Giddi wrote:
> Hi Corey,
>  
> Thanks for your reply but I am not clear. Let me list the steps, may
> be that will explain the problem I see.
>  
> 1. I have a host target environment
> 2. I build Linux Kernel image with initrd on the host
> 3. I also build the root file system on the host
> 4. Now I build Linux BIOS and specify the Linux Kernel as payload.
> 5. So at this point I have the .bin/.rom for Linux BIOS and an image
> file for the root file system.
> 6. So my question was how do I get this on the flash device. Do I have
> to use an external programmer for this ? Because there is nothing on
> the target for me to run flashrom.

Yep, you can use an external programmer, or you can use some other board
that's compatible with flashrom and your flash chip, by hot swapping the
flash chips.

-Corey

--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Phani Babu Giddi | 1 Jan 21:24
Picon

Re: flashrom on the host or target ?

Hi Corey,
 
Is there a way by which I can use the external programmer to flash the complete chip at once. I mean There is the Linux BIOS image which includes the kernel and then there is the root file system and a fall back image. So that I can have a single file which I can generate and distribute.
 
Have this been done before ?
 
Regards,
Phani

On Jan 1, 2008 9:32 AM, Corey Osgood <corey.osgood <at> gmail.com> wrote:
Phani Babu Giddi wrote:
> Hi Corey,
>
> Thanks for your reply but I am not clear. Let me list the steps, may
> be that will explain the problem I see.
>
> 1. I have a host target environment
> 2. I build Linux Kernel image with initrd on the host
> 3. I also build the root file system on the host
> 4. Now I build Linux BIOS and specify the Linux Kernel as payload.
> 5. So at this point I have the .bin/.rom for Linux BIOS and an image
> file for the root file system.
> 6. So my question was how do I get this on the flash device. Do I have
> to use an external programmer for this ? Because there is nothing on
> the target for me to run flashrom.

Yep, you can use an external programmer, or you can use some other board
that's compatible with flashrom and your flash chip, by hot swapping the
flash chips.

-Corey

--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios
Corey Osgood | 2 Jan 04:48
Picon

Re: flashrom on the host or target ?

Phani Babu Giddi wrote:
> Hi Corey,
>  
> Is there a way by which I can use the external programmer to flash the
> complete chip at once. I mean There is the Linux BIOS image which
> includes the kernel and then there is the root file system and a fall
> back image. So that I can have a single file which I can generate and
> distribute.
>  
> Have this been done before ?

Yes, you can use an external programmer. Just use the software that's
included with the programmer.

I have a Willem programmer, highly recommend avoiding it, it's junk for
any sort of real work, although it does work in a pinch. I've heard
others speak highly of the Galep 5, but I don't have one.

-Corey

--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

aaron lwe | 2 Jan 08:47
Picon

problem about dram init

On Dec 21, 2007 1:40 PM, Corey Osgood <corey.osgood <at> gmail.com> wrote:
>
> And now you're where I am. For some reason there's a reserved memory
> range _somewhere_ at the tolm, of some unknown size. I've found that
> reserving an extra 1MB doesn't work, but 32MB does. I've found nothing
> in the documentation I have to explain this. BTW, have you had to make
> any code changes other than the MA Map, and board-specific fixes? I'm
> wondering how generic that code really is.
>
> -Corey
>

Corey, I think I've found the cause of this problem, it's agp aperture memory
that caused this memory unusable. When I set agp aperture memory
size to 128MB, I found I could only use the tolm - 128 * 1024 memory,
and you set agp aperture memory size to 32MB, so reserving 32MB
worked for you. The smallest size I can set for agp apertur memory size
is 4MB and after setting that, memtest now reports 508MB(512MB - 4MB)
is working fine ;-)
Only I don't know why agp aperture memory would interfere with physical memory.

--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Corey Osgood | 2 Jan 09:16
Picon

Re: problem about dram init

aaron lwe wrote:
> On Dec 21, 2007 1:40 PM, Corey Osgood <corey.osgood <at> gmail.com> wrote:
>   
>> And now you're where I am. For some reason there's a reserved memory
>> range _somewhere_ at the tolm, of some unknown size. I've found that
>> reserving an extra 1MB doesn't work, but 32MB does. I've found nothing
>> in the documentation I have to explain this. BTW, have you had to make
>> any code changes other than the MA Map, and board-specific fixes? I'm
>> wondering how generic that code really is.
>>
>> -Corey
>>
>>     
>
> Corey, I think I've found the cause of this problem, it's agp aperture memory
> that caused this memory unusable. When I set agp aperture memory
> size to 128MB, I found I could only use the tolm - 128 * 1024 memory,
> and you set agp aperture memory size to 32MB, so reserving 32MB
> worked for you. The smallest size I can set for agp apertur memory size
> is 4MB and after setting that, memtest now reports 508MB(512MB - 4MB)
> is working fine ;-)
> Only I don't know why agp aperture memory would interfere with physical memory.

Are you configuring the system for AGP 2.0 or 3.0, ie are you
configuring dev 0.0 or 1.0? The way I had it set up, I thought, was 32MB
for video, 32MB for agp, and the rest for the system, using AGP 3.0. I
could very well have messed something up somewhere, though.

-Corey

--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

aaron lwe | 2 Jan 09:44
Picon

problem about dram init

> Are you configuring the system for AGP 2.0 or 3.0, ie are you
> configuring dev 0.0 or 1.0? The way I had it set up, I thought, was 32MB
> for video, 32MB for agp, and the rest for the system, using AGP 3.0. I
> could very well have messed something up somewhere, though.
>
> -Corey
>

I'm configuring the system for AGP 3.0.
AFAIK, frame buffer uses physical memory but agp aperture memory
do not use physical memory. We could set agp aperture memory
size to be 128MB even we only have 64MB physical memory.
and I've disabled the integrated graphics card, reserving no memory for it.

--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Luc Verhaegen | 2 Jan 10:16
Picon
Gravatar

[Patch] Fix CONFIG_CONSOLE_VGA handling in default pci_dev_init.

The CONFIG_CONSOLE_VGA and CONFIG_PCI_ROM_RUN logic in 
src/devices/pci_device.c:pci_dev_init is messed up.

First of all, pci_dev_init should only do anything when the pci rom 
should be run. Secondly, vga_inited should only be set when the rom has 
been run, and never otherwise as this should be done by the relevant 
init function of possible (future) VGA setup drivers.

Signed-off-by: Luc Verhaegen <libv <at> skynet.be>
Index: src/devices/pci_device.c
===================================================================
--- src/devices/pci_device.c	(revision 3031)
+++ src/devices/pci_device.c	(working copy)
@@ -643,23 +643,13 @@
 		((device & 0xffff) << 16) | (vendor & 0xffff));
 }

+/** default handler: only runs the relevant pci bios. */
 void pci_dev_init(struct device *dev)
 {
-#if CONFIG_CONSOLE_VGA == 1
-	extern int vga_inited;
-#endif
-#if CONFIG_PCI_ROM_RUN == 1 || CONFIG_CONSOLE_VGA == 1
+
+#if CONFIG_PCI_ROM_RUN == 1
 	struct rom_header *rom, *ram;

-#if CONFIG_PCI_ROM_RUN != 1
-	/* We want to execute VGA option ROMs when CONFIG_CONSOLE_VGA
-	 * is set but CONFIG_PCI_ROM_RUN is not. In this case we skip
-	 * all other option ROM types.
-	 */
-	if (dev->class!=PCI_CLASS_DISPLAY_VGA) 
-		return;
-#endif
-
 	rom = pci_rom_probe(dev);
 	if (rom == NULL)
 		return;
@@ -671,14 +661,14 @@
 	run_bios(dev, ram);

 #if CONFIG_CONSOLE_VGA == 1
-	/* vga_inited is a trigger of the VGA console code.
-	 *
-	 * Only set it if we enabled VGA console, and if we 
-	 * just initialized a VGA card.
-	 */
-	vga_inited|=dev->class==PCI_CLASS_DISPLAY_VGA;
-#endif
-#endif
+	/* vga_inited is a trigger of the VGA console code. */
+	if (dev->class == PCI_CLASS_DISPLAY_VGA) {
+	    extern int vga_inited;
+	    vga_inited = TRUE;
+	}
+#endif /* CONFIG_CONSOLE_VGA */
+
+#endif /* CONFIG_PCI_ROM_RUN */
 }

 /** Default device operation for PCI devices */
--

-- 
linuxbios mailing list
linuxbios <at> linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Gmane