aboutsummaryrefslogtreecommitdiffstats
path: root/platform
Commit message (Collapse)AuthorAgeFilesLines
* meson: Refactor the programmer selectionThomas Heijligen2022-09-121-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements a positive selection choice of which programmers should be built. - Each programmer is represented through an entry in the programmer dictionary - The entry contains: - A list of systems and CPU families where the programmer can run on - A list of required dependencies - A list of sources needed to build the programmer - A list of compiler flags - A flag to determin if the programmer should be build on 'auto' - If an entry is not given it is set to the default value - If a programmer gets selected, an 'active' flag is added to the entry on runtime - All programmers with an 'active' flag will be included in the build - One or more programmers can be selected through '-Dprogrammer=<>' - 'auto' enables all programmers which are available, deps are found and have the 'default' flag - 'all' enables all programmers which are available and deps are found - 'group_***' enables all programmers which are available, deps are found and the programmer belongs to the selected group - '_programmer_name_' forces the programmer to be built or the build will fail. Change-Id: Ib44b26e3748fc71f116184082b4aed0bb208b4c1 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/63724 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* meson: use `platform/` as subdir()Thomas Heijligen2022-05-121-0/+11
| | | | | | | | | | | | | | | | Move build instructions for files inside the `platform/` directory to `platform/meson.build`. This contains instructions to build `memaccess.c`, the right endian implementation and selecting the right legacy command line option for the endian. The `platform/` directory should contain code that abstracts the underlying platform but is not involved in flashrom logic. Change-Id: I88044a3f903f316138483dd872a6d95f8686ae69 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/63826 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* platform/swap: move swap inline functions & macros into an own headerThomas Heijligen2022-05-082-0/+2
| | | | | | | | | | | | | These inline functions and macros are only used in platform/endian_(big|little).c and do not need to be compiled into every object which includes `platform.h`. Change-Id: Ib2326e6a4eb5e000a0eace857d040372e2e9e561 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/63825 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* Introduce an `include` directory for header filesThomas Heijligen2022-04-294-28/+3
| | | | | | | | | | | | Move all header files to the new `include` directory. Adapt include directives and build systems to the new directory. Change-Id: Iaddd6bbfa0624b166d422f665877f096983bf4cf Signed-off-by: Felix Singer <felix.singer@secunet.com> Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/58622 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* hwaccess: add endianness converting deserialization functionsThomas Heijligen2022-04-131-0/+42
| | | | | | | | | | | | | | | Add functions like `uint32_t read_le32(const void *base, size_t offset);` Read a 32 bit unsigned from a base with an offset. Having prototypes and a macro generated implementation makes it easier to read, understand and spot errors in one of them. Change-Id: Idde177acf8bc5f94cd046b6539dc31532c98e452 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/31016 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
* Endian conversion: move to platform.h and platform/endian*.cThomas Heijligen2022-04-122-0/+84
| | | | | | | | | | | Starting to move the platform dependent code to platform/ and provide the abstraction through the platform.h header. Change-Id: I35640282d451960f2a329ae24339ec05dbae6d30 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/62899 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* platform/pci.h: adapt NetBSD include path to pkg-configThomas Heijligen2022-02-151-1/+1
| | | | | | | | | | | | The pkg-config include path resolves the pciutils directory. So the include is only the pci.h file. Change-Id: I69dc8184d1d012fb695770cbf6f7c64e5a024453 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/61525 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* pci.h: move include into own wrapperThomas Heijligen2021-12-221-0/+25
Split the include of hwaccess and libpci. There is no need to have pci.h included in hwaccess. Change-Id: Ibf00356f0ef5cc92e0ec99f8fe5cdda56f47b166 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/58883 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>