[flashrom] Porting flashrom to OpenBSD

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Jun 25 11:57:31 CEST 2010


Hi Jonathan,

you're in CC of this mail because you sent the "unbreak pciutils" mail
to this list, and the failure mode is related.
http://marc.info/?l=openbsd-ports&m=126918139214769

On 25.06.2010 01:30, Stuart Henderson wrote:
> On 2010/06/25 00:21, Stuart Henderson wrote:
>   
>> On 2010/06/22 04:02, Carl-Daniel Hailfinger wrote:
>>     
>>> I added a few fixups to the flashrom tree in the meantime to get the
>>> OpenBSD patch size down a bit. After all, if it gets easier for you to
>>> test, we all win.
>>>
>>> Stuart, if this works for you, I'll commit the patches into flashrom
>>> subversion ASAP. My stated goal is to support every OS without the need
>>> for any local patches.
>>>
>>> A good first step to check if flashrom could run on your system is to
>>> run lspci. You may have to set
>>> machdep.allowaperture=2
>>> and possibly other settings to get it working.
>>> flashrom uses raw memory access (/dev/mem), raw x86 port access (via
>>> inb/outb functions) and PCI access (via libpci).
>>>       
>> Port attached and at http://spacehopper.org/flashrom.tgz; this is
>> basically your patches with a typo fixed (missing ; in the Makefile).
>>     

Right, my bad. Thanks.


>> You can see exampkle output from an unsuccessful run on amd64
>> attempting to dump rom contents at 
>>     
>
> http://spacehopper.org/flashrom.txt
>   


Excerpt from that log:

> pcilib: obsd_write: ioctl(PCIOCWRITE) failed
>   

Ouch. I remember a pciutils patch on the ports mailing list which may be
related to this: http://marc.info/?l=openbsd-ports&m=126918139214769
flashrom uses libpci from pciutils, and it absolutely _must_ have write
access to PCI.


> Port at http://spacehopper.org/flashrom.tgz is updated (add dmidedode
> as a RUN_DEPENDS and tidy the Makefile).
>   

Thanks, looks good. One small comment about installation in sbin,
though. flashrom can also work with programmers attached to serial ports
and USB, and those might work even for non-root users if appropriate
permissions are set (well, under most Unix-like OS, but OpenBSD might be
different). Due to that, some people think installing in bin instead of
sbin makes more sense.

Stuart, does the pcilib abort happen on i386 and amd64?

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list