diff options
author | 2003-12-09 08:13:57 +0000 | |
---|---|---|
committer | 2003-12-09 08:13:57 +0000 | |
commit | 3a09a380ef4470365e58aaf172a8dc633083f35c (patch) | |
tree | a20110c13e04001056e70b856e8b6543d8c57ca8 /sys-boot/lilo | |
parent | added sys-boot category for bootloaders (diff) | |
download | gentoo-2-3a09a380ef4470365e58aaf172a8dc633083f35c.tar.gz gentoo-2-3a09a380ef4470365e58aaf172a8dc633083f35c.tar.bz2 gentoo-2-3a09a380ef4470365e58aaf172a8dc633083f35c.zip |
moved from sys-apps to sys-boot
Diffstat (limited to 'sys-boot/lilo')
24 files changed, 2842 insertions, 0 deletions
diff --git a/sys-boot/lilo/ChangeLog b/sys-boot/lilo/ChangeLog new file mode 100644 index 000000000000..55179648fbc6 --- /dev/null +++ b/sys-boot/lilo/ChangeLog @@ -0,0 +1,177 @@ +# ChangeLog for sys-apps/lilo +# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/ChangeLog,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +*lilo-22.5.8 (08 Dec 2003) + + 08 Dec 2003; Seemant Kulleen <seemant@gentoo.org> lilo-22.1-r3.ebuild, + lilo-22.3.3-r1.ebuild, lilo-22.3.4.ebuild, lilo-22.5.1.ebuild, + lilo-22.5.6-r2.ebuild, lilo-22.5.6-r3.ebuild, lilo-22.5.7.2.ebuild, + lilo-22.5.8-r1.ebuild, lilo-22.5.8.ebuild, metadata.xml, + files/lilo-22.5.6-animated-menu.patch, files/lilo-22.5.6-glibc233.patch, + files/lilo.conf: + moved from sys-apps to sys-boot + + 12 Nov 2003; Alexander Gabert <pappy@gentoo.org> lilo-22.5.8-r1.ebuild: + added hardened-gcc -yet_exec flags for gcc building lilo which has assembler + parts in it + +*lilo-22.5.8-r1 (06 Nov 2003) + + 06 Nov 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.8-r1.ebuild: + Get the build to actually use gcc as $CC; remove the hardened crap. + +*lilo-22.5.8 (13 Oct 2003) + + 13 Oct 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.8.ebuild: + Update version. + + 07 Sep 2003; Alexander Gabert <pappy@gentoo.org> lilo-22.5.1.ebuild, + lilo-22.5.7.2.ebuild: + added hardened-gcc excludes + +*lilo-22.5.7.2 (01 Sep 2003) + + 01 Sep 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.7.2.ebuild: + Update, closes bug #27141. + +*lilo-22.5.1 (05 Aug 2003) + + 05 Aug 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.1.ebuild: + Add back lilo-22.5.1 ebuild that I removed by mistake. + + 03 Aug 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.6-r3.ebuild, + files/lilo-22.5.6-animated-menu.patch, files/lilo-22.5.6-glibc233.patch: + Add fixes for latest libc. Mask again until the 'timeout=' option can be fixed + (for my friend chip). + +*lilo-22.5.6-r3 (03 Aug 2003) + + 03 Aug 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.6-r3.ebuild, + files/lilo-22.5.6-animated-menu.patch: + Add updated animated graphical bootmenu support (bug #19397), thanks to + Quequero <quequero@bitchx.it>. + +*lilo-22.5.6-r2 (17 Jul 2003) + + 17 Jul 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.6-r2.ebuild, + files/lilo.conf: + More cleanups. Remove the loaders (*.b files), as they are no longer needed. + Add the 'disk=' examples to lilo.conf (bug #24035), thanks to Kidion + <david_en_clarina@zonnet.nl>. + + 16 Jul 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.6-r1.ebuild: + Cleanup the build again. Fix my BOOTS kludge, and remove the patch. + +*lilo-22.5.6-r1 (14 Jul 2003) + + 14 Jul 2003; Patrick Kursawe <phosphan@gentoo.org> lilo-22.5.6-r1.ebuild, + lilo-22.5.6.ebuild, files/dot-b-files.patch: + Didn't install all .b files - bug 24368 + + 11 Jul 2003; Patrick Kursawe <phosphan@gentoo.org> lilo-22.5.6.ebuild: + Added entry with "obsolete" to SRC_URI which should work in the future. + +*lilo-22.5.6 (10 Jul 2003) + + 10 Jul 2003; Patrick Kursawe <phosphan@gentoo.org> lilo-22.5.6.ebuild: + Version bump. Using new download URI which quite likely will have to be + changed to .../obsolete/ soon :-( + + 10 Jul 2003; Patrick Kursawe <phosphan@gentoo.org> lilo-22.3.4.ebuild, + lilo-22.5.1.ebuild, lilo-22.5.5.ebuild: + Updated SRC_URI, tarballs were moved to /obsolete. Ebuilds for new versions + should perhaps try ftp://metalab.unc.edu/pub/Linux/system/boot/lilo, at least + this location is encouraged in announcement as the "main distribution site". + +*lilo-22.5.5 (24 Jun 2003) + + 24 Jun 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.5.ebuild: + New version. + + 03 Apr 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.1.ebuild : + Set OPTS down to -O1 to fix a problem where lilo sometimes locked at + boot. + +*lilo-22.5.1 (30 Mar 2003) + + 30 Mar 2003; Martin Schlemmer <azarah@gentoo.org> lilo-22.5.1.ebuild : + New version. Added support to detect if lilo is used as boot loader, + and then run /sbin/lilo. + + 24 Jan 2002; <woodchip@gentoo.org> *.ebuild : Reorder mount-boot.eclass + function, clean some fluff. + +*lilo-22.3.4 (04 Jan 2002) + + 24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> lilo-22.3.4.ebuild : + This is definitely not for mips. + + 06 Jan 2002; Seemant Kulleen <seemant@gentoo.org> *.ebuild : + PROVIDE virtual/bootloader + + 04 Jan 2002; Donny Davies <woodchip@gentoo.org> : + New testing release. + + 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords + +*lilo-22.3.3-r1 (22 Sep 2002) + + 24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> lilo-22.3.3-r1.ebuild : + This is definitely not for mips. + + 29 Sep 2002; Donny Davies <woodchip@gentoo.org> : + Several fixes + cosmetic issues. #7898, #8057, #7903. + + 22 Sep 2002; Donny Davies <woodchip@gentoo.org> : + Now uses mount-boot.eclass. Created new patch a la Suse. + +*lilo-22.3.3 (3 Sep 2002) + + 3 Sep 2002; Martin Schlemmer <azarah@gentoo.org> : + Updated version. + +*lilo-21.7.5-r2 (8 Apr 2002) + + 20 Jul 2002; Mark Guertin <gerk@gentoo.org> : + Adjusted keywords + + 14 Jul 2002; phoen][x <phoenix@gentoo.org> lilo-21.7.5-r2.ebuild : + Added LICENSE, KEYWORDS, SLOT. + + 8 Apr 2002; Donny Davies <woodchip@gentoo.org> lilo-21.7.5-r2.ebuild, + lilo-21.7.5-r1.ebuild, lilo-22.1-r2.ebuild : + Sync pkg_setup() with lilo-22.1-r3 and added the sample lilo.conf. + +*lilo-22.1-r3 (5 Apr 2002) + + 24 Feb 2003; Nicholas Wourms <dragon@gentoo.org> lilo-22.1-r3.ebuild : + This is definitely not for mips. + + 14 Jul 2002; phoen][x <phoenix@gentoo.org> lilo-22.1-r3.ebuild : + Added LICENSE, KEYWORDS, SLOT. + Removed the stale ebuilds. + + 5 Apr 2002; M.Schlemmer <azarah@gentoo.org> lilo-22.1-r3.ebuild : + Fix the /boot issue finally (hopefully :P). Add $ROOT checking afterwards. + +*lilo-22.1-r2 (4 Feb 2002) + + 4 Feb 2002; G.Bevin <gbevin@gentoo.org> lilo-22.1-r2.ebuild : + Added new setup function which detects if /boot is mounted or not, in case + it's not mounted it will try to do it automatically and in case of a failure + exit with an error message. + +*lilo-21.7.5-r1 (2 Feb 2002) + + 2 Feb 2002; Donny Davies <woodchip@gentoo.org> lilo-22.1-r1.ebuild: + Added several patches from SuSE for animated boot logos. + +*lilo-22.1-r1 (1 Feb 2002) + + 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog : + Added initial ChangeLog which should be updated whenever the package is + updated in any way. This changelog is targetted to users. This means that the + comments should well explained and written in clean English. The details about + writing correct changelogs are explained in the skel.ChangeLog file which you + can find in the root directory of the portage repository. diff --git a/sys-boot/lilo/Manifest b/sys-boot/lilo/Manifest new file mode 100644 index 000000000000..deef62899062 --- /dev/null +++ b/sys-boot/lilo/Manifest @@ -0,0 +1,23 @@ +MD5 0f816d3f9616aa35bcaf3a164dc7596a lilo-22.5.7.2.ebuild 3981 +MD5 ce11862ff79a5e8c516ac9e4ec6cb0ef lilo-22.5.6-r3.ebuild 3722 +MD5 f3f0ffa32cd680466f67e41d37561b36 lilo-22.3.3-r1.ebuild 1998 +MD5 f6a3e348f4f07112145ffb1ef2c977a5 lilo-22.5.8-r1.ebuild 4192 +MD5 17d51bd1048874cfc6b693cf69d65113 lilo-22.5.1.ebuild 4573 +MD5 62c3935ec2e171f4b0e24dc45702c487 lilo-22.5.6-r2.ebuild 3436 +MD5 41063ae0aa3a80bb1a1ca2fd07b9487f lilo-22.5.8.ebuild 4041 +MD5 f8a0ee70d79cdbe758b30d623eb4ee8b lilo-22.3.4.ebuild 2004 +MD5 369a0c5df1179046152a0b7108498329 ChangeLog 6525 +MD5 e6543624c262cae90cc830cde90ad3ae metadata.xml 165 +MD5 ae8d44679d6ad635167141df89108f4a lilo-22.1-r3.ebuild 1581 +MD5 ca44cc6ec0aecfe30c49c455f74aacec files/lilo-22.5.6-glibc233.patch 640 +MD5 00de3473e03e180faad32ed00335cc7b files/digest-lilo-22.1-r3 61 +MD5 93ff7a7535e7c8ff1327db52a3118bef files/digest-lilo-22.3.4 133 +MD5 8e75fea24b47485fd4185b9962745117 files/digest-lilo-22.5.1 63 +MD5 15b1ea46b95a7517e5207c63b2252fe6 files/digest-lilo-22.5.8 63 +MD5 0a868ea4abd215e2181c6c756173b618 files/digest-lilo-22.3.3-r1 133 +MD5 23a4be524696dfdaefa80c1bdac39fc7 files/digest-lilo-22.5.6-r2 63 +MD5 23a4be524696dfdaefa80c1bdac39fc7 files/digest-lilo-22.5.6-r3 63 +MD5 15b1ea46b95a7517e5207c63b2252fe6 files/digest-lilo-22.5.8-r1 63 +MD5 89d3f49772308bc3fb195f51c9ff1035 files/digest-lilo-22.5.7.2 65 +MD5 90ff63638cb8b46b9e6f3c5231bd464e files/lilo.conf 1719 +MD5 a7ac9497dc60c65e1622c310c3512800 files/lilo-22.5.6-animated-menu.patch 29938 diff --git a/sys-boot/lilo/files/digest-lilo-22.1-r3 b/sys-boot/lilo/files/digest-lilo-22.1-r3 new file mode 100644 index 000000000000..cec554c6e99d --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.1-r3 @@ -0,0 +1 @@ +MD5 ba6830b939e6eeaadf450c68c96a42fb lilo-22.1.tar.gz 319754 diff --git a/sys-boot/lilo/files/digest-lilo-22.3.3-r1 b/sys-boot/lilo/files/digest-lilo-22.3.3-r1 new file mode 100644 index 000000000000..70d741659230 --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.3.3-r1 @@ -0,0 +1,2 @@ +MD5 12b729c6cc1aeebff5e94380a2eb64d3 lilo-22.3.3.tar.gz 369359 +MD5 7a89b03728e27f79806c567b49fdb6ef lilo-22.3.3-gentoo.diff.bz2 7851 diff --git a/sys-boot/lilo/files/digest-lilo-22.3.4 b/sys-boot/lilo/files/digest-lilo-22.3.4 new file mode 100644 index 000000000000..371519121933 --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.3.4 @@ -0,0 +1,2 @@ +MD5 2750f34a84faf2631e57a6076b428298 lilo-22.3.4.tar.gz 369921 +MD5 18fbbc8f5cd0c96355fb4f075d4d8498 lilo-22.3.4-gentoo.diff.bz2 7917 diff --git a/sys-boot/lilo/files/digest-lilo-22.5.1 b/sys-boot/lilo/files/digest-lilo-22.5.1 new file mode 100644 index 000000000000..6bca071889e6 --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.5.1 @@ -0,0 +1 @@ +MD5 246415f158a3f6d5a00f8882c217b600 lilo-22.5.1.tar.gz 382497 diff --git a/sys-boot/lilo/files/digest-lilo-22.5.6-r2 b/sys-boot/lilo/files/digest-lilo-22.5.6-r2 new file mode 100644 index 000000000000..5cd39211f2f0 --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.5.6-r2 @@ -0,0 +1 @@ +MD5 fd85e0cd157e77c1f565dbe649cbaaab lilo-22.5.6.tar.gz 406705 diff --git a/sys-boot/lilo/files/digest-lilo-22.5.6-r3 b/sys-boot/lilo/files/digest-lilo-22.5.6-r3 new file mode 100644 index 000000000000..5cd39211f2f0 --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.5.6-r3 @@ -0,0 +1 @@ +MD5 fd85e0cd157e77c1f565dbe649cbaaab lilo-22.5.6.tar.gz 406705 diff --git a/sys-boot/lilo/files/digest-lilo-22.5.7.2 b/sys-boot/lilo/files/digest-lilo-22.5.7.2 new file mode 100644 index 000000000000..08d2fc4c8d86 --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.5.7.2 @@ -0,0 +1 @@ +MD5 01117bffb9f452796d44ab9c7620901a lilo-22.5.7.2.tar.gz 410234 diff --git a/sys-boot/lilo/files/digest-lilo-22.5.8 b/sys-boot/lilo/files/digest-lilo-22.5.8 new file mode 100644 index 000000000000..c77f9da7dc05 --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.5.8 @@ -0,0 +1 @@ +MD5 3f7a440d198af6715aa3e5b7310e08ef lilo-22.5.8.tar.gz 412078 diff --git a/sys-boot/lilo/files/digest-lilo-22.5.8-r1 b/sys-boot/lilo/files/digest-lilo-22.5.8-r1 new file mode 100644 index 000000000000..c77f9da7dc05 --- /dev/null +++ b/sys-boot/lilo/files/digest-lilo-22.5.8-r1 @@ -0,0 +1 @@ +MD5 3f7a440d198af6715aa3e5b7310e08ef lilo-22.5.8.tar.gz 412078 diff --git a/sys-boot/lilo/files/lilo-22.5.6-animated-menu.patch b/sys-boot/lilo/files/lilo-22.5.6-animated-menu.patch new file mode 100644 index 000000000000..abb64c8fbe6a --- /dev/null +++ b/sys-boot/lilo/files/lilo-22.5.6-animated-menu.patch @@ -0,0 +1,1287 @@ +diff -urpN lilo-22.5.6/Makefile lilo-22.5.6.gfx/Makefile +--- lilo-22.5.6/Makefile 2003-06-30 05:45:19.000000000 +0200 ++++ lilo-22.5.6.gfx/Makefile 2003-08-02 16:29:55.000000000 +0200 +@@ -55,7 +55,7 @@ CONFIG=-DBDATA -DDSECS=3 -DEVMS -DIGNORE + + # set the compiler optimization level + +-OPT=-O2 ++OPT=-O2 -fomit-frame-pointer + + + # End of configuration variables +@@ -261,15 +261,15 @@ chain.o: chain.s common.s + first.s: first.S read.S lilo.h version.h + $(CPP) $(PCONFIG) -DFIRST=0x51f92f79 -o first.s first.S + +-second.s: second.S read.S volume.S mapper.S biosdata.S shs3.S bdata.h lilo.h version.h \ ++second.s: second.S gfxlogo.S read.S volume.S mapper.S biosdata.S shs3.S bdata.h lilo.h version.h \ + graph.S menu.S strlen.S bitmap.S display4.S + $(CPP) $(PCONFIG) -DTEXT=0x68db3d5c second.S -o second.s + +-third.s: second.S read.S volume.S mapper.S biosdata.S bdata.h lilo.h version.h \ ++third.s: second.S gfxlogo.S read.S volume.S mapper.S biosdata.S bdata.h lilo.h version.h \ + graph.S menu.S strlen.S crt.S + $(CPP) $(PCONFIG) -DMENU=0x81cba5a8 second.S -o third.s + +-bitmap.s: second.S read.S volume.S mapper.S biosdata.S bdata.h lilo.h version.h \ ++bitmap.s: second.S gfxlogo.S read.S volume.S mapper.S biosdata.S bdata.h lilo.h version.h \ + strlen.S bitmap.S display4.S + $(CPP) $(PCONFIG) -DBITMAP=0x6fcc6176 second.S -o bitmap.s + +diff -urpN lilo-22.5.6/bsect.c lilo-22.5.6.gfx/bsect.c +--- lilo-22.5.6/bsect.c 2003-06-30 04:34:44.000000000 +0200 ++++ lilo-22.5.6.gfx/bsect.c 2003-08-02 16:27:50.000000000 +0200 +@@ -756,6 +756,7 @@ printf("MAX_IMAGES = %d\n", MAX_IMAGES); + die("%s is too big (> %d bytes)",message,i); + param2.msg_len = bitmap ? (st.st_size+15)/16 : st.st_size; + map_begin_section(); ++ if(!bitmap)param2.msg_len = st.st_size > 0xffff ? 0xffff : st.st_size; + #ifndef LCF_UNIFY + map_add(&geo,0,((st.st_size)+SECTOR_SIZE-1)/SECTOR_SIZE); + #else +@@ -1045,6 +1046,7 @@ if (image) { /* long section specific to + else if (!strcasecmp(vga,"ext") || !strcasecmp(vga,"extended")) + descr->vga_mode = EXTENDED_VGA; + else if (!strcasecmp(vga,"ask")) descr->vga_mode = ASK_VGA; ++ else if (!strcasecmp(vga,"inst")) descr->vga_mode = INST_VGA; + else descr->vga_mode = to_number(vga); + #endif + } +diff -urpN lilo-22.5.6/geometry.c lilo-22.5.6.gfx/geometry.c +--- lilo-22.5.6/geometry.c 2003-06-29 20:52:10.000000000 +0200 ++++ lilo-22.5.6.gfx/geometry.c 2003-08-02 16:27:50.000000000 +0200 +@@ -26,6 +26,21 @@ source directory. + + #include <string.h> + ++#include <linux/kdev_t.h> /* for major and minor macros */ ++#ifndef BMAP_IOCTL ++# define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ ++#endif ++#ifndef FIBMAP ++# define FIBMAP _IO(0x00,1) /* bmap access */ ++#endif ++#ifndef FIGETBSZ ++# define FIGETBSZ _IO(0x00,2) ++#endif ++ ++#include <sys/statfs.h> ++#include <linux/fd.h> /* for fdgetprm */ ++#include <linux/hdreg.h> /* for hdio_getgeo */ ++ + #include "config.h" + #include "lilo.h" + #include "common.h" +@@ -594,6 +609,14 @@ void geo_query_dev(GEOMETRY *geo,int dev + geo->start = hdprm.start; + break; + ++ case MAJOR_LOOP: ++ geo->device = 0; ++ geo->heads = 2; ++ geo->cylinders = 80; ++ geo->sectors = 18; ++ geo->start = 0; ++ break; ++ + default: + die("Sorry, don't know how to handle device 0x%04x",device); + } +diff -urpN lilo-22.5.6/gfxlogo.S lilo-22.5.6.gfx/gfxlogo.S +--- lilo-22.5.6/gfxlogo.S 1970-01-01 02:00:00.000000000 +0200 ++++ lilo-22.5.6.gfx/gfxlogo.S 2003-08-02 16:27:50.000000000 +0200 +@@ -0,0 +1,569 @@ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++; gfx stuff ++; ++; Patch re-adapted and slightly edited from lilo-22.3.4 ++; For problems write me: quequero@bitchx.it ++; Quequero ++; ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++ ++; != 0 -> everything is fine ++gfx_ok: .byte 0 ++ ++; we need it at some point ++gfx_tmp: .word 0 ++ ++; the memory area we are working with ++gfx_mem: .long 0 ; linear address ++gfx_mem_max: .long 0 ; end address ++gfx_mem_free: .long 0 ; start of free area for malloc (after pcx image) ++ ++; interface to loadable gfx extension (seg:ofs values) ++gfx_bc_jt: .long 0 ++ ++gfx_bc_init: .long 0 ++gfx_bc_done: .long 0 ++gfx_bc_input: .long 0 ++gfx_bc_menu_init: .long 0 ++gfx_bc_infobox_init: .long 0 ++gfx_bc_infobox_done: .long 0 ++gfx_bc_progress_init: .long 0 ++gfx_bc_progress_done: .long 0 ++gfx_bc_progress_update: .long 0 ++gfx_bc_progress_limit: .long 0 ++gfx_bc_password_init: .long 0 ++gfx_bc_password_done: .long 0 ++ ++; system config data ++gfx_sysconfig: ++gfx_sc_vmode: .byte 0 ++gfx_sc_modes: .byte 0 ++gfx_bootloader: .byte 0 ++ ++gfx_password_buf: .blkb 32 ++gfx_msg_wrong_image: .ascii "Could not find kernel image: " ++ .byte 0 ++gfx_msg_wrong_password: .ascii "Sorry, incorrect password." ++ .byte 0 ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++; I really have no idea how to get as86 to do this properly ++ ++ macro farcall ++ .byte 0xff ++ .byte 0x1e ++ .word ?1 ++ mend ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_get_sysconfig: ++ xor ax,ax ++ ret ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_set_sysconfig: ++ ret ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++; Initialize graphics code. Load and display graphics data. ++; ++; edi file length ++; ++; return: [gfx_ok] = 0/1 ++; ++gfx_init: ++ push es ++ ++ cld ++ ++ mov byte gfx_ok,#0 ++ ++ ; no gfx if we use a serial line ++ seg fs ++ cmp byte par2_port+SSDIFF,#0 ++ jnz near gfx_init_90 ++ ++ ; define our memory area ++ ; gfx_mem _must_ be 16-byte aligned ++ mov dword gfx_mem,#0x10000 ++ add edi,gfx_mem ++ mov gfx_mem_free,edi ++ mov dword gfx_mem_max,#0x80000 ++ ++ sub edi,gfx_mem_max ++ neg edi ++ cmp edi,#0x1000 ; we need some minimum space ++ jc near gfx_init_80 ++ ++ ; align 4 ++ mov eax,gfx_mem_free ++ add eax,#3 ++ and eax,#~3 ++ mov gfx_mem_free,eax ++ ++ push dword gfx_mem ++ call gfx_l2so ++ pop bx ++ pop es ++ ++ seg es ++ cmp dword (bx),#0x0b2d97f00 ; header.magic_id ++ jnz near gfx_init_80 ++ seg es ++ mov al,(bx+4) ; header.version ++ cmp al,#1 ++ jb near gfx_init_80 ++ cmp al,#2 ++ ja near gfx_init_80 ++ ++ seg es ++ mov eax,(bx+8) ++ or eax,eax ++ jz near gfx_init_80 ++ add eax,gfx_mem ++ test al,#0xf ++ jnz near gfx_init_80 ++ shr eax,4 ++ mov gfx_bc_jt+2,ax ++ ++ ++ ; setup jump table ++ les bx,gfx_bc_jt ++ ++ seg es ++ mov ax,(bx) ++ mov gfx_bc_init,ax ++ mov gfx_bc_init+2,es ++ ++ seg es ++ mov ax,(bx+2) ++ mov gfx_bc_done,ax ++ mov gfx_bc_done+2,es ++ ++ seg es ++ mov ax,(bx+4) ++ mov gfx_bc_input,ax ++ mov gfx_bc_input+2,es ++ ++ seg es ++ mov ax,(bx+6) ++ mov gfx_bc_menu_init,ax ++ mov gfx_bc_menu_init+2,es ++ ++ seg es ++ mov ax,(bx+8) ++ mov gfx_bc_infobox_init,ax ++ mov gfx_bc_infobox_init+2,es ++ ++ seg es ++ mov ax,(bx+10) ++ mov gfx_bc_infobox_done,ax ++ mov gfx_bc_infobox_done+2,es ++ ++ seg es ++ mov ax,(bx+12) ++ mov gfx_bc_progress_init,ax ++ mov gfx_bc_progress_init+2,es ++ ++ seg es ++ mov ax,(bx+14) ++ mov gfx_bc_progress_done,ax ++ mov gfx_bc_progress_done+2,es ++ ++ seg es ++ mov ax,(bx+16) ++ mov gfx_bc_progress_update,ax ++ mov gfx_bc_progress_update+2,es ++ ++ seg es ++ mov ax,(bx+18) ++ mov gfx_bc_progress_limit,ax ++ mov gfx_bc_progress_limit+2,es ++ ++ seg es ++ mov ax,(bx+20) ++ mov gfx_bc_password_init,ax ++ mov gfx_bc_password_init+2,es ++ ++ seg es ++ mov ax,(bx+22) ++ mov gfx_bc_password_done,ax ++ mov gfx_bc_password_done+2,es ++ ++ mov eax,gfx_mem ++ mov ebx,gfx_mem_free ++ mov ecx,gfx_mem_max ++ mov dx,cs ++ mov si,#gfx_sysconfig ++ ++ ; eax memory start ++ ; ebx free memory start ++ ; ecx memory end ++ ; dx boot loader code segment ++ ; si gfx_sysconfig offset ++ ++ farcall(gfx_bc_init) ++ ++ jc gfx_init_80 ++ ++ mov byte gfx_ok,#1 ++ ++ jmp gfx_init_90 ++ ++gfx_init_80: ++ mov byte gfx_ok,#0 ++gfx_init_90: ++ pop es ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++; Back to text mode. ++; ++; return: [gfx_ok] = 0 ++; ++gfx_done: ++ cmp byte gfx_ok,#0 ++ jz gfx_done_90 ++ farcall(gfx_bc_done) ++ mov byte gfx_ok,#0 ++ call gfx_set_sysconfig ++gfx_done_90: ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_input: ++ cmp byte gfx_ok,#0 ++ jz gfx_input_90 ++ call gfx_get_sysconfig ++ ++ mov ax,#0xffff ++ seg fs ++ xchg ax,par2_timeout ++ ++ ; map 0xffff -> 0 ++ add ax,#1 ++ cmc ++ sbb ax,#0 ++ ++gfx_input_20: ++ mov di,#cmdline ++ mov cx,#CL_LENGTH ++ ++ ; di buffer ( 0 --> no buffer ) ++ ; cx buffer size ++ ; ax timeout value (0 --> no timeout) ++ ++ farcall(gfx_bc_input) ++ ++ pushf ++ call gfx_set_sysconfig ++ popf ++ jnc gfx_input_50 ++ mov ax,#1 ++gfx_input_50: ++ cmp ax,#1 ++ jz gfx_input_80 ++ ++ call find_boot_image ++ jnc gfx_input_90 ++ ++ mov si,#gfx_msg_wrong_image ++ mov di,#cmdline ++ ++ mov al,#0 ++ call gfx_infobox ++ ++ xor ax,ax ++ jmp gfx_input_20 ++gfx_input_80: ++ push ax ++ call gfx_done ++ pop ax ++gfx_input_90: ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_setup_menu: ++ cmp byte gfx_ok,#0 ++ jz gfx_setup_menu_90 ++ ++ mov si,#DESCR0 ++ mov di,si ++ xor ax,ax ++ mov cx,#IMAGES ++gfx_setup_menu_20: ++ cmp byte (si),#0 ++ jz gfx_setup_menu_30 ++ inc ax ++ add si,#id_size ++ loop gfx_setup_menu_20 ++gfx_setup_menu_30: ++ mov si,di ++ mov dx,#id_size ++ ++ ; al menu entries ++ ; dx menu entry size ++ ; di menu entry list ++ ; si default menu entry ++ ++ farcall(gfx_bc_menu_init) ++gfx_setup_menu_90: ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_infobox: ++ pushad ++ cmp byte gfx_ok,#0 ++ jz gfx_infobox_90 ++ farcall(gfx_bc_infobox_init) ++ xor di,di ++ xor ax,ax ++ farcall(gfx_bc_input) ++ farcall(gfx_bc_infobox_done) ++gfx_infobox_90: ++ popad ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_progress_init: ++ pushad ++ cmp byte gfx_ok,#0 ++ jz gfx_progress_init_90 ++ movzx eax,ax ++ farcall(gfx_bc_progress_init) ++gfx_progress_init_90: ++ popad ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_progress_done: ++ pushad ++ cmp byte gfx_ok,#0 ++ jz gfx_progress_done_90 ++ farcall(gfx_bc_progress_done) ++gfx_progress_done_90: ++ popad ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_progress_update: ++ pushad ++ cmp byte gfx_ok,#0 ++ jz gfx_progress_update_90 ++ movzx eax,cx ++ farcall(gfx_bc_progress_update) ++gfx_progress_update_90: ++ popad ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++gfx_progress_limit: ++ pushad ++ cmp byte gfx_ok,#0 ++ jz gfx_progress_limit_90 ++ movzx eax,ax ++ farcall(gfx_bc_progress_limit) ++gfx_progress_limit_90: ++ popad ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++; ds:di image descr ++; ++gfx_password: ++ push es ++ pushad ++ cmp byte gfx_ok,#0 ++ stc ++ jz gfx_password_90 ++ push di ++ mov si,#gfx_password_buf ; not used ++ farcall(gfx_bc_password_init) ++ mov di,#gfx_password_buf ++ mov cx,#32 ++ xor ax,ax ++ farcall(gfx_bc_input) ++ mov si,#gfx_password_buf ++ farcall(gfx_bc_password_done) ++ pop di ++ call check_password ++ jnc gfx_password_90 ++ mov si,#gfx_msg_wrong_password ++ xor di,di ++ mov al,#0 ++ farcall(gfx_bc_infobox_init) ++ xor di,di ++ xor ax,ax ++ farcall(gfx_bc_input) ++ farcall(gfx_bc_infobox_done) ++ stc ++gfx_password_90: ++ popad ++ pop es ++ ret ++ ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++; Convert 32bit linear address to seg:ofs. ++; ++; dword [esp + 2]: linear address ++; ++; return: ++; dword [esp + 2]: seg:ofs ++; ++; Notes: ++; - changes no regs ++; ++gfx_l2so: ++ push eax ++ mov eax,(esp + 6) ++ shr eax,4 ++ mov (esp + 8),ax ++ and word (esp + 6),#0xf ++ pop eax ++ ret ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++; locate the boot image ++; ++; return: ++; bx boot image index ++; CF error (image not found) ++; ++find_boot_image: ++ mov dx,#DESCR0 ++ mov cx,#IMAGES ++ ++ xor bx,bx ++ ++find_boot_image_10: ++ mov si,dx ++ mov di,#cmdline ++find_boot_image_20: ++ mov al,(si) ++ or al,al ++ jz find_boot_image_60 ++ cmp al,(di) ++ jnz find_boot_image_30 ++ inc si ++ inc di ++ jmp find_boot_image_20 ++find_boot_image_30: ++ inc bx ++ add dx,#id_size ++ cmp bx,cx ++ jb find_boot_image_10 ++ ; not found, strip options for fancy error message ++ ++ mov si,#cmdline ++ mov cx,#MAX_IMAGE_NAME+1 ++find_boot_image_40: ++ cmp byte (si),#0x20+1 ++ inc si ++ jb find_boot_image_50 ++ loop find_boot_image_40 ++find_boot_image_50: ++ mov byte (si-1),#0 ++ jmp find_boot_image_80 ++find_boot_image_60: ++ mov al,(di) ++ cmp al,#0x20 ++ ja find_boot_image_30 ++ imul bx,bx,#id_size ++ add bx,#DESCR0 ++ jmp find_boot_image_90 ++find_boot_image_80: ++ stc ++find_boot_image_90: ++ ret ++ ++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++; ++; ds:di image descr ++; ++; CF = 0: password valid ++; ++check_password: ++#if defined(SHS_PASSWORDS) ++ mov bp,di ++ mov di,#gfx_password_buf ++ mov si,di ++ push ds ++ pop es ++ mov cx,#32 - 1 ++ xor al,al ++ repne ++ scasb ++ sub cx,#32 - 1 ++ not cx ++ mov bx,cx ++ ++ push ss ++ pop es ++ mov cx,#32 ++ sub sp,cx ++ mov di,sp ++ rep ++ movsb ++ mov si,sp ++ ++ push bp ++ ++ push bx ; length ++ push si ; ss:si password ++ call _shsInit ++ call _shsUpdate ++ call _shsFinal ++ pop si ++ pop bx ++ ++ pop di ++ ++ add di,#id_password_crc ++ mov si,#shs_digest ++ mov cx,#MAX_PW_CRC*4 ++ push ds ++ pop es ++ repe ++ cmpsb ++ je check_pw_50 ++ inc cx ++check_pw_50: ++ add sp,#32 ++ pushad ; clear password buffer ++ mov di,#gfx_password_buf ++ mov cx,#32 ++ xor al,al ++ rep ++ stosb ++ popad ++ cmp cx,#1 ++ cmc ++#endif ++ ret ++ +diff -urpN lilo-22.5.6/lilo.c lilo-22.5.6.gfx/lilo.c +--- lilo-22.5.6/lilo.c 2003-06-30 05:13:13.000000000 +0200 ++++ lilo-22.5.6.gfx/lilo.c 2003-08-02 16:27:50.000000000 +0200 +@@ -241,6 +241,9 @@ static void show_images(char *map_file) + case ASK_VGA: + printf("ASK\n"); + break; ++ case INST_VGA: ++ printf("INST\n"); ++ break; + default: + printf("%d (0x%04x)\n", + descrs.d.descr[image].vga_mode, +diff -urpN lilo-22.5.6/lilo.h lilo-22.5.6.gfx/lilo.h +--- lilo-22.5.6/lilo.h 2003-06-30 05:46:30.000000000 +0200 ++++ lilo-22.5.6.gfx/lilo.h 2003-08-02 16:27:50.000000000 +0200 +@@ -61,6 +61,7 @@ source directory. + #define MAJMIN_RAM 0x101 /* RAM disk */ + #define MAJOR_FD 2 /* floppy disks */ + #define MAJOR_HD 3 /* IDE-type hard disks */ ++#define MAJOR_LOOP 7 /* loop device */ + #define MAJOR_SD 8 /* SCSI disks 0-15 */ + #define MAJOR_MD 9 /* multi-disk RAID sets */ + #define MAJOR_XT 13 /* XT-type hard disks */ +@@ -273,13 +274,14 @@ source directory. + + + #define VGA_NOCOVR 0x8000 /* VGA setting not overridden on command line */ ++#define INST_VGA 0xfff0 /* test for framebuffer at vga=771 */ + + #define SER_DFL_PRM 0xa3 /* default serial parameters: 2400n8 */ + + #define DC_MAGIC 0xf4f2 /* magic number of default cmd. line sector */ + #define DC_MGOFF 0x6b6d /* magic number for disabled line */ + +-#define MAX_MESSAGE 65535 /* maximum message length */ ++#define MAX_MESSAGE 8*64*1024-1 /* maximum message length (512k) */ + #define MAX_MENU_TITLE 37 /* maximum MENU title length */ + + #define NEW_HDR_SIG "HdrS" /* setup header signature */ +diff -urpN lilo-22.5.6/partition.c lilo-22.5.6.gfx/partition.c +--- lilo-22.5.6/partition.c 2003-06-15 00:49:51.000000000 +0200 ++++ lilo-22.5.6.gfx/partition.c 2003-08-02 16:27:50.000000000 +0200 +@@ -22,7 +22,14 @@ source directory. + #include <sys/types.h> + #include <asm/unistd.h> + #include <limits.h> +-/*#include <linux/fs.h>*/ ++ ++#if 0 ++# define _LINUX_STRING_H_ ++# include <linux/fs.h> ++#else ++# include <linux/kdev_t.h> ++#endif ++ + #include <time.h> + #include "config.h" + #include "lilo.h" +diff -urpN lilo-22.5.6/second.S lilo-22.5.6.gfx/second.S +--- lilo-22.5.6/second.S 2003-06-30 04:01:03.000000000 +0200 ++++ lilo-22.5.6.gfx/second.S 2003-08-02 16:36:49.000000000 +0200 +@@ -614,7 +614,9 @@ extp: BEG_FS + seg es + cmp byte ptr (si),#0 ! empty ? + je iloop ! yes -> enter interactive mode +- jmp niloop ! enter non-interactive mode ++ ++niloop0: ++ br niloop ! enter non-interactive mode + + ! No external parameters after timeout -> boot first image + +@@ -622,7 +624,7 @@ noex: push cs ! restore ES + pop es + mov si,#DFLCMD+2 ! default command line ? + cmp byte ptr (si),#0 +- jne niloop ! yes -> use it ++ jne niloop0 ! yes -> use it + mov ax,nodfl ! no idea how to tell as86 to do jmp (addr) :-( + jmp ax ! fall through + +@@ -630,16 +632,23 @@ noex: push cs ! restore ES + ! Command input processor + + iloop: +-#if defined(MENU) || defined(BITMAP) ++#ifdef BITMAP + call menu_setup + #endif + + #ifndef BITMAP ++ cmp byte gfx_ok,#0 ++ jnz iloop_gfx ++ ++ ; load message before doing anything else ++ ; the graphics/text stuff is mixed in a rather messy way... ++ + ;; BEG_FS + ;; SEG_FS ! message disabled ? + cmp word ptr par2_msg_len,#0 ;MSG_OFF+SSDIFF,#0 + ;; END_FS +- je nomsg ! yes -> skip this ++ ; _must_ be 'jz'! ++ jz iloop_20 ! yes -> skip this + call crlf + ;BEG_FS + ;SEG_FS ! load the message file +@@ -653,13 +662,91 @@ iloop: + call sread + call loadfile + ++; es:bx points to file end ++ movzx ebx,bx ++ xor edi,edi ++ mov di,es ++ shl edi,4 ++ add edi,ebx ++ sub edi,#SYSSEG * 16 ++ ++ ; edi -> message file size ++ + xor bx,bx ! set the terminating NUL and disable further + ! messages + xchg bx,par2_msg_len ;MSG_OFF+SSDIFF + + push #SYSSEG + pop ds +- mov byte ptr (bx),#0 ++ ++ ++ cmp dword ptr 0,#0x0b2d97f00 ; magic header ++ ; _must_ be 'jnz'! ++ jnz iloop_10 ++ ++ push cs ++ pop ds ++ ++ ; graphical message ++ ++ call gfx_init ++ push cs ++ pop es ++ cmp byte gfx_ok,#0 ++ jz iloop ++ call gfx_setup_menu ++iloop_gfx: ++ push cs ++ pop es ++ call gfx_input ++ cmp ax,#1 ++ jz iloop ; text mode ++ mov gfx_tmp,bx ++ jmp near scan_cmdline ++ ++ ; normal text message ++iloop_10: ++ ; keep the zero flag! ++ mov byte ptr (bx),#0 ++ push cs ++ pop ds ++ ++iloop_20: ++#ifdef MENU ++ pushf ++ call menu_setup ++ popf ++#endif ++ jnz totxt ++ mov ax,showit ++ mov dx,showit+2 ++ mov bx,ax ++ or bx,dx ++ jz iloop_40 ++ push ds ++ shl dx,12 ++ mov bx,ax ++ and bx,#0xf ++ shr ax,4 ++ add ax,dx ++ add ax,#SYSSEG ++ mov ds,ax ++ call say ++ pop ds ++ xor ax,ax ++ mov showit,ax ++ mov showit+2,ax ++iloop_40: ++ ++ jmp nomsg ++ ++showit: ++ .long 0 ++ ++totxt: ++ push #SYSSEG ++ pop ds ++ + xor bx,bx ! display the message + call say + +@@ -695,12 +782,6 @@ input: seg es ! interactive mode ? + mov al,(si) + inc si + jmp gotinp ! go on +- +-tolist: +-#ifdef BITMAP +- call menu_exit +-#endif +- br list ! ... + + kbinp: mov cx,#brto ! get a key + call getkey +@@ -727,8 +808,6 @@ gotinp: cmp al,#9 ! TAB ? + je nul ! yes -> go on + cmp al,#8 ! BS ? + je todelch ! yes -> erase one character +- cmp al,#13 ! CR ? +- je cr ! yes -> go on + cmp al,#127 ! DEL ? + je todelch ! yes -> erase one character + ja input ! non-printable -> ignore it +@@ -736,6 +815,8 @@ gotinp: cmp al,#9 ! TAB ? + je todell ! yes -> erase the line + cmp al,#24 ! ^X ? + je todell ! yes -> erase the line ++ cmp al,#13 ! CR ? ++ je cr ! yes -> go on + cmp al,#32 ! ignore non-printable characters except space + jb input + ja noblnk ! no space -> go on +@@ -778,6 +859,11 @@ sknext: add di,#id_size ! test next entr + + todelch:br delch ! ... + todell: br delline ! ... ++tolist: ++#ifdef BITMAP ++ call menu_exit ++#endif ++ br list ! ... + + ! End of input, process the command line + +@@ -819,6 +905,7 @@ cpsav: lodsb ! copy one byte + or al,al ! at end ? + jnz cpsav ! no -> go on + ++scan_cmdline: + cmp bx,#cmdline ! empty line ? + je notrspc ! yes -> boot first image + cmp byte ptr (bx-1),#32 ! trailing space ? +@@ -876,6 +963,11 @@ vsknb: + je chkvga ! yes -> look for options again + or al,al ! at end ? + jnz vsknb ! no -> go on ++ ++ mov bx,gfx_tmp ++ cmp byte gfx_ok,#0 ++ jnz near boot ++ + call crlf ! write CR/LF + cmp di,#cmdline+1 ! empty line ? + emptyl: je bfirst ! yes -> boot first image +@@ -1087,6 +1179,16 @@ dopw: + ;; SEG_FS + mov word ptr par2_timeout,#0xffff ; cancel timeout + ;; END_FS ++ ++ cmp byte gfx_ok,#0 ++ jz dopw_nogfx ++ mov di,bx ++ call gfx_password ++ pop bx ++ jnc toboot ++ jmp near iloop ++dopw_nogfx: ++ + mov bx,#msg_pw ! display a prompt + call say + +@@ -1257,7 +1359,8 @@ pwcleanup: + pop bp + pop bx + or cx,cx ; test CX==0 means all okay +- jz doboot ++ jnz pwfail ++ br doboot + ; fall into pwfail + + #else +@@ -1314,16 +1417,158 @@ pwcr: call crlf + or cl,cl ! no errors ? + jnz pwfail ! no -> fail + cmp byte ptr (si),#0 ! at end ? +- je doboot ! yes -> continue booting ++ jne pwfail ! yes -> continue booting ++ br doboot ++ + #endif /* CRC_PASSWORDS */ + + pwfail: mov bx,#msg_pf ! display an error message + call say + br iloop ! get next input + ++! Test if the monitor can display a vga mode ++! mode in ax, returns ax if success, otherwise 0 ++montest: ++ push es ++ push di ++ push bx ++ push cx ++ push dx ++ push ax ++ push #0 ++ pop es ++ mov di,#0xfc00 ++ xor cx,cx ++ seg es ++ mov 0xfc23,cx ++ xor dx,dx ++ mov bx,#1 ++ mov ax,#0x4f15 ++ int 0x10 ++ cmp ax,#0x4f ++ pop ax ++ jnz monno ++ mov bx,ax ++ sub bx,#0x100 ++ cmp bx,#0x1c ++ jnb monno ++ seg cs ++ mov bl,monbits(bx) ++ xor bh,bh ++ seg es ++ mov cx,0xfc23 ++ or cx,cx ++ jnz nofsc ++ call fscscan ++nofsc: and cl,#0xfe ++ bt cx,bx ++ jc monok ++monno: xor ax,ax ++monok: pop dx ++ pop cx ++ pop bx ++ pop di ++ pop es ++ ret ++ ++monbits: ++ .byte 5,5,9,9,14,14,15,15,0,0,0,0,0,0,0,0 ++ .byte 5,5,5,9,9,9,14,14,14,15,15,15 ++ ++! return in cx the bits for FSC notebooks. ++fscscan: ++ push ds ++ push si ++ push di ++ push ax ++ push bx ++ push #0xf000 ++ pop ds ++ xor di,di ++fscnn: cmp dword ptr (di),#0x696a7546 ++ jnz fscn ++ cmp dword ptr 4(di),#0x20757374 ++ jnz fscn ++ mov cx,#0x20 ++ xor bx,bx ++ mov si,di ++fscsig: lodsb ++ add bl,al ++ dec cx ++ jnz fscsig ++ or bl,bl ++ jnz fscn ++ mov al,23(di) ++ and al,#0xf0 ++ jnz fscbad ++ mov bl,21(di) ++ and bx,#0xf0 ++ shr bx,#3 ++ seg cs ++ mov cx,fscbits(bx) ++ jmp fscok ++fscn: add di,#0x10 ++ jnz fscnn ++fscbad: xor cx,cx ++fscok: pop bx ++ pop ax ++ pop di ++ pop si ++ pop ds ++ ret ++ ++fscbits: ++ .word 0,0x0020,0x0200,0x4000,0x8000,0x8000,0,0 ++ .word 0x8000,0,0,0,0,0,0,0 ++ ++! Test if the driver can display a vga mode ++! mode in ax, returns ax if success, otherwise 0 ++vgatest: ++ push es ++ push di ++ push bx ++ push cx ++ push dx ++ push ax ++ push #0 ++ pop es ++ mov cx,ax ++ xor ax,ax ++ seg es ++ mov 0xfc00+0x28,ax ++ seg es ++ mov 0xfc00+0x2a,ax ++ mov di,#0xfc00 ++ mov ax,#0x4f01 ++ int 0x10 ++ cmp ax,#0x4f ++ jnz vgano ++ seg es ++ mov ax,0xfc00 ++ and ax,#0x99 ++ cmp ax,#0x99 ++ jnz vgano ++ seg es ++ mov ax,0xfc00+0x28 ++ seg es ++ or ax,0xfc00+0x2a ++ jz vgano ++ pop ax ++ jmp vgayes ++vgano: pop ax ++ xor ax,ax ++vgayes: pop dx ++ pop cx ++ pop bx ++ pop di ++ pop es ++ ret ++ + ! Boot the image BX points to + +-doboot: mov byte ptr prechr,#61 ! switch to equal sign ++doboot: ++ call gfx_done ++ mov byte ptr prechr,#61 ! switch to equal sign + push bx ! save image descr + mov bx,#msg_l ! say hi + call say +@@ -1478,8 +1723,36 @@ cpdone: + jmp vgaset + vganorm:test bx,#FLAG_VGA + jz novga +-vgaset: seg es +- mov [VGA_SET],ax ! magic offset in the boot sector ++vgaset: ++#ifdef NORMAL_VGA ++ cmp ax,#INST_VGA ++ jnz vganoi ++ mov ax,#0x117 ++ call vgatest ++ or ax,ax ++ jz vga2 ++ call montest ++ or ax,ax ++ jnz vga3 ++vga2: ++ mov ax,#0x114 ++ call vgatest ++ or ax,ax ++ jz vga4 ++ call montest ++ or ax,ax ++ jnz vga3 ++vga4: ++ mov ax,#0x101 ++ call vgatest ++ or ax,ax ++ jnz vga3 ++ mov ax,#NORMAL_VGA-0x0200 ++vga3: ++ add ax,#0x200 ++#endif ++vganoi: seg es ++ mov [VGA_SET],ax ! magic offset in the boot sector + novga: push bx ! use flags (BX) later + test bx,#FLAG_LOCK ! ... lock target ? + jnz lockit ! yup -> do it +@@ -1492,8 +1765,8 @@ lockit: + push es + push si + +- push ds ; +- pop es ; ++ push ds ; ++ pop es ; + call cmd_write ; write out the command line + + pop si +@@ -1506,7 +1779,7 @@ nolock: + #endif + xor cx,cx + seg es +- add cl,[VSS_NUM] ++ add cl,[VSS_NUM] + ;;; or cx,cx + jnz lsetup + mov cl,#SETUPSECS ! default is to load four sectors +@@ -3246,6 +3519,8 @@ vganum: pop si ! get SI + jmp vgaput1 + #else + xor cx,cx ++ mov bh,ch ++ mov bl,#10 ; bx: base (_not_ bl!) + mov ah,cl + test byte ptr (si),#0xff ! no value ? + jz vgaerr ! yes -> error +@@ -3254,17 +3529,45 @@ vgadig: lodsb ! get the next character + jz vgaput ! yes -> done + cmp al,#32 + je vgaput +- cmp al,#48 ! is it a digit ? (0x30=48="0") +- jb vgaerr ! no -> error +- cmp al,#57 ! 57=0x39="9" +- ja vgaerr +- sub al,#48 ! cx = cx*10+al-'0' +- imul cx,#10 ++ cmp al,#0x61 ++ jb vgadig_10 ++ sub al,#0x20 ; upper case ++vgadig_10: ++ or cx,cx ++ jnz vgadig_20 ++ cmp al,#0x58 ++ jnz vgadig_20 ++ mov bl,#16 ; hex ++ jmp vgadig ++vgadig_20: ++ cmp al,#0x3a ++ jb vgadig_30 ++ sub al,#7 ++vgadig_30: ++ sub al,#0x30 ++ jb vgaerr ; not a digit ++ cmp al,bl ++ jae vgaerr ; larger than current base ++ imul cx,bx ++ + add cx,ax + jnc vgadig ! next one + #endif + +-vgaerr: mov bx,#msg_v ! display an error message ++vgaerr: ++ mov bx,#msg_v ! display an error message ++ cmp byte gfx_ok,#0 ++ jz vgaerr_txt ++ lea si,(bx+1) ; skip initial NL ++ xor di,di ++ mov al,#0 ++ mov msg_v1,al ; drop final NL ++ call gfx_infobox ++ mov byte msg_v1,#10 ; put it back ++ stc ++ ret ++vgaerr_txt: ++ + call say + /* ifdef HIGHMEM_MAX */ + xor eax,eax +@@ -3285,6 +3588,9 @@ vgatab: + .ascii "EXT" + .byte 0 + .word NORMAL_VGA ++ .byte 0 ++ .word INST_VGA ++ .ascii "INST" + .ascii "NORMAL" + .byte 0 + #endif +@@ -3365,7 +3671,9 @@ getmem: + inc si ! skip '@' + call get_K + pop edx ! restore size +- jc memerr ++;;; jc memerr ++ je gmmull ++ br s2lbad + cmp eax,#1024 ! start : 1meg + ja gmcopy ! just copy if above + add eax,edx ! EAX = hma/1024 +@@ -3375,7 +3683,9 @@ gm22: + or bl,#0x20 + cmp bl,#0x20 ! NUL or SPACE + #if 0 +- jne memerr ++;;; jne memerr ++ je gmmull ++ br s2lbad + #else + jne gmcopy ! allow <size>#<start> and <size>$<start> + #endif +@@ -3387,6 +3697,7 @@ gmret: ret + gmnocopy: pop bx + ret + ++#include "gfxlogo.S" + + memerr: + mov bx,#msg_me ! numeric conversion error +@@ -3588,8 +3899,8 @@ msg_pf: .ascii "Sorry." + + msg_v: .byte 10 + .ascii "Valid vga values are ASK, NORMAL, EXTENDED or a " +- .ascii "decimal number." +- .byte 10,0 ++ .ascii "number." ++msg_v1: .byte 10,0 + + msg_pks:.byte 10 + .ascii "Invalid hexadecimal number. - Ignoring remaining items." diff --git a/sys-boot/lilo/files/lilo-22.5.6-glibc233.patch b/sys-boot/lilo/files/lilo-22.5.6-glibc233.patch new file mode 100644 index 000000000000..96d582d418e8 --- /dev/null +++ b/sys-boot/lilo/files/lilo-22.5.6-glibc233.patch @@ -0,0 +1,24 @@ +--- lilo-22.5.6/boot.c 2003-08-03 21:02:55.000000000 +0200 ++++ lilo-22.5.6.glibc233/boot.c 2003-08-03 21:03:17.000000000 +0200 +@@ -18,6 +18,9 @@ + #include <fcntl.h> + #include <errno.h> + #include <a.out.h> ++#ifndef PAGE_SIZE ++# include <asm/page.h> ++#endif + #include <sys/stat.h> + + #include "config.h" +--- lilo-22.5.6/partition.c 2003-08-03 21:03:33.000000000 +0200 ++++ lilo-22.5.6.glibc233/partition.c 2003-08-03 21:03:56.000000000 +0200 +@@ -18,6 +18,9 @@ + #include <fcntl.h> + #include <errno.h> + #include <a.out.h> ++#ifndef PAGE_SIZE ++# include <asm/page.h> ++#endif + #include <sys/stat.h> + #include <sys/types.h> + #include <asm/unistd.h> diff --git a/sys-boot/lilo/files/lilo.conf b/sys-boot/lilo/files/lilo.conf new file mode 100644 index 000000000000..5daef1972871 --- /dev/null +++ b/sys-boot/lilo/files/lilo.conf @@ -0,0 +1,73 @@ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/files/lilo.conf,v 1.1 2003/12/09 08:12:34 seemant Exp $ +# Author: Ultanium + +# +# Start LILO global section +# + +# Faster, but won't work on all systems: +#compact +# Should work for most systems, and do not have the sector limit: +lba32 +# If lba32 do not work, use linear: +#linear + +# MBR to install LILO to: +boot = /dev/hda +map = /boot/.map + +# If you are having problems booting from a hardware raid-array +# or have a unusual setup, try this: +#disk=/dev/ataraid/disc0/disc bios=0x80 # see this as the first BIOS disk +#disk=/dev/sda bios=0x81 # see this as the second BIOS disk +#disk=/dev/hda bios=0x82 # see this as the third BIOS disk + +# Here you can select the secondary loader to install. A few +# examples is: +# +# boot-text.b +# boot-menu.b +# boot-bmp.b +# +install = /boot/boot-menu.b # Note that for lilo-22.5.5 or later you + # do not need boot-{text,menu,bmp}.b in + # /boot, as they are linked into the lilo + # binary. + +menu-scheme=Wb +prompt +# If you always want to see the prompt with a 15 second timeout: +#timeout=150 +delay = 50 +# Normal VGA console +vga = normal +# VESA console with size 1024x768x16: +#vga = 791 + +# +# End LILO global section +# + +# +# Linux bootable partition config begins +# +image = /boot/bzImage + root = /dev/hda3 + #root = /devices/discs/disc0/part3 + label = Gentoo + read-only # read-only for checking +# +# Linux bootable partition config ends +# + +# +# DOS bootable partition config begins +# +other = /dev/hda1 + #other = /devices/discs/disc0/part1 + label = Windows + table = /dev/hda +# +# DOS bootable partition config ends +# + diff --git a/sys-boot/lilo/lilo-22.1-r3.ebuild b/sys-boot/lilo/lilo-22.1-r3.ebuild new file mode 100644 index 000000000000..0ba9decd433b --- /dev/null +++ b/sys-boot/lilo/lilo-22.1-r3.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.1-r3.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot + +S=${WORKDIR}/${P} +DESCRIPTION="Standard Linux boot loader" +SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/${P}.tar.gz" +HOMEPAGE="http://brun.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="x86 -amd64 -ppc -sparc -alpha -mips" + +DEPEND=">=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + +src_unpack() { + unpack ${A} + cd ${S} + cp Makefile Makefile.orig + sed -e "s:-g:${CFLAGS}:" Makefile.orig > Makefile +} + +src_compile() { + emake || die +} + +src_install() { + into / + dosbin lilo + into /usr + dosbin keytab-lilo.pl + dodir /boot + insinto /boot + doins boot-text.b boot-menu.b boot-bmp.b chain.b os2_d.b + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT QuickInst README* +} + +pkg_preinst() { + mount-boot_mount_boot_partition + if [ ! -L $ROOT/boot/boot.b -a -f $ROOT/boot/boot.b ] + then + echo "Saving old boot.b..." + mv $ROOT/boot/boot.b $ROOT/boot/boot.old; + fi + + if [ ! -L $ROOT/boot/chain.b -a -f $ROOT/boot/chain.b ] + then + echo "Saving old chain.b..." + mv $ROOT/boot/chain.b $ROOT/boot/chain.old; + fi + + if [ ! -L $ROOT/boot/os2_d.b -a -f $ROOT/boot/os2_d.b ] + then + echo "Saving old os2_d.b..." + mv $ROOT/boot/os2_d.b $ROOT/boot/os2_d.old; + fi +} + +pkg_postinst() { + einfo "Activating boot-menu..." + ln -sf boot-menu.b $ROOT/boot/boot.b +} diff --git a/sys-boot/lilo/lilo-22.3.3-r1.ebuild b/sys-boot/lilo/lilo-22.3.3-r1.ebuild new file mode 100644 index 000000000000..800ae93dadb3 --- /dev/null +++ b/sys-boot/lilo/lilo-22.3.3-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.3.3-r1.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot eutils + +S=${WORKDIR}/${P} +DESCRIPTION="Standard Linux boot loader" +SRC_URI="http://home.san.rr.com/johninsd/pub/linux/lilo/${P}.tar.gz + mirror://gentoo/${P}-gentoo.diff.bz2" +HOMEPAGE="http://brun.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD GPL-2" +KEYWORDS="x86 -amd64 -ppc -sparc -alpha -mips" + +DEPEND="dev-lang/nasm + >=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + +src_unpack() { + unpack ${P}.tar.gz || die + cd ${S} || die + # This bootlogo patch is borrowed from SuSE Linux. + # You should see Raphaël Quinet's (quinet@gamers.org) website, + # http://www.gamers.org/~quinet/lilo/index.html + epatch ${DISTDIR}/${P}-gentoo.diff.bz2 +} + +src_compile() { + emake || die +} + +src_install() { + into / + dosbin lilo activate mkrescue + into /usr + dosbin keytab-lilo.pl + dodir /boot + insinto /boot + doins boot-text.b boot-menu.b boot-bmp.b chain.b mbr.b os2_d.b + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT README* + docinto samples ; dodoc sample/* + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example +} + +pkg_preinst() { + mount-boot_mount_boot_partition + if [ ! -L $ROOT/boot/boot.b -a -f $ROOT/boot/boot.b ] + then + einfo "Saving old boot.b..." + mv -f $ROOT/boot/boot.b $ROOT/boot/boot.old + fi + + if [ ! -L $ROOT/boot/chain.b -a -f $ROOT/boot/chain.b ] + then + einfo "Saving old chain.b..." + mv -f $ROOT/boot/chain.b $ROOT/boot/chain.old + fi + + if [ ! -L ${ROOT}/boot/mbr.b -a -f ${ROOT}/boot/mbr.b ] + then + einfo "Saving old mbr.b..." + mv -f ${ROOT}/boot/mbr.b ${ROOT}/boot/mbr.old + fi + + if [ ! -L $ROOT/boot/os2_d.b -a -f $ROOT/boot/os2_d.b ] + then + einfo "Saving old os2_d.b..." + mv -f $ROOT/boot/os2_d.b $ROOT/boot/os2_d.old + fi +} + +pkg_postinst() { + einfo "Activating boot-menu..." + ln -sf boot-menu.b $ROOT/boot/boot.b +} diff --git a/sys-boot/lilo/lilo-22.3.4.ebuild b/sys-boot/lilo/lilo-22.3.4.ebuild new file mode 100644 index 000000000000..45b2cdd36e14 --- /dev/null +++ b/sys-boot/lilo/lilo-22.3.4.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.3.4.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot eutils + +S=${WORKDIR}/${P} +DESCRIPTION="Standard Linux boot loader" +SRC_URI="http://home.san.rr.com/johninsd/pub/linux/lilo/obsolete/${P}.tar.gz + mirror://gentoo/${P}-gentoo.diff.bz2" +HOMEPAGE="http://brun.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD GPL-2" +KEYWORDS="x86 -amd64 -ppc -sparc -alpha -mips" + +DEPEND="dev-lang/nasm + >=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + +src_unpack() { + unpack ${P}.tar.gz || die + cd ${S} || die + # This bootlogo patch is borrowed from SuSE Linux. + # You should see Raphaël Quinet's (quinet@gamers.org) website, + # http://www.gamers.org/~quinet/lilo/index.html + epatch ${DISTDIR}/${P}-gentoo.diff.bz2 +} + +src_compile() { + emake || die +} + +src_install() { + into / + dosbin lilo activate mkrescue + into /usr + dosbin keytab-lilo.pl + dodir /boot + insinto /boot + doins boot-text.b boot-menu.b boot-bmp.b chain.b mbr.b os2_d.b + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT README* + docinto samples ; dodoc sample/* + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example +} + +pkg_preinst() { + mount-boot_mount_boot_partition + if [ ! -L $ROOT/boot/boot.b -a -f $ROOT/boot/boot.b ] + then + einfo "Saving old boot.b..." + mv -f $ROOT/boot/boot.b $ROOT/boot/boot.old + fi + + if [ ! -L $ROOT/boot/chain.b -a -f $ROOT/boot/chain.b ] + then + einfo "Saving old chain.b..." + mv -f $ROOT/boot/chain.b $ROOT/boot/chain.old + fi + + if [ ! -L ${ROOT}/boot/mbr.b -a -f ${ROOT}/boot/mbr.b ] + then + einfo "Saving old mbr.b..." + mv -f ${ROOT}/boot/mbr.b ${ROOT}/boot/mbr.old + fi + + if [ ! -L $ROOT/boot/os2_d.b -a -f $ROOT/boot/os2_d.b ] + then + einfo "Saving old os2_d.b..." + mv -f $ROOT/boot/os2_d.b $ROOT/boot/os2_d.old + fi +} + +pkg_postinst() { + einfo "Activating boot-menu..." + ln -sf boot-menu.b $ROOT/boot/boot.b +} diff --git a/sys-boot/lilo/lilo-22.5.1.ebuild b/sys-boot/lilo/lilo-22.5.1.ebuild new file mode 100644 index 000000000000..b95a2b1677a9 --- /dev/null +++ b/sys-boot/lilo/lilo-22.5.1.ebuild @@ -0,0 +1,196 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.5.1.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot eutils + +S="${WORKDIR}/${P}" +DESCRIPTION="Standard Linux boot loader" +SRC_URI="http://home.san.rr.com/johninsd/pub/linux/lilo/obsolete/${P}.tar.gz" +# mirror://gentoo/${P}-gentoo.diff.bz2" +HOMEPAGE="http://brun.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD GPL-2" +KEYWORDS="-* x86" + +DEPEND="dev-lang/nasm + >=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + +src_unpack() { + unpack ${P}.tar.gz || die + cd ${S} + + # Get all the loaders to install + cp Makefile Makefile.orig + sed -e 's:# $(BOOTS): $(BOOTS):' Makefile.orig > Makefile + + # This bootlogo patch is borrowed from SuSE Linux. + # You should see Raphaël Quinet's (quinet@gamers.org) website, + # http://www.gamers.org/~quinet/lilo/index.html +# epatch ${DISTDIR}/${P}-gentoo.diff.bz2 +} + +src_compile() { + [ -z "${CC}" ] && CC="gcc" + + # http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml + if has_version 'sys-devel/hardened-gcc' && [ "${CC}" = "gcc" ] + then + CC="${CC} -yet_exec" + fi + + emake CC="${CC}" OPT="-O1" || die +} + +src_install() { + into / + dosbin lilo activate mkrescue + into /usr + dosbin keytab-lilo.pl + + dodir /boot + insinto /boot + doins boot-text.b boot-menu.b boot-bmp.b chain.b mbr.b os2_d.b + + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example + + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT README* + docinto samples ; dodoc sample/* +} + +pkg_preinst() { + mount-boot_mount_boot_partition + + if [ ! -L ${ROOT}/boot/boot.b -a -f ${ROOT}/boot/boot.b ] + then + einfo "Saving old boot.b..." + mv -f ${ROOT}/boot/boot.b ${ROOT}/boot/boot.old + fi + + if [ ! -L ${ROOT}/boot/boot-text.b -a -f ${ROOT}/boot/boot-text.b ] + then + einfo "Saving old boot-text.b..." + mv -f ${ROOT}/boot/boot-text.b ${ROOT}/boot/boot-text.old + fi + + if [ ! -L ${ROOT}/boot/boot-menu.b -a -f ${ROOT}/boot/boot-menu.b ] + then + einfo "Saving old boot-menu.b..." + mv -f ${ROOT}/boot/boot-menu.b ${ROOT}/boot/boot-menu.old + fi + + if [ ! -L ${ROOT}/boot/boot-bmp.b -a -f ${ROOT}/boot/boot-bmp.b ] + then + einfo "Saving old boot-bmp.b..." + mv -f ${ROOT}/boot/boot-bmp.b ${ROOT}/boot/boot-bmp.old + fi + + if [ ! -L ${ROOT}/boot/chain.b -a -f ${ROOT}/boot/chain.b ] + then + einfo "Saving old chain.b..." + mv -f ${ROOT}/boot/chain.b ${ROOT}/boot/chain.old + fi + + if [ ! -L ${ROOT}/boot/mbr.b -a -f ${ROOT}/boot/mbr.b ] + then + einfo "Saving old mbr.b..." + mv -f ${ROOT}/boot/mbr.b ${ROOT}/boot/mbr.old + fi + + if [ ! -L ${ROOT}/boot/os2_d.b -a -f ${ROOT}/boot/os2_d.b ] + then + einfo "Saving old os2_d.b..." + mv -f ${ROOT}/boot/os2_d.b ${ROOT}/boot/os2_d.old + fi +} + +# Check whether LILO is installed +# This function is from /usr/sbin/mkboot from debianutils, with copyright: +# +# Debian GNU/Linux +# Copyright 1996-1997 Guy Maor <maor@debian.org> +# +# Modified for Gentoo for use with the lilo ebuild by: +# Martin Schlemmer <azarah@gentoo.org> (16 Mar 2003) +# +lilocheck () { + local bootpart= + local rootpart="$(rdev 2> /dev/null | cut -d ' ' -f 1 2> /dev/null)" + + echo + einfon "Checking for LILO ..." + + if [ "$(whoami)" != "root" ] + then + echo; echo + eerror "Only root can check for LILO!" + return 1 + fi + + if [ -z "${rootpart}" ] + then + echo; echo + eerror "Could not determine root partition!" + return 1 + fi + + if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ] + then + echo " No" + return 1 + fi + + bootpart="$(perl -ne 'print $1 if /^\s*boot\s*=\s*(\S*)/' /etc/lilo.conf)" + + if [ -z "${bootpart}" ] + then + # lilo defaults to current root when 'boot=' is not present + bootpart="${rootpart}" + fi + + if ! dd if=${bootpart} ibs=16 count=1 2>&- | grep -q 'LILO' + then + echo; echo + ewarn "Yes, but I couldn't find a LILO signature on ${bootpart}" + ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand." + return 1 + fi + + echo " Yes, on ${bootpart}" + + return 0 +} + + +pkg_postinst() { + if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] + then + ln -snf boot-menu.b ${ROOT}/boot/boot.b + fi + + if [ "${ROOT}" = "/" ] + then + if lilocheck + then + einfo "Running LILO to complete the install ..." + /sbin/lilo &> /dev/null + if [ "$?" -ne 0 ] + then + echo + ewarn "Running /sbin/lilo failed! Please check what the problem is" + ewarn "before your next reboot." + + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 5 + fi + fi + echo + fi +} + diff --git a/sys-boot/lilo/lilo-22.5.6-r2.ebuild b/sys-boot/lilo/lilo-22.5.6-r2.ebuild new file mode 100644 index 000000000000..a03dc0e3f910 --- /dev/null +++ b/sys-boot/lilo/lilo-22.5.6-r2.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.5.6-r2.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot eutils + +S="${WORKDIR}/${P}" +DESCRIPTION="Standard Linux boot loader" +SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/${P}.tar.gz + ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/obsolete/${P}.tar.gz" +# mirror://gentoo/${P}-gentoo.diff.bz2" +HOMEPAGE="http://brun.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD GPL-2" +KEYWORDS="-* ~x86" + +DEPEND="dev-lang/nasm + >=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + + +src_unpack() { + unpack ${P}.tar.gz + + # This bootlogo patch is borrowed from SuSE Linux. + # You should see Raphaël Quinet's (quinet@gamers.org) website, + # http://www.gamers.org/~quinet/lilo/index.html +# epatch ${DISTDIR}/${P}-gentoo.diff.bz2 +} + +src_compile() { + emake CC="${CC:=gcc}" lilo || die +} + +src_install() { + keepdir /boot + make ROOT=${D} install || die + into /usr + dosbin keytab-lilo.pl + + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example + + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT README* + docinto samples ; dodoc sample/* +} + +pkg_preinst() { + mount-boot_mount_boot_partition +} + +# Check whether LILO is installed +# This function is from /usr/sbin/mkboot from debianutils, with copyright: +# +# Debian GNU/Linux +# Copyright 1996-1997 Guy Maor <maor@debian.org> +# +# Modified for Gentoo for use with the lilo ebuild by: +# Martin Schlemmer <azarah@gentoo.org> (16 Mar 2003) +# +lilocheck () { + local bootpart= + local rootpart="$(rdev 2> /dev/null | cut -d ' ' -f 1 2> /dev/null)" + + echo + einfon "Checking for LILO ..." + + if [ "$(whoami)" != "root" ] + then + echo; echo + eerror "Only root can check for LILO!" + return 1 + fi + + if [ -z "${rootpart}" ] + then + echo; echo + eerror "Could not determine root partition!" + return 1 + fi + + if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ] + then + echo " No" + return 1 + fi + + bootpart="$(perl -ne 'print $1 if /^\s*boot\s*=\s*(\S*)/' /etc/lilo.conf)" + + if [ -z "${bootpart}" ] + then + # lilo defaults to current root when 'boot=' is not present + bootpart="${rootpart}" + fi + + if ! dd if=${bootpart} ibs=16 count=1 2>&- | grep -q 'LILO' + then + echo; echo + ewarn "Yes, but I couldn't find a LILO signature on ${bootpart}" + ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand." + return 1 + fi + + echo " Yes, on ${bootpart}" + + return 0 +} + + +pkg_postinst() { + if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] + then + [ -f "${ROOT}/boot/boot-menu.b" ] && \ + ln -snf boot-menu.b ${ROOT}/boot/boot.b + fi + + if [ "${ROOT}" = "/" ] + then + if lilocheck + then + einfo "Running LILO to complete the install ..." + # do not redirect to /dev/null because it may display some input + # prompt + /sbin/lilo + if [ "$?" -ne 0 ] + then + echo + ewarn "Running /sbin/lilo failed! Please check what the problem is" + ewarn "before your next reboot." + + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 5 + fi + fi + echo + fi + + echo + einfo "Please note that all the loader files (/boot/*.b) is now linked" + einfo "into LILO, and thus no longer installed." + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 3 + echo +} + diff --git a/sys-boot/lilo/lilo-22.5.6-r3.ebuild b/sys-boot/lilo/lilo-22.5.6-r3.ebuild new file mode 100644 index 000000000000..9bcc0af7b71a --- /dev/null +++ b/sys-boot/lilo/lilo-22.5.6-r3.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.5.6-r3.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot eutils + +S="${WORKDIR}/${P}" +DESCRIPTION="Standard Linux boot loader" +SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/${P}.tar.gz + ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/obsolete/${P}.tar.gz" +# mirror://gentoo/${P}-gentoo.diff.bz2" +HOMEPAGE="http://brun.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD GPL-2" +KEYWORDS="-*" + +DEPEND="dev-lang/nasm + >=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + + +src_unpack() { + unpack ${P}.tar.gz + + # This bootlogo patch is borrowed from SuSE Linux. + # You should see Raphaël Quinet's (quinet@gamers.org) website, + # http://www.gamers.org/~quinet/lilo/index.html + # + # Update for 22.5 by Quequero (bug #19397): + # + # I've adapted and edited this patch from and older version + # For problems email me. + # Quequero <quequerp@bitchx.it> + # + epatch ${FILESDIR}/${P}-animated-menu.patch + + # Fixup things for glibc-2.3.3 (and later CVS versions of 2.3.2) + epatch ${FILESDIR}/${P}-glibc233.patch +} + +src_compile() { + emake CC="${CC:=gcc}" lilo || die +} + +src_install() { + keepdir /boot + make ROOT=${D} install || die + into /usr + dosbin keytab-lilo.pl + + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example + + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT README* + docinto samples ; dodoc sample/* +} + +pkg_preinst() { + mount-boot_mount_boot_partition +} + +# Check whether LILO is installed +# This function is from /usr/sbin/mkboot from debianutils, with copyright: +# +# Debian GNU/Linux +# Copyright 1996-1997 Guy Maor <maor@debian.org> +# +# Modified for Gentoo for use with the lilo ebuild by: +# Martin Schlemmer <azarah@gentoo.org> (16 Mar 2003) +# +lilocheck () { + local bootpart= + local rootpart="$(rdev 2> /dev/null | cut -d ' ' -f 1 2> /dev/null)" + + echo + einfon "Checking for LILO ..." + + if [ "$(whoami)" != "root" ] + then + echo; echo + eerror "Only root can check for LILO!" + return 1 + fi + + if [ -z "${rootpart}" ] + then + echo; echo + eerror "Could not determine root partition!" + return 1 + fi + + if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ] + then + echo " No" + return 1 + fi + + bootpart="$(perl -ne 'print $1 if /^\s*boot\s*=\s*(\S*)/' /etc/lilo.conf)" + + if [ -z "${bootpart}" ] + then + # lilo defaults to current root when 'boot=' is not present + bootpart="${rootpart}" + fi + + if ! dd if=${bootpart} ibs=16 count=1 2>&- | grep -q 'LILO' + then + echo; echo + ewarn "Yes, but I couldn't find a LILO signature on ${bootpart}" + ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand." + return 1 + fi + + echo " Yes, on ${bootpart}" + + return 0 +} + + +pkg_postinst() { + if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] + then + [ -f "${ROOT}/boot/boot-menu.b" ] && \ + ln -snf boot-menu.b ${ROOT}/boot/boot.b + fi + + if [ "${ROOT}" = "/" ] + then + if lilocheck + then + einfo "Running LILO to complete the install ..." + # do not redirect to /dev/null because it may display some input + # prompt + /sbin/lilo + if [ "$?" -ne 0 ] + then + echo + ewarn "Running /sbin/lilo failed! Please check what the problem is" + ewarn "before your next reboot." + + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 5 + fi + fi + echo + fi + + echo + einfo "Please note that all the loader files (/boot/*.b) is now linked" + einfo "into LILO, and thus no longer installed." + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 3 + echo +} + diff --git a/sys-boot/lilo/lilo-22.5.7.2.ebuild b/sys-boot/lilo/lilo-22.5.7.2.ebuild new file mode 100644 index 000000000000..a495f0dbfd94 --- /dev/null +++ b/sys-boot/lilo/lilo-22.5.7.2.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.5.7.2.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot eutils + +S="${WORKDIR}/${P}" +DESCRIPTION="Standard Linux boot loader" +SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/${P}.tar.gz + ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/obsolete/${P}.tar.gz" +# mirror://gentoo/${P}-gentoo.diff.bz2" +HOMEPAGE="http://brun.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD GPL-2" +KEYWORDS="-* ~x86" + +DEPEND="dev-lang/nasm + >=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + + +src_unpack() { + unpack ${P}.tar.gz + + # This bootlogo patch is borrowed from SuSE Linux. + # You should see Raphaël Quinet's (quinet@gamers.org) website, + # http://www.gamers.org/~quinet/lilo/index.html + # + # Update for 22.5 by Quequero (bug #19397): + # + # I've adapted and edited this patch from and older version + # For problems email me. + # Quequero <quequerp@bitchx.it> + # +# cd ${S}; epatch ${FILESDIR}/${P}-animated-menu.patch + + # Fixup things for glibc-2.3.3 (and later CVS versions of 2.3.2) + cd ${S}; epatch ${FILESDIR}/${PN}-22.5.6-glibc233.patch +} + +src_compile() { + + CC="${CC:=gcc}" + + # http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml + if has_version 'sys-devel/hardened-gcc' && [ "${CC}"="gcc" ] + then + find ${W} -type f -name "Makefile" -exec sed -i "s:CC=cc:CC=${CC} ${CFLAGS} -yet_exec:" {} \; + fi + + emake lilo || die +} + +src_install() { + keepdir /boot + make ROOT=${D} install || die + into /usr + dosbin keytab-lilo.pl + + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example + + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT README* + docinto samples ; dodoc sample/* +} + +pkg_preinst() { + mount-boot_mount_boot_partition +} + +# Check whether LILO is installed +# This function is from /usr/sbin/mkboot from debianutils, with copyright: +# +# Debian GNU/Linux +# Copyright 1996-1997 Guy Maor <maor@debian.org> +# +# Modified for Gentoo for use with the lilo ebuild by: +# Martin Schlemmer <azarah@gentoo.org> (16 Mar 2003) +# +lilocheck () { + local bootpart= + local rootpart="$(rdev 2> /dev/null | cut -d ' ' -f 1 2> /dev/null)" + + echo + einfon "Checking for LILO ..." + + if [ "$(whoami)" != "root" ] + then + echo; echo + eerror "Only root can check for LILO!" + return 1 + fi + + if [ -z "${rootpart}" ] + then + echo; echo + eerror "Could not determine root partition!" + return 1 + fi + + if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ] + then + echo " No" + return 1 + fi + + bootpart="$(perl -ne 'print $1 if /^\s*boot\s*=\s*(\S*)/' /etc/lilo.conf)" + + if [ -z "${bootpart}" ] + then + # lilo defaults to current root when 'boot=' is not present + bootpart="${rootpart}" + fi + + if ! dd if=${bootpart} ibs=16 count=1 2>&- | grep -q 'LILO' + then + echo; echo + ewarn "Yes, but I couldn't find a LILO signature on ${bootpart}" + ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand." + return 1 + fi + + echo " Yes, on ${bootpart}" + + return 0 +} + + +pkg_postinst() { + if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] + then + [ -f "${ROOT}/boot/boot-menu.b" ] && \ + ln -snf boot-menu.b ${ROOT}/boot/boot.b + fi + + if [ "${ROOT}" = "/" ] + then + if lilocheck + then + einfo "Running LILO to complete the install ..." + # do not redirect to /dev/null because it may display some input + # prompt + /sbin/lilo + if [ "$?" -ne 0 ] + then + echo + ewarn "Running /sbin/lilo failed! Please check what the problem is" + ewarn "before your next reboot." + + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 5 + fi + fi + echo + fi + + echo + einfo "Please note that all the loader files (/boot/*.b) is now linked" + einfo "into LILO, and thus no longer installed." + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 3 + echo +} + diff --git a/sys-boot/lilo/lilo-22.5.8-r1.ebuild b/sys-boot/lilo/lilo-22.5.8-r1.ebuild new file mode 100644 index 000000000000..c22fddc2bb9d --- /dev/null +++ b/sys-boot/lilo/lilo-22.5.8-r1.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.5.8-r1.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot eutils + +S="${WORKDIR}/${P}" +DESCRIPTION="Standard Linux boot loader" +SRC_URI="http://home.san.rr.com/johninsd/pub/linux/lilo/${P}.tar.gz + ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/${P}.tar.gz + ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/obsolete/${P}.tar.gz" +# mirror://gentoo/${P}-gentoo.diff.bz2" +HOMEPAGE="http://lilo.go.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD GPL-2" +KEYWORDS="-* ~x86" + +DEPEND="dev-lang/nasm + >=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + + +src_unpack() { + unpack ${P}.tar.gz + + # Do not try and build the dos crap. + sed -i -e 's|^all:.*$|all: lilo|' ${S}/Makefile + + # This bootlogo patch is borrowed from SuSE Linux. + # You should see Raphaël Quinet's (quinet@gamers.org) website, + # http://www.gamers.org/~quinet/lilo/index.html + # + # Update for 22.5 by Quequero (bug #19397): + # + # I've adapted and edited this patch from and older version + # For problems email me. + # Quequero <quequerp@bitchx.it> + # +# cd ${S}; epatch ${FILESDIR}/${P}-animated-menu.patch + + # Fixup things for glibc-2.3.3 (and later CVS versions of 2.3.2) + cd ${S}; epatch ${FILESDIR}/${PN}-22.5.6-glibc233.patch +} + +src_compile() { + # add the hardened-gcc compiler flag for building its assembler parts ;-) + if has_version 'sys-devel/hardened-gcc' + then + export CC="${CC:=gcc} -yet_exec" + find ${W} -type f -name "Makefile" -exec sed -i "s:CC=cc:CC=${CC}:" {} \; + fi + + # Do not use custom CFLAGS for stability reasons + emake CC="${CC:=gcc}" lilo || die +} + +src_install() { + keepdir /boot + make ROOT=${D} install || die + into /usr + dosbin keytab-lilo.pl + + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example + + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT README* + docinto samples ; dodoc sample/* +} + +pkg_preinst() { + mount-boot_mount_boot_partition +} + +# Check whether LILO is installed +# This function is from /usr/sbin/mkboot from debianutils, with copyright: +# +# Debian GNU/Linux +# Copyright 1996-1997 Guy Maor <maor@debian.org> +# +# Modified for Gentoo for use with the lilo ebuild by: +# Martin Schlemmer <azarah@gentoo.org> (16 Mar 2003) +# +lilocheck () { + local bootpart= + local rootpart="$(rdev 2> /dev/null | cut -d ' ' -f 1 2> /dev/null)" + + echo + einfon "Checking for LILO ..." + + if [ "$(whoami)" != "root" ] + then + echo; echo + eerror "Only root can check for LILO!" + return 1 + fi + + if [ -z "${rootpart}" ] + then + echo; echo + eerror "Could not determine root partition!" + return 1 + fi + + if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ] + then + echo " No" + return 1 + fi + + bootpart="$(perl -ne 'print $1 if /^\s*boot\s*=\s*(\S*)/' /etc/lilo.conf)" + + if [ -z "${bootpart}" ] + then + # lilo defaults to current root when 'boot=' is not present + bootpart="${rootpart}" + fi + + if ! dd if=${bootpart} ibs=16 count=1 2>&- | grep -q 'LILO' + then + echo; echo + ewarn "Yes, but I couldn't find a LILO signature on ${bootpart}" + ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand." + return 1 + fi + + echo " Yes, on ${bootpart}" + + return 0 +} + + +pkg_postinst() { + if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] + then + [ -f "${ROOT}/boot/boot-menu.b" ] && \ + ln -snf boot-menu.b ${ROOT}/boot/boot.b + fi + + if [ "${ROOT}" = "/" ] + then + if lilocheck + then + einfo "Running LILO to complete the install ..." + # do not redirect to /dev/null because it may display some input + # prompt + /sbin/lilo + if [ "$?" -ne 0 ] + then + echo + ewarn "Running /sbin/lilo failed! Please check what the problem is" + ewarn "before your next reboot." + + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 5 + fi + fi + echo + fi + + echo + einfo "Please note that all the loader files (/boot/*.b) is now linked" + einfo "into LILO, and thus no longer installed." + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 3 + echo +} + diff --git a/sys-boot/lilo/lilo-22.5.8.ebuild b/sys-boot/lilo/lilo-22.5.8.ebuild new file mode 100644 index 000000000000..2ff8d12fdf1c --- /dev/null +++ b/sys-boot/lilo/lilo-22.5.8.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-22.5.8.ebuild,v 1.1 2003/12/09 08:12:34 seemant Exp $ + +inherit mount-boot eutils + +S="${WORKDIR}/${P}" +DESCRIPTION="Standard Linux boot loader" +SRC_URI="http://home.san.rr.com/johninsd/pub/linux/lilo/${P}.tar.gz + ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/${P}.tar.gz + ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/obsolete/${P}.tar.gz" +# mirror://gentoo/${P}-gentoo.diff.bz2" +HOMEPAGE="http://lilo.go.dyndns.org/pub/linux/lilo/" + +SLOT="0" +LICENSE="BSD GPL-2" +KEYWORDS="-* ~x86" + +DEPEND="dev-lang/nasm + >=sys-devel/bin86-0.15.5" + +PROVIDE="virtual/bootloader" + + +src_unpack() { + unpack ${P}.tar.gz + + # This bootlogo patch is borrowed from SuSE Linux. + # You should see Raphaël Quinet's (quinet@gamers.org) website, + # http://www.gamers.org/~quinet/lilo/index.html + # + # Update for 22.5 by Quequero (bug #19397): + # + # I've adapted and edited this patch from and older version + # For problems email me. + # Quequero <quequerp@bitchx.it> + # +# cd ${S}; epatch ${FILESDIR}/${P}-animated-menu.patch + + # Fixup things for glibc-2.3.3 (and later CVS versions of 2.3.2) + cd ${S}; epatch ${FILESDIR}/${PN}-22.5.6-glibc233.patch +} + +src_compile() { + + CC="${CC:=gcc}" + + # http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml + if has_version 'sys-devel/hardened-gcc' && [ "${CC}"="gcc" ] + then + find ${W} -type f -name "Makefile" -exec sed -i "s:CC=cc:CC=${CC} ${CFLAGS} -yet_exec:" {} \; + fi + + emake lilo || die +} + +src_install() { + keepdir /boot + make ROOT=${D} install || die + into /usr + dosbin keytab-lilo.pl + + insinto /etc + newins ${FILESDIR}/lilo.conf lilo.conf.example + + doman manPages/*.[5-8] + dodoc CHANGES COPYING INCOMPAT README* + docinto samples ; dodoc sample/* +} + +pkg_preinst() { + mount-boot_mount_boot_partition +} + +# Check whether LILO is installed +# This function is from /usr/sbin/mkboot from debianutils, with copyright: +# +# Debian GNU/Linux +# Copyright 1996-1997 Guy Maor <maor@debian.org> +# +# Modified for Gentoo for use with the lilo ebuild by: +# Martin Schlemmer <azarah@gentoo.org> (16 Mar 2003) +# +lilocheck () { + local bootpart= + local rootpart="$(rdev 2> /dev/null | cut -d ' ' -f 1 2> /dev/null)" + + echo + einfon "Checking for LILO ..." + + if [ "$(whoami)" != "root" ] + then + echo; echo + eerror "Only root can check for LILO!" + return 1 + fi + + if [ -z "${rootpart}" ] + then + echo; echo + eerror "Could not determine root partition!" + return 1 + fi + + if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ] + then + echo " No" + return 1 + fi + + bootpart="$(perl -ne 'print $1 if /^\s*boot\s*=\s*(\S*)/' /etc/lilo.conf)" + + if [ -z "${bootpart}" ] + then + # lilo defaults to current root when 'boot=' is not present + bootpart="${rootpart}" + fi + + if ! dd if=${bootpart} ibs=16 count=1 2>&- | grep -q 'LILO' + then + echo; echo + ewarn "Yes, but I couldn't find a LILO signature on ${bootpart}" + ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand." + return 1 + fi + + echo " Yes, on ${bootpart}" + + return 0 +} + + +pkg_postinst() { + if [ ! -e ${ROOT}/boot/boot.b -a ! -L ${ROOT}/boot/boot.b ] + then + [ -f "${ROOT}/boot/boot-menu.b" ] && \ + ln -snf boot-menu.b ${ROOT}/boot/boot.b + fi + + if [ "${ROOT}" = "/" ] + then + if lilocheck + then + einfo "Running LILO to complete the install ..." + # do not redirect to /dev/null because it may display some input + # prompt + /sbin/lilo + if [ "$?" -ne 0 ] + then + echo + ewarn "Running /sbin/lilo failed! Please check what the problem is" + ewarn "before your next reboot." + + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 5 + fi + fi + echo + fi + + echo + einfo "Please note that all the loader files (/boot/*.b) is now linked" + einfo "into LILO, and thus no longer installed." + echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 ; echo -ne "\a" ; sleep 1 + sleep 3 + echo +} + diff --git a/sys-boot/lilo/metadata.xml b/sys-boot/lilo/metadata.xml new file mode 100644 index 000000000000..ef0805e71ae1 --- /dev/null +++ b/sys-boot/lilo/metadata.xml @@ -0,0 +1,6 @@ + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata> |