Kernel 3.18

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18

Post by xeno74 »

A new Nemo patch for the RC6:
nemo_3.18-2.patch.tar.bz2
(8.06 KiB) Downloaded 892 times
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18

Post by xeno74 »

New Nemo kernel config for the RC6:
nemo_3.18.0-rc6_KVM-PR_OVERLAYFS.config.tar.bz2
(16.1 KiB) Downloaded 1091 times
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
ddni
Posts: 230
Joined: Fri Dec 02, 2011 11:06 pm

Re: Kernel 3.18

Post by ddni »

Have to say, despite my reservations about Linux, your hard work and skill is very very impressive!
Good job and thank you.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18

Post by xeno74 »

ddni wrote:Have to say, despite my reservations about Linux, your hard work and skill is very very impressive!
Good job and thank you.
Thank you very much for these kind words.

@All

Zzd10h reported a problem with the PASEMI (Vitesse VSC8221) network chip yesterday. At boot, there was a message "eth0: Could not attach to phy" and a notification "Wire network is unplugged" on the desktop. But the network with the PASEMI network chip worked without any problems. The earlier RCs don't have this issue.
I have figured out, that the new address configuration for the device-tree is responsible for the behavior of the PASEMI network chip. The kernel developers changed the source code for the address configuration last week because it was a historical hack that treated missing ranges properties as the equivalent of an empty one. But our A1-X1000 needs this hack. I have reverted the changes today and now, the PASEMI network chip works without this strange behavior.

Code: Select all

diff -rupN linux-3.18/drivers/of/address.c linux-3.18-nemo/drivers/of/address.c
--- linux-3.18/drivers/of/address.c	2014-11-24 00:25:20.000000000 +0100
+++ linux-3.18-nemo/drivers/of/address.c	2014-11-17 01:36:20.000000000 +0100
@@ -450,21 +450,6 @@ static struct of_bus *of_match_bus(struc
 	return NULL;
 }
 
-static int of_empty_ranges_quirk(void)
-{
-	if (IS_ENABLED(CONFIG_PPC)) {
-		/* To save cycles, we cache the result */
-		static int quirk_state = -1;
-
-		if (quirk_state < 0)
-			quirk_state =
-				of_machine_is_compatible("Power Macintosh") ||
-				of_machine_is_compatible("MacRISC");
-		return quirk_state;
-	}
-	return false;
-}
-
 static int of_translate_one(struct device_node *parent, struct of_bus *bus,
 			    struct of_bus *pbus, __be32 *addr,
 			    int na, int ns, int pna, const char *rprop)
@@ -490,10 +475,12 @@ static int of_translate_one(struct devic
 	 * This code is only enabled on powerpc. --gcl
 	 */
 	ranges = of_get_property(parent, rprop, &rlen);
-	if (ranges == NULL && !of_empty_ranges_quirk()) {
+#if !defined(CONFIG_PPC)
+	if (ranges == NULL) {
 		pr_err("OF: no ranges; cannot translate\n");
 		return 1;
 	}
+#endif /* !defined(CONFIG_PPC) */
 	if (ranges == NULL || rlen == 0) {
 		offset = of_read_number(addr, na);
 		memset(addr, 0, pna * 4);
New Nemo patch:
nemo_3.18-3.patch.zip
(9.26 KiB) Downloaded 1516 times
Download RC6-2: vmlinux-3.18.0-rc6-2-KVM-PR-OVERLAYFS-AMIGA_one_X1000.tar.bz2
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Re: Kernel 3.18

Post by zzd10h »

Thank you for the fix and the explanation. It works now.

But why does it worked for you ?

Because I have an old AEon-stock Ubuntu 12.04 ?
(when i will have time and motivation, i will add a second hard-drive to install a newer linux distro)
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18

Post by xeno74 »

zzd10h wrote: But why does it worked for you ?
After the compiling the RC6, I done a big test. In this test I also recognized this behavior and then I disabled the PASEMI network chip with the Networkmanager. I wanted to wait on bug reports by other testers.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18

Post by xeno74 »

Dear Linux kernel tester

I have cross compiled the RC7 on my x86-64 Ubuntu Server 14.04.1 today. :-)

Could you test this cross compiled kernel on your AMIGA one X1000, please? I'd like to know if cross compiling works.

Download: vmlinux-3.18.0-rc7-KVM-PR-OVERLAYFS-AMIGA_one_X1000.tar.bz2

Cross compiling instructions:

System requirements: Ubuntu 14.04 x86 or higher
  1. Install the toolchain with the following commands:

    Code: Select all

    sudo apt-get install gcc-powerpc-linux-gnu

    Code: Select all

    sudo apt-get install build-essential

    Code: Select all

    sudo apt-get install libncurses5-dev
  2. Download the RC7:

    Code: Select all

    wget www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.18-rc7.tar.gz
  3. Unpack the kernel archive:

    Code: Select all

    tar zxvf linux-3.18-rc7.tar.gz
  4. Rename the directory for the Nemo patch:

    Code: Select all

    mv linux-3.18-rc7 linux-3.18
  5. Patch the kernel source code with the Nemo patch:

    Code: Select all

    patch -p0 < nemo_3.18-3.patch
  6. Copy the old RC6 config file to the linux-3.18 directory:

    Code: Select all

    cp nemo_3.18.0-rc6_KVM-PR_OVERLAYFS.config linux-3.18/.config
  7. Change to the directory linux-3.18:

    Code: Select all

    cd linux-3.18
  8. Create a RC7 config based on the old RC6 config:

    Code: Select all

    make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc oldconfig
  9. Compile the Linux kernel:

    Code: Select all

    make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc vmlinux
  10. With file you can check if make had built a PPC64 kernel.

    Code: Select all

    file vmlinux
    vmlinux: ELF 64-bit MSB executale, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, BuildID[sha1]=3cec1ab0e5804eeafbfdcb249c54625336d70a6f, not stripped
  11. Compile the Linux kernel modules:

    Code: Select all

    make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc modules
  12. Install the Linux kernel modules:

    Code: Select all

    sudo make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc modules_install
    You can get the kernel modules from the directory /lib/modules
.

Please, test the cross compiled kernel.

I am looking forward to getting your answers.

Thanks in advance.

Best regards

Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Re: Kernel 3.18

Post by zzd10h »

"I'd like to know if cross compiling works."
I don't undesrtand, don't you have a x1000 ?


I tested your new kernel, all is working (network & sound) fine !
Cross-compiling seems to work :-D

Image
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18

Post by xeno74 »

zzd10h wrote:I don't undesrtand, don't you have a x1000?
Yes, of course I have a X1000. :-)

But I wanted to test cross compiling.
zzd10h wrote: I tested your new kernel, all is working (network & sound) fine !
Cross-compiling seems to work :-D

Image

Merci for the really fast testing. :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply