Ian Dall | 1 Dec 15:41 2002
Picon

Re: Using current gcc & binutils and NetBSD -current speeds

Simon Burge <simonb <at> wasabisystems.com> writes:

> Hi folks (and inparticular Ian(!)),
> 
> I have managed to build a kernel with current gcc and binutils.  Most
> files built with -O2, but I needed a build a couple with -O1 to avoid
> 
> 	internal compiler error: in general_operand, at recog.c:1023
> 
> type errors.

Try the following gcc fix:

diff -u -r1.6 ns32k.h
--- ns32k.h     1 Dec 2002 06:27:52 -0000       1.6
+++ ns32k.h     1 Dec 2002 13:29:53 -0000
 <at>  <at>  -1058,7 +1058,6  <at>  <at> 
   else if (GET_CODE (xfooy) == PRE_DEC)                                       \
     {                                                                  \
       if (REGNO (XEXP (xfooy, 0)) == STACK_POINTER_REGNUM) goto ADDR;  \
-      else abort ();                                                   \
     }                                                                  \
 }

This is in GO_IF_LEGITIMATE_ADDRESS. It should be sufficient to just
not go if it not a legitimate address. The abort is pointless. I've
got a make check running with this change at the moment, and if it
doesn't throw up any surprises, I'll put in a patch to the gcc people.

> Next, I needed to use -n with ld to link an nmagic kernel, I have
(Continue reading)

Simon Burge | 6 Dec 06:00 2002

Re: Using current gcc & binutils and NetBSD -current speeds

Ian Dall wrote:

> Simon Burge <simonb <at> wasabisystems.com> writes:
> 
> > Hi folks (and inparticular Ian(!)),
> > 
> > I have managed to build a kernel with current gcc and binutils.  Most
> > files built with -O2, but I needed a build a couple with -O1 to avoid
> > 
> > 	internal compiler error: in general_operand, at recog.c:1023
> > 
> > type errors.
> 
> Try the following gcc fix:
> 
> diff -u -r1.6 ns32k.h
> --- ns32k.h     1 Dec 2002 06:27:52 -0000       1.6
> +++ ns32k.h     1 Dec 2002 13:29:53 -0000
>  <at>  <at>  -1058,7 +1058,6  <at>  <at> 
>    else if (GET_CODE (xfooy) == PRE_DEC)                                       \
>      {                                                                  \
>        if (REGNO (XEXP (xfooy, 0)) == STACK_POINTER_REGNUM) goto ADDR;  \
> -      else abort ();                                                   \
>      }                                                                  \
>  }

With this, I get all the way through building a kernel with -O2.

And with this change:

(Continue reading)

Eyal Lebedinsky | 25 Dec 11:29 2002
Picon

cannot mount a CD on 1.5.3

I connected a CD-ROM to my pc532 (TOSHIBA XM-3501TA) and it seems to
be picked up at boot time (see boot messages below).

Yet, when I try to mount it I always get a failure:

[root <at> e1]# mount -t cd9660 -r /dev/cd0a /cd
mount_cd9660: /dev/cd0a on /cd: Operation not supported by device

What device should I use for this mount? /dev has:
brw-r-----  1 root  operator   4, 0 Dec 25 20:11 cd0a
brw-r-----  1 root  operator   4, 2 Dec 25 20:11 cd0c
crw-r-----  1 root  operator  12, 0 Dec 25 20:11 rcd0a
crw-r-----  1 root  operator  12, 2 Dec 25 20:11 rcd0c

Is there some config file I should update to allow using the CD-ROM?
I had no such problems using the tape unit (st0).

Finally, I noticed that I also have a Toshiba XM-3401TA which the
doco says is known to work, but I got the same failure. I should
say that this drive works just fine on NetBSD 1.6/pmax.

boot messages
=============
NetBSD 1.5.3 (GENERIC) #6: Tue Jul  2 19:53:03 PDT 2002
    jon <at> bullbox.bullers.net:/usr/src/sys/arch/pc532/compile/GENERIC
