* SGI O2 meth: missing sysfs device symlink
[not found] ` <50621.192.168.2.50.1179383217.squirrel@eppesuigoccas.homedns.org>
@ 2007-05-17 15:16 ` Martin Michlmayr
2007-05-21 15:47 ` Ralf Baechle
0 siblings, 1 reply; 22+ messages in thread
From: Martin Michlmayr @ 2007-05-17 15:16 UTC (permalink / raw)
To: linux-mips; +Cc: Giuseppe Sacco
Apparently udev fails to rename the SGI O2 interface because it
doesn't have a sysfs device symlink. Does someone here know how to
fix this?
* Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org> [2007-05-17 08:26]:
> [...]
> > Interfaces must have a device symlink (in /sys/class/net/$IFACE/, which
> > some broken drivers lack) and unique MAC addresses.
>
> Hi Marco,
> this "device" link is missing for this driver. So probably this is a
> kernel bug.
>
> giuseppe@sgi:~$ ls -ld /sys/class/net/*{,/device}
> drwxr-xr-x 3 root root 0 2007-05-17 08:22 /sys/class/net/eth0
> drwxr-xr-x 3 root root 0 2007-05-17 08:22 /sys/class/net/eth100
> lrwxrwxrwx 1 root root 0 2007-05-17 08:22 /sys/class/net/eth100/device ->
> ../../../devices/pci0000:00/0000:00:03.0
> drwxr-xr-x 3 root root 0 2007-05-12 23:35 /sys/class/net/lo
> drwxr-xr-x 3 root root 0 2007-05-12 15:10 /sys/class/net/ppp0
> drwxr-xr-x 3 root root 0 2007-05-12 21:35 /sys/class/net/sit0
>
> Thanks,
> Giuseppe
--
Martin Michlmayr
http://www.cyrius.com/
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-17 15:16 ` SGI O2 meth: missing sysfs device symlink Martin Michlmayr
@ 2007-05-21 15:47 ` Ralf Baechle
2007-05-22 11:09 ` Ralf Baechle
0 siblings, 1 reply; 22+ messages in thread
From: Ralf Baechle @ 2007-05-21 15:47 UTC (permalink / raw)
To: Martin Michlmayr; +Cc: linux-mips, Giuseppe Sacco
On Thu, May 17, 2007 at 05:16:37PM +0200, Martin Michlmayr wrote:
> Apparently udev fails to rename the SGI O2 interface because it
> doesn't have a sysfs device symlink. Does someone here know how to
> fix this?
The driver needs to be rewritten to support the device driver model which
in this case means as a platform device.
The driver is ok; it's just ancient style, not long ago was using constructs
there were already deprecated for 2.4 ...
Ralf
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-21 15:47 ` Ralf Baechle
@ 2007-05-22 11:09 ` Ralf Baechle
2007-05-22 11:41 ` Giuseppe Sacco
2007-05-23 3:51 ` Kumba
0 siblings, 2 replies; 22+ messages in thread
From: Ralf Baechle @ 2007-05-22 11:09 UTC (permalink / raw)
To: Martin Michlmayr; +Cc: linux-mips, Giuseppe Sacco
On Mon, May 21, 2007 at 04:47:26PM +0100, Ralf Baechle wrote:
Below patch is meant to cure the problem. It's against HEAD but should
apply to somewhat older problems as well.
I appreciate testing asap so I can try to still push this upstream
for 2.6.22.
Thanks,
Ralf
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/arch/mips/sgi-ip32/Makefile b/arch/mips/sgi-ip32/Makefile
index 7e14167..60f0227 100644
--- a/arch/mips/sgi-ip32/Makefile
+++ b/arch/mips/sgi-ip32/Makefile
@@ -3,5 +3,5 @@
# under Linux.
#
-obj-y += ip32-berr.o ip32-irq.o ip32-setup.o ip32-reset.o \
+obj-y += ip32-berr.o ip32-irq.o ip32-platform.o ip32-setup.o ip32-reset.o \
crime.o ip32-memory.o
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c
new file mode 100644
index 0000000..120b159
--- /dev/null
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -0,0 +1,20 @@
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+static __init int meth_devinit(void)
+{
+ struct platform_device *pd;
+ int ret;
+
+ pd = platform_device_alloc("meth", -1);
+ if (!pd)
+ return -ENOMEM;
+
+ ret = platform_device_add(pd);
+ if (ret)
+ platform_device_put(pd);
+
+ return ret;
+}
+
+device_initcall(meth_devinit);
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index 0343ea1..f300d3f 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -8,15 +8,16 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
-#include <linux/module.h>
-#include <linux/init.h>
-
-#include <linux/kernel.h> /* printk() */
#include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
#include <linux/slab.h>
-#include <linux/errno.h> /* error codes */
-#include <linux/types.h> /* size_t */
-#include <linux/interrupt.h> /* mark_bh */
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
#include <linux/in.h>
#include <linux/in6.h>
@@ -33,7 +34,6 @@
#include <asm/io.h>
#include <asm/scatterlist.h>
-#include <linux/dma-mapping.h>
#include "meth.h"
@@ -51,8 +51,6 @@
static const char *meth_str="SGI O2 Fast Ethernet";
-MODULE_AUTHOR("Ilya Volynets <ilya@theIlya.com>");
-MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver");
#define HAVE_TX_TIMEOUT
/* The maximum time waited (in jiffies) before assuming a Tx failed. (400ms) */
@@ -784,15 +782,15 @@ static struct net_device_stats *meth_stats(struct net_device *dev)
/*
* The init function.
*/
-static struct net_device *meth_init(void)
+static int __init meth_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct meth_private *priv;
- int ret;
+ int err;
dev = alloc_etherdev(sizeof(struct meth_private));
if (!dev)
- return ERR_PTR(-ENOMEM);
+ return -ENOMEM;
dev->open = meth_open;
dev->stop = meth_release;
@@ -808,11 +806,12 @@ static struct net_device *meth_init(void)
priv = netdev_priv(dev);
spin_lock_init(&priv->meth_lock);
+ SET_NETDEV_DEV(dev, &pdev->dev);
- ret = register_netdev(dev);
- if (ret) {
+ err = register_netdev(dev);
+ if (err) {
free_netdev(dev);
- return ERR_PTR(ret);
+ return err;
}
printk(KERN_INFO "%s: SGI MACE Ethernet rev. %d\n",
@@ -820,21 +819,44 @@ static struct net_device *meth_init(void)
return 0;
}
-static struct net_device *meth_dev;
+static int __exit meth_remove(struct platform_device *pdev)
+{
+ struct net_device *dev = platform_get_drvdata(pdev);
+
+ unregister_netdev(dev);
+ free_netdev(dev);
+ platform_set_drvdata(pdev, NULL);
+
+ return 0;
+}
+
+static struct platform_driver meth_driver = {
+ .probe = meth_probe,
+ .remove = __devexit_p(meth_remove),
+ .driver = {
+ .name = "meth",
+ }
+};
static int __init meth_init_module(void)
{
- meth_dev = meth_init();
- if (IS_ERR(meth_dev))
- return PTR_ERR(meth_dev);
- return 0;
+ int err;
+
+ err = platform_driver_register(&meth_driver);
+ if (err)
+ printk(KERN_ERR "Driver registration failed\n");
+
+ return err;
}
static void __exit meth_exit_module(void)
{
- unregister_netdev(meth_dev);
- free_netdev(meth_dev);
+ platform_driver_register(&meth_driver);
}
module_init(meth_init_module);
module_exit(meth_exit_module);
+
+MODULE_AUTHOR("Ilya Volynets <ilya@theIlya.com>");
+MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver");
+MODULE_LICENSE("GPL");
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 11:09 ` Ralf Baechle
@ 2007-05-22 11:41 ` Giuseppe Sacco
2007-05-22 12:01 ` sknauert
2007-05-22 12:13 ` Giuseppe Sacco
2007-05-23 3:51 ` Kumba
1 sibling, 2 replies; 22+ messages in thread
From: Giuseppe Sacco @ 2007-05-22 11:41 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
Il giorno mar, 22/05/2007 alle 12.09 +0100, Ralf Baechle ha scritto:
> On Mon, May 21, 2007 at 04:47:26PM +0100, Ralf Baechle wrote:
>
> Below patch is meant to cure the problem. It's against HEAD but should
> apply to somewhat older problems as well.
>
> I appreciate testing asap so I can try to still push this upstream
> for 2.6.22.
[...]
I may test it against 2.6.18, the standard debian kernel for stable; but
I will be on the console only in two days :-(
Bye,
Giuseppe
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 11:41 ` Giuseppe Sacco
@ 2007-05-22 12:01 ` sknauert
2007-05-22 12:28 ` Ralf Baechle
2007-05-22 13:02 ` SGI O2 meth: missing sysfs device symlink Thiemo Seufer
2007-05-22 12:13 ` Giuseppe Sacco
1 sibling, 2 replies; 22+ messages in thread
From: sknauert @ 2007-05-22 12:01 UTC (permalink / raw)
To: Giuseppe Sacco; +Cc: Ralf Baechle, linux-mips
I've noticed that besides kernel complied from the Debian 2.6.18, I can't
get any other kernel (vanilla from kernel.org or the separate linux-MIPS
repository) to boot on my O2.
If you need beta testers, I can try, but it will take a day or so
(compiling on the O2 is slow).
Finally, I've been working on the PCI Legacy IO issue (progress is sadly
slow - don't have a fully compiling patchset yet), would this patch be
relevant since its also an O2 sysfs issue?
> Il giorno mar, 22/05/2007 alle 12.09 +0100, Ralf Baechle ha scritto:
>> On Mon, May 21, 2007 at 04:47:26PM +0100, Ralf Baechle wrote:
>>
>> Below patch is meant to cure the problem. It's against HEAD but should
>> apply to somewhat older problems as well.
>>
>> I appreciate testing asap so I can try to still push this upstream
>> for 2.6.22.
> [...]
>
> I may test it against 2.6.18, the standard debian kernel for stable; but
> I will be on the console only in two days :-(
>
> Bye,
> Giuseppe
>
>
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 11:41 ` Giuseppe Sacco
2007-05-22 12:01 ` sknauert
@ 2007-05-22 12:13 ` Giuseppe Sacco
2007-05-22 13:00 ` Ralf Baechle
2007-05-23 11:45 ` Giuseppe Sacco
1 sibling, 2 replies; 22+ messages in thread
From: Giuseppe Sacco @ 2007-05-22 12:13 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Martin Michlmayr
Il giorno mar, 22/05/2007 alle 13.41 +0200, Giuseppe Sacco ha scritto:
> Il giorno mar, 22/05/2007 alle 12.09 +0100, Ralf Baechle ha scritto:
> > On Mon, May 21, 2007 at 04:47:26PM +0100, Ralf Baechle wrote:
> >
> > Below patch is meant to cure the problem. It's against HEAD but should
> > apply to somewhat older problems as well.
> >
> > I appreciate testing asap so I can try to still push this upstream
> > for 2.6.22.
> [...]
>
> I may test it against 2.6.18, the standard debian kernel for stable; but
> I will be on the console only in two days :-(
It seems the patch doesn't apply on 2.6.18, so I will recompile
2.6.22-rc2, but I do not know if it works on my SGI. I never tried it.
The error is:
giuseppe@sgi:/usr/local/src/linux-source-2.6.18$ patch -p1 --dry-run </tmp/sgi.patch
patching file arch/mips/sgi-ip32/Makefile
Hunk #1 succeeded at 3 with fuzz 2.
patching file arch/mips/sgi-ip32/ip32-platform.c
patching file drivers/net/meth.c
Hunk #1 FAILED at 8.
Hunk #2 succeeded at 36 with fuzz 2 (offset 2 lines).
Hunk #3 succeeded at 53 (offset 2 lines).
Hunk #4 succeeded at 785 (offset 3 lines).
Hunk #5 succeeded at 809 with fuzz 2 (offset 3 lines).
Hunk #6 succeeded at 822 (offset 3 lines).
1 out of 6 hunks FAILED -- saving rejects to file drivers/net/meth.c.rej
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 12:01 ` sknauert
@ 2007-05-22 12:28 ` Ralf Baechle
2007-05-22 13:32 ` sknauert
2007-05-22 13:02 ` SGI O2 meth: missing sysfs device symlink Thiemo Seufer
1 sibling, 1 reply; 22+ messages in thread
From: Ralf Baechle @ 2007-05-22 12:28 UTC (permalink / raw)
To: sknauert; +Cc: Giuseppe Sacco, linux-mips
On Tue, May 22, 2007 at 08:01:53AM -0400, sknauert@wesleyan.edu wrote:
> I've noticed that besides kernel complied from the Debian 2.6.18, I can't
> get any other kernel (vanilla from kernel.org or the separate linux-MIPS
> repository) to boot on my O2.
>
> If you need beta testers, I can try, but it will take a day or so
> (compiling on the O2 is slow).
Sounds almost like you're building an excessibly large kernel configuration.
A realistic kernel config will crosscompile within a few minutes on a
modest machine such as a 3GHz / 1GB P4-class PC.
But to lessen the pains of your aching CPU, here's a binary tarball:
ftp://ftp.linux-mips.org/pub/linux/mips/people/ralf/sgi-ip32/linux-2.6.22-rc2-gc6b5a619-dirty.tar.bz2
> Finally, I've been working on the PCI Legacy IO issue (progress is sadly
> slow - don't have a fully compiling patchset yet), would this patch be
> relevant since its also an O2 sysfs issue?
The two issues are entirely unrelated.
Ralf
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 12:13 ` Giuseppe Sacco
@ 2007-05-22 13:00 ` Ralf Baechle
2007-05-23 11:45 ` Giuseppe Sacco
1 sibling, 0 replies; 22+ messages in thread
From: Ralf Baechle @ 2007-05-22 13:00 UTC (permalink / raw)
To: Giuseppe Sacco; +Cc: linux-mips, Martin Michlmayr
On Tue, May 22, 2007 at 02:13:11PM +0200, Giuseppe Sacco wrote:
> It seems the patch doesn't apply on 2.6.18, so I will recompile
> 2.6.22-rc2, but I do not know if it works on my SGI. I never tried it.
Remove the "#include <linux/sched.h>" line drivers/net/meth.c, then apply
the patch. Anyway, here's also a binary tarball:
ftp://ftp.linux-mips.org/pub/linux/mips/people/ralf/sgi-ip32/linux-2.6.18.8-gb29bece0-dirty.tar.bz2
Ralf
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 12:01 ` sknauert
2007-05-22 12:28 ` Ralf Baechle
@ 2007-05-22 13:02 ` Thiemo Seufer
1 sibling, 0 replies; 22+ messages in thread
From: Thiemo Seufer @ 2007-05-22 13:02 UTC (permalink / raw)
To: sknauert; +Cc: Giuseppe Sacco, Ralf Baechle, linux-mips
sknauert@wesleyan.edu wrote:
> I've noticed that besides kernel complied from the Debian 2.6.18, I can't
> get any other kernel (vanilla from kernel.org or the separate linux-MIPS
> repository) to boot on my O2.
>
> If you need beta testers, I can try, but it will take a day or so
> (compiling on the O2 is slow).
If you have a faster Debian system around you may want to try a
cross compiler: http://people.debian.org/~ths/toolchain/
Thiemo
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 12:28 ` Ralf Baechle
@ 2007-05-22 13:32 ` sknauert
2007-05-22 15:18 ` Thiemo Seufer
0 siblings, 1 reply; 22+ messages in thread
From: sknauert @ 2007-05-22 13:32 UTC (permalink / raw)
To: linux-mips
> On Tue, May 22, 2007 at 08:01:53AM -0400, sknauert@wesleyan.edu wrote:
>
>> I've noticed that besides kernel complied from the Debian 2.6.18, I
>> can't
>> get any other kernel (vanilla from kernel.org or the separate linux-MIPS
>> repository) to boot on my O2.
>>
>> If you need beta testers, I can try, but it will take a day or so
>> (compiling on the O2 is slow).
>
> Sounds almost like you're building an excessibly large kernel
> configuration.
> A realistic kernel config will crosscompile within a few minutes on a
> modest machine such as a 3GHz / 1GB P4-class PC.
>
I could never get cross-compiling to work, so I've been doing all my
compiling directly on the R5K 300 Mhz CPU in my O2. If there is an easy
way to get this to work, I'd be very thankful for some pointers. Might my
trying to compile on the actual machine be why I can't seem to use any
source other than Debian's 2.6.18?
> But to lessen the pains of your aching CPU, here's a binary tarball:
>
> ftp://ftp.linux-mips.org/pub/linux/mips/people/ralf/sgi-ip32/linux-2.6.22-rc2-gc6b5a619-dirty.tar.bz2
>
Thanks. I installed the kernel and arcboot was able to load it, but
nothing showed up on the screen. Does this have framebuffer support? In
was also unable to ssh in. Does this kernel have the necessary support for
that? It didn't fault at boot (like most of my nonbootable kernel do) and
I did hear the standard startup hard drive activity, so things may be
working. I was also able to get a response from the power button to
correctly reboot. Sadly I lack the necessary null modem cable for a serial
console (if this was the only interface you configured). If you can crank
out a new one with framebuffer support just as quickly, I'll gladly give
it a whirl.
>> Finally, I've been working on the PCI Legacy IO issue (progress is sadly
>> slow - don't have a fully compiling patchset yet), would this patch be
>> relevant since its also an O2 sysfs issue?
>
> The two issues are entirely unrelated.
>
> Ralf
>
Nice to know.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 13:32 ` sknauert
@ 2007-05-22 15:18 ` Thiemo Seufer
2007-05-22 16:46 ` Cross-Compile difficulties sknauert
0 siblings, 1 reply; 22+ messages in thread
From: Thiemo Seufer @ 2007-05-22 15:18 UTC (permalink / raw)
To: sknauert; +Cc: linux-mips
sknauert@wesleyan.edu wrote:
> > On Tue, May 22, 2007 at 08:01:53AM -0400, sknauert@wesleyan.edu wrote:
> >
> >> I've noticed that besides kernel complied from the Debian 2.6.18, I
> >> can't
> >> get any other kernel (vanilla from kernel.org or the separate linux-MIPS
> >> repository) to boot on my O2.
> >>
> >> If you need beta testers, I can try, but it will take a day or so
> >> (compiling on the O2 is slow).
> >
> > Sounds almost like you're building an excessibly large kernel
> > configuration.
> > A realistic kernel config will crosscompile within a few minutes on a
> > modest machine such as a 3GHz / 1GB P4-class PC.
> >
>
> I could never get cross-compiling to work, so I've been doing all my
> compiling directly on the R5K 300 Mhz CPU in my O2. If there is an easy
> way to get this to work, I'd be very thankful for some pointers. Might my
> trying to compile on the actual machine be why I can't seem to use any
> source other than Debian's 2.6.18?
Should be rather straightforward:
- Add the sources.list line mentioned in the repository to your
/etc/apt/sources.list, for debian/stable that's:
deb http://people.debian.org/~ths/toolchain/current etch/
- apt-get update
- apt-get install gcc-4.1-mips-linux-gnu
- In your www.linux-mips.org source tree, compile with e.g.
make CROSS_COMPILE=mips-linux-gnu- oldconfig
make CROSS_COMPILE=mips-linux-gnu- all
Thiemo
^ permalink raw reply [flat|nested] 22+ messages in thread
* Cross-Compile difficulties
2007-05-22 15:18 ` Thiemo Seufer
@ 2007-05-22 16:46 ` sknauert
2007-05-22 17:32 ` Geert Uytterhoeven
0 siblings, 1 reply; 22+ messages in thread
From: sknauert @ 2007-05-22 16:46 UTC (permalink / raw)
To: linux-mips
> sknauert@wesleyan.edu wrote:
>> > On Tue, May 22, 2007 at 08:01:53AM -0400, sknauert@wesleyan.edu wrote:
>> >
>> >> I've noticed that besides kernel complied from the Debian 2.6.18, I
>> >> can't
>> >> get any other kernel (vanilla from kernel.org or the separate
>> linux-MIPS
>> >> repository) to boot on my O2.
>> >>
>> >> If you need beta testers, I can try, but it will take a day or so
>> >> (compiling on the O2 is slow).
>> >
>> > Sounds almost like you're building an excessibly large kernel
>> > configuration.
>> > A realistic kernel config will crosscompile within a few minutes on a
>> > modest machine such as a 3GHz / 1GB P4-class PC.
>> >
>>
>> I could never get cross-compiling to work, so I've been doing all my
>> compiling directly on the R5K 300 Mhz CPU in my O2. If there is an easy
>> way to get this to work, I'd be very thankful for some pointers. Might
>> my
>> trying to compile on the actual machine be why I can't seem to use any
>> source other than Debian's 2.6.18?
>
> Should be rather straightforward:
>
> - Add the sources.list line mentioned in the repository to your
> /etc/apt/sources.list, for debian/stable that's:
>
> deb http://people.debian.org/~ths/toolchain/current etch/
>
> - apt-get update
> - apt-get install gcc-4.1-mips-linux-gnu
>
> - In your www.linux-mips.org source tree, compile with e.g.
> make CROSS_COMPILE=mips-linux-gnu- oldconfig
> make CROSS_COMPILE=mips-linux-gnu- all
>
>
> Thiemo
>
>
Thanks for your help, but that isn't working.
With both the 2.6.20.11 and 2.6.21.1 I get the same results.
To be verbose:
Shiva:/usr/src/linux-2.6.20.11# more /etc/apt/sources.list
deb http://ftp.debian.org/ etch main contrib non-free
deb http://mirrors.kernel.org/debian/ etch main contrib non-free
deb http://debian.lcs.mit.edu/debian/ etch main contrib non-free
deb http://people.debian.org/~ths/toolchain/current etch/
deb http://security.debian.org/ etch/updates main
Shiva:/usr/src/linux-2.6.20.11# apt-get update
Get:1 http://debian.lcs.mit.edu etch Release.gpg [378B]
Hit http://debian.lcs.mit.edu etch Release
Ign http://debian.lcs.mit.edu etch/main Packages/DiffIndex
Ign http://debian.lcs.mit.edu etch/contrib Packages/DiffIndex
Ign http://debian.lcs.mit.edu etch/non-free Packages/DiffIndex
Hit http://debian.lcs.mit.edu etch/main Packages
Hit http://debian.lcs.mit.edu etch/contrib Packages
Hit http://debian.lcs.mit.edu etch/non-free Packages
Ign http://people.debian.org etch/ Release.gpg
Get:2 http://ftp.debian.org etch Release.gpg [378B]
Ign http://people.debian.org etch/ Release
Get:3 http://mirrors.kernel.org etch Release.gpg [378B]
Hit http://ftp.debian.org etch Release
Ign http://people.debian.org etch/ Packages/DiffIndex
Ign http://ftp.debian.org etch/main Packages/DiffIndex
Hit http://mirrors.kernel.org etch Release
Ign http://people.debian.org etch/ Packages
Ign http://ftp.debian.org etch/contrib Packages/DiffIndex
Ign http://ftp.debian.org etch/non-free Packages/DiffIndex
Get:4 http://security.debian.org etch/updates Release.gpg [189B]
Hit http://people.debian.org etch/ Packages
Ign http://mirrors.kernel.org etch/main Packages/DiffIndex
Hit http://ftp.debian.org etch/main Packages
Hit http://ftp.debian.org etch/contrib Packages
Hit http://ftp.debian.org etch/non-free Packages
Ign http://mirrors.kernel.org etch/contrib Packages/DiffIndex
Ign http://mirrors.kernel.org etch/non-free Packages/DiffIndex
Hit http://security.debian.org etch/updates Release
Hit http://mirrors.kernel.org etch/main Packages
Hit http://mirrors.kernel.org etch/contrib Packages
Hit http://mirrors.kernel.org etch/non-free Packages
Ign http://security.debian.org etch/updates/main Packages/DiffIndex
Hit http://security.debian.org etch/updates/main Packages
Fetched 4B in 0s (5B/s)
Reading package lists... Done
Shiva:/usr/src/linux-2.6.20.11# apt-get install gcc-4.1-mips-linux-gnu
Reading package lists... Done
Building dependency tree... Done
gcc-4.1-mips-linux-gnu is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Shiva:/usr/src/linux-2.6.20.11# make CROSS_COMPILE=mips-linux-gnu- oldconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:107:23: error: sys/types.h: No such file or directory
scripts/basic/fixdep.c:108:22: error: sys/stat.h: No such file or directory
scripts/basic/fixdep.c:109:22: error: sys/mman.h: No such file or directory
scripts/basic/fixdep.c:110:20: error: unistd.h: No such file or directory
scripts/basic/fixdep.c:111:19: error: fcntl.h: No such file or directory
scripts/basic/fixdep.c:112:20: error: string.h: No such file or directory
scripts/basic/fixdep.c:113:20: error: stdlib.h: No such file or directory
scripts/basic/fixdep.c:114:19: error: stdio.h: No such file or directory
In file included from
/usr/lib/gcc/i486-linux-gnu/4.1.2/include/syslimits.h:7,
from /usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:11,
from scripts/basic/fixdep.c:115:
/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:122:61: error:
limits.h: No such file or directory
scripts/basic/fixdep.c:116:19: error: ctype.h: No such file or directory
scripts/basic/fixdep.c:117:23: error: arpa/inet.h: No such file or directory
scripts/basic/fixdep.c: In function ‘usage’:
scripts/basic/fixdep.c:131: warning: implicit declaration of function
‘fprintf’
scripts/basic/fixdep.c:131: warning: incompatible implicit declaration of
built-in function ‘fprintf’
scripts/basic/fixdep.c:131: error: ‘stderr’ undeclared (first use in this
function)
scripts/basic/fixdep.c:131: error: (Each undeclared identifier is reported
only once
scripts/basic/fixdep.c:131: error: for each function it appears in.)
scripts/basic/fixdep.c:132: warning: implicit declaration of function ‘exit’
scripts/basic/fixdep.c:132: warning: incompatible implicit declaration of
built-in function ‘exit’
scripts/basic/fixdep.c: In function ‘print_cmdline’:
scripts/basic/fixdep.c:140: warning: implicit declaration of function
‘printf’
scripts/basic/fixdep.c:140: warning: incompatible implicit declaration of
built-in function ‘printf’
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:143: error: ‘NULL’ undeclared here (not in a function)
scripts/basic/fixdep.c: In function ‘grow_config’:
scripts/basic/fixdep.c:156: warning: implicit declaration of function
‘realloc’
scripts/basic/fixdep.c:156: warning: assignment makes pointer from integer
without a cast
scripts/basic/fixdep.c:158: warning: implicit declaration of function
‘perror’
scripts/basic/fixdep.c:158: warning: incompatible implicit declaration of
built-in function ‘exit’
scripts/basic/fixdep.c: In function ‘is_defined_config’:
scripts/basic/fixdep.c:174: warning: implicit declaration of function
‘memcmp’
scripts/basic/fixdep.c: In function ‘define_config’:
scripts/basic/fixdep.c:187: warning: implicit declaration of function
‘memcpy’
scripts/basic/fixdep.c:187: warning: incompatible implicit declaration of
built-in function ‘memcpy’
scripts/basic/fixdep.c: In function ‘use_config’:
scripts/basic/fixdep.c:206: error: ‘PATH_MAX’ undeclared (first use in
this function)
scripts/basic/fixdep.c:214: warning: incompatible implicit declaration of
built-in function ‘memcpy’
scripts/basic/fixdep.c:220: warning: implicit declaration of function
‘tolower’
scripts/basic/fixdep.c:222: warning: incompatible implicit declaration of
built-in function ‘printf’
scripts/basic/fixdep.c:206: warning: unused variable ‘s’
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:225: error: expected declaration specifiers or
‘...’ before ‘size_t’
scripts/basic/fixdep.c: In function ‘parse_config_file’:
scripts/basic/fixdep.c:227: error: ‘len’ undeclared (first use in this
function)
scripts/basic/fixdep.c:233: warning: implicit declaration of function ‘ntohl’
scripts/basic/fixdep.c:244: warning: implicit declaration of function
‘isalnum’
scripts/basic/fixdep.c: In function ‘strrcmp’:
scripts/basic/fixdep.c:259: warning: implicit declaration of function
‘strlen’
scripts/basic/fixdep.c:259: warning: incompatible implicit declaration of
built-in function ‘strlen’
scripts/basic/fixdep.c: In function ‘do_config_file’:
scripts/basic/fixdep.c:270: error: storage size of ‘st’ isn’t known
scripts/basic/fixdep.c:274: warning: implicit declaration of function ‘open’
scripts/basic/fixdep.c:274: error: ‘O_RDONLY’ undeclared (first use in
this function)
scripts/basic/fixdep.c:276: warning: incompatible implicit declaration of
built-in function ‘fprintf’
scripts/basic/fixdep.c:276: error: ‘stderr’ undeclared (first use in this
function)
scripts/basic/fixdep.c:278: warning: incompatible implicit declaration of
built-in function ‘exit’
scripts/basic/fixdep.c:280: warning: implicit declaration of function ‘fstat’
scripts/basic/fixdep.c:282: warning: implicit declaration of function ‘close’
scripts/basic/fixdep.c:285: warning: implicit declaration of function ‘mmap’
scripts/basic/fixdep.c:285: error: ‘PROT_READ’ undeclared (first use in
this function)
scripts/basic/fixdep.c:285: error: ‘MAP_PRIVATE’ undeclared (first use in
this function)
scripts/basic/fixdep.c:285: warning: assignment makes pointer from integer
without a cast
scripts/basic/fixdep.c:292: error: too many arguments to function
‘parse_config_file’
scripts/basic/fixdep.c:294: warning: implicit declaration of function
‘munmap’
scripts/basic/fixdep.c:270: warning: unused variable ‘st’
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:299: error: expected declaration specifiers or
‘...’ before ‘size_t’
scripts/basic/fixdep.c: In function ‘parse_dep_file’:
scripts/basic/fixdep.c:302: error: ‘len’ undeclared (first use in this
function)
scripts/basic/fixdep.c:304: error: ‘PATH_MAX’ undeclared (first use in
this function)
scripts/basic/fixdep.c:306: warning: implicit declaration of function
‘strchr’
scripts/basic/fixdep.c:306: warning: incompatible implicit declaration of
built-in function ‘strchr’
scripts/basic/fixdep.c:308: warning: incompatible implicit declaration of
built-in function ‘fprintf’
scripts/basic/fixdep.c:308: error: ‘stderr’ undeclared (first use in this
function)
scripts/basic/fixdep.c:309: warning: incompatible implicit declaration of
built-in function ‘exit’
scripts/basic/fixdep.c:311: warning: incompatible implicit declaration of
built-in function ‘memcpy’
scripts/basic/fixdep.c:312: warning: incompatible implicit declaration of
built-in function ‘printf’
scripts/basic/fixdep.c:304: warning: unused variable ‘s’
scripts/basic/fixdep.c: In function ‘print_deps’:
scripts/basic/fixdep.c:341: error: storage size of ‘st’ isn’t known
scripts/basic/fixdep.c:345: error: ‘O_RDONLY’ undeclared (first use in
this function)
scripts/basic/fixdep.c:347: warning: incompatible implicit declaration of
built-in function ‘fprintf’
scripts/basic/fixdep.c:347: error: ‘stderr’ undeclared (first use in this
function)
scripts/basic/fixdep.c:349: warning: incompatible implicit declaration of
built-in function ‘exit’
scripts/basic/fixdep.c:353: warning: incompatible implicit declaration of
built-in function ‘fprintf’
scripts/basic/fixdep.c:357: error: ‘PROT_READ’ undeclared (first use in
this function)
scripts/basic/fixdep.c:357: error: ‘MAP_PRIVATE’ undeclared (first use in
this function)
scripts/basic/fixdep.c:357: warning: assignment makes pointer from integer
without a cast
scripts/basic/fixdep.c:364: error: too many arguments to function
‘parse_dep_file’
scripts/basic/fixdep.c:341: warning: unused variable ‘st’
scripts/basic/fixdep.c: In function ‘traps’:
scripts/basic/fixdep.c:376: warning: incompatible implicit declaration of
built-in function ‘fprintf’
scripts/basic/fixdep.c:376: error: ‘stderr’ undeclared (first use in this
function)
scripts/basic/fixdep.c:378: warning: incompatible implicit declaration of
built-in function ‘exit’
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
Shiva:/usr/src/linux-2.6.20.11#
Any ideas?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cross-Compile difficulties
2007-05-22 16:46 ` Cross-Compile difficulties sknauert
@ 2007-05-22 17:32 ` Geert Uytterhoeven
2007-05-22 22:44 ` sknauert
0 siblings, 1 reply; 22+ messages in thread
From: Geert Uytterhoeven @ 2007-05-22 17:32 UTC (permalink / raw)
To: sknauert; +Cc: linux-mips
On Tue, 22 May 2007, sknauert@wesleyan.edu wrote:
> scripts/basic/fixdep.c:107:23: error: sys/types.h: No such file or directory
You're missing the basic libraries for native compilation.
| apt-get install libc6-dev
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cross-Compile difficulties
2007-05-22 17:32 ` Geert Uytterhoeven
@ 2007-05-22 22:44 ` sknauert
2007-05-22 23:26 ` Carlos Munoz
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: sknauert @ 2007-05-22 22:44 UTC (permalink / raw)
To: linux-mips
> On Tue, 22 May 2007, sknauert@wesleyan.edu wrote:
>> scripts/basic/fixdep.c:107:23: error: sys/types.h: No such file or
>> directory
>
> You're missing the basic libraries for native compilation.
>
> | apt-get install libc6-dev
>
> Gr{oetje,eeting}s,
>
>
Thanks, I feel like a real idiot. Somehow a bunch of development packages
(libc6-dev, ncurses5-dev, and a few others) got uninstalled on that
machine.
Anyway... I was somewhat able to cross-compile a kernel.
Shiva:/usr/src/linux-2.6.21.1# file vmlinux
vmlinux: ELF 64-bit MSB executable, MIPS, MIPS-IV version 1 (SYSV),
statically linked, not stripped
However, when I rsync it over to my O2, it does not boot. It panics almost
immediately, like all other kernels I compiled natively (on the O2) from
something other than the Debian sources. This is the full panic as
displayed from the PROM:
Status register: 0x34010082<CUI,CU0,FR,DE,IPL=8,KX,MODE=KERNEL>
Cause register: 0x8014<CE=0,IP8,EXC=WADE>
Exception PC: 0x801da9fc, Exception RA: 0x8047b0ec
Write address error exception, bad address: 0xfffff000
Saved user regs in hex (&gpda 0x81061838, &_regs 0x81061a38):
arg: 81070000 50000 8049f510 2
tmp: 81070000 a800 804b5808 fff804d9 ffffffff 81412ef4 a13fab68 8
sve: 81070000 c064d6ca 0 46136478 0 c02b80ce 0 be4acb69
t8 81070000 0 t9 0 at 0 v0 c04936d8 v1 0 k1 fffff000
gp 81070000 fp0 sp 0 ra 0
Just to make sure I'm not doing something stupid. Here are the command in
my kernel build sequence:
make CROSS_COMPILE=mips-linux-gnu- oldconfig
make -j 3 CROSS_COMPILE=mips-linux-gnu- all
make CROSS_COMPILE=mips-linux-gnu- INSTALL_MOD_PATH=~/ modules_install
cp vmlinux ~/boot/vmlinux-2.6.21.1
cp System.map ~/boot/System.map-2.6.21.1
cp .config ~/boot/config-2.6.21.1
cd ~/
tar -cf kernel.tar lib boot
CONFIG_CROSSCOMPILE=y in my .config.
I also tried rsyncing the Debian sources over to my Core Duo 2 Debian
machine for cross-compiling. I was unable to get past the .config step.
Debian's patches must hinder cross-compiling in some manner. For example,
make menuconfig seems to refuse to display MIPS as the architecture
anymore.
I've been mainly using a working Debian 2.6.18 config (i.e. the one from
their package which lets me compile working 2.6.18 from the Debian
sources), but the default config (set to IP32, RK5, etc.) panics at boot
as well. Not sure if the message is 100% identical, I can double check if
anyone thinks that would help.
Thanks again for all the help, it's appreciated.
Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
> geert@linux-m68k.org
>
> 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
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cross-Compile difficulties
2007-05-22 22:44 ` sknauert
@ 2007-05-22 23:26 ` Carlos Munoz
2007-05-23 3:42 ` Kumba
2007-05-23 6:12 ` Geert Uytterhoeven
2 siblings, 0 replies; 22+ messages in thread
From: Carlos Munoz @ 2007-05-22 23:26 UTC (permalink / raw)
To: sknauert; +Cc: linux-mips
sknauert@wesleyan.edu wrote:
> make CROSS_COMPILE=mips-linux-gnu- oldconfig
> make -j 3 CROSS_COMPILE=mips-linux-gnu- all
> make CROSS_COMPILE=mips-linux-gnu- INSTALL_MOD_PATH=~/ modules_install
> cp vmlinux ~/boot/vmlinux-2.6.21.1
> cp System.map ~/boot/System.map-2.6.21.1
> cp .config ~/boot/config-2.6.21.1
> cd ~/
> tar -cf kernel.tar lib boot
>
Don't know if it makes any difference, but I always specify the
architecture on the command line:
make ARCH=mips -j 3 CROSS_COMPILE=mips-linux-gnu all
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cross-Compile difficulties
2007-05-22 22:44 ` sknauert
2007-05-22 23:26 ` Carlos Munoz
@ 2007-05-23 3:42 ` Kumba
2007-05-23 17:41 ` sknauert
2007-05-23 6:12 ` Geert Uytterhoeven
2 siblings, 1 reply; 22+ messages in thread
From: Kumba @ 2007-05-23 3:42 UTC (permalink / raw)
To: sknauert; +Cc: linux-mips
sknauert@wesleyan.edu wrote:
>> On Tue, 22 May 2007, sknauert@wesleyan.edu wrote:
>>> scripts/basic/fixdep.c:107:23: error: sys/types.h: No such file or
>>> directory
>> You're missing the basic libraries for native compilation.
>>
>> | apt-get install libc6-dev
>>
>> Gr{oetje,eeting}s,
>>
>>
>
> Thanks, I feel like a real idiot. Somehow a bunch of development packages
> (libc6-dev, ncurses5-dev, and a few others) got uninstalled on that
> machine.
>
> Anyway... I was somewhat able to cross-compile a kernel.
>
> Shiva:/usr/src/linux-2.6.21.1# file vmlinux
> vmlinux: ELF 64-bit MSB executable, MIPS, MIPS-IV version 1 (SYSV),
> statically linked, not stripped
>
> However, when I rsync it over to my O2, it does not boot. It panics almost
> immediately, like all other kernels I compiled natively (on the O2) from
> something other than the Debian sources. This is the full panic as
> displayed from the PROM:
>
> Status register: 0x34010082<CUI,CU0,FR,DE,IPL=8,KX,MODE=KERNEL>
> Cause register: 0x8014<CE=0,IP8,EXC=WADE>
> Exception PC: 0x801da9fc, Exception RA: 0x8047b0ec
> Write address error exception, bad address: 0xfffff000
> Saved user regs in hex (&gpda 0x81061838, &_regs 0x81061a38):
> arg: 81070000 50000 8049f510 2
> tmp: 81070000 a800 804b5808 fff804d9 ffffffff 81412ef4 a13fab68 8
> sve: 81070000 c064d6ca 0 46136478 0 c02b80ce 0 be4acb69
> t8 81070000 0 t9 0 at 0 v0 c04936d8 v1 0 k1 fffff000
> gp 81070000 fp0 sp 0 ra 0
>
> Just to make sure I'm not doing something stupid. Here are the command in
> my kernel build sequence:
>
> make CROSS_COMPILE=mips-linux-gnu- oldconfig
> make -j 3 CROSS_COMPILE=mips-linux-gnu- all
> make CROSS_COMPILE=mips-linux-gnu- INSTALL_MOD_PATH=~/ modules_install
> cp vmlinux ~/boot/vmlinux-2.6.21.1
> cp System.map ~/boot/System.map-2.6.21.1
> cp .config ~/boot/config-2.6.21.1
> cd ~/
> tar -cf kernel.tar lib boot
>
> CONFIG_CROSSCOMPILE=y in my .config.
>
> I also tried rsyncing the Debian sources over to my Core Duo 2 Debian
> machine for cross-compiling. I was unable to get past the .config step.
> Debian's patches must hinder cross-compiling in some manner. For example,
> make menuconfig seems to refuse to display MIPS as the architecture
> anymore.
>
> I've been mainly using a working Debian 2.6.18 config (i.e. the one from
> their package which lets me compile working 2.6.18 from the Debian
> sources), but the default config (set to IP32, RK5, etc.) panics at boot
> as well. Not sure if the message is 100% identical, I can double check if
> anyone thinks that would help.
>
> Thanks again for all the help, it's appreciated.
>
One, make sure you're doing "make vmlinux.32", and two, CONFIG_BUILD_ELF64 is
_not_ enabled. For 2.6.20, I had to cram in a patch from Frank to get these
things to not PROM crash (due to the elimination of CPHYSADDY and replacement by
__pa()), but on 2.6.21, this patch was unnecessary. Unsure about 2.6.22-rcX.
O2's will boot a pure 64bit kernel, but my experience is that they are
ridiculously slow at it (the console lags severely). vmlinux.32 is the modern
method of 64bit-code-in-a-32bit-shell, which the O2's and IP22 systems will
swallow much better.
Also, gbefb must be no greater than 4MB memory in menuconfig.
And what's the MHz of your R5000? 300MHz?, if so, it'll be the RM5200, and
you'll want "RM52xx" for CPU instead.
--Kumba
--
Gentoo/MIPS Team Lead
"Such is oft the course of deeds that move the wheels of the world: small hands
do them because they must, while the eyes of the great are elsewhere." --Elrond
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 11:09 ` Ralf Baechle
2007-05-22 11:41 ` Giuseppe Sacco
@ 2007-05-23 3:51 ` Kumba
2007-05-23 8:37 ` Ralf Baechle
1 sibling, 1 reply; 22+ messages in thread
From: Kumba @ 2007-05-23 3:51 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Martin Michlmayr, linux-mips, Giuseppe Sacco
Ralf Baechle wrote:
> On Mon, May 21, 2007 at 04:47:26PM +0100, Ralf Baechle wrote:
>
> Below patch is meant to cure the problem. It's against HEAD but should
> apply to somewhat older problems as well.
>
> I appreciate testing asap so I can try to still push this upstream
> for 2.6.22.
>
> Thanks,
>
> Ralf
>
Didn't test on 2.6.22 (yet), but 2.6.21.1 works:
# ls -ld /sys/class/net/*{,/device}
drwxr-xr-x 3 root root 0 May 22 18:19 /sys/class/net/eth0/
lrwxrwxrwx 1 root root 0 May 22 18:19 /sys/class/net/eth0/device ->
../../../devices/platform/meth/
drwxr-xr-x 3 root root 0 May 22 18:19 /sys/class/net/lo/
Btw, If we wanted to protect meth from the speculative execution issues of the
R10000 processor, what's the right way for that? I believe IP28 used a special
type of buffer for protecting Seeq from the DMA wonkiness that occurs, but I got
the indication that Meth would need a different approach.
--Kumba
--
Gentoo/MIPS Team Lead
"Such is oft the course of deeds that move the wheels of the world: small hands
do them because they must, while the eyes of the great are elsewhere." --Elrond
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cross-Compile difficulties
2007-05-22 22:44 ` sknauert
2007-05-22 23:26 ` Carlos Munoz
2007-05-23 3:42 ` Kumba
@ 2007-05-23 6:12 ` Geert Uytterhoeven
2 siblings, 0 replies; 22+ messages in thread
From: Geert Uytterhoeven @ 2007-05-23 6:12 UTC (permalink / raw)
To: sknauert; +Cc: linux-mips
On Tue, 22 May 2007, sknauert@wesleyan.edu wrote:
> I also tried rsyncing the Debian sources over to my Core Duo 2 Debian
> machine for cross-compiling. I was unable to get past the .config step.
> Debian's patches must hinder cross-compiling in some manner. For example,
> make menuconfig seems to refuse to display MIPS as the architecture
> anymore.
You did add `ARCH=mips' to the make command line?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-23 3:51 ` Kumba
@ 2007-05-23 8:37 ` Ralf Baechle
0 siblings, 0 replies; 22+ messages in thread
From: Ralf Baechle @ 2007-05-23 8:37 UTC (permalink / raw)
To: Kumba; +Cc: Martin Michlmayr, linux-mips, Giuseppe Sacco
On Tue, May 22, 2007 at 11:51:30PM -0400, Kumba wrote:
> Didn't test on 2.6.22 (yet), but 2.6.21.1 works:
That's the only one I care about for purposes of upstream patch submission
anyway.
> Btw, If we wanted to protect meth from the speculative execution issues of
> the R10000 processor, what's the right way for that? I believe IP28 used a
> special type of buffer for protecting Seeq from the DMA wonkiness that
> occurs, but I got the indication that Meth would need a different approach.
I don't see why the standard approach would fail for meth.
Ralf
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-22 12:13 ` Giuseppe Sacco
2007-05-22 13:00 ` Ralf Baechle
@ 2007-05-23 11:45 ` Giuseppe Sacco
2007-05-24 11:47 ` Ralf Baechle
1 sibling, 1 reply; 22+ messages in thread
From: Giuseppe Sacco @ 2007-05-23 11:45 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Martin Michlmayr
Il giorno mar, 22/05/2007 alle 14.13 +0200, Giuseppe Sacco ha scritto:
> Il giorno mar, 22/05/2007 alle 13.41 +0200, Giuseppe Sacco ha scritto:
> > Il giorno mar, 22/05/2007 alle 12.09 +0100, Ralf Baechle ha scritto:
> > > On Mon, May 21, 2007 at 04:47:26PM +0100, Ralf Baechle wrote:
> > >
> > > Below patch is meant to cure the problem. It's against HEAD but should
> > > apply to somewhat older problems as well.
> > >
> > > I appreciate testing asap so I can try to still push this upstream
> > > for 2.6.22.
> > [...]
> >
> > I may test it against 2.6.18, the standard debian kernel for stable; but
> > I will be on the console only in two days :-(
>
> It seems the patch doesn't apply on 2.6.18, so I will recompile
> 2.6.22-rc2, but I do not know if it works on my SGI. I never tried it.
I got 2.6.21.1 source, then I applied patch-2.6.22-rc2.bz2 and your
patch. I compiled everything with this command:
# make-kpkg clean
# time make-kpkg --revision 2:2.6.22~rc2 \
-append-to-version -r5k-ip32 --arch-in-name buildpackage
and got this result:
[...]
CC [M] net/ipv6/reassembly.o
CC [M] net/ipv6/tcp_ipv6.o
CC [M] net/ipv6/exthdrs.o
net/ipv6/exthdrs.c: In function ‘ipv6_rthdr_rcv’:
net/ipv6/exthdrs.c:390: error: ‘struct sk_buff’ has no member named ‘h’
net/ipv6/exthdrs.c:391: error: ‘struct sk_buff’ has no member named ‘h’
net/ipv6/exthdrs.c:391: error: ‘struct sk_buff’ has no member named ‘h’
net/ipv6/exthdrs.c:398: error: ‘struct sk_buff’ has no member named ‘h’
make[4]: *** [net/ipv6/exthdrs.o] Error 1
make[3]: *** [net/ipv6] Error 2
make[2]: *** [net] Error 2
make[2]: Leaving directory `/home/src/linux-2.6.22-rc2'
make[1]: *** [debian/stamp-build-kernel] Error 2
make[1]: Leaving directory `/home/src/linux-2.6.22-rc2'
make: *** [stamp-buildpackage] Error 2
real 409m49.142s
user 250m33.296s
sys 15m41.356s
sgi:/usr/local/src/linux-2.6.22-rc2# bc
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cross-Compile difficulties
2007-05-23 3:42 ` Kumba
@ 2007-05-23 17:41 ` sknauert
0 siblings, 0 replies; 22+ messages in thread
From: sknauert @ 2007-05-23 17:41 UTC (permalink / raw)
To: linux-mips
> sknauert@wesleyan.edu wrote:
>>> On Tue, 22 May 2007, sknauert@wesleyan.edu wrote:
>>>> scripts/basic/fixdep.c:107:23: error: sys/types.h: No such file or
>>>> directory
>>> You're missing the basic libraries for native compilation.
>>>
>>> | apt-get install libc6-dev
>>>
>>> Gr{oetje,eeting}s,
>>>
>>>
>>
>> Thanks, I feel like a real idiot. Somehow a bunch of development
>> packages
>> (libc6-dev, ncurses5-dev, and a few others) got uninstalled on that
>> machine.
>>
>> Anyway... I was somewhat able to cross-compile a kernel.
>>
>> Shiva:/usr/src/linux-2.6.21.1# file vmlinux
>> vmlinux: ELF 64-bit MSB executable, MIPS, MIPS-IV version 1 (SYSV),
>> statically linked, not stripped
>>
>> However, when I rsync it over to my O2, it does not boot. It panics
>> almost
>> immediately, like all other kernels I compiled natively (on the O2) from
>> something other than the Debian sources. This is the full panic as
>> displayed from the PROM:
>>
>> Status register: 0x34010082<CUI,CU0,FR,DE,IPL=8,KX,MODE=KERNEL>
>> Cause register: 0x8014<CE=0,IP8,EXC=WADE>
>> Exception PC: 0x801da9fc, Exception RA: 0x8047b0ec
>> Write address error exception, bad address: 0xfffff000
>> Saved user regs in hex (&gpda 0x81061838, &_regs 0x81061a38):
>> arg: 81070000 50000 8049f510 2
>> tmp: 81070000 a800 804b5808 fff804d9 ffffffff 81412ef4 a13fab68 8
>> sve: 81070000 c064d6ca 0 46136478 0 c02b80ce 0 be4acb69
>> t8 81070000 0 t9 0 at 0 v0 c04936d8 v1 0 k1 fffff000
>> gp 81070000 fp0 sp 0 ra 0
>>
>> Just to make sure I'm not doing something stupid. Here are the command
>> in
>> my kernel build sequence:
>>
>> make CROSS_COMPILE=mips-linux-gnu- oldconfig
>> make -j 3 CROSS_COMPILE=mips-linux-gnu- all
>> make CROSS_COMPILE=mips-linux-gnu- INSTALL_MOD_PATH=~/ modules_install
>> cp vmlinux ~/boot/vmlinux-2.6.21.1
>> cp System.map ~/boot/System.map-2.6.21.1
>> cp .config ~/boot/config-2.6.21.1
>> cd ~/
>> tar -cf kernel.tar lib boot
>>
>> CONFIG_CROSSCOMPILE=y in my .config.
>>
>> I also tried rsyncing the Debian sources over to my Core Duo 2 Debian
>> machine for cross-compiling. I was unable to get past the .config step.
>> Debian's patches must hinder cross-compiling in some manner. For
>> example,
>> make menuconfig seems to refuse to display MIPS as the architecture
>> anymore.
>>
>> I've been mainly using a working Debian 2.6.18 config (i.e. the one from
>> their package which lets me compile working 2.6.18 from the Debian
>> sources), but the default config (set to IP32, RK5, etc.) panics at boot
>> as well. Not sure if the message is 100% identical, I can double check
>> if
>> anyone thinks that would help.
>>
>> Thanks again for all the help, it's appreciated.
>>
>
> One, make sure you're doing "make vmlinux.32", and two, CONFIG_BUILD_ELF64
> is
> _not_ enabled. For 2.6.20, I had to cram in a patch from Frank to get
> these
> things to not PROM crash (due to the elimination of CPHYSADDY and
> replacement by
> __pa()), but on 2.6.21, this patch was unnecessary. Unsure about
> 2.6.22-rcX.
>
I tried the vmlinux.32 I had been generating previously, same response
from the PROM.
Didn't see any options something like CONFIG_BUILD_ELF64 in menuconfig
(the closest thing was kernel code model which is 64-bit only), so I just
manually edited the .config. I think my issue is that Debian's working
.config is setting some options contrary to what they need to be for a
later kernel or one without Debian's patches. With CONFIG_BUILD_ELF64=n
and the Debian .config I got compile errors.
Building from the default make menuconfig, then selecting the appropriate
O2 hardware, actually compiled and didn't panic at boot. However, nothing
happened after the PROM loaded the kernel. This happens for both the
vmlinux and vmlinux.32 kernels produced. The framebuffer (4Mb) didn't
start and I couldn't ssh in. This is more or less the same behavior as the
2.6.22-rc test kernel posted.
Anybody have a confirmed working .config for an O2?
> O2's will boot a pure 64bit kernel, but my experience is that they are
> ridiculously slow at it (the console lags severely). vmlinux.32 is the
> modern
> method of 64bit-code-in-a-32bit-shell, which the O2's and IP22 systems
> will
> swallow much better.
>
> Also, gbefb must be no greater than 4MB memory in menuconfig.
>
> And what's the MHz of your R5000? 300MHz?, if so, it'll be the RM5200,
> and
> you'll want "RM52xx" for CPU instead.
>
Its 300 Mhz, but I'm not actually sure as to whether its an R5000 or
R5200. hinv and dmesg show it as R5000, though apparently this is normal
hinv behavior for the R5200. If I switched R5000 to R5200 in the Debian
sources, the resulting kernel won't boot. Is it possible that my compiling
woes might be from the necessity to compile for R5200? Or should it be
backwards compatible, so I only miss out on optimizations.
>
> --Kumba
>
> --
> Gentoo/MIPS Team Lead
>
> "Such is oft the course of deeds that move the wheels of the world: small
> hands
> do them because they must, while the eyes of the great are elsewhere."
> --Elrond
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: SGI O2 meth: missing sysfs device symlink
2007-05-23 11:45 ` Giuseppe Sacco
@ 2007-05-24 11:47 ` Ralf Baechle
0 siblings, 0 replies; 22+ messages in thread
From: Ralf Baechle @ 2007-05-24 11:47 UTC (permalink / raw)
To: Giuseppe Sacco; +Cc: linux-mips, Martin Michlmayr
On Wed, May 23, 2007 at 01:45:35PM +0200, Giuseppe Sacco wrote:
> I got 2.6.21.1 source, then I applied patch-2.6.22-rc2.bz2 and your
> patch. I compiled everything with this command:
>
> # make-kpkg clean
> # time make-kpkg --revision 2:2.6.22~rc2 \
> -append-to-version -r5k-ip32 --arch-in-name buildpackage
>
> and got this result:
>
> [...]
> CC [M] net/ipv6/reassembly.o
> CC [M] net/ipv6/tcp_ipv6.o
> CC [M] net/ipv6/exthdrs.o
> net/ipv6/exthdrs.c: In function ‘ipv6_rthdr_rcv’:
> net/ipv6/exthdrs.c:390: error: ‘struct sk_buff’ has no member named ‘h’
> net/ipv6/exthdrs.c:391: error: ‘struct sk_buff’ has no member named ‘h’
> net/ipv6/exthdrs.c:391: error: ‘struct sk_buff’ has no member named ‘h’
> net/ipv6/exthdrs.c:398: error: ‘struct sk_buff’ has no member named ‘h’
> make[4]: *** [net/ipv6/exthdrs.o] Error 1
> make[3]: *** [net/ipv6] Error 2
> make[2]: *** [net] Error 2
> make[2]: Leaving directory `/home/src/linux-2.6.22-rc2'
> make[1]: *** [debian/stamp-build-kernel] Error 2
> make[1]: Leaving directory `/home/src/linux-2.6.22-rc2'
> make: *** [stamp-buildpackage] Error 2
>
> real 409m49.142s
> user 250m33.296s
> sys 15m41.356s
> sgi:/usr/local/src/linux-2.6.22-rc2# bc
Unrelated problem. If you can reproduce it with a vanilla kernel report
to netdev@vger.kernel.org.
Ralf
Ralf
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2007-05-24 11:47 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1178743456.15447.41.camel@scarafaggio>
[not found] ` <20070516151939.GH19816@deprecation.cyrius.com>
[not found] ` <20070516160313.GA3409@bongo.bofh.it>
[not found] ` <50621.192.168.2.50.1179383217.squirrel@eppesuigoccas.homedns.org>
2007-05-17 15:16 ` SGI O2 meth: missing sysfs device symlink Martin Michlmayr
2007-05-21 15:47 ` Ralf Baechle
2007-05-22 11:09 ` Ralf Baechle
2007-05-22 11:41 ` Giuseppe Sacco
2007-05-22 12:01 ` sknauert
2007-05-22 12:28 ` Ralf Baechle
2007-05-22 13:32 ` sknauert
2007-05-22 15:18 ` Thiemo Seufer
2007-05-22 16:46 ` Cross-Compile difficulties sknauert
2007-05-22 17:32 ` Geert Uytterhoeven
2007-05-22 22:44 ` sknauert
2007-05-22 23:26 ` Carlos Munoz
2007-05-23 3:42 ` Kumba
2007-05-23 17:41 ` sknauert
2007-05-23 6:12 ` Geert Uytterhoeven
2007-05-22 13:02 ` SGI O2 meth: missing sysfs device symlink Thiemo Seufer
2007-05-22 12:13 ` Giuseppe Sacco
2007-05-22 13:00 ` Ralf Baechle
2007-05-23 11:45 ` Giuseppe Sacco
2007-05-24 11:47 ` Ralf Baechle
2007-05-23 3:51 ` Kumba
2007-05-23 8:37 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox