<< lib/cpu/SLGuestKernelImage.sleela SLeeLa Standard Library Definition. Definition: Defines SLGuestKernelImage — a bootable guest kernel image: a stream of canonical SLeeLa opcodes (the compiled kernel text), an entry point, and metadata (name, version). This is what the guest VM's substrate loads and executes. Unlike the earlier inline opcode stub, an image is produced by the real toolchain (SLGuestKernelBuilder compiles kernel source through SLCompilerDriver -> register ISA -> SLOpcodeMap -> opcodes), so the guest boots a GENUINELY COMPILED kernel (OS-VM roadmap step 4). SCOPE NOTE: this is a small CUSTOM kernel compiled by our own toolchain, not the upstream Linux kernel. Booting real Linux remains a separate, much larger effort (see EXECUTION.md). The point of step 4 is that the guest image is compiler output, not a hand-written opcode stub. Family: cpu. Composes SLSleelaVM (the opcode store it loads into). >> #sleela 2.5 material; class SLGuestKernelImage { < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- > << Eleven catalogued attributes with getter/setter pairs, so a GUI, loader, or catalog can read and (where appropriate) override this record. Values are faithful to the subject's real origin where publicly known. >> String metaVersion = "1.0.0"; int metaId = 10233; String metaAuthor = "Kiro Agent"; String metaDate = "2026-10-16"; String metaCopyright = "SLeeLa project"; String metaTrademark = "none"; String metaCorporation = "none"; < metaOrigin: National | | International | Galactic > String metaOrigin = "International"; String metaBirthDate = "2026-10-06"; < metaScienceRating: maturity/robustness on a 1..10 scale > int metaScienceRating = 9; < metaNationalSchedule: a real, citable instrument or "none" > String metaNationalSchedule = "none"; String getMetaVersion() { return metaVersion; } void setMetaVersion(String v) { metaVersion = v; } int getMetaId() { return metaId; } void setMetaId(int v) { metaId = v; } String getAuthor() { return metaAuthor; } void setAuthor(String v) { metaAuthor = v; } String getDate() { return metaDate; } void setDate(String v) { metaDate = v; } String getCopyright() { return metaCopyright; } void setCopyright(String v) { metaCopyright = v; } String getTrademark() { return metaTrademark; } void setTrademark(String v) { metaTrademark = v; } String getCorporation() { return metaCorporation; } void setCorporation(String v) { metaCorporation = v; } String getOrigin() { return metaOrigin; } void setOrigin(String v) { metaOrigin = v; } String getBirthDate() { return metaBirthDate; } void setBirthDate(String v) { metaBirthDate = v; } int getScienceRating() { return metaScienceRating; } void setScienceRating(int v) { metaScienceRating = v; } String getNationalSchedule() { return metaNationalSchedule; } void setNationalSchedule(String v) { metaNationalSchedule = v; } String name; String version; < opcode stream: op per word > SLRAM ops; < paired immediate per word > SLRAM args; int length; int entry; void configure(String kernelName, String kernelVersion, int capacity) { name = kernelName; version = kernelVersion; ops = new SLRAM(); ops.configure(capacity, 32); ops.allocate(); args = new SLRAM(); args.configure(capacity, 32); args.allocate(); length = 0; entry = 0; } < Append one compiled opcode to the image. > int append(int opcode, int arg) { ops.writeWord(length, opcode); args.writeWord(length, arg); int at = length; length = length + 1; return at; } int opcodeAt(int i) { return ops.readWord(i); } int argAt(int i) { return args.readWord(i); } < Load this image into a guest VM's substrate for execution. > void loadInto(SLSleelaVM vm) { int i = 0; while (i < length) { vm.loadOpcode(ops.readWord(i), args.readWord(i)); i = i + 1; } } void setEntry(int e) { entry = e; } int entryPoint() { return entry; } int size() { return length; } String kernelName() { return name; } String kernelVersion() { return version; } }