total memory = 8192 KB
avail memory = 6204 KB
using 128 buffers containing 512 KB of memory
mainbus0 (root)
rtc0 at mainbus0 addr 0xfff00000
(Continue reading)

Eyal Lebedinsky | 26 Dec 00:15 2002
Picon

Re: cannot mount a CD on 1.5.3

"Perry E. Metzger" wrote:
> 
> try cd0c -- see if that works.

No beef. I tried all possibilities, but cd0a is the one in the 'mount'
man page.

Any chance that MAKEDEV uses the wrong major/minor? Permissions (did
not work even with 777)?

Or maybe the GENERIC kernel is missing the cd driver?

[root <at> e1]# mount -t cd9660 -r /dev/cd0a /cd
mount_cd9660: /dev/cd0a on /cd: Operation not supported by device
[root <at> e1]# mount -t cd9660 -r /dev/cd0c /cd
mount_cd9660: /dev/cd0c on /cd: Operation not supported by device

[root <at> e1]# ls -l /dev/cd0*
brw-r-----  1 root  operator   4, 0 Dec 25 20:11 cd0a
brw-r-----  1 root  operator   4, 2 Dec 25 20:11 cd0c

--
Eyal Lebedinsky (eyal <at> eyal.emu.id.au) <http://samba.org/eyal/>

Eyal Lebedinsky | 26 Dec 01:21 2002
Picon

1.5.3: clock stalls

Seasons greetings,

Due to severe leg pain I am spending a few days at home rather than
enjoying the outdoors - my pc532 is paying the price, being moved
to a smaller case (the Miniscribe finally retired) and the latest
NetBSD 1.5.3 installed. A cd was added too.

I just noticed that the clock on my machine is way off. I verified
that it was just fine last night. I then noticed these messages:

Dec 25 21:00:02 e1 newsyslog[197]: log file turned over
Dec 25 21:00:02 e1 syslogd: restart
Dec 25 e1 inetd[215]: warning: host name/name mismatch:
e7.eyal.emu.id.au != eyal.emu.id.au
Dec 26 03:19:53 e1 /netbsd: sd2: no disk label
Dec 26 03:19:54 e1 /netbsd: scn3: fifo overrun
Dec 26 03:44:29 e1 inetd[1018]: warning: host name/name mismatch:
e7.eyal.emu.id.au != eyal.emu.id.au

As you see, I last logged in at 21:25:52 . A backup was running (over
rsh on ppp0)
which finished at 01:41:02. The rlogin this morning (10ish) shows up as
03:44:29.

OK, cron shows 'daily' is run at 03:15, and I can see that it checks
disklabels
(/var/backups/disklabel.*) and this triggered the sd2 (which has no
disklabel being
my old minix disk) and scn3 (ppp0) messages.

(Continue reading)

Perry E. Metzger | 26 Dec 01:32 2002

Re: cannot mount a CD on 1.5.3


1) the man page doesn't matter in this case.
2) the driver is obviously there since it probes in your autoconf
   messages.
3) it is possible MAKEDEV is wrong.

.pm

Eyal Lebedinsky <eyal <at> eyal.emu.id.au> writes:

> "Perry E. Metzger" wrote:
> > 
> > try cd0c -- see if that works.
> 
> No beef. I tried all possibilities, but cd0a is the one in the 'mount'
> man page.
> 
> Any chance that MAKEDEV uses the wrong major/minor? Permissions (did
> not work even with 777)?
> 
> Or maybe the GENERIC kernel is missing the cd driver?
> 
> 
> [root <at> e1]# mount -t cd9660 -r /dev/cd0a /cd
> mount_cd9660: /dev/cd0a on /cd: Operation not supported by device
> [root <at> e1]# mount -t cd9660 -r /dev/cd0c /cd
> mount_cd9660: /dev/cd0c on /cd: Operation not supported by device
> 
> [root <at> e1]# ls -l /dev/cd0*
> brw-r-----  1 root  operator   4, 0 Dec 25 20:11 cd0a
(Continue reading)

Eyal Lebedinsky | 26 Dec 03:24 2002
Picon

Re: cannot mount a CD on 1.5.3

