Kernel 4.20

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Kernel 4.20/5.0

Post by Hypex »

tbreeden wrote: My CF disk is pretty big, so I haven't really needed compression.
I didn't need compression for any size contraints on disk. Mainly it is good for us as our firmware loads it in a slow PIO mode. Or from a CF/USB drive which can be even slower. Also firmware tends to have low limits (like under 16MB) for loading assets to boot.

On top of this, compressed kernels and ramdisks are a Linux industry standard. Even though Linux has targetted rather fast hardware on average, for some years now, it is common across the board to build in compression. For a kernel to lack compression is uncommon in the Linux world.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Kernel 4.20/5.0

Post by Hypex »

xeno74 wrote:Hypex is right. The compressed kernel is one-third smaller than the uncompressed kernel and it boots a little little little bit faster. I hope Hypex can help us with improving our Linux support. He posted here yesterday and it seems he is gone again.
Oh just over night. I went to bed. :)

I found some more info here. It targets x86 but talks about compressed kernels. So it's common for the kernel to unpack itself with a little unpacking wrapper in the boot code. Ha that's funny. :D

So it looks like PPC may miss out on the bzImage which creates a vmlinuz. Why I don't know. We could use it. Right now we are stuck at a vmlinux. Now I know the difference between a vmlinux and a vmlinuz. The later unpacks itself.

http://linuxdocs.org/HOWTOs/Kernel-HOWTO-5.html
I added initial ramdisks for the X5000 and X1000 to the stable kernel 4.19.1 yesterday. I only use ramdisks for booting with a LABEL or UUID. Please test the stable kernel 4.19.1.
Thankyou! Okay it took me an hour to get it working but I have good news and well, it's not bad, but it turns out even better. :D

So I got stuck in CFE for an hour. I copied the kernels to two USB sticks. Likely because OS4 doesn't unmount a drive and CFE's own bugs the kernels did not show up. So annoying. It even said my second one had a boot block error. :?

So then I thought I'll just copy them to my HDD. So I did. I tried to load up the ramdisk without a -z from HDD but it just crashed CFE. Just a raw file, why? BTW Linux can uncompress a ramdisk itself. I used XZ in the A1 installer. XZ is the best. :D

So I tried again. Being confident I just wrote some batch scripts to change my menus so the ramdisk and compressed kernel loaded off HDD. I reboot, run the batch script off HDD. Get an error about unknown command. I forgot CFE doesn't like Amiga files. Right now it doesn't look too well and an hour has passed but it ran the batch script and my menu was changed.

So I bring up the menu. Pick Linux. It loads in the ramdisk from HDD. It tries to load the kernel from HDD. Printing output to screen. Something is going on...

OMG! Oh MacGyver!! It works!!! :shock: :shock: :shock:

You can boot it with the ramdisk (from HDD) with the following commands:

Code: Select all

ramdisk -z -addr=0x2400000 -fs=amigafs ide0.1:initrd.img-4.19.1
setenv bootargs "root=LABEL=Ubuntu_16.04"
boot -z -elf- noints -nousb -fs=amigafs ide0.1:vmlinux-4.19
Ha! Both GZip compressed. Give it a shot. :P
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.20/5.0

Post by xeno74 »

Hypex wrote:
OMG! Oh MacGyver!! It works!!! :shock: :shock: :shock:

You can boot it with the ramdisk (from HDD) with the following commands:

Code: Select all

ramdisk -z -addr=0x2400000 -fs=amigafs ide0.1:initrd.img-4.19.1
setenv bootargs "root=LABEL=Ubuntu_16.04"
boot -z -elf- noints -nousb -fs=amigafs ide0.1:vmlinux-4.19
Ha! Both GZip compressed. Give it a shot. :P
Great! :-) Many thanks for testing my kernel and ramdisk. Fantastic, that you was able to boot from an Amiga partition. Well done!

-- Christian
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 4.20/5.0

Post by xeno74 »

You can rename the LABEL of a partition with the following command:

For example rename the partition /dev/sdb7 to AMIGAONE:

Code: Select all

tune2fs -L AMIGAONE /dev/sdb7
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 4.20/5.0

Post by xeno74 »

Hi All,

I released the RC1-2 of kernel 4.20 with initial ramdisks for the X5000, X1000, and for virtual e5500 QEMU machines today.

New:
  • X1000: Kernel has a smaller file size and boots faster (Compressed zImage). You need to add '-z' to the CFE Linux boot command. (Thanks to Hypex for the hint)
  • X5000: Compiling problems solved (TRACE_INCLUDE_PATH redefined). (Thanks to Scott)
  • Initial ramdisks for the X5000 and X1000 (You can boot with a LABEL or a UUID. For example: setenv bootargs "root=LABEL=AMIGAONE")
  • Phoronix articles, reviews and news stories covering Linux 4.20
  • Linux Git log
Download: vmlinux-4.20-rc1-2-AmigaOne_X1000_X5000.tar.gz

Screenshot of kernel 4.20-rc1-2 and an initial ramdisk on an AmigaOne X1000:

Image

Please test it.

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

Running Linux on AmigaONEs can require some tinkering.
User avatar
vox
Posts: 174
Joined: Thu Jun 23, 2011 2:19 pm
Location: Belgrade Country:Serbia
Contact:

Re: Kernel 4.20/5.0

Post by vox »

xeno74 wrote:
Hypex wrote: Great! :-) Many thanks for testing my kernel and ramdisk. Fantastic, that you was able to boot from an Amiga partition. Well done!
-- Christian
Agreed, thanks @Hypex you are the man!

Now we can boot Linux kernels from BDH0: something our manuals promised since day one!
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Kernel 4.20/5.0

Post by Hypex »

xeno74 wrote:Great! :-) Many thanks for testing my kernel and ramdisk. Fantastic, that you was able to boot from an Amiga partition. Well done!
Nice. :D

I will have to move form LABEL to UUID soon. Right now my A1 HDD is on my X1000 for backing up. As evidence for randomness of drive assignments I went to boot up Linux again which I have assigned to an 'Ubuntu' label. So, using the 4.19 kernel, I boot it up, and after picking from the menu it's hard to tell if anything is going on as the screen is covered. But the HDD light is on.

The kernel loads up. Everything looks fine. But wait. That doesn't look right. What's happened to my Ubuntu desktop? That's my old one off the A1/XE! That's Ubuntu 9.04! Ahahaha. :lol: :lol:

So even old 32-bit Linux versions boot fine using the newer 64-bit kernel. How about that. :D
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Kernel 4.20/5.0

Post by Hypex »

As Vox was asking what's the possibility of compiling a ppc64el kernel and installing a little endian Linux?

For people testing kernels I recommend to have a menu setup that is set to boot a kernel/ramdisk of a specific generic name, like vmlinux or vmlinux-testing. Then when a new one arrives just copy it to the boot partition with that name. And be able to boot it with a minimum of fuss. :)
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.20/5.0

Post by xeno74 »

Hypex wrote:As Vox was asking what's the possibility of compiling a ppc64el kernel and installing a little endian Linux?
I don‘t know if a ppc64le kernel boots on the PA6T.

— Christian
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 4.20/5.0

Post by xeno74 »

xeno74 wrote:
Hypex wrote:As Vox was asking what's the possibility of compiling a ppc64el kernel and installing a little endian Linux?
I don‘t know if a ppc64le kernel boots on the PA6T.

— Christian
I asked the Linux kernel developers and Olof Johansson the former developer of P.A. Semi today.

Link: PA6T little endian mode: ppc64le kernels possible?

I also asked the members of the A-EON Linux development and support team.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply