Page 3 of 8

Re: Kernel 4.20/5.0

Posted: Wed Nov 07, 2018 11:39 am
by Hypex
vox wrote:As shown on x1000 Debian 12 CD, CFE can boot a batch file pointing to kernel files on DVD as well as Debian installs support
CFE quite nice.
And also, as eluded to by the OS4 bootloader, CFE exposes some kind of OpenFirmware interface. So this should help somewhat since yaboot, the common OF bootloader, tends to be used. However, it's not known how this OF interface comes into things, so best not relied upon. In any case, CFE can run batch scripts, which is also how the Pegasos is booted and also needed a custom kernel. So I see no big deal to add X1000 support myself as all that should be needed is a batch boot file and custom kernel.

Re: Kernel 4.20/5.0

Posted: Wed Nov 07, 2018 12:42 pm
by Hypex
xeno74 wrote:Hi All,

Linus Torvalds has released the RC1 of kernel 4.20
I'd like to test it, thanks, but I see no ramdisk included. So on my system it will kernel panic without root. Or is the ramdisk somehow embedded in the kernel?

Also, why are the X1000 kernels so large? I see it is a raw elf image and not compressed. Yet the X5000 kernels are compressed. So I don't understand why the X1000 images would also not be compressed?

CFE supports elf compression as well as UBoot images. So it has the support. And I also found the Linux kernel supports internal image compression which could be a neat option to pack it down. As we know the X1000 is not the fastest machine to boot so it needs all the help it can get. :D

Re: Kernel 4.20/5.0

Posted: Wed Nov 07, 2018 1:40 pm
by xeno74
Hypex wrote: In any case, CFE can run batch scripts, which is also how the Pegasos is booted and also needed a custom kernel. So I see no big deal to add X1000 support myself as all that should be needed is a batch boot file and custom kernel.
Hi Hypex,

Great suggestion! :-) I know batch scripts and I like your idea! Please help us with adding the X1000 support.
Hypex wrote: I'd like to test it, thanks, but I see no ramdisk included. So on my system it will kernel panic without root. Or is the ramdisk somehow embedded in the kernel?
I don't usually add ramdisks to the packages because I don't need it for myself and the testers haven't asked for these yet. But ..... I added initial ramdisks for the X5000 and X1000 to the stable kernel 4.19.1 today. I only use ramdisks for booting with a LABEL or UUID but actually the testers and I don't need to boot with a LABEL and UUID currently. Anyway, you can try the stable kernel 4.19.1 if you like.
Hypex wrote: Also, why are the X1000 kernels so large? I see it is a raw elf image and not compressed. Yet the X5000 kernels are compressed. So I don't understand why the X1000 images would also not be compressed?
The size of the kernel isn't a problem for me. Most of the drivers are included in the kernel. Therefore we actually don't need a ramdisk. But ... all patches and configs are included in the packages. That means you can create your own kernels and you can upload them for the other users. It would be really great if you compile some kernels and upload them for us. I would be really happy if you can do it. Most of the time I am alone and I need someone for helping me to improve the Linux support for our AmigaOne machines. Please come to our team. :-)

Cheers,
Christian

Re: Kernel 4.20/5.0

Posted: Wed Nov 07, 2018 5:59 pm
by xeno74
Hypex wrote:I see it is a raw elf image and not compressed. Yet the X5000 kernels are compressed. So I don't understand why the X1000 images would also not be compressed?
Hi Hypex,

Thank you for your hint. I compiled the RC1 of kernel 4.20 with the command make zImage for the X1000 today. It boots and it's smaller than a vmlinux image.

zImage-4.20 = 26MB
vmlinux-4.20 = 31MB

.config:

Code: Select all

...
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_XZ is not set
...
Is this the correct way to compile a compressed kernel for the X1000?

Download: zImage-4.20

@All
Please test the zImage-4.20.

Thanks,
Christian

Re: Kernel 4.20/5.0

Posted: Wed Nov 07, 2018 8:50 pm
by xeno74
OK, I have a solution and it works.

Code: Select all

gzip -9 vmlinux-4.20
= 12MB!

Boot:

Code: Select all

boot -elf -z -noints -fatfs cf0:vmlinuz-4.20

Re: Kernel 4.20/5.0

Posted: Wed Nov 07, 2018 9:07 pm
by xeno74
I was able to decrease it again. :-)

Code: Select all

make zImage

Code: Select all

gzip -9 zImage-4.20
= 10MB :-D

Download: vmlinuz-4.20

Please test it.

Re: Kernel 4.20/5.0

Posted: Thu Nov 08, 2018 4:36 am
by tbreeden
Download: vmlinux-4.20-rc1-AmigaOne_X1000_X5000.tar.gz
kernel 4.20-rc1 is running well on X1000 here.

