[flashrom] [PATCH] flashrom DOS support take2 (plus patch for pciutils)

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Mon Mar 15 03:09:28 CET 2010


Hi Rudolf,

thanks for your patch.

On 14.03.2010 18:36, Rudolf Marek wrote:
> I reworked the physmem mapping and also did a hack to allow RO mapping
> of first
> 1MB which is not allowed under DPMI ;) I simply copy the memory and
> return a
> pointer to a copied data. This is used for the coreboot tables and
> there is no
> need for RW.

Neat trick.


> The dmidecode could be also DOS recompiled but executing that if quite
> complicated. Therefore maybe own parser for DMI would be nice.

Agreed.


> Attached patches are for the flashrom and pciutils.
>
> To make it work try following:
> [...]

I added a short version of your description to the flashrom README.


> Have fun and please test ;)
>
> The dos.patch contains some flashrom NULL ptr fix and also
> Carl-Daniels changes
> for Makefile.

I made some more changes to the Makefile. "make dos" is something I'd
rather avoid because it hardcodes too many assumptions.

> Index: physmap.c
> ===================================================================
> --- physmap.c	(revision 935)
> +++ physmap.c	(working copy)
> @@ -4,6 +4,7 @@
>   * Copyright (C) 2009 Peter Stuge <peter at stuge.se>
>   * Copyright (C) 2009 coresystems GmbH
>   * Copyright (C) 2010 Carl-Daniel Hailfinger
> + * Copyright (C) 2010 Rudolf Marek <r.marek at assembler.cz>
>   *
>   * This program is free software; you can redistribute it and/or modify
>   * it under the terms of the GNU General Public License as published by
> @@ -27,7 +28,77 @@
>  #include <errno.h>
>  #include "flash.h"
>  
> -#ifdef __DARWIN__
> +#ifdef __DJGPP__
> [...]
> +#elif __DARWIN__
>   

Can you change this to
#elif defined(__DARWIN)
to keep the logic as it was? I don't have a Mac OS X machine, so I can't
test...


> +
>  #include <DirectIO/darwinio.h>
>  
>  #define MEM_DEV "DirectIO"
>   

If you drop the board_enable.c hunk (and if my latest Makefile+README
patch is OK for you), this is
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

I can update the README once your pciutils patch has been merged.

Regards,
Carl-Daniel
-- 
"I do consider assignment statements and pointer variables to be among
computer science's most valuable treasures."
-- Donald E. Knuth





More information about the flashrom mailing list