Kernel 5.12

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

Re: Kernel 5.12

Post by xeno74 »

Hi All,

I released the alpha6 of kernel 5.12 for the X1000 and X5000 today.
There are compiling issues but with reverting the bad commit, the kernels compile without any problems. Further information: Latest Git kernel doesn't compile because of the LINUX_VERSION_CODE issue

New:
Download: linux-image-5.12-alpha6-X1000_X5000.tar.gz

In addition, a nice background image for your desktop:

Image

Please test the kernels.

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

Running Linux on AmigaONEs can require some tinkering.
User avatar
musa
Posts: 478
Joined: Tue Aug 23, 2011 7:58 pm

Re: Kernel 5.12

Post by musa »

Hi christian
I testet Debian 10 ppc with kernel 5.12_a6
Workning fine.
Have a nice day
linux-5.12_a6.png
AmigaX1000
Follow me on twitter @basjoo_dk
User avatar
xeno74
Posts: 6808
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.12

Post by xeno74 »

musa wrote: Fri Feb 26, 2021 6:26 pm Hi christian
I testet Debian 10 ppc with kernel 5.12_a6
Workning fine.
Have a nice day
linux-5.12_a6.png
Fantastic! :-) Thank you for testing! :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 5.12

Post by xeno74 »

Hi All,

The alpha7 of kernel 5.12 has been released for testing.

New:
Download: linux-image-5.12-alpha7-X1000_X5000.tar.gz

Image

Please test the kernels.

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

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

Re: Kernel 5.12

Post by xeno74 »

Masahiro Yamada has created a patch because of the compiling issue. If you don't have set the values of the variables SUBLEVEL and PATCHLEVEL in the file "a/Makefile" in the latest Git kernels then the compiling fails. This patch solves this issue.

Code: Select all

Commit 9b82f13e7ef3 ("kbuild: clamp SUBLEVEL to 255") breaks the build
if SUBLEVEL or PATCHLEVEL is empty.

Commit 78d3bb4483ba ("kbuild: Fix <linux/version.h> for empty SUBLEVEL
or PATCHLEVEL") fixed the issue by prepending a zero.

This time, we cannot take the same approach because we have C code:

  #define LINUX_VERSION_PATCHLEVEL $(PATCHLEVEL)
  #define LINUX_VERSION_SUBLEVEL $(SUBLEVEL)

Replace empty SUBLEVEL or PATCHLEVEL with a zero.

Fixes: 9b82f13e7ef3 ("kbuild: clamp SUBLEVEL to 255")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index f2dc2f953e23..14c13b09a9e7 100644
--- a/Makefile
+++ b/Makefile
@@ -1283,10 +1283,10 @@ endef
 define filechk_version.h
 	if [ $(SUBLEVEL) -gt 255 ]; then                                 \
 		echo \#define LINUX_VERSION_CODE $(shell                 \
-		expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 255); \
+		expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + 255); \
 	else                                                             \
 		echo \#define LINUX_VERSION_CODE $(shell                 \
-		expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \
+		expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \
 	fi;                                                              \
 	echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) +  \
 	((c) > 255 ? 255 : (c)))';                                       \
@@ -1295,6 +1295,8 @@ define filechk_version.h
 	echo \#define LINUX_VERSION_SUBLEVEL $(SUBLEVEL)
 endef
 
+$(version_h): PATCHLEVEL := $(if $(PATCHLEVEL), $(PATCHLEVEL), 0)
+$(version_h): SUBLEVEL := $(if $(SUBLEVEL), $(SUBLEVEL), 0)
 $(version_h): FORCE
 	$(call filechk,version.h)
 
-- 
2.27.0
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
musa
Posts: 478
Joined: Tue Aug 23, 2011 7:58 pm

Re: Kernel 5.12

Post by musa »

Hi
Testing kernel 5.12 a7 on Debian/mint 32 . Using FS-UAE
Have a nice day
kernel5.12a7.png
AmigaX1000
Follow me on twitter @basjoo_dk
User avatar
xeno74
Posts: 6808
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.12

Post by xeno74 »

