Hello community,
here is the log from the commit of package lilo
checked in at Thu Sep 25 23:35:53 CEST 2008.
--------
--- arch/i386/lilo/lilo.changes 2008-09-19 16:16:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/lilo/lilo.changes 2008-09-25 13:48:49.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Sep 25 13:37:46 CEST 2008 - olh@suse.de
+
+- bootheader: update RPA note in addnote to tell firmware to
+ relocate itself to make room for the downloaded ELF binary
+ there must be enough room for the TFTP download (bnc#427960)
+
+-------------------------------------------------------------------
+Thu Sep 25 13:30:26 CEST 2008 - olh@suse.de
+
+- bootheader: leave initrd where it is if the kernel has enough room
+ at address 0x0 (bnc#427960)
+
+-------------------------------------------------------------------
Old:
----
yaboot-22.8-r1119.tar.bz2
New:
----
yaboot-22.8-r1127.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lilo.spec ++++++
--- /var/tmp/diff_new_pack.s12756/_old 2008-09-25 23:35:46.000000000 +0200
+++ /var/tmp/diff_new_pack.s12756/_new 2008-09-25 23:35:46.000000000 +0200
@@ -21,7 +21,7 @@
Name: lilo
ExclusiveArch: ppc ppc64 %ix86 x86_64
-%define yaboot_vers 22.8-r1119
+%define yaboot_vers 22.8-r1127
Group: System/Boot
License: BSD 3-Clause
Summary: The Linux Loader, a Boot Menu
@@ -50,7 +50,7 @@
BuildRequires: gcc-32bit glibc-devel-32bit libgcc42-32bit libmudflap42-32bit
%endif
Version: 22.8
-Release: 23
+Release: 24
Source0: lilo-ppc-%{version}.tar.bz2
Source1: http://penguinppc.org/projects/yaboot/yaboot-%{yaboot_vers}.tar.bz2
Source86: lilo-%{version}.src.tar.bz2
@@ -212,6 +212,13 @@
%endif
%doc %{_mandir}/*/*
%changelog
+* Thu Sep 25 2008 olh@suse.de
+- bootheader: update RPA note in addnote to tell firmware to
+ relocate itself to make room for the downloaded ELF binary
+ there must be enough room for the TFTP download (bnc#427960)
+* Thu Sep 25 2008 olh@suse.de
+- bootheader: leave initrd where it is if the kernel has enough room
+ at address 0x0 (bnc#427960)
* Fri Sep 19 2008 olh@suse.de
- rewrite /chosen/bootpath parser to support IPv6 TFTP (bnc#417538)
* Fri Sep 05 2008 olh@suse.de
++++++ lilo-ppc-22.8.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lilo-ppc-22.8/bootheader/chrp/main.c new/lilo-ppc-22.8/bootheader/chrp/main.c
--- old/lilo-ppc-22.8/bootheader/chrp/main.c 2008-08-29 13:29:47.000000000 +0200
+++ new/lilo-ppc-22.8/bootheader/chrp/main.c 2008-09-25 13:32:38.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: main.c 1097 2008-08-29 11:29:47Z olh $ */
+/* $Id: main.c 1122 2008-09-25 11:32:38Z olh $ */
/*
* Copyright (C) Paul Mackerras 1997.
*
@@ -41,7 +41,6 @@
extern char _initrd_md5_start[];
extern char _initrd_md5_end[];
-
struct addr_range {
unsigned long addr;
unsigned long size;
@@ -59,7 +58,7 @@
void mdelay(int ms)
{
ms = of1275_milliseconds() + ms;
- while(of1275_milliseconds() < ms);
+ while (of1275_milliseconds() < ms) ;
}
int read(void *buf, int buflen)
@@ -83,13 +82,10 @@
elf32->e_ident[EI_MAG2] != ELFMAG2 ||
elf32->e_ident[EI_MAG3] != ELFMAG3 ||
elf32->e_ident[EI_CLASS] != ELFCLASS32 ||
- elf32->e_ident[EI_DATA] != ELFDATA2MSB ||
- !(elf32->e_type == ET_EXEC || elf32->e_type == ET_DYN) ||
- elf32->e_machine != EM_PPC)
+ elf32->e_ident[EI_DATA] != ELFDATA2MSB || !(elf32->e_type == ET_EXEC || elf32->e_type == ET_DYN) || elf32->e_machine != EM_PPC)
return 0;
- elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 +
- (unsigned long)elf32->e_phoff);
+ elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + (unsigned long)elf32->e_phoff);
for (i = 0; i < (unsigned int)elf32->e_phnum; i++, elf32ph++)
if (elf32ph->p_type == PT_LOAD && elf32ph->p_offset != 0)
@@ -131,13 +127,10 @@
elf64->e_ident[EI_MAG2] != ELFMAG2 ||
elf64->e_ident[EI_MAG3] != ELFMAG3 ||
elf64->e_ident[EI_CLASS] != ELFCLASS64 ||
- elf64->e_ident[EI_DATA] != ELFDATA2MSB ||
- !(elf64->e_type == ET_EXEC || elf64->e_type == ET_DYN) ||
- elf64->e_machine != EM_PPC64)
+ elf64->e_ident[EI_DATA] != ELFDATA2MSB || !(elf64->e_type == ET_EXEC || elf64->e_type == ET_DYN) || elf64->e_machine != EM_PPC64)
return 0;
- elf64ph = (Elf64_Phdr *) ((unsigned long)elf64 +
- (unsigned long)elf64->e_phoff);
+ elf64ph = (Elf64_Phdr *) ((unsigned long)elf64 + (unsigned long)elf64->e_phoff);
for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++)
if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0)
@@ -156,14 +149,13 @@
printf("p_filesz %016llx\n", elf64ph->p_filesz);
printf("p_memsz %016llx\n", elf64ph->p_memsz);
printf("p_align %016llx\n", elf64ph->p_align);
- printf("... skipping %08lx bytes of ELF header\n",
- (unsigned long)elf64ph->p_offset);
+ printf("... skipping %08lx bytes of ELF header\n", (unsigned long)elf64ph->p_offset);
#endif
return 64;
}
-static unsigned long claim_base = PROG_START ;
+static unsigned long claim_base = PROG_START;
static unsigned long try_claim(unsigned long size)
{
@@ -195,18 +187,14 @@
of1275_prominit(promptr);
- printf("\nSuSE Linux zImage starting: loaded at %p-%p (%lx/%lx/%p; sp: %p)\n",
- _coff_start, _end, a1, a2, promptr, sp);
+ printf("\nSuSE Linux zImage starting: loaded at %p-%p (%lx/%lx/%p; sp: %p)\n", _coff_start, _end, a1, a2, promptr, sp);
/* if the zImage is too big, firmware may only load parts of it */
if (_vmlinuz_md5_start != _vmlinuz_md5_end) {
actual_md5 = md5sum_string(_vmlinuz_start, _vmlinuz_end - _vmlinuz_start);
if (strcmp(_vmlinuz_md5_start, actual_md5)) {
printf("\nvmlinuz CORRUPTION. memory range %p %p\n"
- "Expected md5 %s\n"
- "Got md5 %s\n",
- _vmlinuz_start, _vmlinuz_end,
- _vmlinuz_md5_start, actual_md5);
+ "Expected md5 %s\n" "Got md5 %s\n", _vmlinuz_start, _vmlinuz_end, _vmlinuz_md5_start, actual_md5);
abort("\nvmlinuz corrupted\n");
}
}
@@ -214,10 +202,7 @@
actual_md5 = md5sum_string(_initrd_start, _initrd_end - _initrd_start);
if (strcmp(_initrd_md5_start, actual_md5)) {
printf("\ninitrd CORRUPTION. memory range %p %p\n"
- "Expected md5 %s\n"
- "Got md5 %s\n",
- _initrd_start, _initrd_end,
- _initrd_md5_start, actual_md5);
+ "Expected md5 %s\n" "Got md5 %s\n", _initrd_start, _initrd_end, _initrd_md5_start, actual_md5);
abort("\ninitrd corrupted\n");
}
}
@@ -234,9 +219,9 @@
claim_base = 32 * 1024 * 1024;
/* the executable memrange may not be claimed by firmware */
of1275_claim((unsigned int)_coff_start, (unsigned int)(_end - _coff_start), 0);
-
+
bootcpu_phandle[0] = 0;
- find_type_devices(bootcpu_phandle, "cpu", sizeof(bootcpu_phandle)/sizeof(phandle));
+ find_type_devices(bootcpu_phandle, "cpu", sizeof(bootcpu_phandle) / sizeof(phandle));
if (!bootcpu_phandle[0])
abort("must be a dream");
@@ -250,8 +235,7 @@
/* Eventually gunzip the ELF header of the kernel */
if (*(unsigned short *)vmlinuz.addr == 0x1f8b)
- gunzip((unsigned long)elfheader, sizeof(elfheader),
- vmlinuz.addr, vmlinuz.size, "ELF header");
+ gunzip((unsigned long)elfheader, sizeof(elfheader), vmlinuz.addr, vmlinuz.size, "ELF header");
else
memcpy(elfheader, _vmlinuz_start, sizeof(elfheader));
@@ -262,8 +246,7 @@
abort("not a powerpc ELF file\n");
if (cputype && cputype != elftype) {
- printf("booting a %d-bit kernel on a %d-bit cpu.\n",
- elftype, cputype);
+ printf("booting a %d-bit kernel on a %d-bit cpu.\n", elftype, cputype);
abort("");
}
@@ -276,8 +259,7 @@
if (vmlinux.addr == 0 || vmlinux.addr == -1)
abort("Can't allocate memory for kernel image !\n");
- printf("Allocated %08lx bytes for kernel @ %08lx\n",
- vmlinux.memsize, vmlinux.addr);
+ printf("Allocated %08lx bytes for kernel @ %08lx\n", vmlinux.memsize, vmlinux.addr);
/*
* Now we try to claim memory for the initrd (and copy it there)
@@ -285,41 +267,40 @@
initrd.size = (unsigned long)(_initrd_end - _initrd_start);
initrd.memsize = initrd.size;
if (initrd.size > 0) {
- initrd.addr = try_claim(initrd.size);
- if (initrd.addr == 0 || initrd.addr == -1)
- abort
- ("Can't allocate memory for initial ramdisk !\n");
- printf("Allocated %08lx bytes for initrd @ %08lx\n",
- initrd.size, initrd.addr);
- a1 = initrd.addr;
- a2 = initrd.size;
+ /*
+ * The kernel relocates itself to address 0x0
+ * If the initrd is at a higher address, just leave it where it is
+ */
+ if (vmlinux.memsize < (unsigned long)_initrd_start) {
+ initrd.addr = (unsigned long)_initrd_start;
+ printf("Leave %08lx bytes for initrd @ %08lx\n", initrd.size, initrd.addr);
+ } else {
+ initrd.addr = try_claim(initrd.size);
+ if (initrd.addr == 0 || initrd.addr == -1)
+ abort("Can't allocate memory for initial ramdisk !\n");
+ printf("Allocated %08lx bytes for initrd @ %08lx\n", initrd.size, initrd.addr);
#ifdef DEBUG
- printf
- ("initial ramdisk moving %08lx <- %08lx (%08lx bytes)\n",
- initrd.addr, (unsigned long)_initrd_start, initrd.size);
- printf("initrd head: %08lx\n",
- *((unsigned long *)_initrd_start));
+ printf("initial ramdisk moving %08lx <- %08lx (%08lx bytes)\n", initrd.addr, (unsigned long)_initrd_start, initrd.size);
+ printf("initrd head: %08lx\n", *((unsigned long *)_initrd_start));
#endif
- memmove((void *)initrd.addr, (void *)_initrd_start,
- initrd.size);
+ memmove((void *)initrd.addr, (void *)_initrd_start, initrd.size);
+ }
+ a1 = initrd.addr;
+ a2 = initrd.size;
}
/* Eventually gunzip the kernel */
if (*(unsigned short *)vmlinuz.addr == 0x1f8b)
- gunzip(vmlinux.addr, vmlinux.memsize, vmlinuz.addr,
- vmlinuz.size, "kernel");
+ gunzip(vmlinux.addr, vmlinux.memsize, vmlinuz.addr, vmlinuz.size, "kernel");
else
- memmove((void *)vmlinux.addr, (void *)vmlinuz.addr,
- vmlinuz.size);
+ memmove((void *)vmlinux.addr, (void *)vmlinuz.addr, vmlinuz.size);
if (_builtin_cmd_line.prefer && _builtin_cmd_line.prefer != '0') {
int l = get_cmdline(_builtin_cmd_line.string, strlen(_builtin_cmd_line.string), sizeof(_builtin_cmd_line.string));
#ifdef DEBUG
- printf("copy built-in cmdline(%d):\n%s\n", l,
- _builtin_cmd_line.string);
+ printf("copy built-in cmdline(%d):\n%s\n", l, _builtin_cmd_line.string);
#endif
- l = of1275_setprop(chosen_handle, "bootargs",
- _builtin_cmd_line.string, l + 1);
+ l = of1275_setprop(chosen_handle, "bootargs", _builtin_cmd_line.string, l + 1);
#ifdef DEBUG
printf("setprop bootargs: %d\n", l);
#endif
@@ -328,8 +309,7 @@
flush_cache((void *)vmlinux.addr, vmlinux.memsize);
kernel_entry = (kernel_entry_t) (vmlinux.addr + vmlinux.offset);
- printf( "entering kernel at %p(%lx/%lx/%p)\n",
- kernel_entry, a1, a2, promptr);
+ printf("entering kernel at %p(%lx/%lx/%p)\n", kernel_entry, a1, a2, promptr);
kernel_entry(a1, a2, promptr, NULL);
abort("Error: Linux kernel returned to zImage bootloader!\n");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lilo-ppc-22.8/bootheader/utils/addnote.c new/lilo-ppc-22.8/bootheader/utils/addnote.c
--- old/lilo-ppc-22.8/bootheader/utils/addnote.c 2008-07-04 10:27:54.000000000 +0200
+++ new/lilo-ppc-22.8/bootheader/utils/addnote.c 2008-09-25 13:48:49.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: addnote.c 1083 2008-07-04 08:27:54Z olh $ */
+/* $Id: addnote.c 1123 2008-09-25 11:48:49Z olh $ */
/*
* addnote.c - Program to hack in a PT_NOTE program header entry in an ELF file.
* This is needed for OF on RS/6000s to load an image correctly.
@@ -35,12 +35,12 @@
#define N_DESCR 6
unsigned int descr[N_DESCR] = {
- 0xffffffff, /* real-mode = true */
- 0x02000000, /* real-base, i.e. where we expect OF to be */
- 0xffffffff, /* real-size */
- 0xffffffff, /* virt-base */
- 0xffffffff, /* virt-size */
- 0x4000, /* load-base */
+ 0xffffffff, /* real-mode = true */
+ 0x02000000, /* real-base, i.e. where we expect OF to be */
+ 0xffffffff, /* real-size */
+ 0xffffffff, /* virt-base */
+ 0xffffffff, /* virt-size */
+ 0x4000, /* load-base */
};
/* RPA note section */
@@ -52,16 +52,18 @@
* it looks at the splpar field at least. So these values need to be
* reasonable.
*/
-#define N_RPA_DESCR 8
+#define N_RPA_DESCR 10
unsigned int rpanote[N_RPA_DESCR] = {
- 0, /* lparaffinity */
- 64, /* min_rmo_size */
- 0, /* min_rmo_percent */
- 40, /* max_pft_size */
- 1, /* splpar */
- -1, /* min_load */
- 0, /* new_mem_def */
- 1, /* ignore_my_client_config */
+ 1, /* lparaffinity */
+ 128, /* min_rmo_size */
+ 0, /* min_rmo_percent */
+ 46, /* max_pft_size */
+ 1, /* splpar */
+ -1, /* min_load */
+ 1, /* new_mem_def */
+ 0, /* ignore_my_client_config */
+ 1, /* large_page_ready */
+ 0, /* force_alpha_mode */
};
#define ROUNDUP(len) (((len) + 3) & ~3)
@@ -98,120 +100,115 @@
unsigned char elf_magic[4] = { 0x7f, 'E', 'L', 'F' };
-int
-main(int ac, char **av)
+int main(int ac, char **av)
{
- int fd, n, i;
- int ph, ps, np;
- int nnote, nnote2, ns;
-
- if (ac != 2) {
- fprintf(stderr, "Usage: %s elf-file\n", av[0]);
- exit(1);
- }
- fd = open(av[1], O_RDWR);
- if (fd < 0) {
- perror(av[1]);
- exit(1);
- }
-
- nnote = 12 + ROUNDUP(strlen(arch) + 1) + sizeof(descr);
- nnote2 = 12 + ROUNDUP(strlen(rpaname) + 1) + sizeof(rpanote);
-
- n = read(fd, buf, sizeof(buf));
- if (n < 0) {
- perror("read");
- exit(1);
- }
-
- if (n < E_HSIZE || memcmp(&buf[E_IDENT+EI_MAGIC], elf_magic, 4) != 0)
- goto notelf;
-
- if (buf[E_IDENT+EI_CLASS] != ELFCLASS32
- || buf[E_IDENT+EI_DATA] != ELFDATA2MSB) {
- fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n",
- av[1]);
- exit(1);
- }
-
- ph = GET_32BE(E_PHOFF);
- ps = GET_16BE(E_PHENTSIZE);
- np = GET_16BE(E_PHNUM);
- if (ph < E_HSIZE || ps < PH_HSIZE || np < 1)
- goto notelf;
- if (ph + (np + 2) * ps + nnote + nnote2 > n)
- goto nospace;
-
- for (i = 0; i < np; ++i) {
- if (GET_32BE(ph + PH_TYPE) == PT_NOTE) {
- fprintf(stderr, "%s already has a note entry\n",
- av[1]);
- exit(0);
- }
- ph += ps;
- }
-
- /* XXX check that the area we want to use is all zeroes */
- for (i = 0; i < 2 * ps + nnote + nnote2; ++i)
- if (buf[ph + i] != 0)
- goto nospace;
-
- /* fill in the program header entry */
- ns = ph + 2 * ps;
- PUT_32BE(ph + PH_TYPE, PT_NOTE);
- PUT_32BE(ph + PH_OFFSET, ns);
- PUT_32BE(ph + PH_FILESZ, nnote);
-
- /* fill in the note area we point to */
- /* XXX we should probably make this a proper section */
- PUT_32BE(ns, strlen(arch) + 1);
- PUT_32BE(ns + 4, N_DESCR * 4);
- PUT_32BE(ns + 8, 0x1275);
- strcpy(&buf[ns + 12], arch);
- ns += 12 + strlen(arch) + 1;
- for (i = 0; i < N_DESCR; ++i, ns += 4)
- PUT_32BE(ns, descr[i]);
-
- /* fill in the second program header entry and the RPA note area */
- ph += ps;
- PUT_32BE(ph + PH_TYPE, PT_NOTE);
- PUT_32BE(ph + PH_OFFSET, ns);
- PUT_32BE(ph + PH_FILESZ, nnote2);
-
- /* fill in the note area we point to */
- PUT_32BE(ns, strlen(rpaname) + 1);
- PUT_32BE(ns + 4, sizeof(rpanote));
- PUT_32BE(ns + 8, 0x12759999);
- strcpy(&buf[ns + 12], rpaname);
- ns += 12 + ROUNDUP(strlen(rpaname) + 1);
- for (i = 0; i < N_RPA_DESCR; ++i, ns += 4)
- PUT_32BE(ns, rpanote[i]);
-
- /* Update the number of program headers */
- PUT_16BE(E_PHNUM, np + 2);
-
- /* write back */
- lseek(fd, (long) 0, SEEK_SET);
- i = write(fd, buf, n);
- if (i < 0) {
- perror("write");
- exit(1);
- }
- if (i < n) {
- fprintf(stderr, "%s: write truncated\n", av[1]);
- exit(1);
- }
-
- exit(0);
-
-notelf:
- fprintf(stderr, "%s does not appear to be an ELF file\n", av[1]);
- exit(1);
-
-nospace:
- fprintf(stderr, "sorry, I can't find space in %s to put the note\n",
- av[1]);
- exit(1);
+ int fd, n, i;
+ int ph, ps, np;
+ int nnote, nnote2, ns;
+
+ if (ac != 2) {
+ fprintf(stderr, "Usage: %s elf-file\n", av[0]);
+ exit(1);
+ }
+ fd = open(av[1], O_RDWR);
+ if (fd < 0) {
+ perror(av[1]);
+ exit(1);
+ }
+
+ nnote = 12 + ROUNDUP(strlen(arch) + 1) + sizeof(descr);
+ nnote2 = 12 + ROUNDUP(strlen(rpaname) + 1) + sizeof(rpanote);
+
+ n = read(fd, buf, sizeof(buf));
+ if (n < 0) {
+ perror("read");
+ exit(1);
+ }
+
+ if (n < E_HSIZE || memcmp(&buf[E_IDENT + EI_MAGIC], elf_magic, 4) != 0)
+ goto notelf;
+
+ if (buf[E_IDENT + EI_CLASS] != ELFCLASS32 || buf[E_IDENT + EI_DATA] != ELFDATA2MSB) {
+ fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n", av[1]);
+ exit(1);
+ }
+
+ ph = GET_32BE(E_PHOFF);
+ ps = GET_16BE(E_PHENTSIZE);
+ np = GET_16BE(E_PHNUM);
+ if (ph < E_HSIZE || ps < PH_HSIZE || np < 1)
+ goto notelf;
+ if (ph + (np + 2) * ps + nnote + nnote2 > n)
+ goto nospace;
+
+ for (i = 0; i < np; ++i) {
+ if (GET_32BE(ph + PH_TYPE) == PT_NOTE) {
+ fprintf(stderr, "%s already has a note entry\n", av[1]);
+ exit(0);
+ }
+ ph += ps;
+ }
+
+ /* XXX check that the area we want to use is all zeroes */
+ for (i = 0; i < 2 * ps + nnote + nnote2; ++i)
+ if (buf[ph + i] != 0)
+ goto nospace;
+
+ /* fill in the program header entry */
+ ns = ph + 2 * ps;
+ PUT_32BE(ph + PH_TYPE, PT_NOTE);
+ PUT_32BE(ph + PH_OFFSET, ns);
+ PUT_32BE(ph + PH_FILESZ, nnote);
+
+ /* fill in the note area we point to */
+ /* XXX we should probably make this a proper section */
+ PUT_32BE(ns, strlen(arch) + 1);
+ PUT_32BE(ns + 4, N_DESCR * 4);
+ PUT_32BE(ns + 8, 0x1275);
+ strcpy(&buf[ns + 12], arch);
+ ns += 12 + strlen(arch) + 1;
+ for (i = 0; i < N_DESCR; ++i, ns += 4)
+ PUT_32BE(ns, descr[i]);
+
+ /* fill in the second program header entry and the RPA note area */
+ ph += ps;
+ PUT_32BE(ph + PH_TYPE, PT_NOTE);
+ PUT_32BE(ph + PH_OFFSET, ns);
+ PUT_32BE(ph + PH_FILESZ, nnote2);
+
+ /* fill in the note area we point to */
+ PUT_32BE(ns, strlen(rpaname) + 1);
+ PUT_32BE(ns + 4, sizeof(rpanote));
+ PUT_32BE(ns + 8, 0x12759999);
+ strcpy(&buf[ns + 12], rpaname);
+ ns += 12 + ROUNDUP(strlen(rpaname) + 1);
+ for (i = 0; i < N_RPA_DESCR; ++i, ns += 4)
+ PUT_32BE(ns, rpanote[i]);
+
+ /* Update the number of program headers */
+ PUT_16BE(E_PHNUM, np + 2);
+
+ /* write back */
+ lseek(fd, (long)0, SEEK_SET);
+ i = write(fd, buf, n);
+ if (i < 0) {
+ perror("write");
+ exit(1);
+ }
+ if (i < n) {
+ fprintf(stderr, "%s: write truncated\n", av[1]);
+ exit(1);
+ }
+
+ exit(0);
+
+ notelf:
+ fprintf(stderr, "%s does not appear to be an ELF file\n", av[1]);
+ exit(1);
+
+ nospace:
+ fprintf(stderr, "sorry, I can't find space in %s to put the note\n", av[1]);
+ exit(1);
}
/*
++++++ yaboot-22.8-r1119.tar.bz2 -> yaboot-22.8-r1127.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-22.8-r1119/Changelog.SuSE new/yaboot-22.8-r1127/Changelog.SuSE
--- old/yaboot-22.8-r1119/Changelog.SuSE 2008-09-19 16:40:56.000000000 +0200
+++ new/yaboot-22.8-r1127/Changelog.SuSE 2008-09-25 15:32:32.000000000 +0200
@@ -1,4 +1,20 @@
------------------------------------------------------------------------
+r1127 | olh | 2008-09-25 13:32:32 +0000 (Thu, 25 Sep 2008) | 1 line
+Changed paths:
+ M /trunk/yaboot/Makefile
+
+add missing r to VERSION
+------------------------------------------------------------------------
+r1124 | olh | 2008-09-25 12:49:43 +0000 (Thu, 25 Sep 2008) | 3 lines
+Changed paths:
+ M /trunk/yaboot/Makefile
+ M /trunk/yaboot/second/yaboot.c
+ M /trunk/yaboot/yaboot.deps
+
+a global Makefile variable VERSION= will invoke svn for each make target
+build a version.h file and let yaboot.c depend on it
+
+------------------------------------------------------------------------
r1119 | olh | 2008-09-19 14:33:32 +0000 (Fri, 19 Sep 2008) | 1 line
Changed paths:
M /trunk/yaboot/second/parse_device_path.c
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-22.8-r1119/doc/yaboot-howto.html/index.html new/yaboot-22.8-r1127/doc/yaboot-howto.html/index.html
--- old/yaboot-22.8-r1119/doc/yaboot-howto.html/index.html 2008-09-25 23:35:47.000000000 +0200
+++ new/yaboot-22.8-r1127/doc/yaboot-howto.html/index.html 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to index.en.html
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-22.8-r1119/Makefile new/yaboot-22.8-r1127/Makefile
--- old/yaboot-22.8-r1119/Makefile 2008-09-19 16:40:56.000000000 +0200
+++ new/yaboot-22.8-r1127/Makefile 2008-09-25 15:32:32.000000000 +0200
@@ -6,7 +6,7 @@
include Config
-VERSION = 22.8-r1119
+VERSION = 22.8-r1127
# Debug mode (spam/verbose)
DEBUG = 0
# make install vars
@@ -26,7 +26,6 @@
YBCFLAGS = -Os $(CFLAGS) -msoft-float -fno-builtin -nostdinc -Wall -isystem `gcc -print-file-name=include`
YBCFLAGS += -g
YBCFLAGS += -mcpu=powerpc
-YBCFLAGS += -DVERSION=\"${VERSION}\" #"
YBCFLAGS += -I ./include
ifneq ($(DEBUG),0)
YBCFLAGS += -DDEBUG=$(DEBUG)
@@ -115,6 +114,24 @@
all yaboot: second/yaboot md5test
+.PHONY: FORCE
+FORCE:
+include/version.h: FORCE
+ @if test -d .svn ; then \
+ rev=`env -i svn info | sed -n "/^Last Changed Rev:[[:blank:]]\+/s@^[^:]\+:[[:blank:]]\+@@p"` ; \
+ mod=`env -i svn st | grep -q '^[MAD]' && echo M` ; \
+ else \
+ rev=${VERSION} ; mod= ; \
+ fi ; \
+ echo "#define VERSION \"r$$rev$$mod\"" > $@~ ; \
+ if test -f $@ ; then \
+ if ! diff -u $@ $@~ ; then \
+ cp -f $@~ $@ ; \
+ fi ; \
+ else \
+ cp -f $@~ $@ ; \
+ fi
+
second/empty.c:
rm -f $@
echo '' > $@
@@ -185,6 +202,7 @@
rm -rf ../yaboot-binary-${VERSION}
clean:
+ rm -f include/version.h
rm -f second/yaboot util/addnote util/elfextract $(OBJS)
rm -f second/yaboot.debug
rm -f second/yaboot.chrp
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-22.8-r1119/second/yaboot.c new/yaboot-22.8-r1127/second/yaboot.c
--- old/yaboot-22.8-r1119/second/yaboot.c 2008-09-18 16:07:24.000000000 +0200
+++ new/yaboot-22.8-r1127/second/yaboot.c 2008-09-25 14:49:43.000000000 +0200
@@ -54,6 +54,7 @@
#include