-
Notifications
You must be signed in to change notification settings - Fork 0
Boot CD ROM Builder
Builder for bootable CD-ROM ISO images in JNode's build system.
The Boot CD-ROM Builder is the build system component that assembles all JNode artifacts (boot image, init-jar, GRUB bootloader) into a bootable ISO-9660 formatted CD-ROM image. It is invoked by the cdrom, cdrom-lite, and cdrom_64-lite targets in the build system.
| File | Purpose |
|---|---|
all/build.xml |
Master build file, defines CD-ROM targets |
all/build-x86.xml |
Contains create-cdrom macro and cdrom/cdrom-lite targets |
builder/lib/iso9660.jar |
ISOTask library for ISO-9660 image creation |
The build system exposes three CD-ROM targets:
sh build.sh cd-x86 # Full distribution ISO
sh build.sh cd-x86-lite # Lite x86 ISO
sh build.sh cd-x86_64-lite # Lite x86_64 ISOThe create-cdrom macro in all/build-x86.xml:286 assembles the CD-ROM contents:
Directory contents:
├── boot/grub/ GRUB boot files (eltorito.s2, fat.s15, grub.s1, grub.s2)
├── boot/grub/menu.lst Boot menu configuration
├── licenses/ License files
├── jnode*.gz Boot image (compressed kernel)
└── initjars/ Plugin JARs and descriptors
The macro supports two ISO creation backends:
-
mkisofs (Unix/Linux): Uses the system
mkisofsutility with El Torito boot catalogmkisofs -o <destfile> -R -b boot/grub/eltorito.s2 \ -no-emul-boot -boot-load-size 4 -boot-info-table <dir> -
ISOTask (cross-platform): Uses
de.tu_darmstadt.informatik.rbg.hatlak.iso9660.ISOTaskfromiso9660.jar-
enableRockRidge: Enables Rock Ridge extensions for Unix-style filenames -
mkisofsCompatibility: Ensures compatibility with mkisofs-generated images -
bootImage: Specifies the El Torito boot image -
bootImageSectorCount: Boot image size in sectors (4 for GRUB) -
genBootInfoTable: Generates boot info table for BIOS
-
The CD-ROM follows this layout:
| Component | Location | Purpose |
|---|---|---|
| Boot image | Root |
jnode*.gz - compressed boot image |
| Init JAR | Root |
initjars/ - all plugin JARs |
| GRUB | boot/grub/ |
Bootloader stages |
| Menu | boot/grub/menu.lst |
Boot configuration |
| Licenses | licenses/ |
GPL/LGPL license files |
The menu.lst file is copied from all/conf/menu-cdrom.lst and provides boot menu options. GRUB is configured to:
- Boot from El Torito emulation (no-emulation boot)
- Load the boot image from CD-ROM
- Pass multiboot parameters to the kernel
The ISOTask library (de.tu_darmstadt.informatik.rbg.hatlak.iso9660.ISOTask) is a Java-based ISO-9660 image creator that:
- Implements ISO-9660 Level 1 and Level 2 formats
- Supports Rock Ridge extensions for long filenames
- Generates El Torito bootable CDs
- Provides mkisofs-compatible output
-
Platform dependency: The
mkisofspath is Unix/Linux only; Windows builds must use ISOTask - mkisofs spaces issue: Build fails on Windows if the path contains spaces
- Boot image size: The boot image sector count (4 sectors = 2KB) must match GRUB expectations
-
ISOTask classpath: The
iso9660.jarmust be in the build classpath for ISOTask to work - Rock Ridge: Enabled by default but can affect compatibility with non-Unix systems
-
Output path: CD-ROM images are written to
all/build/cdroms/jnode-*.iso
- Build-System — Build system overview
- Boot-Sequence — What happens after the ISO boots
- Boot---BootImageBuilder-Internals — Boot image construction
- ISO9660 — ISO-9660 filesystem standard