NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: install/43112: i386 floppy installation now prompts for each floppy three times



The following reply was made to PR install/43112; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: install-manager%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost, 
netbsd-bugs%NetBSD.org@localhost,
        tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: install/43112: i386 floppy installation now prompts for each floppy
         three times
Date: Sun, 9 May 2010 17:38:05 +0900

 > >Synopsis:       i386 floppy installation now prompts for each floppy three 
 > >times
 
 > A similar problem was reported in 2008 in PR install/38943 and
 > subsequently fixed.
 
 Here is a dumb patch based on the PR install/38943:
 
 
 Index: arch/alpha/stand/ustarboot/Makefile
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/alpha/stand/ustarboot/Makefile,v
 retrieving revision 1.7
 diff -u -r1.7 Makefile
 --- arch/alpha/stand/ustarboot/Makefile        3 Feb 2009 12:49:00 -0000       
1.7
 +++ arch/alpha/stand/ustarboot/Makefile        9 May 2010 07:52:22 -0000
 @@ -12,7 +12,7 @@
                -DLIBSA_SINGLE_DEVICE=blkdev \
                  -D"blkdevioctl(x,y,z)=EINVAL" \
                -DLIBSA_SINGLE_FILESYSTEM=ustarfs \
 -              -DNO_LOAD_NOTE
 +              -DNO_LOAD_BACKWARD
  
  CLEANFILES+= ${PROG}.sym
  
 Index: arch/alpha/stand/common/boot.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/alpha/stand/common/boot.c,v
 retrieving revision 1.30
 diff -u -r1.30 boot.c
 --- arch/alpha/stand/common/boot.c     3 Feb 2009 12:49:00 -0000       1.30
 +++ arch/alpha/stand/common/boot.c     9 May 2010 07:52:22 -0000
 @@ -122,8 +122,8 @@
                gets(boot_file);
        }
  
 -#ifdef NO_LOAD_NOTE
 -      loadflag = LOAD_KERNEL & ~LOAD_NOTE;
 +#ifdef NO_LOAD_BACKWARD
 +      loadflag = LOAD_KERNEL & ~LOAD_BACKWARD;
  #else
        loadflag = LOAD_KERNEL;
  #endif
 Index: arch/i386/stand/lib/exec.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/i386/stand/lib/exec.c,v
 retrieving revision 1.42
 diff -u -r1.42 exec.c
 --- arch/i386/stand/lib/exec.c 14 Sep 2009 11:56:27 -0000      1.42
 +++ arch/i386/stand/lib/exec.c 9 May 2010 07:52:22 -0000
 @@ -228,7 +228,7 @@
  #endif
        marks[MARK_START] = loadaddr;
        if ((fd = loadfile(file, marks,
 -          LOAD_KERNEL & ~(floppy ? LOAD_NOTE : 0))) == -1)
 +          LOAD_KERNEL & ~(floppy ? LOAD_BACKWARD : 0))) == -1)
                return EIO;
  
        close(fd);
 Index: arch/macppc/stand/ofwboot/boot.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/macppc/stand/ofwboot/boot.c,v
 retrieving revision 1.24
 diff -u -r1.24 boot.c
 --- arch/macppc/stand/ofwboot/boot.c   29 Mar 2010 00:13:32 -0000      1.24
 +++ arch/macppc/stand/ofwboot/boot.c   9 May 2010 07:52:22 -0000
 @@ -288,7 +288,7 @@
  
                        loadflag = LOAD_KERNEL;
                        if (floppyboot)
 -                              loadflag &= ~LOAD_NOTE;
 +                              loadflag &= ~LOAD_BACKWARD;
  
                        marks[MARK_START] = 0;
                        if (loadfile(kernels[i], marks, loadflag) >= 0)
 Index: arch/news68k/stand/boot/boot.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/news68k/stand/boot/boot.c,v
 retrieving revision 1.17
 diff -u -r1.17 boot.c
 --- arch/news68k/stand/boot/boot.c     20 Jan 2009 13:35:28 -0000      1.17
 +++ arch/news68k/stand/boot/boot.c     9 May 2010 07:52:22 -0000
 @@ -123,10 +123,10 @@
                kernels[1] = NULL;
        }
  
 -      /* disable LOAD_NOTE on floppy to avoid backward seek across volumes */
 +      /* avoid backward seek on floppies */
        loadflag = LOAD_KERNEL;
        if (devname[0] == 'f')  /* XXX */
 -              loadflag &= ~LOAD_NOTE;
 +              loadflag &= ~LOAD_BACKWARD;
  
        for (i = 0; kernels[i]; i++) {
                sprintf(file, "%s%s", devname, kernels[i]);
 Index: arch/newsmips/stand/boot/boot.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/newsmips/stand/boot/boot.c,v
 retrieving revision 1.17
 diff -u -r1.17 boot.c
 --- arch/newsmips/stand/boot/boot.c    20 Jan 2009 13:12:26 -0000      1.17
 +++ arch/newsmips/stand/boot/boot.c    9 May 2010 07:52:22 -0000
 @@ -161,10 +161,10 @@
                kernels[1] = NULL;
        }
  
 -      /* disable LOAD_NOTE on floppy to avoid backward seek across volumes */
 +      /* avoid backward seek on floppies */
        loadflag = LOAD_KERNEL;
        if (devname[0] == 'f')  /* XXX */
 -              loadflag &= ~LOAD_NOTE;
 +              loadflag &= ~LOAD_BACKWARD;
  
        marks[MARK_START] = 0;
  
 Index: arch/x68k/stand/boot/boot.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/x68k/stand/boot/boot.c,v
 retrieving revision 1.14
 diff -u -r1.14 boot.c
 --- arch/x68k/stand/boot/boot.c        31 Jan 2009 14:22:21 -0000      1.14
 +++ arch/x68k/stand/boot/boot.c        9 May 2010 07:52:22 -0000
 @@ -111,7 +111,7 @@
  
        loadflag = LOAD_KERNEL;
        if (file[0] == 'f')
 -              loadflag &= ~LOAD_NOTE;
 +              loadflag &= ~LOAD_BACKWARD;
                
        marks[MARK_START] = 0x100000;
        if ((fd = loadfile(file, marks, loadflag)) == -1) {
 Index: lib/libsa/loadfile_elf32.c
 ===================================================================
 RCS file: /cvsroot/src/sys/lib/libsa/loadfile_elf32.c,v
 retrieving revision 1.25
 diff -u -r1.25 loadfile_elf32.c
 --- lib/libsa/loadfile_elf32.c 12 Mar 2010 21:43:11 -0000      1.25
 +++ lib/libsa/loadfile_elf32.c 9 May 2010 07:52:22 -0000
 @@ -272,7 +272,7 @@
                uint8_t         desc[ELF_NOTE_NETBSD_DESCSZ];
        } note;
        char *shstr = NULL;
 -      int boot_load_ctf=1;
 +      bool boot_load_ctf = (flags & LOAD_CTF) != 0;
  
        /* some ports dont use the offset */
        offset = offset;
 Index: lib/libsa/loadfile.h
 ===================================================================
 RCS file: /cvsroot/src/sys/lib/libsa/loadfile.h,v
 retrieving revision 1.10
 diff -u -r1.10 loadfile.h
 --- lib/libsa/loadfile.h       25 Sep 2008 20:59:38 -0000      1.10
 +++ lib/libsa/loadfile.h       9 May 2010 07:52:22 -0000
 @@ -50,7 +50,13 @@
  #define       LOAD_SYM        0x0010
  #define       LOAD_HDR        0x0020
  #define LOAD_NOTE     0x0040
 -#define LOAD_ALL      0x007f
 +#define LOAD_CTF      0x0080
 +#define LOAD_ALL      0x00ff
 +/*
 + * XXX these ones cause backward seek which is annoying on ustarfs floppies.
 + * See PR install/38943 and install/43112.
 + */
 +#define LOAD_BACKWARD (LOAD_NOTE | LOAD_CTF)
  
  #define       COUNT_TEXT      0x0100
  #define       COUNT_TEXTA     0x0200
 
 ---
 Izumi Tsutsui
 


Home | Main Index | Thread Index | Old Index