home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
root
/
usr
/
share
/
YaST2
/
include
/
bootloader
/
ppc
/
chrp.ycp
next >
Wrap
Text File
|
2006-11-29
|
3KB
|
140 lines
/**
* File:
* bootloader/ppc/prep.ycp
*
* Module:
* Bootloader installation and configuration
*
* Summary:
* include containing specific functions for iSeries configuration
* and installation
*
* Authors:
* Jiri Srain <jsrain@suse.cz>
*
* $Id: chrp.ycp 29688 2006-04-04 23:48:59Z odabrunz $
*
*/
{
textdomain "bootloader";
import "Kernel";
import "Mode";
import "BootCommon";
include "bootloader/ppc/misc.ycp";
include "bootloader/routines/popups.ycp";
/**
* Propose bootloader settings
* @param initial boolean true if doing initial proposal
*/
global define void CHRPPropose (boolean initial) ``{
if (BootCommon::was_proposed)
{
return;
}
if ( ! (size (prep_boot_partitions) > 0 || prep_boot_partition != ""))
{
BootCommon::activate = false;
prep_boot_partition = "";
}
else
{
BootCommon::activate = true;
}
}
/**
* Read the board-type-specific settings
* @return boolean true on success
*/
global define boolean CHRPRead () ``{
prep_boot_partition = (string) BootCommon::globals["boot"]:"";
BootCommon::activate = prep_boot_partition != "";
of_defaultdevice = ( BootCommon::globals["activate"]:"false" == "true" ? true : false );
return true;
}
/**
* Update the board-type-specific settings
* @return boolean true on success
*/
global define boolean CHRPUpdate () ``{
return true;
}
/**
* Save the board-type-specific settings
* @return boolean true on success
*/
global define boolean CHRPSave () ``{
BootCommon::globals["boot"] = prep_boot_partition;
BootCommon::globals["activate"] = ( of_defaultdevice ? "true" : "false" );
return true;
}
/**
* retuen the board-type-specific part of summary
* @return a list of summary strings
*/
global define list<string> CHRPSummary () ``{
list<string> ret = [];
if ((! Mode::config ()) && 0 == size (prep_boot_partitions))
{
ret = [
// summary part
_("There is no 41 PReP boot nor a FAT16 partition. You cannot boot from the hard disk."),
];
}
else if (BootCommon::activate == false)
{
ret = [
// summary part
_("No boot configuration. Configure booting manually.")
];
}
else
{
ret = [
sformat(
// summary part
_("yaboot will be written to %1. A correct boot path will be prepended to boot-device variable."),
prep_boot_partition
)
];
}
return ret;
// TODO of_defaultdevice ??
}
/**
* Install the board-type-specific part of bootloader
* @param requires_initrd boolean true if initrd is required
* @return boolean true on success
*/
global define boolean CHRPWrite (boolean requires_initrd) ``{
// just call lilo
return true;
}
/**
* Initialize attributes of the board type
*/
global define void CHRPInit () ``{
y2milestone ("Initializing CHRP attributes");
prep_only_active = true;
prep_only_iseries_vd = false;
prep_only_primary = true;
// On CHRP, if there is no bootable partition on the disk containing
// "/", there is CHRP-specific code in choosePrepBootPartition that
// takes the first prep partition in the system.
prep_same_disk_as_root = true;
table_items = [ "__chrp_location", "__set_default_of" ];
}
}