Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 8062
Collapse All | Expand All

(-)lilo-22.3.1/Makefile (-1 / +3 lines)
Lines 28-33 Link Here
28
# * LVM		  Enables support for booting from LVM partitions.  This will
28
# * LVM		  Enables support for booting from LVM partitions.  This will
29
#		  OOPS if you try to use this and are using a kernel < 2.4.7
29
#		  OOPS if you try to use this and are using a kernel < 2.4.7
30
#		  that has not been patched to at least LVM 0.9.1beta6. (new)
30
#		  that has not been patched to at least LVM 0.9.1beta6. (new)
31
# * EVMS	  Enables support for booting from EVMS volumes. Requires a
32
#		  2.4 or 2.5 kernel patched to EVMS version 1.1.0 or later.
31
# * M386	  Use 386 instructions in assembly code to reduce size of
33
# * M386	  Use 386 instructions in assembly code to reduce size of
32
#		  second-stage loader (recommended)
34
#		  second-stage loader (recommended)
33
#   NO1STDIAG	  Don't show diagnostic on read errors in the first stage
35
#   NO1STDIAG	  Don't show diagnostic on read errors in the first stage
Lines 54-60 Link Here
54
# * VERSION	  Prints version string at LILO boot prompt.
56
# * VERSION	  Prints version string at LILO boot prompt.
55
#   XL_SECS=n	  Support for extra large (non-standard) floppies.
57
#   XL_SECS=n	  Support for extra large (non-standard) floppies.
56
58
57
CONFIG=-DBDATA -DBUILTIN -DDSECS=3 -DIGNORECASE -DLBA32 -DLVM -DM386 \
59
CONFIG=-DBDATA -DBUILTIN -DDSECS=3 -DIGNORECASE -DLBA32 -DLVM -DEVMS -DM386 \
58
  -DONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVARSETUP \
60
  -DONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVARSETUP \
59
  -DVERSION -DUNIFY
61
  -DVERSION -DUNIFY
60
62
(-)lilo-22.3.1/geometry.c (+100 lines)
Lines 63-68 Link Here
63
#endif
63
#endif
64
#endif
64
#endif
65
65
66
#ifdef LCF_EVMS
67
struct evms_get_bmap_t {
68
    __u64 rsector;
69
    __u32 dev;
70
    int status;
71
};
72
73
struct evms_version_t {
74
    __u32 major;
75
    __u32 minor;
76
    __u32 patch;
77
};
78
79
#ifndef EVMS_GET_BMAP
80
#define EVMS_GET_BMAP		_IOWR(MAJOR_EVMS, 0xC7, struct evms_get_bmap_t)
81
#endif
82
#ifndef EVMS_GET_IOCTL_VERSION
83
#define EVMS_GET_IOCTL_VERSION	_IOR(MAJOR_EVMS, 0x0, struct evms_version_t)
84
#endif
85
#endif
86
66
#ifndef HDIO_GETGEO
87
#ifndef HDIO_GETGEO
67
#define HDIO_GETGEO HDIO_REQ
88
#define HDIO_GETGEO HDIO_REQ
68
#endif
89
#endif
Lines 345-350 Link Here
345
#endif
366
#endif
346
367
347
368
369
#ifdef LCF_EVMS
370
void evms_bmap(struct evms_get_bmap_t *ebm)
371
{                                  
372
    DEVICE dev;
373
    static int evms_fd = -1;
374
    static dev_t evms_last_dev = 0;
375
376
    if (ebm->dev != evms_last_dev) {
377
        char evms_blk[] = "/dev/evms/block_device";
378
        struct evms_version_t evms_ver;
379
380
        // Open the EVMS device
381
        if (evms_fd != -1)
382
            close(evms_fd);
383
384
        evms_fd = open(evms_blk, O_RDONLY);
385
        if (evms_fd < 0)
386
            die("Can't open EVMS block device %s.\n", evms_blk);
387
388
        // Get EVMS ioctl version number.
389
        if (ioctl(evms_fd, EVMS_GET_IOCTL_VERSION, &evms_ver) < 0)
390
            die("EVMS_GET_IOCTL_VERSION failed on %s.\n", evms_blk);
391
392
        // Check that the ioctl version is >= 7.1.0
393
        if (evms_ver.major < 7 ||
394
            (evms_ver.major == 7 && evms_ver.minor < 1))
395
            die("EVMS ioctl version %d.%d.%d does not support booting.\n",
396
                evms_ver.major, evms_ver.minor, evms_ver.patch);
397
        close(evms_fd);
398
399
        evms_fd = dev_open(&dev, ebm->dev, O_RDONLY);
400
        if (evms_fd < 0)
401
            die("Can't open EVMS block device %#x\n", ebm->dev);
402
        evms_last_dev = ebm->dev;
403
    }
404
405
    if (ioctl(evms_fd, EVMS_GET_BMAP, ebm) < 0) {
406
        perror(__FUNCTION__);
407
        pdie("EVMS_GET_BMAP error or ioctl unsupported. Can't have image on EVMS volume.\n");
408
    }
409
}
410
#endif
411
412
348
static void geo_query_dev(GEOMETRY *geo,int device,int all)
413
static void geo_query_dev(GEOMETRY *geo,int device,int all)
349
{
414
{
350
    DEVICE dev;
415
    DEVICE dev;
Lines 622-627 Link Here
622
	device = geo->base_dev = lbmA.lv_dev;
687
	device = geo->base_dev = lbmA.lv_dev;
623
    }
688
    }
