Subject: booting 2.2.2 kernels on RiscPC

From: Nicholas Clark <[email-masked]>
Date: Sat, 13 Mar 1999 14:49:34 +0000 (GMT)

Do I sucessfully claim the prize for the greatest distance between the machine
booting and the machine logging the serial port?
Failing to find anything in the house capable of logging it, I dialed into
Liverpool and logged the boot via my modem onto a machine 200 miles away.

and IT WORKED. My log goes:

Linux version 2.2.2 ([email-masked]) (gcc version egcs-2.91.60 19990113/philb (egcs-1.1.1 release)) #15 Sat Mar 13 14:30:44 GMT 1999

<4>NetWinder Floating Point Emulator V0.94.1 (c) 1998 Corel Computer Corp.

Console: colour dummy device 80x30

Calibrating delay loop... 190.46 BogoMIPS

Memory: 35332k/36M available (912k code, 20k reserved, 584k data, 16k init)

POSIX conformance testing by UNIFIX

Probing expansion cards: (does not imply support)

  8:      [0046:00EC] i-cubed ltd, EtherLan 600 interface (00:c0:32:00:45:a4)

<6>Linux NET4.0 for Linux 2.2

<6>Based upon Swansea University Computer Society NET3.039

<6>NET4: Unix domain sockets 1.0 for Linux NET4.0.

<6>NET4: Linux TCP/IP 1.0 for NET4.0

<6>IP Protocols: ICMP, UDP, TCP

Initializing RT netlink socket

Starting kswapd v 1.5 

Acornfb: 2048kB VRAM, VIDC20, using 640x480, 31.468kHz, 59Hz

<3>fbcon_setup: No support for fontwidth 8

<2>Bad mode in prefetch abort handler detected: mode SVC_32

Internal error: Oops: 0

CPU: 0

pc : [<ed000000>]    lr : [<c00ac1a8>]

sp : c0187ddc  ip : 00000000  fp : 00000000

r10: c00081bc  r9 : 00000000  r8 : c01800dc

r7 : c011e050  r6 : 00000000  r5 : 00000000  r4 : 00000011

r3 : 00000011  r2 : 00000000  r1 : 00000002  r0 : c011e050

Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  Segment kernel

Control: 1000517D  Table: 1000517D  DAC: 0000001D

Process swapper (pid: 1, stackpage=c0187000)

Stack: 

c0187e00:                                               c00ac1a8 ed000000 20000093 

c0187e20: ffffffff 00000000 00000002 00000000  00000000 c0111cb4 00000000 00000000 

c0187e40: c00ffbf4 00000000 c00b60d0 c00ffc00  00000000 c00b9ed0 c0187ec0 c01035d7 

c0187e60: 00000000 00000000 00000028 c01035da  c00ffcf8 c0103601 c0103602 00000027 

c0187e80: 00000001 c01035da c001c808 00000001  00000000 c0103602 0000002b 00000106 

c0187ea0: c011e050 00000000 c011e050 00000100  c01800dc c00ab5c4 c00e626c 00000008 

c0187ec0: 00000000 00000000 60000013 ffffffff  c000e1c0 00000000 e0200018 00000100 

c0187ee0: 00000000 c018a1a0 c00ac370 04000000  c00e625c 00000001 00000000 00000000 

c0187f00: 00000000 c011e104 00000000 00000000  c01113dc c01800dc c00ab26c 00000000 

c0187f20: c0122440 00000000 c00fd774 00000000  0000003e c00b649c 00000001 00000000 

c0187f40: c0122440 c00fd774 c00bac94 c0187f58  c00e6248 00000000 00000001 c00fd904 

c0187f60: c011e02f c01113dc 00000000 c011e02e  c0111284 c00b0ab4 00000800 00007aec 

c0187f80: 00000056 0000003b c0111460 00000002  c00b5300 00000280 000001e0 0000001f 

c0187fa0: 000001d4 0000003b 00000000 00000000  c000b4a8 c0122838 c00f391c 4401a102 

c0187fc0: c00b0be4 c00f36cc c00f36d0 c0112490  c00a5030 c0099b3c c00321d4 c00f36cc 

c0187fe0: c00f36d0 c0112490 c0122838 c000c8bc  c000c8d4 c00f36cc c00f36d0 c000c7d8 

Code: pc not in code space

There it ends.
How can I fix the kernel?

Nick
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Sat, 13 Mar 1999 16:26:08 +0000 (GMT)

> booting and the machine logging the serial port?

I think you've gained that prize!

> Linux version 2.2.2 ([email-masked]) (gcc version egcs-2.91.60 19990113/philb (egcs-1.1.1 release)) #15 Sat Mar 13 14:30:44 GMT 1999

Hmm, where'd the -rmk go on the version number?

> <3>fbcon_setup: No support for fontwidth 8

Oops.  Did you configure in the framebuffers?  My console
section looks like:

CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FB_ACORN=y
CONFIG_FBCON_MFB=y
CONFIG_FBCON_CFB2=y
CONFIG_FBCON_CFB4=y
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_FONTS=y
CONFIG_FONT_ACORN_8x8=y

> <2>Bad mode in prefetch abort handler detected: mode SVC_32

Looks like fbcon has gone mad...  I'll see if I can provoke this here.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Nicholas Clark <[email-masked]>
Date: Sat, 13 Mar 1999 22:47:36 +0000 (GMT)

> Hmm, where'd the -rmk go on the version number?

Dunno, sorry

> Looks like fbcon has gone mad...  I'll see if I can provoke this here.

You can probaby provoke it by

CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FB_ACORN=y
CONFIG_FBCON_MFB=n
CONFIG_FBCON_CFB2=n
CONFIG_FBCON_CFB4=n
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_FONTS=y
CONFIG_FONT_ACORN_8x8=y

Now, this was why I didn't boot. I wasn't expecting linux 2.2.2 to change
resolution. 2.0.35 sits nicely in the mode RISC OS left the machine in.
So my next question is - how do I get 2.2.2 (or 2.2.3) to switch to 1360x1024
in 8 bpp?

So, IT BOOTS. It works enough to compile kernels. I can't run X - xinit dies
with "

Using VT7

VT_GETSCRINFO failed
"

I can't run screen - I get many many lines of "modprobe: Out of file handles"
and then a final message about no more ptys.

It also refused to load my ppp module. I think it's refusing to load all
modules. It may be because the 2.2.0 kernel needs it to load the Acorn FPE,
and it appears to be trying this for 2.2.2. Not sure.

Finally, tab completion in bash, and pressing backspace at the start of a line
causes an extra space to be printed. I did "stty sane" and it still does it.

Sorry for the about diatribe. The summary is that I can boot 2.2.2 now, but its
not that useful.

Nick

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Sun, 14 Mar 1999 08:22:07 +0000 (GMT)

> You can probaby provoke it by

Aha!  Currently, acornfb wants to start in 4bpp, 640x480.  Hence, if cfb4
is missing, it won't be able to (however, it still shouldn't die horribly).

> So my next question is - how do I get 2.2.2 (or 2.2.3) to switch to 1360x1024

You may want to have a look at the fbcon utilities - you can find details
about them in linux/Documentation/Changes

> So, IT BOOTS. It works enough to compile kernels. I can't run X - xinit dies

Ok, fix already exists - there is a new X server binary in the FTP site
in /pub/armlinux/testing/X I think.  I know of one problem with it - since
the kernel now passes the keyboard-generated autorepeat to the X server,
the X server cockes up doing it's own autorepeat.

> and then a final message about no more ptys.

Aha!  You probably haven't got the correct major/minor numbers for
/dev/?ty[p-s]*.  Have a look at linux/Documentation/devices.txt for
the correct numbers.  These will be backwards compatible with the
2.0.3x kernels.

> and it appears to be trying this for 2.2.2. Not sure.

I assume that you've recompiled the modules in the 2.2 tree?  If so, you'll
also need a later modutils - 2.1.121 on ftp.kernel.org doesn't seem to be
up to date (and will crash a machine if used).  I'll upload a 2.1.121 which
seems to work...  (both binary and src).

> causes an extra space to be printed. I did "stty sane" and it still does it.

Do you mean that the cursor is at the end of a line?  If so, this is a bug
in all PC kernels 1.x and so far 2.x.  I thought that my patches fixed that...
Hmm, just tried it, and if I have a line of 'a's with the cursor sitting under
the last one, then hit backspace, it leaves the last 'a' there...
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Matthew Wilcox <[email-masked]>
Date: Sun, 14 Mar 1999 11:25:48 +0100

> So my next question is - how do I get 2.2.2 (or 2.2.3) to switch to 1360x1024

There's a util called fbset.  I don't know the original site, but you can
get it in the debian slink distribution in main/source/admin/fbset*

> So, IT BOOTS. It works enough to compile kernels. I can't run X - xinit dies

I think you need to run XF68_FBDev instead of Russell's X port.  Or is the
old console driver still available, Russell?

> and it appears to be trying this for 2.2.2. Not sure.

I don't think that's correct - the boot messages you pasted before show you
have the NWFPE built in.  You do however probably need newer modutils than
the ones you currently have.  Bjorn Ekwall has a snapshot up for people to
try out - http://www.pi.se/blox/modutils/

-- 
Matthew Wilcox <[email-masked]>
"I decry the current tendency to seek patents on algorithms.  There are
better ways to earn a living than to prevent other people from making use of
one's contributions to computer science."  -- Donald E. Knuth, TAoCP vol 3
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Nicholas Clark <[email-masked]>
Date: Sun, 14 Mar 1999 18:52:32 +0000 (GMT)

> the X server cockes up doing it's own autorepeat.