musa wrote: Sun Feb 28, 2021 12:05 pm Hi
Testing kernel 5.12 a7 on Debian/mint 32 . Using FS-UAE
Have a nice day
Hi Musa,

Many thanks for testing the alpha7. You helps me a lot. :-) Thank you for this.

Have a nice day too,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
daz
Beta Tester
Beta Tester
Posts: 328
Joined: Tue Dec 21, 2010 7:32 pm

Re: Kernel 5.12

Post by daz »

xeno74 wrote: Fri Feb 26, 2021 3:33 pm Hi All,

I released the alpha6 of kernel 5.12 for the X1000 and X5000 today.
There are compiling issues but with reverting the bad commit, the kernels compile without any problems. Further information: Latest Git kernel doesn't compile because of the LINUX_VERSION_CODE issue
Christian,

Please apply the following to your X1000 build and test. I've booted a next kernel with this applied, but my X1000 linux is a little broken at the moment so I can't fully test.

Code: Select all

diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index 8779b10..e6ce4f6 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -24,6 +24,8 @@
 
 #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off))
 
+extern void nemo_init_IRQ(void);
+
 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset)
 {
 	/* Device 0 Function 0 is special: It's config space spans function 1 as
@@ -264,6 +266,11 @@ static int __init pas_add_bridge(struct device_node *dev)
 	 */
 	isa_bridge_find_early(hose);
 
+	/*
+	 * ISA brigde is now active, add the i8259 cascade (if needed)
+	 */
+	nemo_init_IRQ();
+
 	return 0;
 }
 
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 376797e..0363853 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -212,10 +212,12 @@ static void sb600_8259_cascade(struct irq_desc *desc)
 	chip->irq_eoi(&desc->irq_data);
 }
 
-static void nemo_init_IRQ(struct mpic *mpic)
+void nemo_init_IRQ(void)
 {
 	struct device_node *np;
 	int gpio_virq;
+	struct mpic *mpic;
+
 	/* Connect the SB600's legacy i8259 controller */
 	np = of_find_node_by_path("/pxp@0,e0000000");
 	i8259_init(np, 0);
@@ -226,6 +228,7 @@ static void nemo_init_IRQ(struct mpic *mpic)
 	irq_set_chained_handler(gpio_virq, sb600_8259_cascade);
 	mpic_unmask_irq(irq_get_irq_data(gpio_virq));
 
+	mpic = irq_get_chip_data(gpio_virq);
 	irq_set_default_host(mpic->irqhost);
 }
 
@@ -296,8 +299,6 @@ static __init void pas_init_IRQ(void)
 		mpic_unmask_irq(irq_get_irq_data(nmi_virq));
 	}
 
-	nemo_init_IRQ(mpic);
-
 	of_node_put(mpic_node);
 	of_node_put(root);
 }
If is OK will submit later this week/next week.

Regards
Darren
User avatar
xeno74
Posts: 6808
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.12

Post by xeno74 »

daz wrote: Sun Feb 28, 2021 10:58 pm Christian,

Please apply the following to your X1000 build and test. I've booted a next kernel with this applied, but my X1000 linux is a little broken at the moment so I can't fully test.

If is OK will submit later this week/next week.

Regards
Darren
Hi Darren,

Many thanks for your patch! We will test it.

@All

The Linux 5.12 merge window has been closed. The RC1 of kernel 5.12 is available for the X1000 and X5000.

New:
Download: linux-image-5.12-rc1-X1000_X5000.tar.gz

In addition, a nice background image for your desktop:

Image


@Musa

Could you please test this kernel because of Darren's new patch on your X1000?

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

Running Linux on AmigaONEs can require some tinkering.
User avatar
musa
Posts: 478
Joined: Tue Aug 23, 2011 7:58 pm

Re: Kernel 5.12

Post by musa »

xeno74 wrote: Mon Mar 01, 2021 7:19 am
@Musa

Could you please test this kernel because of Darren's new patch on your X1000?

Thanks,
Christian
Yes I can Christian.
Here is kernel 5.12-rc1 on Fienix . I have not put modules in libs but the kernel boot fine.
Have a nice day
kernel-5.12-rc1.png
AmigaX1000
Follow me on twitter @basjoo_dk
Post Reply