[flashrom] compiling flashrom for Debian/kFreeBSD
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Sat Feb 25 01:49:44 CET 2012
Hi Robert,
thanks for testing that patch!
Am 24.02.2012 20:14 schrieb Robert Millan:
> Long time no see :-)
Indeed.
> El 24 de febrer de 2012 0:55, Carl-Daniel Hailfinger
> <c-d.hailfinger.devel.2006 at gmx.net> ha escrit:
>> I have written a patch which should fix compilation and
>> hopefully also work during runtime.
> The patch works perfectly. However, some changes are gratuitous or inaccurate:
>
>> -#elif defined(__FreeBSD__) || defined (__DragonFly__)
>> +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__DragonFly__)
>> if ((io_fd = open("/dev/io", O_RDWR)) < 0) {
>> #else
>> if (iopl(3) != 0) {
> We have both interfaces. You can keep using iopl() if you like.
Hm. Is iopl(3) a feature present in the FreeBSd kernel or is it just
part of the compat layer presented by glibc?
>> #if defined(__FreeBSD__) || defined(__DragonFly__)
>> + /* Note that FreeBSD kernel with glibc does not have machine/cpufunc.h. */
>> #include <machine/cpufunc.h>
>> #define off64_t off_t
>> #define lseek64 lseek
> Actually, we have machine/cpufunc.h (we have everything in machine/*
> actually). The off_t / lseek defines after this look dangerous though
> (they collide with glibc definitions).
Comment has been replaced with
/* Note that FreeBSD kernel with glibc has conflicting out[bwl] definitions
* in machine/cpufunc.h and sys/io.h. Use cpufunc.h only for plain FreeBSD.
*/
>> A full build log would be nice to have so I can see any remaining build
>> issues.
> Attached (build.log).
Looks good, and works as intended.
>> If you could test if flashrom works (do NOT test flashrom on
>> laptops/notebooks/servers), that would be even better. Just run
>>
>> flashrom -VV
> Attached (run.log).
The SFDP limitation you were hitting has been fixed a few minutes ago in
r1506 in flashrom svn.
If you have any other comments about my changes, please tell me.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the flashrom
mailing list