[Skiboot] [RFC PATCH 0/7] Attempt to abstract architectures for external
Cyril Bur
cyril.bur at au1.ibm.com
Fri Jul 17 16:36:04 AEST 2015
Hi everyone,
This patch is very RFC, there have been some requests for a pflash which
can go through /dev/mtd from the host, this infrastructure makes that
possible. This infrastructure also paves the way for making other flash
reading external tools trivial or at least not have to duplicate code
(which I realised I was doing between the gard tool and pflash).
Hopefully it looks sane but feedback please. I haven't updated the gard
tool for this, I'll be sure to do that before posting a version I expect
can just be merged.
The first two patches are fairly trivial. Patch 3 actually does more moving
code around than anything else, in fact this entire series doesn't really
introduce much new code at all. Patch 4 takes from the gard tools 'looking
for mtd device' logic, which will subsequently be removed from there. Patch
5 is nice as it will allow the manipulation of pnor images with fplash on
an x86 machine, such as a developers system, probably safer than using dd.
If you're unsure, look at patch 7, whats where I likely went way dodgy.
Thanks for the feedback,
Cyril
Cyril Bur (7):
libflash: Return a pointer to internal structure.
libflash: Reintroduce typesafety in lowlevel libflash calls
external/common: Create common code for initialising libflash
components
external/common: Add POWERPC code reenable building pflash for POWER
external/common: Add x86 code reenable building pflash
external/pflash: Update distclean make target
external/common: Write an includeable rules.mk.
external/common/arch_flash.h | 41 +++
external/common/arch_flash_arm.c | 294 +++++++++++++++++++++
.../{pflash/io.h => common/arch_flash_arm_io.h} | 43 +--
external/common/arch_flash_common.c | 38 +++
external/common/arch_flash_powerpc.c | 200 ++++++++++++++
external/common/arch_flash_powerpc_io.h | 0
external/common/arch_flash_x86.c | 52 ++++
external/common/arch_flash_x86_io.h | 0
external/{pflash => common}/get_arch.sh | 0
external/common/rules.mk | 29 ++
external/pflash/Makefile | 14 +-
external/pflash/Makefile.dist | 2 +
external/pflash/arm_io.c | 139 ----------
external/pflash/ast.h | 2 +-
external/pflash/pflash.c | 159 +++--------
external/pflash/rules.mk | 18 +-
libflash/libflash.c | 20 +-
libflash/libflash.h | 12 +-
libflash/test/test-flash.c | 2 +-
platforms/astbmc/pnor.c | 2 +-
platforms/rhesus/rhesus.c | 2 +-
21 files changed, 737 insertions(+), 332 deletions(-)
create mode 100644 external/common/arch_flash.h
create mode 100644 external/common/arch_flash_arm.c
rename external/{pflash/io.h => common/arch_flash_arm_io.h} (60%)
create mode 100644 external/common/arch_flash_common.c
create mode 100644 external/common/arch_flash_powerpc.c
create mode 100644 external/common/arch_flash_powerpc_io.h
create mode 100644 external/common/arch_flash_x86.c
create mode 100644 external/common/arch_flash_x86_io.h
rename external/{pflash => common}/get_arch.sh (100%)
create mode 100644 external/common/rules.mk
delete mode 100644 external/pflash/arm_io.c
--
2.4.6
More information about the Skiboot
mailing list