Hello community, here is the log from the commit of package lilo checked in at Thu Jan 17 23:44:53 CET 2008. -------- --- arch/ppc/lilo/lilo.changes 2008-01-07 16:07:39.000000000 +0100 +++ /mounts/work_src_done/STABLE/lilo/lilo.changes 2008-01-17 09:01:04.000000000 +0100 @@ -1,0 +2,21 @@ +Thu Jan 17 09:00:30 CET 2008 - olh@suse.de + +- add debug output to TFTP download function (350212) + +------------------------------------------------------------------- +Wed Jan 16 13:55:13 CET 2008 - olh@suse.de + +- boot the same kernel if the pSeries CSA has to reboot to + reconfigure the device-tree (353676 - LTC34053) + +------------------------------------------------------------------- +Wed Jan 16 09:38:04 CET 2008 - olh@suse.de + +- add functions to access /options/ properties to yaboot (353676) + +------------------------------------------------------------------- +Tue Jan 15 10:21:43 CET 2008 - olh@suse.de + +- add debug output to ELF read functions (350212) + +------------------------------------------------------------------- Old: ---- yaboot-10.1.22-r1028.tar.bz2 New: ---- yaboot-10.1.22-r1034.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lilo.spec ++++++ ++++ 1970 lines (skipped) ++++ between arch/ppc/lilo/lilo.spec ++++ and /mounts/work_src_done/STABLE/lilo/lilo.spec ++++++ lilo-10.1.22.tar.bz2 ++++++ ++++++ yaboot-10.1.22-r1028.tar.bz2 -> yaboot-10.1.22-r1034.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.22-r1028/Changelog.SuSE new/yaboot-10.1.22-r1034/Changelog.SuSE --- old/yaboot-10.1.22-r1028/Changelog.SuSE 2008-01-07 16:08:02.000000000 +0100 +++ new/yaboot-10.1.22-r1034/Changelog.SuSE 2008-01-17 09:01:23.000000000 +0100 @@ -1,4 +1,44 @@ ------------------------------------------------------------------------ +r1034 | olh | 2008-01-17 08:01:04 +0000 (Thu, 17 Jan 2008) | 2 lines +Changed paths: + M /trunk/lilo.changes + M /trunk/yaboot/second/fs_of.c + ++- add debug output to TFTP download function (350212) + +------------------------------------------------------------------------ +r1033 | olh | 2008-01-17 08:00:20 +0000 (Thu, 17 Jan 2008) | 1 line +Changed paths: + M /trunk/yaboot/second/yaboot.c + +typo +------------------------------------------------------------------------ +r1032 | olh | 2008-01-16 12:59:05 +0000 (Wed, 16 Jan 2008) | 3 lines +Changed paths: + M /trunk/lilo.changes + M /trunk/yaboot/second/yaboot.c + ++- boot the same kernel if the pSeries CSA has to reboot to ++ reconfigure the device-tree (353676 - LTC34053) + +------------------------------------------------------------------------ +r1031 | olh | 2008-01-16 08:39:44 +0000 (Wed, 16 Jan 2008) | 2 lines +Changed paths: + M /trunk/lilo.changes + M /trunk/yaboot/include/prom.h + M /trunk/yaboot/second/prom.c + ++- add functions to access /options/ properties to yaboot (353676) + +------------------------------------------------------------------------ +r1030 | olh | 2008-01-15 09:22:21 +0000 (Tue, 15 Jan 2008) | 2 lines +Changed paths: + M /trunk/lilo.changes + M /trunk/yaboot/second/yaboot.c + ++- add debug output to ELF read functions (350212) + +------------------------------------------------------------------------ r1028 | olh | 2007-11-13 08:48:29 +0000 (Tue, 13 Nov 2007) | 4 lines Changed paths: M /trunk/lilo.changes diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.22-r1028/include/prom.h new/yaboot-10.1.22-r1034/include/prom.h --- old/yaboot-10.1.22-r1028/include/prom.h 2006-12-04 19:53:08.000000000 +0100 +++ new/yaboot-10.1.22-r1034/include/prom.h 2008-01-16 09:39:44.000000000 +0100 @@ -108,6 +108,10 @@ int prom_get_chosen(const char *name, void *mem, int len); int prom_set_chosen(const char *name, const void *mem, int len); +int prom_getproplen_options(const char *name); +int prom_get_options(const char *name, void *mem, int len); +int prom_set_options(const char *name, const void *mem, int len); + extern int prom_getms(void); extern void prom_pause(void); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.22-r1028/Makefile new/yaboot-10.1.22-r1034/Makefile --- old/yaboot-10.1.22-r1028/Makefile 2008-01-07 16:08:02.000000000 +0100 +++ new/yaboot-10.1.22-r1034/Makefile 2008-01-17 09:01:23.000000000 +0100 @@ -6,7 +6,7 @@ include Config -VERSION = 10.1.22-r1028 +VERSION = 10.1.22-r1034 # Debug mode (spam/verbose) DEBUG = 0 # make install vars diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.22-r1028/second/fs_of.c new/yaboot-10.1.22-r1034/second/fs_of.c --- old/yaboot-10.1.22-r1028/second/fs_of.c 2007-08-13 15:17:14.000000000 +0200 +++ new/yaboot-10.1.22-r1034/second/fs_of.c 2008-01-17 09:01:04.000000000 +0100 @@ -118,9 +118,10 @@ DEBUG_F("TFTP...\n"); ret = prom_loadmethod(of_device, p); DEBUG_F("result: %d\n", ret); - if (ret > 0) + if (ret > 0) { *buffer = p; - else + prom_printf("yaboot downloaded %08x bytes via network\n", ret); + } else prom_release(p, LOAD_BUFFER_SIZE); out: DEBUG_LEAVE_F(ret); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.22-r1028/second/prom.c new/yaboot-10.1.22-r1034/second/prom.c --- old/yaboot-10.1.22-r1028/second/prom.c 2007-08-23 11:47:44.000000000 +0200 +++ new/yaboot-10.1.22-r1034/second/prom.c 2008-01-16 09:39:44.000000000 +0100 @@ -43,6 +43,7 @@ static ihandle prom_mmu; static ihandle prom_chosen; +static ihandle prom_options; struct prom_args { const char *service; @@ -209,6 +210,21 @@ return prom_setprop(prom_chosen, name, mem, len); } +int prom_getproplen_options(const char *name) +{ + return prom_getproplen(prom_options, name); +} + +int prom_get_options(const char *name, void *mem, int len) +{ + return prom_getprop(prom_options, name, mem, len); +} + +int prom_set_options(const char *name, const void *mem, int len) +{ + return prom_setprop(prom_options, name, mem, len); +} + enum device_type prom_get_devtype(const char *device) { phandle dev; @@ -287,6 +303,8 @@ if (prom_chosen == (void *)-1) prom_exit(); + prom_options = prom_finddevice("/options"); + /* this must be done before looking for stdout, for whatever reason */ len = prom_getprop(prom_finddevice("/"), "compatible", cmptbl, sizeof(cmptbl) - 1); if (len > 0 && len < sizeof(cmptbl)) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.22-r1028/second/yaboot.c new/yaboot-10.1.22-r1034/second/yaboot.c --- old/yaboot-10.1.22-r1028/second/yaboot.c 2007-11-13 09:48:29.000000000 +0100 +++ new/yaboot-10.1.22-r1034/second/yaboot.c 2008-01-17 09:00:20.000000000 +0100 @@ -363,15 +363,16 @@ static int load_elf32(struct boot_file_t *file, loadinfo_t * loadinfo) { - int i; + int i, j; Elf32_Ehdr *e = &(loadinfo->elf.elf32hdr); Elf32_Phdr *p, *ph; int size = sizeof(Elf32_Ehdr) - sizeof(Elf_Ident); unsigned long addr, loadaddr; /* Read the rest of the Elf header... */ - if ((*(file->fs->read)) (file, size, &e->e_version) < size) { - prom_printf("\nCan't read Elf32 image header\n"); + j = (*(file->fs->read)) (file, size, &e->e_version); + if (j < size) { + prom_printf("\nCan't read Elf32 image header: %08x/%08x\n", j, size); return 0; } @@ -405,8 +406,9 @@ prom_printf("seek error\n"); return 0; } - if ((*(file->fs->read)) (file, sizeof(Elf32_Phdr) * e->e_phnum, ph) != sizeof(Elf32_Phdr) * e->e_phnum) { - prom_printf("read error\n"); + j = (*(file->fs->read)) (file, sizeof(Elf32_Phdr) * e->e_phnum, ph); + if (j != sizeof(Elf32_Phdr) * e->e_phnum) { + prom_printf("read error: %08x/%08x\n", j, sizeof(Elf32_Phdr) * e->e_phnum); return 0; } @@ -464,8 +466,9 @@ return 0; } offset = p->p_vaddr - loadinfo->load_loc; - if ((*(file->fs->read)) (file, p->p_filesz, loadinfo->base + offset) != p->p_filesz) { - prom_printf("Read failed\n"); + j = (*(file->fs->read)) (file, p->p_filesz, loadinfo->base + offset); + if (j != p->p_filesz) { + prom_printf("Read failed: %08x/%08x\n", j, p->p_filesz); prom_release(loadinfo->base, loadinfo->memsize); return 0; } @@ -479,15 +482,16 @@ static int load_elf64(struct boot_file_t *file, loadinfo_t * loadinfo) { - int i; + int i, j; Elf64_Ehdr *e = &(loadinfo->elf.elf64hdr); Elf64_Phdr *p, *ph; int size = sizeof(Elf64_Ehdr) - sizeof(Elf_Ident); unsigned long addr, loadaddr; /* Read the rest of the Elf header... */ - if ((*(file->fs->read)) (file, size, &e->e_version) < size) { - prom_printf("\nCan't read Elf64 image header\n"); + j = (*(file->fs->read)) (file, size, &e->e_version); + if (j < size) { + prom_printf("\nCan't read Elf64 image header: %08x/%08x\n", j, size); return 0; } @@ -521,8 +525,9 @@ prom_printf("Seek error\n"); return 0; } - if ((*(file->fs->read)) (file, sizeof(Elf64_Phdr) * e->e_phnum, ph) != sizeof(Elf64_Phdr) * e->e_phnum) { - prom_printf("Read error\n"); + j = (*(file->fs->read)) (file, sizeof(Elf64_Phdr) * e->e_phnum, ph); + if (j != sizeof(Elf64_Phdr) * e->e_phnum) { + prom_printf("Read error: %08x/%08x\n", j, sizeof(Elf64_Phdr) * e->e_phnum); return 0; } @@ -578,8 +583,9 @@ return 0; } offset = p->p_vaddr - loadinfo->load_loc; - if ((*(file->fs->read)) (file, p->p_filesz, loadinfo->base + offset) != p->p_filesz) { - prom_printf("Read failed\n"); + j = (*(file->fs->read)) (file, p->p_filesz, loadinfo->base + offset); + if (j != p->p_filesz) { + prom_printf("Read failed: %08x/%08llx\n", j, p->p_filesz); prom_release(loadinfo->base, loadinfo->memsize); return 0; } @@ -869,6 +875,16 @@ if (useconf && (!imagename || imagename[0] == 0)) imagename = cfg_get_default(); + /* Now we have an image or label name and additional cmdline options. + Store them in nvram in case the pSeries firmware has to reboot */ + c = strlen(imagename) + 1 + strlen(params->args) + 1; + p = malloc(c); + if (p) { + sprintf(p, "%s %s", imagename, params->args[0] ? params->args : ""); + prom_set_options("boot-last-label", p, c); + free(p); + } + if (useconf) { set_default_device(cfg_get_strg(NULL, "device"), cfg_get_strg(NULL, "partition"), &img_def_device); if (cfg_get_flag(NULL, "restricted")) @@ -979,6 +995,7 @@ loadinfo_t loadinfo; void *initrd_more, *initrd_want; unsigned long initrd_read; + char fw_nbr_reboots[4]; char *msg; make_params_buffer = malloc(2048); @@ -987,6 +1004,13 @@ loadinfo.load_loc = 0; gpr = GET_PARAMS_OK; + memset(fw_nbr_reboots, 0, sizeof(fw_nbr_reboots)); + if (prom_get_options("ibm,client-architecture-support-reboot", &fw_nbr_reboots, sizeof(fw_nbr_reboots)) == -1) + prom_get_options("ibm,fw-nbr-reboots", &fw_nbr_reboots, sizeof(fw_nbr_reboots)); + result = simple_strtol(fw_nbr_reboots, &msg, 10); + if (result > 0) + prom_get_options("boot-last-label", lilo_once_cmdline, 512); + for (;;) { initrd_size = 0; initrd_base = NULL; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org