mirror of
https://github.com/tailix/libkernaux.git
synced 2024-10-30 11:54:01 -04:00
32 lines
944 B
C
32 lines
944 B
C
#include <kernaux/macro.h>
|
|
#include <kernaux/multiboot2.h>
|
|
|
|
#include <kernaux/macro/packing_start.run>
|
|
|
|
// Minimal example
|
|
KERNAUX_ALIGNED(KERNAUX_MULTIBOOT2_HEADER_ALIGN)
|
|
static const struct {
|
|
struct KernAux_Multiboot2_Header multiboot2_header;
|
|
struct KernAux_Multiboot2_HTag_None tag_none;
|
|
}
|
|
KERNAUX_PACKED
|
|
multiboot2_header_example0 = {
|
|
.multiboot2_header = {
|
|
.magic = KERNAUX_MULTIBOOT2_HEADER_MAGIC,
|
|
.arch = KERNAUX_MULTIBOOT2_HEADER_ARCH_I386,
|
|
.total_size = sizeof(multiboot2_header_example0),
|
|
.checksum = KERNAUX_MULTIBOOT2_HEADER_CHECKSUM(
|
|
KERNAUX_MULTIBOOT2_HEADER_ARCH_I386,
|
|
sizeof(multiboot2_header_example0)
|
|
),
|
|
},
|
|
.tag_none = {
|
|
.base = {
|
|
.type = KERNAUX_MULTIBOOT2_HTAG_NONE,
|
|
.flags = 0,
|
|
.size = sizeof(multiboot2_header_example0.tag_none),
|
|
},
|
|
},
|
|
};
|
|
|
|
#include <kernaux/macro/packing_end.run>
|