Hi !
My previous attemps to put coreboot on my laptop (Asus G1, with vgarom on bios) have failed. I want to keep trying to get something to work but it is a real pain in the behind to keep taking out the flash chip and reprogramming it. I think it could be easier to have coreboot booting the original bios , and run any other payload on some key press (or something like that). That way, i could keep flashing new code to try, and in case it doesnt work just boot the orig. bios and reflash. (this is asuming coreboot gets to run)
Is it possible ? Or, do you have any other sugestions to keep trying ?
Thanks.
On 29.07.2009 15:36, Ivan Barrera A. wrote:
My previous attemps to put coreboot on my laptop (Asus G1, with vgarom on bios) have failed. I want to keep trying to get something to work but it is a real pain in the behind to keep taking out the flash chip and reprogramming it. I think it could be easier to have coreboot booting the original bios , and run any other payload on some key press (or something like that). That way, i could keep flashing new code to try, and in case it doesnt work just boot the orig. bios and reflash. (this is asuming coreboot gets to run)
Is it possible ?
Short answer: No, this is not possible.
Long answer: Yes, something like this is possible, but you will have to modify the original BIOS and coreboot and rewrite parts of them. Since you have no sources for the original BIOS, this will be pretty difficult. Basically, neither coreboot nor the original BIOS expect to have a switcher run before them. That switcher would have to preserve the environment completely and not violate any coreboot/BIOS expectations. I wouldn't even try to do it without a bootle of aspirin and sources for the BIOS. If you decide to try it, good luck!
Regards, Carl-Daniel
Carl-Daniel Hailfinger escribió:
On 29.07.2009 15:36, Ivan Barrera A. wrote:
My previous attemps to put coreboot on my laptop (Asus G1, with vgarom on bios) have failed. I want to keep trying to get something to work but it is a real pain in the behind to keep taking out the flash chip and reprogramming it. I think it could be easier to have coreboot booting the original bios , and run any other payload on some key press (or something like that). That way, i could keep flashing new code to try, and in case it doesnt work just boot the orig. bios and reflash. (this is asuming coreboot gets to run)
Is it possible ?
Short answer: No, this is not possible.
bump :(
Long answer: Yes, something like this is possible, but you will have to modify the original BIOS and coreboot and rewrite parts of them. Since you have no sources for the original BIOS, this will be pretty difficult. Basically, neither coreboot nor the original BIOS expect to have a switcher run before them. That switcher would have to preserve the environment completely and not violate any coreboot/BIOS expectations. I wouldn't even try to do it without a bootle of aspirin and sources for the BIOS. If you decide to try it, good luck!
bump again. Asus techs have been of no help at all, so i doubt ill get anywhere with the original BIOS.
Well, i think ill try to figure another way to have a dual-bios system.
Regards, Carl-Daniel
On Wed, 2009-07-29 at 09:36 -0400, Ivan Barrera A. wrote:
Hi !
My previous attemps to put coreboot on my laptop (Asus G1, with vgarom on bios) have failed. I want to keep trying to get something to work but it is a real pain in the behind to keep taking out the flash chip and reprogramming it. I think it could be easier to have coreboot booting the original bios , and run any other payload on some key press (or something like that).
This would be pointless, you must have coreboot really work to achieve it. And if coreboot works, why bother to get your proprietary BIOS running?
That way, i could keep flashing new code to try, and in case it doesnt work just boot the orig. bios and reflash. (this is asuming coreboot gets to run)
Is it possible ? Or, do you have any other sugestions to keep trying ? Thanks.
Cristi
Cristi Magherusan escribió:
On Wed, 2009-07-29 at 09:36 -0400, Ivan Barrera A. wrote:
Hi !
My previous attemps to put coreboot on my laptop (Asus G1, with vgarom on bios) have failed. I want to keep trying to get something to work but it is a real pain in the behind to keep taking out the flash chip and reprogramming it. I think it could be easier to have coreboot booting the original bios , and run any other payload on some key press (or something like that).
This would be pointless, you must have coreboot really work to achieve it. And if coreboot works, why bother to get your proprietary BIOS running?
Main reason : I think coreboot is doing something. But i dont think the vgarom is being loaded (or working). So, to try differents things (changes in code, changes in rom, etc) and not to open up the laptop every time i think i got it, it would be ideal to boot to the original bios and reflash.
The other option would be putting inside 2 flash chips, and an external switch to enable one or the other. Im not sure if this is possible using not so many wires...
That way, i could keep flashing new code to try, and in case it doesnt work just boot the orig. bios and reflash. (this is asuming coreboot gets to run)
Is it possible ? Or, do you have any other sugestions to keep trying ? Thanks.
Cristi
Ivan Barrera A. wrote:
The other option would be putting inside 2 flash chips, and an external switch to enable one or the other. Im not sure if this is possible using not so many wires...
This can certainly be a very doable hack. You will of course have to reboot a lot and that is fairly time consuming. At any rate I would also recommend a flash chip emulator.
But on with it; which flash chip is currently in use on the board? (The name reported by flashrom is fine.)
//Peter
Peter Stuge escribió:
Ivan Barrera A. wrote:
The other option would be putting inside 2 flash chips, and an external switch to enable one or the other. Im not sure if this is possible using not so many wires...
This can certainly be a very doable hack. You will of course have to reboot a lot and that is fairly time consuming. At any rate I would also recommend a flash chip emulator.
But on with it; which flash chip is currently in use on the board? (The name reported by flashrom is fine.)
The System Reports a SST 49LF004A , while it is really a SST 49LF004B (4mbit / 512KB). Flashrom was unable to write on it. So my tests were done using my external programmer. ( the netbook saved the day :) )
Ivan Barrera A. wrote:
The other option would be putting inside 2 flash chips, and an external switch to enable one or the other.
The System Reports a SST 49LF004A , while it is really a SST 49LF004B (4mbit / 512KB).
Ok. If there is physical room for another chip inside the machine you can just connect all important signals across (maybe 10 or so), build a simple transistor switching circuit for the chip select line and finally run only three wires out of the machine. They can be as long as you like.
Flashrom was unable to write on it. So my tests were done using my external programmer. ( the netbook saved the day :) )
So how would you reprogram the flash chip inside the machine? Running wires from the flash chip out of the machine will probably not work.
//Peter
Peter Stuge escribió:
Ivan Barrera A. wrote:
The other option would be putting inside 2 flash chips, and an external switch to enable one or the other.
The System Reports a SST 49LF004A , while it is really a SST 49LF004B (4mbit / 512KB).
Ok. If there is physical room for another chip inside the machine you can just connect all important signals across (maybe 10 or so), build a simple transistor switching circuit for the chip select line and finally run only three wires out of the machine. They can be as long as you like.
I think there is room at a side of the plcc socket i put. How long could those wires be ? The ones for the switch can be loooong, i know.
Flashrom was unable to write on it. So my tests were done using my external programmer. ( the netbook saved the day :) )
So how would you reprogram the flash chip inside the machine? Running wires from the flash chip out of the machine will probably not work.
Uniflash, Asus EZFlash (using a "forced" checksum), etc... Or try to fix the flashrom for my board :)
Ivan Barrera A. wrote:
Ok. If there is physical room for another chip inside the machine you can just connect all important signals across (maybe 10 or so), build a simple transistor switching circuit for the chip select line and finally run only three wires out of the machine. They can be as long as you like.
I think there is room at a side of the plcc socket i put. How long could those wires be ?
A few cm should be fine but keep them as short as possible.
You need pins 2 (7 8) (9 10 11 12) 13 14 15 16 17 24 25 28 29 31 32
Hm, that's 12 but some are the same signal. The ID pins and MODE can probably be tied to either VDD or VSS but check their connections on the original chip first.
So how would you reprogram the flash chip inside the machine?
Uniflash, Asus EZFlash (using a "forced" checksum), etc...
Of course! Sorry. :\
Or try to fix the flashrom for my board :)
That would also be nice, but the chipset could be locked down a bit too much to make it comfortable.
//Peter
I'm copying the flashrom list because this is no longer coreboot related. Followups to flashrom@flashrom.org please.
On 29.07.2009 17:16, Peter Stuge wrote:
Ivan Barrera A. wrote:
Ok. If there is physical room for another chip inside the machine you can just connect all important signals across (maybe 10 or so), build a simple transistor switching circuit for the chip select line and finally run only three wires out of the machine. They can be as long as you like.
I think there is room at a side of the plcc socket i put. How long could those wires be ?
A few cm should be fine but keep them as short as possible.
You need pins 2 (7 8) (9 10 11 12) 13 14 15 16 17 24 25 28 29 31 32
Hm, that's 12 but some are the same signal. The ID pins and MODE can probably be tied to either VDD or VSS but check their connections on the original chip first.
If we're dealing with FWH chips on ICH, you can solder both chips on top of each other with all pins except ID0. ID0 needs to be connected to a switch so that exactly one of them is high and the other one is low.
Or try to fix the flashrom for my board :)
That would also be nice, but the chipset could be locked down a bit too much to make it comfortable.
Still, we should try it. Ivan, can you mail flashrom@flashrom.org with the output from "flashrom -V" for that chip?
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
this is no longer coreboot related.
I think this is highly coreboot related.
A few cm should be fine but keep them as short as possible.
You need pins 2 (7 8) (9 10 11 12) 13 14 15 16 17 24 25 28 29 31 32
Hm, that's 12 but some are the same signal. The ID pins and MODE can probably be tied to either VDD or VSS but check their connections on the original chip first.
If we're dealing with FWH chips on ICH, you can solder both chips on top of each other with all pins except ID0. ID0 needs to be connected to a switch so that exactly one of them is high and the other one is low.
Yes, good point, the CE in this case is ID0, and it should be switched. ID pins are internally pulled-down so the switch circuit actually becomes trivial. Disconnect original ID0 from mainboard. Connect middle contact of switch to VDD via a 1k resistor. Connect each side contact of switch to ID0 on the respective chips. The three leads to the switch can be pretty long.
If they are PLCC chips it isn't very practical to solder two chips on top of each other, because the chip leads bend in under the chip and do not reach the top. Every lead on the upper chip would have to be bent to continue straight down to maybe reach the leads on the lower chip. I don't know if the leads are actually long enough to make that work. Also needs a few mm for the chip package on top of the existing chip of course. Often it's easier to put the second chip somewhere else on the board, and run wires. Yes, that needs a little more work.
//Peter
Peter Stuge escribió:
A few cm should be fine but keep them as short as possible.
You need pins 2 (7 8) (9 10 11 12) 13 14 15 16 17 24 25 28 29 31 32
Hm, that's 12 but some are the same signal. The ID pins and MODE can probably be tied to either VDD or VSS but check their connections on the original chip first.
If we're dealing with FWH chips on ICH, you can solder both chips on top of each other with all pins except ID0. ID0 needs to be connected to a switch so that exactly one of them is high and the other one is low.
Yes, good point, the CE in this case is ID0, and it should be switched. ID pins are internally pulled-down so the switch circuit actually becomes trivial. Disconnect original ID0 from mainboard. Connect middle contact of switch to VDD via a 1k resistor. Connect each side contact of switch to ID0 on the respective chips. The three leads to the switch can be pretty long.
If they are PLCC chips it isn't very practical to solder two chips on top of each other, because the chip leads bend in under the chip and do not reach the top. Every lead on the upper chip would have to be bent to continue straight down to maybe reach the leads on the lower chip. I don't know if the leads are actually long enough to make that work. Also needs a few mm for the chip package on top of the existing chip of course. Often it's easier to put the second chip somewhere else on the board, and run wires. Yes, that needs a little more work.
Besides, in the case of a laptop, one of top of the other is out of the question. There might be enough space around the newly installed socket, but on top, space is pretty limited. (this is, of course, in case of a laptop).
I'll also subscribe to the flashrom list, and send the output of my board.
//Peter
[Fullquote because your flashrom related reply didn't end up on the flashrom list.]
On 29.07.2009 18:17, Peter Stuge wrote:
Carl-Daniel Hailfinger wrote:
this is no longer coreboot related.
I think this is highly coreboot related.
A few cm should be fine but keep them as short as possible.
You need pins 2 (7 8) (9 10 11 12) 13 14 15 16 17 24 25 28 29 31 32
Hm, that's 12 but some are the same signal. The ID pins and MODE can probably be tied to either VDD or VSS but check their connections on the original chip first.
If we're dealing with FWH chips on ICH, you can solder both chips on top of each other with all pins except ID0. ID0 needs to be connected to a switch so that exactly one of them is high and the other one is low.
Yes, good point, the CE in this case is ID0, and it should be switched. ID pins are internally pulled-down so the switch circuit actually becomes trivial. Disconnect original ID0 from mainboard. Connect middle contact of switch to VDD via a 1k resistor. Connect each side contact of switch to ID0 on the respective chips. The three leads to the switch can be pretty long.
If they are PLCC chips it isn't very practical to solder two chips on top of each other, because the chip leads bend in under the chip and do not reach the top. Every lead on the upper chip would have to be bent to continue straight down to maybe reach the leads on the lower chip. I don't know if the leads are actually long enough to make that work. Also needs a few mm for the chip package on top of the existing chip of course. Often it's easier to put the second chip somewhere else on the board, and run wires. Yes, that needs a little more work.
//Peter
Ivan Barrera A. schrieb:
Is it possible ? Or, do you have any other sugestions to keep trying ?
SerialICE might be an option: http://www.coreboot.org/pipermail/coreboot-announce/2009-June/000002.html
That way, the chip only has to be flashed once (at least until serialice works enough, but that's a much smaller problem to solve than getting coreboot to run), and then you can run coreboot or the vendor's BIOS from your host system, and even look at what they do.
Downside: it requires a serial port (though adding EHCI debug port support or something like that should be feasible - but "adding" requires some effort).
Patrick
Patrick Georgi escribió:
Ivan Barrera A. schrieb:
Is it possible ? Or, do you have any other sugestions to keep trying ?
SerialICE might be an option: http://www.coreboot.org/pipermail/coreboot-announce/2009-June/000002.html
That way, the chip only has to be flashed once (at least until serialice works enough, but that's a much smaller problem to solve than getting coreboot to run), and then you can run coreboot or the vendor's BIOS from your host system, and even look at what they do.
Downside: it requires a serial port (though adding EHCI debug port support or something like that should be feasible - but "adding" requires some effort).
Aha... I did read about SerialICE, but didnt get anywhere because the laptop doesnt have serial ports. (and havent found one on the board, tho dmidecode names one) I'll get some flash chips and keep looking.
Area the minipci/minipcie diagnostic cards useful with coreboot/seabios ?
PS : Perhaps the vgarom doesnt work well because it is a PCIe card.
Patrick
Ivan Barrera A. wrote:
Patrick Georgi escribió:
Ivan Barrera A. schrieb:
Is it possible ? Or, do you have any other sugestions to keep trying ?
SerialICE might be an option: http://www.coreboot.org/pipermail/coreboot-announce/2009-June/000002.html
That way, the chip only has to be flashed once (at least until serialice works enough, but that's a much smaller problem to solve than getting coreboot to run), and then you can run coreboot or the vendor's BIOS from your host system, and even look at what they do.
Downside: it requires a serial port (though adding EHCI debug port support or something like that should be feasible - but "adding" requires some effort).
Aha... I did read about SerialICE, but didnt get anywhere because the laptop doesnt have serial ports. (and havent found one on the board, tho dmidecode names one) I'll get some flash chips and keep looking.
Area the minipci/minipcie diagnostic cards useful with coreboot/seabios ?
PS : Perhaps the vgarom doesnt work well because it is a PCIe card.
You won't see anything on VGA because the machine's RAM is not working. Which port did you use as a basis for a i965 port? i945? That one comes pretty close, but needs a _lot_ of changes, still, before it would come close to the point where you can start looking at enabling VGA..
If you want to experiment with supporting the i965 chipset, I suggest you do the following:
* Get a i965 based desktop board first and get that running. * Get an Artec LPC Dongle/FlexyICE and a Stuge LPC/PLCC converter. http://www.coreboot.org/Artecgroup_programmable_LPC_dongle * Get a USB debug device for console via USB http://www.coreboot.org/EHCI_Debug_Port
Best regards, Stefan
Downside: it requires a serial port (though adding EHCI debug port support or something like that should be feasible - but "adding" requires some effort).
Aha... I did read about SerialICE, but didnt get anywhere because the laptop doesnt have serial ports. (and havent found one on the board, tho dmidecode names one) I'll get some flash chips and keep looking.
Area the minipci/minipcie diagnostic cards useful with coreboot/seabios ?
PS : Perhaps the vgarom doesnt work well because it is a PCIe card.
You won't see anything on VGA because the machine's RAM is not working. Which port did you use as a basis for a i965 port? i945? That one comes pretty close, but needs a _lot_ of changes, still, before it would come close to the point where you can start looking at enabling VGA..
Aha. However, lspci (and the specs) shows that my board is i945. 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) (Mobile Intel® 945 PM Express Chipset + ICH7M)
If you want to experiment with supporting the i965 chipset, I suggest you do the following:
- Get a i965 based desktop board first and get that running.
- Get an Artec LPC Dongle/FlexyICE and a Stuge LPC/PLCC converter.
http://www.coreboot.org/Artecgroup_programmable_LPC_dongle
- Get a USB debug device for console via USB
Already have a programmer (lpc/fwh/etc) and think i have a i945 and a i965 board. Ill try to get the debug device, and try your suggestions.
Best regards, Stefan
Ivan Barrera A. wrote:
Downside: it requires a serial port (though adding EHCI debug port support or something like that should be feasible - but "adding" requires some effort).
Aha... I did read about SerialICE, but didnt get anywhere because the laptop doesnt have serial ports. (and havent found one on the board, tho dmidecode names one) I'll get some flash chips and keep looking.
Area the minipci/minipcie diagnostic cards useful with coreboot/seabios ?
PS : Perhaps the vgarom doesnt work well because it is a PCIe card.
You won't see anything on VGA because the machine's RAM is not working. Which port did you use as a basis for a i965 port? i945? That one comes pretty close, but needs a _lot_ of changes, still, before it would come close to the point where you can start looking at enabling VGA..
Aha. However, lspci (and the specs) shows that my board is i945. 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) (Mobile Intel® 945 PM Express Chipset + ICH7M)
Oh, interesting... Then there must be different versions of the Laptop with different chipsets out there. This chipset should work.
- Get an Artec LPC Dongle/FlexyICE and a Stuge LPC/PLCC converter.
http://www.coreboot.org/Artecgroup_programmable_LPC_dongle
- Get a USB debug device for console via USB
Already have a programmer (lpc/fwh/etc)
That will work.
However, the dongle is not a programmer in the strict sense.. more like a memory emulator. you plug it into the bios socket of the target machine and can update the bios on it via USB from another machine. This is our method of choice for all PLCC based systems during BIOS development ..
Ill try to get the debug device, and try your suggestions.
Great.. The USB Debug port will replace serial console more and more, and is one of the few methods for BIOS debugging on machines where there's no serial port. POST cards can be used, but have very limited debugging capabilities.
Stefan
However, lspci (and the specs) shows that my board is i945. 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) (Mobile Intel® 945 PM Express Chipset + ICH7M)
Oh, interesting... Then there must be different versions of the Laptop with different chipsets out there. This chipset should work.
Yep. Newer versions (Asus G1s , etc) use updated chipsets. But the "original" is i945 based.
- Get an Artec LPC Dongle/FlexyICE and a Stuge LPC/PLCC converter.
http://www.coreboot.org/Artecgroup_programmable_LPC_dongle
- Get a USB debug device for console via USB
Already have a programmer (lpc/fwh/etc)
That will work.
However, the dongle is not a programmer in the strict sense.. more like a memory emulator. you plug it into the bios socket of the target machine and can update the bios on it via USB from another machine. This is our method of choice for all PLCC based systems during BIOS development ..
Oh, i see.. It is kind of expensive (considering i have to ship to my country). Well.. if i need to get it, ill consider it. Meanwhile, rebooting is not that awful.
Ill try to get the debug device, and try your suggestions.
Great.. The USB Debug port will replace serial console more and more, and is one of the few methods for BIOS debugging on machines where there's no serial port. POST cards can be used, but have very limited debugging capabilities.
I'll get the tools, and try again when they arrive. I'll keep the list posted ;)
If more ideas come up, that will be good too.
Stefan
Aha. However, lspci (and the specs) shows that my board is i945. 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) (Mobile Intel® 945 PM Express Chipset + ICH7M)
Oh, interesting... Then there must be different versions of the Laptop with different chipsets out there. This chipset should work.
Cool! My Aopen i945GTm-VHL MoDT board has the i945GT chipset. I hope to see coreboot running on it someday...
On Wed, Jul 29, 2009 at 09:36:20AM -0400, Ivan Barrera A. wrote:
Hi !
My previous attemps to put coreboot on my laptop (Asus G1, with vgarom on bios) have failed. I want to keep trying to get something to work but it is a real pain in the behind to keep taking out the flash chip and reprogramming it. I think it could be easier to have coreboot booting the original bios , and run any other payload on some key press (or something like that). That way, i could keep flashing new code to try, and in case it doesnt work just boot the orig. bios and reflash. (this is asuming coreboot gets to run)
Is it possible ? Or, do you have any other sugestions to keep trying ?
Thanks
Ok, here is a thought...
Every x86 cpu starts in real mode, at address 0xF000:0xFFF0. The last 16 bytes of your address space, and the last 16 bytes of your rom.
You will find a jump there, and some extra space to put in a longer jump if needs be.
Have the original image sit at the top of a bigger flash chip, replace the jump to jump somewhere in the bottom halve of the flash (if that's still addressable by real mode).
This code then checks some RTC value while remaining in realmode. If the rtc content is valid, and this fixed location byte is telling it to boot the original image, then just jump to the vector of the original jump. If not, go to the coreboot location and run coreboot.
The question is: is the change in the original image (the different reset vector) going to hit a checksum check somewhere? After some discussion on irc, it is not there on phoenix trusted core (for the initial bios code and the decompression bios) so then it will most likely not be there for less paranoid bioses.
Luc Verhaegen.