Hi,
I'm new to LinuxBios, and just looking for a way to flash the bios on an HP laptop without installing Windoze. None of the tricks I've found through Google have worked for me so far, including HP's own utility for making bootable usb keys.
I'm trying to compile just the flashrom component of LinuxBios from svn, but make gives me an error telling me that I need to install pciutils-devel and zlib-devel. The problem is these packages are already installed.
I extracted the little .test.c program from the Makefile, and determined that the linker is unable to resolve the call to pci_alloc. The problem is I don't know why. The header is there in /usr/include/pci/pci.h, and /usr/lib/libpci.a is there (but I don't know how to tell what symbols the library provides; reached the limit of my expertise there).
This happens on two different machines, one running Mandriva 2008.0 (the laptop in question), and the other Mandriva 2007.0 (my desktop pc). Any ideas what's going on and how to resolve it?
Shocky
Hello,
I'm a new member of the mailing list too, until now i was only a passive reader.
I have a suggestion. You can use grub to boot a floppy disk image with the flasher and bios. (and flash it). Here is how http://gentoo-wiki.com/TIP_Boot_Floppydisk_Image_without_Floppy_using_GRUB
Good luck! ____________ Frederico Silva
Shocky wrote:
Hi,
I'm new to LinuxBios, and just looking for a way to flash the bios on an HP laptop without installing Windoze. None of the tricks I've found through Google have worked for me so far, including HP's own utility for making bootable usb keys.
I'm trying to compile just the flashrom component of LinuxBios from svn, but make gives me an error telling me that I need to install pciutils-devel and zlib-devel. The problem is these packages are already installed.
I extracted the little .test.c program from the Makefile, and determined that the linker is unable to resolve the call to pci_alloc. The problem is I don't know why. The header is there in /usr/include/pci/pci.h, and /usr/lib/libpci.a is there (but I don't know how to tell what symbols the library provides; reached the limit of my expertise there).
This happens on two different machines, one running Mandriva 2008.0 (the laptop in question), and the other Mandriva 2007.0 (my desktop pc). Any ideas what's going on and how to resolve it?
Shocky
On Sunday 25 November 2007 11:08, Frederico Silva wrote:
Hello,
I'm a new member of the mailing list too, until now i was only a passive reader.
I have a suggestion. You can use grub to boot a floppy disk image with the flasher and bios. (and flash it). Here is how http://gentoo-wiki.com/TIP_Boot_Floppydisk_Image_without_Floppy_using_GRUB
Good luck! ____________ Frederico Silva
I don't want to get into a big OT discussion on the list (esp. being new here), but it looks like this just boots a dos image. I've been able to boot dos on a cd iso I got on allbootdisks.com, and access the HP flash utility (which is just a bundled version of the Phoenix bios winphlash utility) on a usb key, but it says it won't run in dos mode.
It will apparently (from what I've read) run at a dos command prompt within windoze. But windoze won't run from a cd without being installed (again according to what I've read), and that's what I want to avoid.
But thanks for the suggestion.
Shocky
Hi,
If you need a windows environment without installing it, you can try use a Preinstalled Environment like BartPE http://www.nu2.nu/pebuilder/. I don't know how to create a BartPE under Linux (maybe with Wine...).
_______________ Frederico Silva
Shocky wrote:
On Sunday 25 November 2007 11:08, Frederico Silva wrote:
Hello,
I'm a new member of the mailing list too, until now i was only a passive reader.
I have a suggestion. You can use grub to boot a floppy disk image with the flasher and bios. (and flash it). Here is how http://gentoo-wiki.com/TIP_Boot_Floppydisk_Image_without_Floppy_using_GRUB
Good luck! ____________ Frederico Silva
I don't want to get into a big OT discussion on the list (esp. being new here), but it looks like this just boots a dos image. I've been able to boot dos on a cd iso I got on allbootdisks.com, and access the HP flash utility (which is just a bundled version of the Phoenix bios winphlash utility) on a usb key, but it says it won't run in dos mode.
It will apparently (from what I've read) run at a dos command prompt within windoze. But windoze won't run from a cd without being installed (again according to what I've read), and that's what I want to avoid.
But thanks for the suggestion.
Shocky
how's about we just figure out why flashrom won't build?
ron
On Sunday 25 November 2007 19:42, ron minnich wrote:
how's about we just figure out why flashrom won't build?
ron
Yeah, that's what I was hoping for 8^). Any ideas?
On Mon, Nov 26, 2007 at 09:34:17AM -0700, Shocky wrote:
On Sunday 25 November 2007 19:42, ron minnich wrote:
how's about we just figure out why flashrom won't build?
ron
Yeah, that's what I was hoping for 8^). Any ideas?
Please post the full compile output here.
Do you have pciutils-dev and zlib-dev (or whatever it's called on your distribution) installed?
Also, there's a Mandriva package already (don't know in which "branch" of Mandriva though). Doesn't that work?
http://linuxbios.org/Flashrom#Installation
If all else fails, edit the Makefile to remove the check for pciutils-dev etc. and see if it works anyway. Maybe it's just the check which is broken.
Uwe.
Uwe Hermann wrote:
If all else fails, edit the Makefile to remove the check for pciutils-dev etc. and see if it works anyway. Maybe it's just the check which is broken.
I was having troubles with the check for pciutils-devel and zlib-devel last night. Removing the dep check showed me that I had not install gcc yet. Compiled just fine after installing gcc. This is on openSUSE.
On Monday 26 November 2007 09:02, Forest Dean Feighner wrote:
Uwe Hermann wrote:
If all else fails, edit the Makefile to remove the check for pciutils-dev etc. and see if it works anyway. Maybe it's just the check which is broken.
I was having troubles with the check for pciutils-devel and zlib-devel last night. Removing the dep check showed me that I had not install gcc yet. Compiled just fine after installing gcc. This is on openSUSE.
I have gcc installed. Been compiling packages when I have to for a few years now. You can see in my log where I did the test manually that it compiles successfully.
But it's always good to check the basics. My dad always started diagnosing electronics problems with "is it plugged in?". You wouldn't believe the number of times it wasn't 8^).
run the checker under strace please :)
ron
On 26/11/07 13:30 -0800, ron minnich wrote:
run the checker under strace please :)
Strace might be a little too verbose (thank you very much, GNU make).
Try make -n first.
ron
-- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios
On Monday 26 November 2007 14:45, Jordan Crouse wrote:
On 26/11/07 13:30 -0800, ron minnich wrote:
run the checker under strace please :)
Strace might be a little too verbose (thank you very much, GNU make).
Try make -n first.
ron
-- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios
-- Jordan Crouse Systems Software Development Engineer Advanced Micro Devices, Inc.
make -n just shows me the command I already know the make is failing on, the one where it tries to compile and link .test.c. With the pciutils dependency removed, it shows me the gcc -o with all the .o files and ending with '-lpci -lz -static'. I don't think there's any useful info there.
Shocky
let's keep this simple :-)
I am getting mixed up
#include <pci/pci.h> int main(){struct pci_access *p = pci_alloc();}
strace -o /tmp/fail cc thing.c -lpci -lz
and tell me what shakes.
ron
On Mon, 26 Nov 2007, ron minnich wrote:
let's keep this simple :-)
Thought I'd try it and see what happens. Went to website, downloaded "latest linuxbios v2", and found flashrom missing. Downloaded -2986 and found it.
"make" complied flashrom with no errors.
Box here is slackware 12.0 with a newer kernel. gcc is now gcc-4.2.2. Is there anything else that would help?
Russ
On Monday 26 November 2007 16:04, ron minnich wrote:
let's keep this simple :-)
I am getting mixed up
#include <pci/pci.h> int main(){struct pci_access *p = pci_alloc();}
strace -o /tmp/fail cc thing.c -lpci -lz
and tell me what shakes.
ron
Okay, see attached.
Shocky
strace -f, thanks :-)
ron
On Tuesday 27 November 2007 08:56, ron minnich wrote:
strace -f, thanks :-)
ron
Okay, here it is gzipped.
Shocky
So according to this trace the build succeeded.
So what's wrong?
ron
On Tuesday 27 November 2007 16:01, ron minnich wrote:
So according to this trace the build succeeded.
So what's wrong?
ron
It won't link. The linker always returns the error:
undefined reference to 'pci_alloc'
Shocky
On Nov 27, 2007 3:17 PM, Shocky shocky1@users.sourceforge.net wrote:
It won't link. The linker always returns the error:
undefined reference to 'pci_alloc'
btw, on the next strace, do -s 1024 :-)
I notice it seems to be linking with a .a instead of a .o for libpci. did you do an nm on that library? I wonder if you have some weird out of rev version.
The library paths it is using look odd as well, almost like it's cross compiling? that's not the case is it? ron
On Tuesday 27 November 2007 16:28, ron minnich wrote:
On Nov 27, 2007 3:17 PM, Shocky shocky1@users.sourceforge.net wrote:
It won't link. The linker always returns the error:
undefined reference to 'pci_alloc'
btw, on the next strace, do -s 1024 :-)
I notice it seems to be linking with a .a instead of a .o for libpci. did you do an nm on that library? I wonder if you have some weird out of rev version.
Yeah, it is libpci.a. Is that not what it should be?
The library paths it is using look odd as well, almost like it's cross compiling? that's not the case is it?
Not as far as I know.
ron
Shocky
gcc -o thing thing.c /usr/lib/libpci.a -lz
see what happens.
ron
On Tuesday 27 November 2007 17:33, ron minnich wrote:
gcc -o thing thing.c /usr/lib/libpci.a -lz
see what happens.
ron
Aha, that ran successfully. I can even run the thing program, which does nothing other than give me a return code of 8. Seems like progress. Does it give you a clue what's wrong with the linker on Mandriva?
Shocky
On Nov 28, 2007 7:53 AM, Shocky shocky1@users.sourceforge.net wrote:
Aha, that ran successfully. I can even run the thing program, which does nothing other than give me a return code of 8. Seems like progress. Does it give you a clue what's wrong with the linker on Mandriva?
I can only tell you, from the strace, that the mandriva guys seem to want to be clever, and fail badly, I don't know what they're doing, but it's not working very well :-)
ron
In a prior email I wrote "libz and libz.so." It should have been "libz.a and libz.so." sorry.
On Wed, 28 Nov 2007, Shocky wrote:
On Tuesday 27 November 2007 17:33, ron minnich wrote:
gcc -o thing thing.c /usr/lib/libpci.a -lz
see what happens.
ron
Aha, that ran successfully. I can even run the thing program, which does nothing other than give me a return code of 8. Seems like progress. Does it give you a clue what's wrong with the linker on Mandriva?
To see what the linker is doing, try this: gcc -o thing thing.c -Xlinker --verbose -lpci -lz
The results you get should look alot like this:
GNU ld (Linux/GNU Binutils) 2.17.50.0.17.20070615 Supported emulations: elf_i386 i386linux elf_x86_64 using internal linker script: ================================================== /* Script for -z combreloc: combine and sort reloc sections */ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) ENTRY(_start) SEARCH_DIR("/usr/i486-slackware-linux/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); SECTIONS { [..] }
================================================== attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../crt1.o succeeded /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../crt1.o attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../crti.o succeeded /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../crti.o attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/crtbegin.o succeeded /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/crtbegin.o attempt to open /tmp/ccyKMHNi.o succeeded /tmp/ccyKMHNi.o attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libpci.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libpci.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libpci.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libpci.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.a succeeded (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.a)access.o (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.a)dump.o (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.a)names.o (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.a)sysfs.o (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.a)proc.o (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.a)i386-ports.o (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libpci.a)generic.o attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libz.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libz.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libz.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libz.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libz.so succeeded -lz (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libz.so) attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc.a succeeded attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_s.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_s.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_s.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_s.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libgcc_s.so succeeded -lgcc_s (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libgcc_s.so) attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libc.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libc.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libc.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libc.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libc.so succeeded opened script file /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libc.so opened script file /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libc.so attempt to open /lib/libc.so.6 succeeded /lib/libc.so.6 attempt to open /usr/lib/libc_nonshared.a succeeded (/usr/lib/libc_nonshared.a)elf-init.oS attempt to open /lib/ld-linux.so.2 succeeded /lib/ld-linux.so.2 attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc.a succeeded attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_s.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_s.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_s.so failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_s.a failed attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libgcc_s.so succeeded -lgcc_s (/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../libgcc_s.so) attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/crtend.o succeeded /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/crtend.o attempt to open /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../crtn.o succeeded /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../crtn.o ld-linux.so.2 needed by /lib/libc.so.6 found ld-linux.so.2 at /lib/ld-linux.so.2
Russ
On Monday 26 November 2007 14:30, ron minnich wrote:
run the checker under strace please :)
ron
When you say "the checker", are you referring to the 'ld test.o' command that shows the linking problem, or something else?
Shocky
On Monday 26 November 2007 12:52, Uwe Hermann wrote:
Please post the full compile output here.
Do you have pciutils-dev and zlib-dev (or whatever it's called on your distribution) installed?
Also, there's a Mandriva package already (don't know in which "branch" of Mandriva though). Doesn't that work?
http://linuxbios.org/Flashrom#Installation
If all else fails, edit the Makefile to remove the check for pciutils-dev etc. and see if it works anyway. Maybe it's just the check which is broken.
Uwe.
Yes, pciutils-devel and zlib-devel are installed.
There is no package Mandriva package in any of the standard repositories named flashrom or linuxbios, and no packages that contain any file whose name contains the string "flashrom". This is the first thing I tried before resorting to trying a build.
Here's the output from when I compiled and tried to link the test program extracted from the Makefile, and a few lines to show that the files are there that should be.
[flashrom]$ cat test.c #include <pci/pci.h> struct pci_access *pacc; int main(int argc, char **argv) { pacc = pci_alloc(); return 0; } [flashrom]$ [flashrom]$ gcc -c test.c [flashrom]$ ld -lpci -lz -static test.o ld: warning: cannot find entry symbol _start; defaulting to 0000000008048094 test.o: In function `main': test.c:(.text+0x12): undefined reference to `pci_alloc' [flashrom]$ ls -l /usr/lib/libpci.a -rw-r--r-- 1 root root 138094 2007-08-14 16:11 /usr/lib/libpci.a [flashrom]$ ls -l /usr/include/pci/pci.h -rw-r--r-- 1 root root 6479 2007-08-14 16:11 /usr/include/pci/pci.h [flashrom]$ grep pci_alloc /usr/include/pci/pci.h struct pci_access *pci_alloc(void);
I tried removing the pciutils dependency from the all target in Makefile, though I didn't expect this to work (if it can't find the symbol in the test file, it's not going to find the symbol in the real program, is it?). This gives me a different ld error:
/usr/bin/ld: cannot find -lc
Shocky
On Nov 26, 2007 8:34 AM, Shocky shocky1@users.sourceforge.net wrote:
On Sunday 25 November 2007 19:42, ron minnich wrote:
how's about we just figure out why flashrom won't build?
ron
Yeah, that's what I was hoping for 8^). Any ideas?
send me the output from a failed build.
ron
On Monday 26 November 2007 13:03, ron minnich wrote:
On Nov 26, 2007 8:34 AM, Shocky shocky1@users.sourceforge.net wrote:
On Sunday 25 November 2007 19:42, ron minnich wrote:
how's about we just figure out why flashrom won't build?
ron
Yeah, that's what I was hoping for 8^). Any ideas?
send me the output from a failed build.
ron
It just says:
Checking for pciutils and zlib... not found.
Please install pciutils-devel and zlib-devel.
Nothing more informative.
Shocky
* Shocky shocky1@users.sourceforge.net [071126 21:37]:
It just says:
Checking for pciutils and zlib... not found.
Please install pciutils-devel and zlib-devel.
Nothing more informative.
What pciutils, pciutils-devel, zlib and zlib-devel package versions do you have installed on your system?
On Tuesday 27 November 2007 02:46, Stefan Reinauer wrote:
- Shocky shocky1@users.sourceforge.net [071126 21:37]:
It just says:
Checking for pciutils and zlib... not found.
Please install pciutils-devel and zlib-devel.
Nothing more informative.
What pciutils, pciutils-devel, zlib and zlib-devel package versions do you have installed on your system?
-- coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br. Tel.: +49 761 7668825 • Fax: +49 761 7664613 Email: info@coresystems.de • http://www.coresystems.de/ Registergericht: Amtsgericht Freiburg • HRB 7656 Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
pciutils and pciutils-devel are version 2.2.6 release 3mdv2008.0. zlib is actually zlib1. zlib1 and zlib1-devel are version 1.2.3 release 8mdv2008.0.
That's on the laptop where I really want to build it. I also get the same error my my 2007.0 desktop, where pciutils is at veresion 2.2.3, and zlib1 is at the same version 1.2.3.
I'm wondering if I should pull down the source rpms for these and see what's inside them. I saw someone mention the other day on another thread that some distros break linuxbios. Maybe Mandriva is one of them.
Shocky
I have yet to see anyone try my trivial trick on mandriva which, again, is something like this:
#include <pci.h> main(){return pci_alloc();}
cc a.c -lpci -lz
and tell us what happens.
ron
Shocky wrote:
On Tuesday 27 November 2007 02:46, Stefan Reinauer wrote:
- Shocky shocky1@users.sourceforge.net [071126 21:37]:
It just says:
Checking for pciutils and zlib... not found.
Please install pciutils-devel and zlib-devel.
Nothing more informative.
What pciutils, pciutils-devel, zlib and zlib-devel package versions do you have installed on your system?
-- coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br. Tel.: +49 761 7668825 • Fax: +49 761 7664613 Email: info@coresystems.de • http://www.coresystems.de/ Registergericht: Amtsgericht Freiburg • HRB 7656 Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
pciutils and pciutils-devel are version 2.2.6 release 3mdv2008.0. zlib is actually zlib1. zlib1 and zlib1-devel are version 1.2.3 release 8mdv2008.0.
Perhaps this can help?
http://rpmfind.net/linux/rpm2html/search.php?query=flashrom
The rpms are there, for immediate use, and also the maintainer's contact info. Perhaps he knows something we don't (but should). Source is there as well to see if there are any differences, but there are too many people on the repos at the moment, I'm getting kicked.
That's on the laptop where I really want to build it. I also get the same error my my 2007.0 desktop, where pciutils is at veresion 2.2.3, and zlib1 is at the same version 1.2.3.
I'm wondering if I should pull down the source rpms for these and see what's inside them. I saw someone mention the other day on another thread that some distros break linuxbios. Maybe Mandriva is one of them.
Shocky
If the threads you were looking at dealt with stack check failure, it doesn't affect flashrom.
-Corey
On Tuesday 27 November 2007 08:57, Corey Osgood wrote: ...
http://rpmfind.net/linux/rpm2html/search.php?query=flashrom
The rpms are there, for immediate use, and also the maintainer's contact info. Perhaps he knows something we don't (but should). Source is there as well to see if there are any differences, but there are too many people on the repos at the moment, I'm getting kicked.
Oh, that's why urpmi is not picking this up for me, these are cooker (unstable, development version) packages. Installing cooker rpms on a regular Mandriva install is almost guaranteed to trash your system (often pulls in new versions of glibc and stuff like that).
But building and installing a cooker srpm is relatively safe. Usually just fails to build if the dependencies are incompatible. I'll give it a shot, though I suspect it will fail on the same linker error if not on something else.
...
If the threads you were looking at dealt with stack check failure, it doesn't affect flashrom.
Not sure, but that might have been the one.
-Corey
Shocky
On Sunday 25 November 2007 14:38, Frederico Silva wrote:
Hi,
If you need a windows environment without installing it, you can try use a Preinstalled Environment like BartPE http://www.nu2.nu/pebuilder/. I don't know how to create a BartPE under Linux (maybe with Wine...).
Frederico Silva
If I get desperate I might try that. Except that I don't have Win 2K or XP. The laptop came with Vista, which for reasons I won't get into I was forced to use for three weeks before I was able to replace it with Linux. I don't wish to ever go through that experience again. If you haven't had the misfortune of using Vista, it really is as bad as people have been saying. Those horror stories are not exaggerated. But this is way OT, and I don't want to wear out my welcome on this list too quickly 8^).
Shocky
Shocky wrote:
Hi,
I'm new to LinuxBios, and just looking for a way to flash the bios on an HP laptop without installing Windoze. None of the tricks I've found through Google have worked for me so far, including HP's own utility for making bootable usb keys.
Some HP laptops these days use SPI flash, which flashrom can do only in one special situation (afaik), Gigabyte m57sli. Also, the flash may have protection coming from the embedded controller or GPIO lines, which flashrom knows nothing about.
Last time I flashed my HP laptop's bios, I took a windows 98se iso, added the bios and flash utility to it with an iso editor, and then burned and booted from it. I ran the utility through dos, and it worked fine. This should also work fine with a custom cd and the floppy emulation, with a 98se boot disk as the source. K3b can do the dirty work.
I'm trying to compile just the flashrom component of LinuxBios from svn, but make gives me an error telling me that I need to install pciutils-devel and zlib-devel. The problem is these packages are already installed.
I extracted the little .test.c program from the Makefile, and determined that the linker is unable to resolve the call to pci_alloc. The problem is I don't know why. The header is there in /usr/include/pci/pci.h, and /usr/lib/libpci.a is there (but I don't know how to tell what symbols the library provides; reached the limit of my expertise there).
This happens on two different machines, one running Mandriva 2008.0 (the laptop in question), and the other Mandriva 2007.0 (my desktop pc). Any ideas what's going on and how to resolve it?
Sorry, can't be of much help.
-Corey
On Sunday 25 November 2007 11:45, Corey Osgood wrote: ...
Some HP laptops these days use SPI flash, which flashrom can do only in one special situation (afaik), Gigabyte m57sli. Also, the flash may have protection coming from the embedded controller or GPIO lines, which flashrom knows nothing about.
Last time I flashed my HP laptop's bios, I took a windows 98se iso, added the bios and flash utility to it with an iso editor, and then burned and booted from it. I ran the utility through dos, and it worked fine. This should also work fine with a custom cd and the floppy emulation, with a 98se boot disk as the source. K3b can do the dirty work.
...
Sorry, can't be of much help.
-Corey
Yeah, I know there's a good chance that it won't work. But I'm willing to give it a shot if I can. HP is stingy with h/w info, and I haven't yet figured out the secret handshake to open the case and see who's m/b it is. I've been able to determine that it uses NVidia MCP51, which has a "?" under the supported column. Maybe I can at least contribute to getting it supported.
Shocky
On Nov 25, 2007 8:24 AM, Shocky shocky1@users.sourceforge.net wrote:
I'm trying to compile just the flashrom component of LinuxBios from svn, but make gives me an error telling me that I need to install pciutils-devel and zlib-devel. The problem is these packages are already installed.
I extracted the little .test.c program from the Makefile, and determined that the linker is unable to resolve the call to pci_alloc. The problem is I don't know why.
I've had similar issues after upgrading my compilation toolchain incorrectly and will wager a guess that the issues you are facing have more to do with your distribution than with flashrom. A few questions that come to mind -- Have you recently upgraded system packages such as libc, gcc, etc? Also, are you using crosstool? Do you have all the -devel packages installed which distros like Debian and Redhat tend to omit.
Also, I think Mandriva / SuSE / Redhat / etc. have features tucked away which can help you to upgrade your whole distro from "basic" to "developer" or something to automagically install all -devel packages and libraries. If you have the hard disk space available, you may wish to try something like that just to be certain there's no easy fix.
On Nov 25, 2007 8:24 AM, Shocky shocky1@users.sourceforge.net wrote:
The header is there in /usr/include/pci/pci.h, and /usr/lib/libpci.a is there (but I don't know how to tell what symbols the library provides; reached the limit of my expertise there).
nm is your friend here ;-)
On Tuesday 27 November 2007 15:50, David Hendricks wrote:
I've had similar issues after upgrading my compilation toolchain incorrectly and will wager a guess that the issues you are facing have more to do with your distribution than with flashrom. A few questions that come to mind -- Have you recently upgraded system packages such as libc, gcc, etc? Also, are you using crosstool? Do you have all the -devel packages installed which distros like Debian and Redhat tend to omit.
Yeah, it does seem to be something with this distro, since others can build it successfully.
Also, I think Mandriva / SuSE / Redhat / etc. have features tucked away which can help you to upgrade your whole distro from "basic" to "developer" or something to automagically install all -devel packages and libraries. If you have the hard disk space available, you may wish to try something like that just to be certain there's no easy fix.
They used to have an install option to make it a developer workstation, which I did select when I installed 2007.0 on my desktop. I've successfully built quite a few packages on it without any problems like this. I haven't done any recent updates.
On the laptop, where it's 2008.0, they've eliminated that developer option to simplify the installer. But I've manually installed everything I need for building packages. I've built a few packages and this is the first I've seen something like this.
It's odd how the same problem occurs in two completely different versions of Mandriva. But I'll have to check on the Mandriva lists and see what they say.
On Nov 25, 2007 8:24 AM, Shocky shocky1@users.sourceforge.net wrote:
The header is there in /usr/include/pci/pci.h, and /usr/lib/libpci.a is there (but I don't know how to tell what symbols the library provides; reached the limit of my expertise there).
nm is your friend here ;-)
Thanks, I knew there had to be a command that would do this. This just deepens the mystery further. nm tells me that within /usr/lib/libpci.a access.o defines the external symbol "00000760 T pci_alloc". So if nm can see it, why can't ld see it?
Shocky
On Tue, Nov 27, 2007 at 05:19:01PM -0700, Shocky wrote:
Thanks, I knew there had to be a command that would do this. This just deepens the mystery further. nm tells me that within /usr/lib/libpci.a access.o defines the external symbol "00000760 T pci_alloc". So if nm can see it, why can't ld see it?
What if you link with the archive manually:
ld -o flashrom file1.o file2.o /usr/lib/libpci.a
(ie don't use -lpci)
//Peter
On Wed, 28 Nov 2007, Peter Stuge wrote:
On Tue, Nov 27, 2007 at 05:19:01PM -0700, Shocky wrote:
Thanks, I knew there had to be a command that would do this. This just deepens the mystery further. nm tells me that within /usr/lib/libpci.a access.o defines the external symbol "00000760 T pci_alloc". So if nm can see it, why can't ld see it?
What if you link with the archive manually:
ld -o flashrom file1.o file2.o /usr/lib/libpci.a
(ie don't use -lpci)
I'm a little slow. It took me an hour to find the answer but now that I've found it, the answer is simple:
It's not libpci.a, it's a missing zlib package. It contains libz and libz.so. In the Makefile the flags passed to the linker are " -lpci -lz"
Russ
On Tue, Nov 27, 2007 at 08:23:07PM -0800, Russell Whitaker wrote:
It's not libpci.a, it's a missing zlib package. It contains libz and libz.so. In the Makefile the flags passed to the linker are " -lpci -lz"
Does the zlib package really contain a file called libz ? Where?
Anyway, libz.so is the shared library and is no good here, you need a libz.a because flashrom is statically linked. (The -static option.)
//Peter
On Wednesday 28 November 2007 06:19, Peter Stuge wrote:
On Tue, Nov 27, 2007 at 08:23:07PM -0800, Russell Whitaker wrote:
It's not libpci.a, it's a missing zlib package. It contains libz and libz.so. In the Makefile the flags passed to the linker are " -lpci -lz"
Does the zlib package really contain a file called libz ? Where?
Anyway, libz.so is the shared library and is no good here, you need a libz.a because flashrom is statically linked. (The -static option.)
//Peter
I have both /usr/lib/libz.a and /usr/lib/libz.so, as well as /usr/include/zlib.h.
Also, the little test program extracted from the Makefile doesn't use libz, unless it's buried somewhere. But it's specifically the pci_alloc call from pciutils that it refuses to link.
Shocky
On Tuesday 27 November 2007 19:52, Peter Stuge wrote:
On Tue, Nov 27, 2007 at 05:19:01PM -0700, Shocky wrote:
Thanks, I knew there had to be a command that would do this. This just deepens the mystery further. nm tells me that within /usr/lib/libpci.a access.o defines the external symbol "00000760 T pci_alloc". So if nm can see it, why can't ld see it?
What if you link with the archive manually:
ld -o flashrom file1.o file2.o /usr/lib/libpci.a
(ie don't use -lpci)
//Peter
That gives a huge list of undefined references, trying to resolve all the symbols referenced by all the files inside libpci.
Shocky
On Sunday 25 November 2007 09:24, Shocky wrote:
Hi,
I'm new to LinuxBios, and just looking for a way to flash the bios on an HP laptop without installing Windoze. None of the tricks I've found through Google have worked for me so far, including HP's own utility for making bootable usb keys.
I'm trying to compile just the flashrom component of LinuxBios from svn, but make gives me an error telling me that I need to install pciutils-devel and zlib-devel. The problem is these packages are already installed.
I extracted the little .test.c program from the Makefile, and determined that the linker is unable to resolve the call to pci_alloc. The problem is I don't know why. The header is there in /usr/include/pci/pci.h, and /usr/lib/libpci.a is there (but I don't know how to tell what symbols the library provides; reached the limit of my expertise there).
This happens on two different machines, one running Mandriva 2008.0 (the laptop in question), and the other Mandriva 2007.0 (my desktop pc). Any ideas what's going on and how to resolve it?
Shocky
These are my opinions. Get your own.
I finally tracked down the problem, and it had nothing to do with libpci.a or libzlib1.a, except for the fact that static linking is used.
Mandriva, both 2007 and 2008, has a package called glibc-static-devel which is required to do static linking. I guess this is the first time I've tried to build a package that used static linking. The clue was the reference to not being able to find "-lc". libc.a is part of this package. Once I urpmi'ed this package, flashrom built successfully.
I wonder if someone could modify the Makefile message for this possibility, something like in the attached patch.
Anyway, thanks to all those who helped me resolve this issue.
Shocky
Shocky wrote:
I finally tracked down the problem, and it had nothing to do with libpci.a or libzlib1.a, except for the fact that static linking is used.
Mandriva, both 2007 and 2008, has a package called glibc-static-devel which is required to do static linking. I guess this is the first time I've tried to build a package that used static linking. The clue was the reference to not being able to find "-lc". libc.a is part of this package. Once I urpmi'ed this package, flashrom built successfully.
This looks like a dependency problem of your distribution. You might want to report it to them to get it fixed.
I wonder if someone could modify the Makefile message for this possibility, something like in the attached patch.
Anyway, thanks to all those who helped me resolve this issue.
Thanks for the insight.
Stefan