"Perry E. Metzger" wrote:
> 
> 1) the man page doesn't matter in this case.
> 2) the driver is obviously there since it probes in your autoconf
>    messages.

Checked the sources, conf/GENERIC does have a line
	cd* at scsibus? target ? lun ?          # SCSI CD-ROMs

> 3) it is possible MAKEDEV is wrong.
Also looked at pc532/conf.c and it seems that MAKEDEV is OK:
	major=4 for block device
	major=12 for char device

--
Eyal Lebedinsky (eyal <at> eyal.emu.id.au) <http://samba.org/eyal/>

Eyal Lebedinsky | 26 Dec 06:08 2002
Picon

Note for installing w/out autoboot monitor

This note complements the information about booting the pc532
when not using the autoboot ROM. The current INSTALL document
is not telling.

  ----------------------------------

After the installation finishes you can find out the details of the
boot image using bim, e.g. on sd0:

# bim /dev/rsd0c
Disk: mysd1   Type: SCSI disk
Physical Sector Size = 512
Disk Size = 891574
 partition         type  sector start  length in sectors
     a          4.2BSD             0             783700
     b            swap        783700              92200
     h            boot        885120               6454

Boot partition = h
Default boot image  = 0
Boot Images: total of 8
  (image address and size in sectors.)
Image  address   size  load addr  run addr   name
    0        0     72   0x3be000  0x3be020   boot

You now have the details for booting the image, in this case:
	read d'885120 3be000 d'72
	run 3be020

If you constructed the disk yourself then you need to first
(Continue reading)

Eyal Lebedinsky | 27 Dec 06:33 2002
Picon

kvm_mkdb trouble

I am using 1.5.3 (do we have 1.6 stable enough to try?).

At boot time the kvm db is built. However, it does not know
the name of the booted image on pc532 since we do not set
machdep.booted_kernel. Building the wrong db means failed
commands (e.g. vmstat) that often actually segfault.

I am now playing with building a smaller kernel. With only
8MB RAM I can surely use the savings:

-rwxr-xr-x   1 root  wsrc   1210273 Jul  3 12:53 netbsd
-rwxr-xr-x   1 root  wsrc    820571 Dec 27 14:23 E2

The removed options are:
#file-system    OVERLAY                 # overlay file system
#file-system    UNION                   # union file system
#file-system    NFS                     # Network File System client
#options        NFSSERVER               # Network File System server
#options        INET6           # IPV6

Now, what I did is change /etc/rc.d/sysdb to assume the
image name is the same as the config file (from
kern.version), and fall back to /netbsd if this assumption
fails (see below).

Should we adopt such an approach? Of course it would be best
to make machdep.booted_kernel available.

And as always, I must ask, does anyone know a source for 4MB
sticks that will work in the pc532?
(Continue reading)

Eyal Lebedinsky | 28 Dec 01:38 2002
Picon

Re: cannot mount a CD on 1.5.3- solved, and a question

Eyal Lebedinsky wrote:
> 
> I connected a CD-ROM to my pc532 (TOSHIBA XM-3501TA) and it seems to
> be picked up at boot time (see boot messages below).
> 
> Yet, when I try to mount it I always get a failure:

I was busy climbing the NetBSD learning curve, and I finally
figured that
        - the cd9660 was not built into the kernel
                /usr/src/sys/srch/pc532/GENERIC
        - the module cannot be dynamically loaded. LKM _is_
          in the config - see erros below.

I now have a kernel with cd9660 bult-in and I can mount cds.

If anyone knows, does lkm work on the pc532? If so then it
will be a better solution in terms of memory utilization.

Here is what I get when I try to load a module, is there
another kernel feature needed for LKM to work?

[root <at> e1]# f=fdesc ; modload -v -A /E3 -o /var/run/${f}.o
/usr/lkm/${f}.o
modload: reserving 12288 bytes of memory
modload: can't reserve memory: Operation not permitted

--
Eyal Lebedinsky (eyal <at> eyal.emu.id.au) <http://samba.org/eyal/>

(Continue reading)


Gmane