My CF disk is pretty big, so I haven't really needed compression.
I'm curious about the usage of a ramdisk. I fiddled with it unsuccessfully
when looking into OpenSUSE earlier.
Screenshot from 2018-11-08 03-21-41.png

Re: Kernel 4.20/5.0

Posted: Thu Nov 08, 2018 9:51 am
by xeno74
tbreeden wrote: kernel 4.20-rc1 is running well on X1000 here.
Hi Tom,

Fantastic! Thanks a lot for testing and thank you for the screenshot!!!! :-)
tbreeden wrote: My CF disk is pretty big, so I haven't really needed compression.
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.
tbreeden wrote: I'm curious about the usage of a ramdisk. I fiddled with it unsuccessfully
when looking into OpenSUSE earlier.
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. You can boot it with the ramdisk with the following commands:

Code: Select all

ramdisk -z -addr=0x2400000 -fatfs cf0:initrd.img-4.19.1
Booting with a LABEL (For example Julian's ubuntu MATE 16.04 from a USB flash drive):

Code: Select all

setenv bootargs "root=LABEL=Ubuntu_16.04"

Code: Select all

boot -elf- noints -fatfs cf0:vmlinux-4.19
Cheers,
Christian

Re: Kernel 4.20/5.0

Posted: Thu Nov 08, 2018 1:24 pm
by Hypex
xeno74 wrote:Hi Hypex,

Great suggestion! :-) I know batch scripts and I like your idea! Please help us with adding the X1000 support.
Thanks. I don't know what features CFE offers in batch files. I should look it up. I've only made some with a few commands. I'd be happy to help adding the X1000 to the official PPC distros but we don't have much time left. :D
I don't usually add ramdisks to the packages because I don't need it for myself and the testers haven't asked for these yet. But ..... I added initial ramdisks for the X5000 and X1000 to the stable kernel 4.19.1 today. I only use ramdisks for booting with a LABEL or UUID but actually the testers and I don't need to boot with a LABEL and UUID currently. Anyway, you can try the stable kernel 4.19.1 if you like.
Okay thanks. I need them myself because I find the /dev/sdx assignments too unstable. On my A1/XE they seem to randomly move on each boot. On my X1000 they are moved if I have a USB disk inserted or likely, added a HDD for some reason. So I use the LABEL option. Which means I need the ramdisk.
The size of the kernel isn't a problem for me. Most of the drivers are included in the kernel. Therefore we actually don't need a ramdisk. But ... all patches and configs are included in the packages. That means you can create your own kernels and you can upload them for the other users. It would be really great if you compile some kernels and upload them for us. I would be really happy if you can do it. Most of the time I am alone and I need someone for helping me to improve the Linux support for our AmigaOne machines. Please come to our team. :-)

Cheers,
Christian
I only noticed the size because for the last few years I was experimenting with loading in a kernel from HDD. Which always failed with a memory error. Then lately I noticed the size was rather large. So I tested just compressing a kernel with LhA to reduce it and tried to load that in. Which worked alongside a ramdisk. But I cheated as typing commands in CFE is time consuming and rigged a Kicklayout to load the files. LOL. I suspected CFE had a memory limit of around 16MB, like UBoot does, and being able to load files under this size confirmed my suspicions. Otherwise I couldn't see why CFE had trouble simply reading in file blocks since it can be told where to load it in. Obviously it likes to load it into allocated space first before moving it.

Having now completed my work on the A1/XE Debian installer for the moment, including a net installer and USB/ISO hybrid support, I'd be happy to help you and your team improve Linux on the X1000. And X5000 where possible. Not that I need a new project, but I've wanted to improve the Linux experience for some time. :)

Re: Kernel 4.20/5.0

Posted: Thu Nov 08, 2018 2:07 pm
by Hypex
xeno74 wrote:Hi Hypex,

Thank you for your hint. I compiled the RC1 of kernel 4.20 with the command make zImage for the X1000 today. It boots and it's smaller than a vmlinux image.

zImage-4.20 = 26MB
vmlinux-4.20 = 31MB
Oh nice. I don't know what is compressed inside it as there are still lots of zeros
.config:

Code: Select all

...
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_XZ is not set
...
Is this the correct way to compile a compressed kernel for the X1000?
I wouldn't say I'm an expert on the subject as I've spent more time modifying an installer ramdisk than compiling a kernel but it looks right to me. Although I wonder why

Code: Select all

CONFIG_KERNEL_XZ
is not set?

I did find this site that details a zImage is the right one to make:
https://www.kernel.org/doc/Documentatio ... rapper.txt

Download: zImage-4.20

Okay this loads fine for me with -z switch but did end up kernel panic. Only because it couldn't find root.