About uBoot | ||||||||||||||||||||||||||||||
The uBoot system is intended to provide a simple mechanism for booting microkernel OS's from one self-contained file in various environments.
| ||||||||||||||||||||||||||||||
Boot Environment | ||||||||||||||||||||||||||||||
typedef struct { char be_name[32]; /* asciiZ */ unsigned int be_offset; /* 4K pages */ unsigned int be_type; /* BE_* */ unsigned int be_size; /* 4K pages */ unsigned int be_vsize; /* 4K pages */ unsigned int be_extra0; unsigned int be_extra1; unsigned int be_extra2; unsigned int be_extra3; } boot_entry; typedef struct { boot_entry bd_entry[64]; } boot_dir; #define BE_TYPE_NONE 0 /* empty entry */ #define BE_TYPE_DIRECTORY 1 /* directory (entry 0) */ #define BE_TYPE_BOOTSTRAP 2 /* bootstrap code object */ #define BE_TYPE_CODE 3 /* executable code object */ #define BE_TYPE_DATA 4 /* raw data object */ #define BE_TYPE_ELF32 5 /* 32bit ELF object */ /* for BE_TYPE_CODE / BE_TYPE_BOOTSTRAP */ #define be_code_vaddr be_extra0 /* virtual address (rel offset 0) */ #define be_code_ventr be_extra1 /* virtual entry point (rel offset 0) */ | ||||||||||||||||||||||||||||||
BootMaker (building the image) | ||||||||||||||||||||||||||||||
The bootmaker util reads description file that looks like: # Boot Image for stock OpenBLT # [bootstrap] type=boot file=boot/boot.bin ventry=128 [kernel] type=code file=kernel/kernel.bin [namer] type=code file=srv/namer/namer.bin [console] type=code file=srv/console/console.binEach section (headed by a name in []'s) is an entry in the boot directory, starting with entry 1 (entry 0 being the directory itself). Each entry must have a valid type and a valid file to load. Some entry types will allow extra params (eg ventry in a type=boot entry). Valid types are boot -> BE_TYPE_BOOTSTRAP, code -> BE_TYPE_CODE, elf32 -> BE_TYPE_ELF32, data -> BE_TYPE_DATA. A mechanism for defining your own types and meanings for the extra[0123] fields will be available soon. The name in the []'s starting the section will be placed in be_name. The first entry should be a bootstrap entry (as the bootloader will transfer control into it whether it is or no.
bootmaker <descr_file> <bootimage_file> [ -floppy ]
The bootmaker util reads the descr_file, writes the bootimage_file, and
if the optional -floppy flag is specified, the bootimage_file will be
a disk image suitable for rawriting or copying with dd.
| ||||||||||||||||||||||||||||||
boot.com (loading the image) | ||||||||||||||||||||||||||||||
The DOS bootloader (boot.com) can be invoked in two ways:
boot.com bootfile
boot.com net=ip=x.y.z.w | ||||||||||||||||||||||||||||||
NetBoot Client | ||||||||||||||||||||||||||||||
netboot <bootfile> <ip_address> netboot will send the specified bootfile to the netboot server at the specified ip address. | ||||||||||||||||||||||||||||||