[boot] Build, load, and pass initrd from boot to init
The initrd image is now created by the build system, loaded by the bootloader, and passed to srv.init, which loads it (but doesn't do anything with it yet, so this is actually a functional regression). This simplifies a lot of the modules code between boot and init as well: Gone are the many subclasses of module and all the data being inline with the module structs, except for any loaded files. Now the only modules loaded and passed will be the initrd, and any devices only the bootloader has knowledge of, like the UEFI framebuffer.
This commit is contained in:
@@ -16,7 +16,6 @@ using desc_flags = bootproto::desc_flags;
|
||||
struct descriptor {
|
||||
desc_flags flags;
|
||||
wchar_t const *path;
|
||||
wchar_t const *desc;
|
||||
};
|
||||
|
||||
/// A bootconfig is a manifest of potential files.
|
||||
@@ -31,15 +30,17 @@ public:
|
||||
inline uint16_t flags() const { return m_flags; }
|
||||
inline const descriptor & kernel() const { return m_kernel; }
|
||||
inline const descriptor & init() const { return m_init; }
|
||||
descriptors programs() { return m_programs; }
|
||||
descriptors data() { return m_data; }
|
||||
inline const wchar_t * initrd() const { return m_initrd; }
|
||||
inline uint16_t initrd_format() const { return m_initrd_format; }
|
||||
inline const descriptors & panics() { return m_panics; }
|
||||
|
||||
private:
|
||||
uint16_t m_flags;
|
||||
uint16_t m_initrd_format;
|
||||
descriptor m_kernel;
|
||||
descriptor m_init;
|
||||
descriptors m_programs;
|
||||
descriptors m_data;
|
||||
descriptors m_panics;
|
||||
wchar_t const *m_initrd;
|
||||
};
|
||||
|
||||
} // namespace boot
|
||||
|
||||
Reference in New Issue
Block a user