diff options
author | Khem Raj <raj.khem@gmail.com> | 2009-08-08 20:16:28 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2009-08-08 20:16:28 -0700 |
commit | 9f6ae8707682ecb1afd1cad1370204f74742aa31 (patch) | |
tree | 07e5065f7898198112b345e5dd9c9f497a43c8aa /recipes/lilo-sh | |
parent | 14d7697f931ae22daa2209d392d13e42b4d0c734 (diff) |
lilo-sh_21.bb: Replace PAGE_SIZE
PAGE_SIZE is not available to usersplace anymore
struct partion in linux/genhd.h is defined conditional
if CONFIG_BLOCK is defined.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/lilo-sh')
-rw-r--r-- | recipes/lilo-sh/files/lilo-replace-PAGE_SIZE.patch | 58 | ||||
-rw-r--r-- | recipes/lilo-sh/lilo-sh_21.bb | 6 |
2 files changed, 62 insertions, 2 deletions
diff --git a/recipes/lilo-sh/files/lilo-replace-PAGE_SIZE.patch b/recipes/lilo-sh/files/lilo-replace-PAGE_SIZE.patch new file mode 100644 index 0000000000..8d80040e08 --- /dev/null +++ b/recipes/lilo-sh/files/lilo-replace-PAGE_SIZE.patch @@ -0,0 +1,58 @@ +Index: lilo/boot.c +=================================================================== +--- lilo.orig/boot.c 2009-08-08 19:09:05.779211145 -0700 ++++ lilo/boot.c 2009-08-08 19:15:45.111207238 -0700 +@@ -21,6 +21,7 @@ + #include "map.h" + #include "partition.h" + #include "boot.h" ++#include <linux/genhd.h> + + + static GEOMETRY geo; +@@ -64,9 +65,9 @@ + if (!modern_kernel || !(hdr.flags & LFLAG_HIGH)) + check_size(spec,setup,sectors); + else { +- if (hdr.start % PAGE_SIZE) ++ if (hdr.start % getpagesize()) + die("Can't load kernel at mis-aligned address 0x%08lx\n",hdr.start); +- descr->start_page = hdr.start/PAGE_SIZE; /* load kernel high */ ++ descr->start_page = hdr.start/getpagesize(); /* load kernel high */ + } + geo_close(&geo); + if (verbose > 1) +@@ -161,7 +162,6 @@ + cfg_unset(cf_other,"map-drive"); + } + +- + #define PART(s,n) (((struct partition *) (s)[0].par_c.ptable)[(n)]) + + +Index: lilo/lilo.c +=================================================================== +--- lilo.orig/lilo.c 2009-08-08 19:09:05.779211145 -0700 ++++ lilo/lilo.c 2009-08-08 19:09:06.135205054 -0700 +@@ -154,7 +154,7 @@ + printf(" Kernel is loaded \"low\"\n"); + else printf(" Kernel is loaded \"high\", at 0x%08lx\n", + (unsigned long) descrs.d.descr[image].start_page* +- PAGE_SIZE); ++ getpagesize()); + if (!*(unsigned long *) descrs.d.descr[image].rd_size) + printf(" No initial RAM disk\n"); + else printf(" Initial RAM disk is %ld bytes\n", +Index: lilo/Makefile +=================================================================== +--- lilo.orig/Makefile 2009-08-08 19:45:05.247206997 -0700 ++++ lilo/Makefile 2009-08-08 19:45:18.759234365 -0700 +@@ -24,7 +24,7 @@ + # VARSETUP Enables use of variable-size setup segments. + # XL_SECS=n Support for extra large (non-standard) floppies. + +-CONFIG=-DIGNORECASE -DVARSETUP -DREWRITE_TABLE -DLARGE_EBDA -DONE_SHOT ++CONFIG=-DIGNORECASE -DVARSETUP -DREWRITE_TABLE -DLARGE_EBDA -DONE_SHOT -DCONFIG_BLOCK + + # End of configuration variables + diff --git a/recipes/lilo-sh/lilo-sh_21.bb b/recipes/lilo-sh/lilo-sh_21.bb index cc4fbac8a7..038573209a 100644 --- a/recipes/lilo-sh/lilo-sh_21.bb +++ b/recipes/lilo-sh/lilo-sh_21.bb @@ -12,7 +12,7 @@ the kernel. LILO can also boot other operating systems. LILO-sh is a \ port of LILO to the SH processor." SECTION = "bootloaders" LICENSE = "MIT" -PR = "r0" +PR = "r1" SRC_URI = "http://twibble.org/dist/sh4/src/lilosh/lilo-21.tar.gz \ file://lilo-0.21-include.patch;patch=1 \ @@ -23,7 +23,9 @@ SRC_URI = "http://twibble.org/dist/sh4/src/lilosh/lilo-21.tar.gz \ file://lilo-0.21-second.patch;patch=1;pnum=0 \ file://lilo-sh-linux.patch;patch=1 \ file://lilo-linkgear.patch;patch=1 \ - file://lilo-noconfig-h.patch;patch=1" + file://lilo-noconfig-h.patch;patch=1 \ + file://lilo-replace-PAGE_SIZE.patch;patch=1 \ + " S = "${WORKDIR}/lilo" |