Modularize kernel
- From: "Howard Su" <howard0su@xxxxxxxxx>
- Date: Thu, 7 Sep 2006 13:47:46 +0800
Modularize kernel
In today's FreeBSD, KERNEL image is still the big image that contains
a lot core components.
Although we support module, however most of users are still using
customize big kernel image.
advantage:
1. Don't ask user to rebuild the kernel when they want new
feature/module/driver. This make it easy to do binary update to
improve the supportability and security.
2. Every piece in kernel is regarded as a module except rtld.
3. the kernel options can be centralized
4. enable other enhances in kernel like auto load device driver,
on-daemon kernel dependency, binary update for kernel, quick boot
5. We don't need files/files.{ARCH} anymore. the Makefile under the
module will be used for this purpose
6. Load different kernel based on different settings. For example, we
can provide two kernels (UP and SMP) like Windows do.
7. No more GENERIC. Not all user need rebuild kernel anymore. More
productivity due to the fact all the files are pre-compiled in most
user
machines.
8. Easily maintain the code. Naturally, the code is separated into the modules.
disadvantage:
1. Bring complex into the boot procedure.
2. Kernel become a kernel module. We need some way to verify all
symbols can be resolved in the compile stage.
3. config(8) need some sorts of changes.
implementation details:
1. kernel image still exists. It only contains rtld and it's dependency.
2. a new 'unix' image contains the basic stuffs in today's freebsd.
like MM, scheduler, etc.
3. other preload modules can be set in loader.conf
acpi, atadisk/scsidisk/nfsclient (the core driver that are
depended by boot process.)
4. mapping table from deviceid->devicedriver? (that can offer us new
feature to auto load drivers.)
5. loader.conf can be automatically regen after system suecessful
reboot. The utility can check the root device driver to decide what is
required during boot.
New Kenrel Build Process
Kernel Config File
|
| config(1)
|
Kernel Global Opt file (opt_all.h)
Make file contains the module defines only
|
| below is exact same as current implementations
|
run make
|
|
make install
New Kernel Boot Process
Boot0
|
Boot1
|
Boot2
|
rtld startup and try to load kernel and its dependencies
|
kernel start. Initialize other part by SYSINIT order
I am writing this email to get some advice on the direction and implementation.
--
-Howard
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: Modularize kernel
- From: M. Warner Losh
- Re: Modularize kernel
- From: gnn
- Re: Modularize kernel
- Prev by Date: Re: USB changes
- Next by Date: Re: Modularize kernel
- Previous by thread: USB changes
- Next by thread: Re: Modularize kernel
- Index(es):
Relevant Pages
- Re: kernel update, initrd image help
... found out about hitting shift key during boot. ... >Thats going to install
that specific kernel image alongside the existing ... (Debian-User) - Re: Trying to setup Linux on AT91RM9200EK
... > this U BOOT to try loading the kernel from ram and from flash. ...
You MUST build your kernel image in the form so-called "uImage". ... (comp.os.linux.embedded) - Which is the right Kernel Image for Dual-Core AMD Opteron(tm) Processor 2210
... Presently I have the Following Kernel Image Installed on a ... How ever I find
there is a Kernel image specifically named SMP. ... Dual-Core AMD OpteronProcessor
2210 ... mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext ... (Debian-User) - Re: updating kernel to 2.6.13-rc1 from 2.6.12 + CONFIG_DEVFS_FS + empty /dev
... Why not put it in ROM with your kernel image, ... > have udev
instead of devfs... ... (Linux-Kernel) - How does linux boot
... The BIOS loads the boot-loader. ... If the kernel image has modules,
... My machine has a scsi disk in it. ... (Debian-User)