624
#endif
689
#endif
690
691
#ifdef LCF_EVMS
692
    if (MAJOR(device) == MAJOR_EVMS) {
693
        struct evms_get_bmap_t ebm;
694
        
695
        ebm.rsector = 0;
696
        ebm.dev = device;
697
        ebm.status = 0;
698
        
699
        evms_bmap(&ebm);
700
        
701
        device = geo->base_dev = ebm.dev;
702
    }
703
#endif
704
625
    /* Find underlying device for MD RAID */
705
    /* Find underlying device for MD RAID */
626
    if (MAJOR(device) == MD_MAJOR) {
706
    if (MAJOR(device) == MD_MAJOR) {
627
        char mdxxx[16];
707
        char mdxxx[16];
Lines 824-831 Link Here
824
	block = lbm.lv_block;
904
	block = lbm.lv_block;
825
    }
905
    }
826
#endif
906
#endif
907
908
#ifdef LCF_EVMS
909
    if (MAJOR(geo->dev) == MAJOR_EVMS) {
910
        struct evms_get_bmap_t ebm;
911
                          
912
        ebm.rsector = block * geo->spb;
913
        ebm.dev = geo->dev;
914
        ebm.status = 0;
915
                            
916
        evms_bmap(&ebm);
917
        if (ebm.dev != geo->base_dev)
918
            die("EVMS boot volume cannot be on multiple disks.\n");
919
        sector = ebm.rsector + ((offset/SECTOR_SIZE) % geo->spb) + geo->start;
920
    }
921
    else {
922
        sector = block*geo->spb+((offset/SECTOR_SIZE) % geo->spb);
923
        sector += geo->start;
924
    }
925
#else
827
    sector = block*geo->spb+((offset/SECTOR_SIZE) % geo->spb);
926
    sector = block*geo->spb+((offset/SECTOR_SIZE) % geo->spb);
828
    sector += geo->start;
927
    sector += geo->start;
928
#endif
829
 /*   Always use CHS addressing on floppies:     JRC   */
929
 /*   Always use CHS addressing on floppies:     JRC   */
830
    if ((geo->device & 0x80) && (linear || lba32)) {
930
    if ((geo->device & 0x80) && (linear || lba32)) {
831
        addr->device = geo->device | (linear ? LINEAR_FLAG : (LBA32_FLAG|LBA32_NOCOUNT))
931
        addr->device = geo->device | (linear ? LINEAR_FLAG : (LBA32_FLAG|LBA32_NOCOUNT))
(-)lilo-22.3.1/lilo.h (+1 lines)
Lines 74-79 Link Here
74
#define MAJOR_CISS	104 /* First CCISS Major 104-111 */
74
#define MAJOR_CISS	104 /* First CCISS Major 104-111 */
75
#define MAJOR_IBM_iSER	112 /* IBM iSeries virtual disk */
75
#define MAJOR_IBM_iSER	112 /* IBM iSeries virtual disk */
76
#define MAJOR_HPT370	114 /* HPT370 controller */
76
#define MAJOR_HPT370	114 /* HPT370 controller */
77
#define MAJOR_EVMS	117 /* Enterprise Volume Management System */
77
78
78
#define MAX_RAID	30	/* max number of RAID disks in a set */
79
#define MAX_RAID	30	/* max number of RAID disks in a set */
79
#define MAX_TOKEN	255 /* max device Token length */
80
#define MAX_TOKEN	255 /* max device Token length */

Return to bug 8062