status = populate_board_chids(chids);
if (EFI_STATUS_IS_ERROR(status))
+#if SD_BOOT
return log_error_status(status, "Failed to populate board CHIDs: %m");
+#else
+ return status;
+#endif
size_t n_devices = 0;
#include "efi.h"
#include "efi-string.h"
-#include "log.h"
#include "memory-util-fundamental.h"
-#include "proto/file-io.h"
#include "string-util-fundamental.h"
+#if SD_BOOT
+
+#include "log.h"
+#include "proto/file-io.h"
+
/* This is provided by the linker. */
extern uint8_t __executable_start[];
#define bswap_16(x) __builtin_bswap16(x)
#define bswap_32(x) __builtin_bswap32(x)
+
+#else
+
+#include "alloc-util.h"
+
+#define xnew0(type, n) ASSERT_PTR(new0(type, n))
+
+#endif