mknod /dev/fb0 c 29 0
and it works fine on 2.2.2 (albeit in 640x480x16 colours)

What happens when I plug a TV into my RiscPC instead of a monitor?
(I have the lead to do this). I note the code that returns monitor type 
currently always returns 4 (SVGA), but it it returned 1, what would the rest of
the boot sequence do?

> the correct numbers.  These will be backwards compatible with the

Fixed /dev/MAKEDEV and then fixed this. screen works. 2.0.35 still works.

> the last one, then hit backspace, it leaves the last 'a' there...

No, pressing tab sometimes generates spaces, and backspace on an empty line
(ie just a shell prompt) generates spaces.

2 other problems:

crond doesn't start: can't lock /var/run/cron.pid - other process may be 67108304. invalid argument
(ish, in that punctuation may be wrong)

architecture is arm4vl, which causes modutil's configure to barf (so I
explicitly specified arm-linux, and it was happy)

This feels like some massive initiative test, which I'm struggling with.
I'm trying to make a list of all the right things to do in the right order,
starting with a bare bones a.out 2.0.35 installation. and ending up with ELF
and 2.2.2, but with 2.0.35 still bootable. I've still got 2.0.35 bootable,
but that's only because willy supplied me with a spare / partition, which
has got me out of trouble twice now.

Still can't get ppp to load - will compile 2.2.3 with it linked in :-)
eth0 says that its initialisation is delayed -would this be consistent with
insmod not getting the EtherH driver to load?

Nick

PS Is that supposed to be a pint in the penguin's flipper? I'm surprised that
   the penguin didn't take it back to get it topped up - it's >15% head. :-(
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Nicholas Clark <[email-masked]>
Date: Sun, 14 Mar 1999 21:28:19 +0000 (GMT)

> get it in the debian slink distribution in main/source/admin/fbset*

http://www.cs.kuleuven.ac.be/~geert/bin/

I can now set the console to anything sane that it's predefined.
I guess what we want now is the perl script to convert RISC OS modedefs to
fbset's format...

(make install for fbset makes the /dev/fb[0-7] entries )
> old console driver still available, Russell?

Xarmlinux in the testing dir works.
However, it resets that screen back to 640x480. Hmm. So my text console is
1280x1024, but X is at VGA. :-) I *thought* that they were both on /dev/fb0 
so I must be doing something wrong here, but quite what I don't know.

It's nearly all working very nicely. :-)

Upgraded ppp to 2.3.6, as the kernel changes docs suggest I should.
insmod still doesn't want to do ppp. route reveals that eth0 is up, so
the kernel is loading that module. Odd.

Nick

---

From: Philip Blundell <[email-masked]>
Date: Mon, 15 Mar 1999 14:41:06 +0000

>insmod still doesn't want to do ppp.

Post the exact errors you get.

p.

---

From: Nicholas Clark <[email-masked]>
Date: Mon, 15 Mar 1999 21:10:27 +0000 (GMT)

> in all PC kernels 1.x and so far 2.x.  I thought that my patches fixed that...

Ah. I've figured out when it happens - whenever bash tries to ring the
terminal bell.  Within screen, screen flashes the display, and no space 
gets printed. It's only happening on the console device.

Nick

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Mon, 15 Mar 1999 22:16:24 +0000 (GMT)

> so I must be doing something wrong here, but quite what I don't know.

Depending on the kernel version you have, fbset -a will set the
resolution for each and every console, including newly created ones.
Some kernels may only do this for all existing consoles though.

> the kernel is loading that module. Odd.

Interesting.  On 'caramon', pppd 2.2 pl0 seems to work fine with both
2.0.36 and 2.2.0 (hmm, am I still running this on there?)...  However,
I don't think I have ppp compiled up as a module.  Could you post the
output of 'insmod ppp.o' please?
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Nicholas Clark <[email-masked]>
Date: Mon, 15 Mar 1999 23:08:40 +0000 (GMT)

> Some kernels may only do this for all existing consoles though.

Is it because I have no XF86config file, so X is falling back to a nice safe
640x480?
I don't know where to get such a file (it doesn't appear to be in the X rpms
on your site), or the XF86config binary to generate it.

Is there an ELF libX11 out there, or do I need to compile that? If so, does
the source need ARMLinux patches?

> output of 'insmod ppp.o' please?

$ insmod ppp.o
ppp.o: ppp.o: No such file or directory

It's not ppp - I checked and ismod is failing to load the msdos filing system
when I attempt to mount a DOS floppy. I've disabled kerneld, and I know kmod
is working because I get modprobe errors on the console when I attempt the
mount. I conclude that I am unable to load kernel modules on 2.2.2 for some
reason. (If I rename /lib/modues/2.2.2 to 2.2.2-rmk5 then I get errors about
"not found", (sorry, I forget the exact text) so I know it's trying to look in
2.2.2 directory

recompiled kernel with ppp linked in and pppd works. (I'm mailing this :-) )

Nick