diff options
author | sam <sam@FreeBSD.org> | 2006-03-08 18:02:32 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-03-08 18:02:32 +0000 |
commit | fa1fbfedc2f06342ca8bbae5b057d8bd2c14cc59 (patch) | |
tree | 87198eeaccc5a4734146e5e9aa6881c4854232fe /usr.sbin/sysinstall/menus.c | |
parent | b19c8d2fcc1540312b520fc757d445026667a6ac (diff) | |
download | FreeBSD-src-fa1fbfedc2f06342ca8bbae5b057d8bd2c14cc59.zip FreeBSD-src-fa1fbfedc2f06342ca8bbae5b057d8bd2c14cc59.tar.gz |
Revamp base system packaging of kernels to enable up/smp selection
at runtime and to support distributing additional kernels:
o remove kernel from the base tarball
o add new kernel tarballs
o build + package both SMP and GENERIC kernels when an <arch>/conf/SMP
config file is present
o add sysinstall support for multiple kernels
o update sysinstall to probe for the number of cpus on a system
and auto-select smp/up kernel accordingly
o add a post-kernels install hook to fixup /boot/kernel
o add -ldevinfo to boot crunch for sysinstall's cpu probing logic
Notes:
1. On HEAD this code is not currently used because GENERIC kernels
include SMP. This work is mainly intended for RELENG_6 where the
GENERIC kernel is UP. If HEAD changes to match then just enable
WITH_SMP in sysinstall/Makefile.
2. The cpu probing support is done with acpi and MPTable; this means
some systems will require work for auto-detection to work.
3. The handling of /boot/kernel may need to be revisited; for now
we rename one kernel at the last moment (SMP if installed, otherwise
GENERIC). There are other, possibly better, approaches.
Lots of help from ru, emaste, scottl, and jhb.
Diffstat (limited to 'usr.sbin/sysinstall/menus.c')
-rw-r--r-- | usr.sbin/sysinstall/menus.c | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index 767909f..6147313 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -57,6 +57,22 @@ clearSrc(dialogMenuItem *self) } static int +setKernel(dialogMenuItem *self) +{ + Dists |= DIST_KERNEL; + KernelDists = DIST_KERNEL_ALL; + return DITEM_SUCCESS | DITEM_REDRAW; +} + +static int +clearKernel(dialogMenuItem *self) +{ + Dists &= ~DIST_KERNEL; + KernelDists = 0; + return DITEM_SUCCESS | DITEM_REDRAW; +} + +static int setX11Misc(dialogMenuItem *self) { XOrgDists |= DIST_XORG_MISC_ALL; @@ -160,7 +176,8 @@ checkDistEverything(dialogMenuItem *self) { return Dists == DIST_ALL && _IS_SET(SrcDists, DIST_SRC_ALL) && - _IS_SET(XOrgDists, DIST_XORG_ALL); + _IS_SET(XOrgDists, DIST_XORG_ALL) && + _IS_SET(KernelDists, DIST_KERNEL_ALL); } static int @@ -181,6 +198,12 @@ x11FlagCheck(dialogMenuItem *item) } static int +kernelFlagCheck(dialogMenuItem *item) +{ + return KernelDists; +} + +static int checkTrue(dialogMenuItem *item) { return TRUE; @@ -965,6 +988,8 @@ DMenu MenuSubDistributions = { NULL, distReset, NULL, NULL, ' ', ' ', ' ' }, { " base", "Binary base distribution (required)", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BASE }, + { " kernels", "Binary kernel distributions (required)", + kernelFlagCheck,distSetKernel }, { " dict", "Spelling checker dictionary files", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT }, { " doc", "Miscellaneous FreeBSD online docs", @@ -994,6 +1019,27 @@ DMenu MenuSubDistributions = { { NULL } }, }; +DMenu MenuKernelDistributions = { + DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, + "Select the operating system kernels you wish to install.", + "Please check off those kernels you wish to install.\n", + NULL, + NULL, + { { "X Exit", "Exit this menu (returning to previous)", + checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, + { "All", "Select all of the below", + NULL, setKernel, NULL, NULL, ' ', ' ', ' ' }, + { "Reset", "Reset all of the below", + NULL, clearKernel, NULL, NULL, ' ', ' ', ' ' }, + { " GENERIC", "GENERIC kernel configuration", + dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_GENERIC }, +#ifdef WITH_SMP + { " SMP", "GENERIC symmetric multiprocessor kernel configuration", + dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_SMP }, +#endif + { NULL } }, +}; + DMenu MenuSrcDistributions = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Select the sub-components of src you wish to install.", |