[dhcp] Simplify platform-specific client architecture definitions

Move the platform-specific DHCP client architecture definitions to
header files of the form <ipxe/$(PLATFORM)/dhcparch.h>.  This
simplifies the directory structure and allows the otherwise unused
arch/$(ARCH)/include/$(PLATFORM) to be removed from the include
directory search path, which avoids the confusing situation in which a
header file may potentially be accessed through more than one path.

For Linux userspace binaries on any architecture, use the EFI values
for that architecture by delegating to the EFI header file.  This
avoids the need to explicitly select values for Linux userspace
binaries for each architecture.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2023-01-22 16:54:20 +00:00
parent 2ef5f5e05e
commit 2061d658b3
18 changed files with 138 additions and 288 deletions

View File

@@ -0,0 +1,16 @@
#ifndef _IPXE_DHCPARCH_H
#define _IPXE_DHCPARCH_H
/** @file
*
* DHCP client architecture definitions
*
*/
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/* Include platform-specific client architecture definitions */
#define PLATFORM_DHCPARCH(_platform) <ipxe/_platform/dhcparch.h>
#include PLATFORM_DHCPARCH(PLATFORM)
#endif /* _IPXE_DHCPARCH_H */

View File

@@ -0,0 +1,20 @@
#ifndef _IPXE_LINUX_DHCPARCH_H
#define _IPXE_LINUX_DHCPARCH_H
/** @file
*
* DHCP client architecture definitions
*
*/
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/*
* There are no specification-defined values for DHCP architecture for
* PXE clients running as Linux userspace applications. Pretend to be
* the equivalent EFI client.
*
*/
#include <ipxe/efi/dhcparch.h>
#endif /* _IPXE_LINUX_DHCPARCH_H */