Linux on Amiga A600, a success story (in progress, with possible patch)
Hi there,
thanks to some hardware upgrades to my Amiga A600 (A603 chip memory expansion to 2MB, Kickstart 3.1 rom, CF-IDE-Adapter with 4GB CF-card, PCMCIA network card and ACA630 CPU replacement board containig a 68030, but no FPU) i decided i could finally try to get Linux running on that machine. So i debootstrapped a basic system to my CF-card, compiled a standard amiga-kernel 3.1.4 (with CONFIG_M68KFPU_EMU_ONLY activated) and tried to start it. At first, the Amiga froze every time i started amiboot, so i tried supplying my cpu type by hand (with "-p 202") and it worked, but after loading the kernel the amiga fired off a "guru meditation" 00000004 (illegal instruction). After messing around with some kconfig-options and rebuilding the kernel several time without getting anywhere i looked at the build process for the NetBSD-kernel i successfully built for the Amiga before and noticed, that the NetBSD-guys are building their Amiga-kernel with -msoft-float. So after applying that to the Linux-kernel (patch attached) the kernel booted, but died directly after initializing the the framebuffer, just at activating the serial console, with a very long panic message. I couldn't get any output via the serial port (with console=ttyS0), so i made a video of the Amiga booting with my (very bad) handy camera. I'm sorry i can't give you a proper boot log becaus of that. If you would need one i could try to make a video of the boot process with the digital camera of my father and either upload that somewhere or write the messages in the video down. I could make out some of the first lines in the panic:
Data Read fault at 0x00000020 in Super Data (pcb0xb7e08) BAD KERNEL BUSERR
Oops: 00000000
PC: (...) internal_create_group+...
The first command in the trace was a call to mm_release, so i figured the fpu emulator was crashing something inside the sysfs-part of the kernel. So i tried recompiling the kernel with CONFIG_EXPERT activated and CONFIG_SYSFS deactivated and it works! After uninstalling udev from the debian system and mknod'ing all needed device-files everything seems to be running fine, with the exception of the RTC (i think that's my fault, something i missed while configuring my kernel, is there something needed besides of genrtc to get the A600/A603-clock working?) and the PCMCIA network card (some card with NE2000-chip, it works flawlessly under AmigaOS with cnet.device and NetBSD, when inserting the apne module i get "ethernet PCMCIA card inserted", followed by "device not found". Maybe i'm missing a device file here?).
So, i wanted to thank all of you linux-m68k-staff here for making it possible to get my favorite OS running on my favorite little computer pal :-)
If you are interested, i could give you further information (my kernel-config, for example) or get you updated, if i get the last missing parts to run. And, like i said before, if you are interested i could try to get that kernel panic in a readable form, so you could try to analyze the error.
Thanks again, and bye!
Regards,
Patrick
arch/m68k/Makefile_mm +4 -0
@@ -33,6 +33,10 @@ # without -fno-strength-reduce the 53c7xx.c driver fails ;-( KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 +ifdef CONFIG_M68KFPU_EMU_ONLY +KBUILD_CFLAGS += -msoft-float +endif + # enable processor switch if compiled only for a single cpu ifndef CONFIG_M68020 ifndef CONFIG_M68030
Geert Uytterhoeven
maintainerHi Patrick,
Quoted 3 lines · Patrick Bottelberger
tried to start it. At first, the Amiga froze every time i started amiboot, so i tried supplying my cpu type by hand (with "-p 202") and it worked, but after loading the kernel the amiga fired off a "guru
What did Amiboot detect without the -p option (you may want ti try `-d')? Does it assume a 68882 FPU?
Quoted 6 lines
meditation" 00000004 (illegal instruction). After messing around with some kconfig-options and rebuilding the kernel several time without getting anywhere i looked at the build process for the NetBSD-kernel i successfully built for the Amiga before and noticed, that the NetBSD-guys are building their Amiga-kernel with -msoft-float. So after applying that to the Linux-kernel (patch attached) the kernel booted,
Strange, -msoft-float should not be needed, as the kernel shouldn't use any floating point instructions (besides saving/restoring FPU state, which it shouldn't do with CONFIG_M68KFPU_EMU_ONLY).
Quoted 5 lines
but died directly after initializing the the framebuffer, just at activating the serial console, with a very long panic message. I couldn't get any output via the serial port (with console=ttyS0), so i made a video of the Amiga booting with my (very bad) handy camera. I'm sorry i can't give you a proper boot log becaus of that. If you would
Have you tried `debug=mem', and running the AmigaOS dmesg afterwards?
Quoted 7 lines
need one i could try to make a video of the boot process with the digital camera of my father and either upload that somewhere or write the messages in the video down. I could make out some of the first lines in the panic:
Data Read fault at
0x00000020in Super Data (pcb0xb7e08) BAD KERNEL BUSERR
Quoted 7 lines
Oops: 00000000PC: (...) internal_create_group+...
The first command in the trace was a call to
mm_release, so i figured the fpu emulator was crashing something inside the sysfs-part of the kernel. So i tried recompiling the kernel withCONFIG_EXPERTactivated andCONFIG_SYSFSdeactivated and it works! After uninstalling udev from
I'd expected this to be the topology issue, but that change doesn't seem to be in 3.1.4. I'll see whether I can reproduce this.
Quoted 4 lines
the debian system and mknod'ing all needed device-files everything seems to be running fine, with the exception of the RTC (i think that's my fault, something i missed while configuring my kernel, is there something needed besides of genrtc to get the A600/A603-clock working?)
Do you know what clock chip is used on the A603? I had a quick look on the net, but couldn't find it (I did see a picture of an A604 with a partially covered chip that said M6242). If you can't find it, I can ask Jens.
Currently, Linux assumes an A2000 clock chip, which is an Oki MSM6242. If it's a Ricoh RP5C01, you have to modify arch/m68k/amiga/config.c to select an A3000 clock chip on A600.
Quoted 4 lines
and the PCMCIA network card (some card with NE2000-chip, it works flawlessly under AmigaOS with cnet.device and NetBSD, when inserting the apne module i get "ethernet PCMCIA card inserted", followed by "device not found". Maybe i'm missing a device file here?).
Sorry, cannot help you there.
Thanks for your report!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi,
Quoted 8 lines
Quoted 4 lines
the debian system and mknod'ing all needed device-files everything seems to be running fine, with the exception of the RTC (i think that's my fault, something i missed while configuring my kernel, is there something needed besides of genrtc to get the A600/A603-clock working?)
Do you know what clock chip is used on the A603? I had a quick look on the net, but couldn't find it (I did see a picture of an A604 with a partially covered chip that said M6242). If you can't find it, I can ask Jens.
Might be the wrong /dev/rtc device - it should be major 254 minor 0 not major 10 minor 135 (or whatever).
Cheers,
Michael
Geert Uytterhoeven
maintainerQuoted 11 lines · Michael Schmitz
Quoted 8 lines
Quoted 4 lines
the debian system and mknod'ing all needed device-files everything seems to be running fine, with the exception of the RTC (i think that's my fault, something i missed while configuring my kernel, is there something needed besides of genrtc to get the A600/A603-clock working?)
Do you know what clock chip is used on the A603? I had a quick look on the net, but couldn't find it (I did see a picture of an A604 with a partially covered chip that said M6242). If you can't find it, I can ask Jens.
Might be the wrong
/dev/rtcdevice - it should be major 254 minor 0 not major 10 minor 135 (or whatever).
That can also be the problem. Note that the 254/0 is a dynamic number, so it may be different for you.
You can check under /sys/class/devices whether your rtc was found. I think there's also a virtual file there to show the current time without having to use hwclock.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Michael,
Quoted 3 lines · Michael Schmitz
Might be the wrong
/dev/rtcdevice - it should be major 254 minor 0 not major 10 minor 135 (or whatever).
I tried major 254 with minor 1 to 10, none of the nodes seems to be connected. I thought 254/x was used by CONFIG_RTC_CLASS and 10/135 by CONFIG_GEN_RTC? I'll compile the kernel with CONFIG_RTC_CLASS and try again.
Regards
Patrick
Geert Uytterhoeven
maintainerHi Patrick,
Quoted 7 lines · Patrick Bottelberger
Quoted 3 lines · Michael Schmitz
Might be the wrong
/dev/rtcdevice - it should be major 254 minor 0 not major 10 minor 135 (or whatever).I tried major 254 with minor 1 to 10, none of the nodes seems to be connected. I thought 254/x was used by
CONFIG_RTC_CLASSand 10/135 byCONFIG_GEN_RTC? I'll compile the kernel withCONFIG_RTC_CLASSand try again.
These days you need CONFIG_RTC_CLASS and CONFIG_RTC_DRV_MSM6242. CONFIG_GEN_RTC only works with old-style RTC drivers, which we no longer use on Amiga.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 1 line · Michael Schmitz <schmitzmic <at> googlemail.com> writes:
Might be the wrong
/dev/rtcdevice - it should be major 254 minor 0
Actually, it should be /dev/rtc0 (according to my Debian system) and you can find out the correct major number like this:
root@ara5:~ # ll /dev/rtc*
crw------- 1 root root 254, 0 Dec 26 16:48 /dev/rtc0 root@ara5:~ # fgrep rtc /proc/devices
254 rtc
This is auto-created from devtmpfs (no udev here), FWIW. My ARAnyM command line contains devtmpfs.mount=1 coupled with a few lines in /etc/rc.local:
(test -e /dev/fd || ln -s /proc/self/fd /dev/fd || :)
(test -e /dev/stdin || ln -s /proc/self/fd/0 /dev/stdin || :) (test -e /dev/stdout || ln -s /proc/self/fd/1 /dev/stdout || :) (test -e /dev/stderr || ln -s /proc/self/fd/2 /dev/stderr || :)
bye,
//mirabilos
Hi Thorsten,
Might be the wrong /dev/rtc device - it should be major 254 minor 0
Quoted 1 line
Actually, it should be
/dev/rtc0(according to my Debian system)
hwclock attempts to open /dev/rtc which is symlinked to rtc0 if udev is used.
Quoted 8 lines
and you can find out the correct major number like this:
root@ara5:~ # ll
/dev/rtc*
crw------- 1 root root 254, 0 Dec 26 16:48/dev/rtc0root@ara5:~ # fgrep rtc/proc/devices
254 rtcThis is auto-created from devtmpfs (no udev here), FWIW.
With no helpers at all, the devices need to be static files present in /dev. The old makedev scripts (/dev/MAKEDEV) probably need to be overhauled to create the correct files to cover this case. My copy on the Falcon will still create a misc device for RTC,
Quoted 7 lines
My ARAnyM command line contains devtmpfs.mount=1 coupled with a few lines in
/etc/rc.local:(test -e
/dev/fd|| ln -s/proc/self/fd/dev/fd|| :)(test -e /dev/stdin || ln -s /proc/self/fd/0 /dev/stdin || :) (test -e /dev/stdout || ln -s /proc/self/fd/1 /dev/stdout || :) (test -e /dev/stderr || ln -s /proc/self/fd/2 /dev/stderr || :)
rc.local hacks are always possible as a last resort :-) Good one, though.
Cheers,
Michael
Michael Schmitz dixit:
Quoted 2 lines
Quoted 1 line
Actually, it should be
/dev/rtc0(according to my Debian system)hwclock attempts to open
/dev/rtcwhich is symlinked to rtc0 if udev is used.
Oh, fun. Good to know, then. (I just use NTP, always…)
Quoted 1 line
With no helpers at all, the devices need to be static files present in /dev.
Yeah, but devtmpfs creates /dev/rtc0 just fine ;-)
Quoted 1 line
rc.local hacks are always possible as a last resort :-) Good one, though.
They are better than having to use udev, I guess. Probably should place the symlink for /dev/rtc in there, too… on the other hand, nope, not needed:
open("/dev/rtc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) SYS_333(0x8000520d, 0x20000, 0, 0x8000520d, 0) = -1072368512 SYS_333(0x2d, 0xc00182e0, 0x80000724, 0, 0) = -1072368512 SYS_333(0, 0xc00182e0, 0x800007d7, 0, 0) = -1072368512SYS_333(0x2, 0x8000520d, 0, 0, 0) = -1072368512SYS_333(0x2, 0, 0, 0x8000668e, 0) = -1072368512open("/dev/rtc0", O_RDONLY|O_LARGEFILE) = 3
(What’s SYS_333, and why does strace not know it?)
bye,
//mirabilos
Signature · 3 lines
“Having a smoking section in a restaurant is like having
a peeing section in a swimming pool.”
-- Edward BurrGeert Uytterhoeven
maintainerQuoted 9 lines · Thorsten Glaser
open("/dev/rtc", O_RDONLY|O_LARGEFILE)= -1 ENOENT (No such file or directory)SYS_333(0x8000520d, 0x20000, 0, 0x8000520d, 0)= -1072368512SYS_333(0x2d, 0xc00182e0, 0x80000724, 0, 0)= -1072368512SYS_333(0, 0xc00182e0, 0x800007d7, 0, 0)= -1072368512SYS_333(0x2, 0x8000520d, 0, 0, 0)= -1072368512SYS_333(0x2, 0, 0, 0x8000668e, 0)= -1072368512open("/dev/rtc0", O_RDONLY|O_LARGEFILE)= 3(What’s
SYS_333, and why does strace not know it?)
#define __NR_get_thread_area 333
Thread Local Storage.
-ESTRACE_TOO_OLD?
-ESTRACE_NEVER_UPDATED?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Geert Uytterhoeven dixit:
Quoted 5 lines
Quoted 1 line
(What’s
SYS_333, and why does strace not know it?)#define
__NR_get_thread_area333Thread Local Storage.
Ah.
Review
Quoted 2 lines
(quoted diff) +0
-2-ESTRACE_TOO_OLD? -ESTRACE_NEVER_UPDATED?
Probably the latter… it’s been rebuilt after TLS was introduced, and was updated in Debian too.
bye,
//mirabilos
Signature · 3 lines
“Having a smoking section in a restaurant is like having
a peeing section in a swimming pool.”
-- Edward BurrHi Geert,
Quoted 3 lines · Geert Uytterhoeven
What did Amiboot detect without the
-poption (you may want ti try `-d')? Does it assume a 68882 FPU?
Without supplying the '-p' parameter amiboot didn't output anything at all, it just froze the amiga directly after entering the command.
Quoted 2 lines
Have you tried `debug=mem', and running the AmigaOS dmesg afterwards?
I didn't know about the AmigaOS dmesg, thanks for telling me! I attached the dmesg output of it.
Quoted 3 lines
I'd expected this to be the topology issue, but that change doesn't seem to be in 3.1.4. I'll see whether I can reproduce this.
Call Trace: [<0000ffff>] mm_release+0xa1/0xa4 [<002b84fa>] topology_sysfs_init+0x0/0x1e
Seems to prove that, do you think
http://www.spinics.net/lists/linux-m68k/msg04709.html would solve the issue?
Quoted 8 lines
Do you know what clock chip is used on the A603? I had a quick look on the net, but couldn't find it (I did see a picture of an A604 with a partially covered chip that said M6242). If you can't find it, I can ask Jens.
Currently, Linux assumes an A2000 clock chip, which is an Oki MSM6242. If it's a Ricoh RP5C01, you have to modify
arch/m68k/amiga/config.cto select an A3000 clock chip on A600.
The kernel outputs: "Amiga hardware found: (...) A2000_CLK (...)", can i rely on that message, or should i get the A603 out of the case and check the chip to be sure?
Quoted 8 lines
Quoted 5 lines
and the PCMCIA network card (some card with NE2000-chip, it works flawlessly under AmigaOS with cnet.device and NetBSD, when inserting the apne module i get "ethernet PCMCIA card inserted", followed by "device not found". Maybe i'm missing a device file here?).
Sorry, cannot help you there.
OK, i will keep you informed if i find a solution for the PCMCIA-card.
Quoted 2 lines
Thanks for your report!
Thanks for helping me! :-)
Regards
Patrick
Searching for SAVEKMSG magic...
Found 4858 bytes at 0x001e0010
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Linux version 3.1.4-amiga (3.1.4) (root@virtudepp) (gcc version 4.4.6 (Debian 4.4.6-6) ) #1 Sat Jan 14 17:48:12 CET 2012
console [debug0] enabled
Amiga hardware found: [A600] VIDEO BLITTER AUDIO FLOPPY A1200_IDE KEYBOARD MOUSE SERIAL PARALLEL A2000_CLK CHIP_RAM PAULA DENISE_HR AGNUS_HR_PAL PCMCIA ZORRO On node 0 totalpages: 7936free_area_init_node: node 0, pgdat 0028fef4, node_mem_map 002c7000
DMA zone: 70 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 7866 pages, LIFO batch:0
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 7866
Kernel command line: root=/dev/hda5 debug=mem BOOT_IMAGE=vmlinux-putt
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 28548k/28548k available (2044k kernel code, 1028k data, 124k init)
Console: colour dummy device 80x25
console [tty0] enabled
Calibrating delay loop... 6.01 BogoMIPS (lpj=30080)pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
msgmni has been set to 55
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 80x32
fb0: Amiga ECS frame buffer device, using 640K of video memory
Amiga-builtin serial driver version 4.30
ttyS0 is the amiga builtin serial port
Data read fault at 0x00000020 in Super Data (pc=0xb7e08)
BAD KERNEL BUSERR
Oops: 00000000 Modules linked in: PC: [<000b7e08>] internal_create_group+0x16e/0x1b8 SR: 2004 SP: 01819ee8 a2: 01816870 d0: 00000000 d1: 00000016 d2: 00000000 d3: 00000000 d4: 00000000 d5: 00000000 a0: 00000008 a1: 00000186
Process swapper (pid: 1, task=01816870)
Frame format=B ssw=074d isc=6600 isb=feb6 daddr=00000020 dobuf=00000000 baddr=000b7e0e dibuf=00000000 ver=f
Stack from 01819f70:
00000000 00000000 402d9408 00000000 402dd0d8 0000ffff 002b84fa 00002008
40223004 00000000 0027fff8 000b7e76 00000008 00000000 002898f4 002b8512
00000008 002898f4 00000000 00002022 00000000 000000e6 402d9408 00000000
402dd0d8 002c2aa4 00002008 40223004 00002008 002b3e14 002a5b34 002b84fa
002a5ac8 40001000 0000290c 00000000
Call Trace: [<0000ffff>] mm_release+0xa1/0xa4
[<002b84fa>] topology_sysfs_init+0x0/0x1e
[<00002008>] do_one_initcall+0x0/0x1c0
[<000b7e76>] sysfs_create_group+0xe/0x14
[<002b8512>] topology_sysfs_init+0x18/0x1e
[<00002022>] do_one_initcall+0x1a/0x1c0
[<00002008>] do_one_initcall+0x0/0x1c0
[<00002008>] do_one_initcall+0x0/0x1c0
[<002b3e14>] cpu_dev_init+0xc/0x10
[<002a5b34>] kernel_init+0x6c/0xee
[<002b84fa>] topology_sysfs_init+0x0/0x1e
[<002a5ac8>] kernel_init+0x0/0xee
[<0000290c>] kernel_thread+0x3a/0x4e
Code: 4a88 66d4 6000 ff72 286e fffc 6080 2047 <4aa8> 0018 6600 feb6 4878 0041 4879 0024 befe 4879 0024 0cd6 4eb9 001f c6e4 4e47
Disabling lock debugging due to kernel taint
Kernel panic - not syncing: Attempted to kill init!
Call Trace: [<001fc5a4>] panic+0x54/0x194
[<00014b84>] do_exit+0x5ea/0x6ca
[<001fc6e4>] printk+0x0/0x1c
[<00003254>] bad_super_trap+0x0/0x18e
[<000039fe>] buserr_c+0x2d8/0x3a2
[<002b84fa>] topology_sysfs_init+0x0/0x1e
[<00002008>] do_one_initcall+0x0/0x1c0
[<000025c6>] buserr+0x1e/0x24
[<000b7e10>] internal_create_group+0x176/0x1b8
[<000b7e0e>] internal_create_group+0x174/0x1b8
[<000b7e0c>] internal_create_group+0x172/0x1b8
[<0018ff0d>] skb_gso_segment+0x193/0x2ba
[<000ff6ec>] blk_rq_map_kern+0x9e/0x12c
[<00003f1c>] request_irq+0xe/0x42
[<00003f1c>] request_irq+0xe/0x42
[<0000ffff>] mm_release+0xa1/0xa4
[<002b84fa>] topology_sysfs_init+0x0/0x1e
[<00002008>] do_one_initcall+0x0/0x1c0
[<000b7e76>] sysfs_create_group+0xe/0x14
[<002b8512>] topology_sysfs_init+0x18/0x1e
[<00002022>] do_one_initcall+0x1a/0x1c0
[<00002008>] do_one_initcall+0x0/0x1c0
[<00002008>] do_one_initcall+0x0/0x1c0
[<002b3e14>] cpu_dev_init+0xc/0x10
[<002a5b34>] kernel_init+0x6c/0xee
[<002b84fa>] topology_sysfs_init+0x0/0x1e
[<002a5ac8>] kernel_init+0x0/0xee
[<0000290c>] kernel_thread+0x3a/0x4e<<<<<<<<<<<<<<<<<<<<
Geert Uytterhoeven
maintainerHi Patrick,
Quoted 6 lines · Patrick Bottelberger
Quoted 3 lines · Geert Uytterhoeven
What did Amiboot detect without the
-poption (you may want ti try `-d')? Does it assume a 68882 FPU?Without supplying the '-p' parameter amiboot didn't output anything at all, it just froze the amiga directly after entering the command.
Even with '-d'?
Quoted 2 lines
Quoted 2 lines
I'd expected this to be the topology issue, but that change doesn't seem to be in 3.1.4. I'll see whether I can reproduce this.
I can't reproduce it on ARAnyM with 3.1.4.
Quoted 4 lines
Call Trace: [<0000ffff>] mm_release+0xa1/0xa4 [<002b84fa>] topology_sysfs_init+0x0/0x1eSeems to prove that, do you think
But this indeed looks like the same problem. Are you using a Debianized 3.1.4 source tree?
Quoted 1 line
http://www.spinics.net/lists/linux-m68k/msg04709.html would solve the issue?
Yes, that should fix this problem.
Quoted 11 lines
Quoted 8 lines
Do you know what clock chip is used on the A603? I had a quick look on the net, but couldn't find it (I did see a picture of an A604 with a partially covered chip that said M6242). If you can't find it, I can ask Jens.
Currently, Linux assumes an A2000 clock chip, which is an Oki MSM6242. If it's a Ricoh RP5C01, you have to modify
arch/m68k/amiga/config.cto select an A3000 clock chip on A600.The kernel outputs: "Amiga hardware found: (...)
A2000_CLK(...)", can i rely on that message, or should i get the A603 out of the case and check the chip to be sure?
You cannot rely on that message. It just assumes A2000/A500/A600 etc. have an A2000-style clock chip. But on all but A2000 the RTC is optional. BTW, I also asked Jens Schönfeld.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Geert Uytterhoeven
maintainerQuoted 11 lines · Geert Uytterhoeven
Quoted 7 lines
Quoted 4 lines
Currently, Linux assumes an A2000 clock chip, which is an Oki MSM6242. If it's a Ricoh RP5C01, you have to modify
arch/m68k/amiga/config.cto select an A3000 clock chip on A600.The kernel outputs: "Amiga hardware found: (...)
A2000_CLK(...)", can i rely on that message, or should i get the A603 out of the case and check the chip to be sure?You cannot rely on that message. It just assumes A2000/A500/A600 etc. have an A2000-style clock chip. But on all but A2000 the RTC is optional. BTW, I also asked Jens Schönfeld.
Jens confirmed it has an MSM6242.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert,
Quoted 6 lines · Geert Uytterhoeven
Quoted 3 lines
Without supplying the '-p' parameter amiboot didn't output anything at all, it just froze the amiga directly after entering the command.
Even with '-d'?
Yes, even with "-d", no output is printed, after entering the command ("amiboot -d root=/dev/hda5" for example) and pressing "enter" the system freezes immediately.
Quoted 12 lines
I can't reproduce it on ARAnyM with 3.1.4.
Quoted 5 lines
Call Trace: [<0000ffff>] mm_release+0xa1/0xa4 [<002b84fa>] topology_sysfs_init+0x0/0x1eSeems to prove that, do you think
But this indeed looks like the same problem. Are you using a Debianized 3.1.4 source tree?
I just checked again, yes, you're right, i totally forgot i patched my source tree with the Debian patches, sorry :-(
Quoted 5 lines
Quoted 2 lines
http://www.spinics.net/lists/linux-m68k/msg04709.html would solve the issue?
Yes, that should fix this problem.
It really did! Thank you for pointing me in the right direction, now i got sysfs and udev again.
Quoted 4 lines
You cannot rely on that message. It just assumes A2000/A500/A600 etc. have an A2000-style clock chip. But on all but A2000 the RTC is optional. BTW, I also asked Jens Schönfeld.
After activating CONFIG_RTC_CLASS and CONFIG_RTC_DRV_MSM6242 in the kernel and finally being able to get the device nodes created automatically by udev, the RTC now works... somewhat. 8 out of 10 reads from the RTC (via hctosys inside the kernel at startup, hwclock from userspace or cat one of the special files inside /sys/class/rtc) return successfully, but the other 2 return an ioctl()-error. I forgot which exactly, i'll go upstairs to the Amiga later and write it down.
The PCMCIA-network still doesn't work, i'll recompile the kernel with CONFIG_APNE=y (instead of m), maybe that will work.
Regards,
Patrick
Hi Geert,
Quoted 8 lines · Patrick Bottelberger
After activating
CONFIG_RTC_CLASSandCONFIG_RTC_DRV_MSM6242in the kernel and finally being able to get the device nodes created automatically by udev, the RTC now works... somewhat. 8 out of 10 reads from the RTC (via hctosys inside the kernel at startup, hwclock from userspace or cat one of the special files inside/sys/class/rtc) return successfully, but the other 2 return an ioctl()-error. I forgot which exactly, i'll go upstairs to the Amiga later and write it down.
The error reported by hwclock is:RTC_RD_TIME: Illegal Argumentioctl() to /dev/rtc0 to read the time failed.
If reading /sys/class/rtc/rtc0/time with cat, the error is:
cat: /sys/class/rtc/rtc0/time: Invalid Argument
Additional to that, the date seems to be correct every time i read it (for example with "cat /sys/class/rtc/rtc0/date"), but the time seems to be a bit strange. Even if the time can be read, i get different times from the clock. 3 cat's in a row returned:
02:04:16
12:04:18
22:04:19
That seems a bit... odd. Any ideas?
Quoted 3 lines
The PCMCIA-network still doesn't work, i'll recompile the kernel with
CONFIG_APNE=y(instead of m), maybe that will work.
Still doesn't work, but i don't see anything PCMCIA-related in /sys/{bus,bus/platform} either. I think that may be the problem, do i need anything else besides of CONFIG_AMIGA_PCMCIA and CONFIG_APNE?
Maybe it's the debian patches that get everything out of order, i'll try 3.1.10 vanilla, maybe that'll work.
Regards,
Patrick
Hi all,
Quoted 3 lines · Patrick Bottelberger
Maybe it's the debian patches that get everything out of order, i'll try 3.1.10 vanilla, maybe that'll work.
I compiled a vanilla 3.2.2 kernel tree without Debian patches and without adding -msoft-float and it runs. It seems one of the Debian-patches adds some floating-point-operations.
The clock is still flaky and pcmcia still doesn't work. If i find out why, i'll report again.
Regards,
Patrick
Quoted 7 lines · Patrick Bottelberger <patrick.bottelberger <at> sigon.net> writes:
Quoted 3 lines · Patrick Bottelberger
Maybe it's the debian patches that get everything out of order, i'll try 3.1.10 vanilla, maybe that'll work.
I compiled a vanilla 3.2.2 kernel tree without Debian patches and without adding -msoft-float and it runs. It seems one of the Debian-patches adds some floating-point-operations.
I don’t think so. 3.2.2 from Debian is looking good (3.2.4 building), but you MUST compile with -ffreestanding.
Can you try the 3.2.2 image from debian-ports or my repo
https://www.freewrt.org/~tg/debs68k/dists/sid/main/Upload/unstable/linux-2.6/
and check whether that’s more buggy than vanilla? If so, you’ve got bugs to report ☺
Thanks,
//mirabilos
Hi Thorsten,
using your kernel, i got the same errors as with my own (flaky RTC and non-working PCMCIA), but no other errors, especially no illegal instruction errors. So, you're right, it wasn't the Debian patches after all, sorry for accusing you :-) Maybe my toolchain is doing something wicked, i don't know :-/
Back to my current problems, i don't think the read errors for the RTC may be connected to the fact, that i don't have a battery on my A603 board, or could it?
For using the apne driver, am i maybe missing something to get the PCMCIA bus up and running?
Is there any A1200 user around here that could tell me which files relating to PCMCIA should be visible in /sys{,/bus,/class} at system start, if any? Maybe it's the id's of my card that don't get recognised by the apne driver, but how can i read the id without having access to the bus itself? pccardctl doesn't find anything, and the corresponding init-script complains about no existing bridge module, because it can't find /sys/class/pcmcia_socket
I'm a bit lost at the moment :-/
Regards,
Tjelfe
Quoted 30 lines · Thorsten Glaser
Quoted 10 lines · Patrick Bottelberger <patrick.bottelberger <at> sigon.net> writes:
Quoted 4 lines · Patrick Bottelberger
Maybe it's the debian patches that get everything out of order, i'll try 3.1.10 vanilla, maybe that'll work.
I compiled a vanilla 3.2.2 kernel tree without Debian patches and without adding -msoft-float and it runs. It seems one of the Debian-patches adds some floating-point-operations.
I don’t think so. 3.2.2 from Debian is looking good (3.2.4 building), but you MUST compile with -ffreestanding.
Can you try the 3.2.2 image from debian-ports or my repo
https://www.freewrt.org/~tg/debs68k/dists/sid/main/Upload/unstable/linux-2.6/
and check whether that’s more buggy than vanilla? If so, you’ve got bugs to report ☺Thanks,
//mirabilos--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Patrick Bottelberger
Back to my current problems, i don't think the read errors for the RTC may be connected to the fact, that i don't have a battery on my A603 board, or could it?
The kernel rtc code rejects dates before the Unix epoch. Typically an rtc that is reset reports a year before 1970.
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Hi Andreas,
yes, but after setting the clock (e.g. via "date MMDDhhmmccyy" and "hwclock --systohc" thereafter) the date and time should be correct, as long as the computer isn't turned off, right? That's not the case with my A600, the date stays correct, but the time seems to have difficulties with the first digit (e.g. jumping between 02:20, 12:20 and 22:20 in a few seconds) and often returns an EINVAL when trying to read the time. Trying to access the date (through /sys/class/rtc/rtc0/date for example) curiously always works. Could it be related to the floating point emulation? But i don't think the kernel relies on floating point registers for getting the time from the rtc, or is it?
Regards,
Patrick
Quoted 14 lines · Andreas Schwab
Quoted 4 lines · Patrick Bottelberger
Back to my current problems, i don't think the read errors for the RTC may be connected to the fact, that i don't have a battery on my A603 board, or could it?
The kernel rtc code rejects dates before the Unix epoch. Typically an rtc that is reset reports a year before 1970.
Andreas.
Quoted 1 line · Patrick Bottelberger
(e.g. jumping between 02:20, 12:20 and 22:20 in a few seconds)
That looks like a real hardware problem.
Quoted 2 lines
But i don't think the kernel relies on floating point registers for getting the time from the rtc, or is it?
The kernel does not use floating point at all.
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Hi Andreas,
Quoted 6 lines · Andreas Schwab
Quoted 1 line · Patrick Bottelberger
(e.g. jumping between 02:20, 12:20 and 22:20 in a few seconds)
That looks like a real hardware problem.
I am absolutely sure that it's not a hardware problem, as netbsd has no problems reading the hardware clock.
Quoted 5 lines
Quoted 2 lines
But i don't think the kernel relies on floating point registers for getting the time from the rtc, or is it?
The kernel does not use floating point at all.
Ok, thanks for clarifying.
Regards,
Patrick
Geert Uytterhoeven
maintainerQuoted 8 lines · Patrick Bottelberger
Quoted 5 lines
Quoted 2 lines
Without supplying the '-p' parameter amiboot didn't output anything at all, it just froze the amiga directly after entering the command.
Even with '-d'?
Yes, even with "-d", no output is printed, after entering the command ("amiboot -d root=/dev/hda5" for example) and pressing "enter" the system freezes immediately.
Hmm, must be a bug in common/amiga/linuxboot.c:ckfpu(), or ckcpu346().
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds