Kernel 4.20

AmigaOne X1000 platform specific issues related to Linux only.

Re: Kernel 4.20/5.0

Postby Hypex » Sat Nov 10, 2018 4:15 pm

xeno74 wrote:I asked the Linux kernel developers and Olof Johansson the former developer of P.A. Semi today.


Thanks. Good answer.

I also asked the members of the A-EON Linux development and support team.


And what did they say? Looks like this could be a goer for a future kernel.
User avatar
Hypex
Beta Tester
Beta Tester
 
Posts: 402
Joined: Mon Dec 20, 2010 3:23 pm
Location: Vic. Australia.

Re: Kernel 4.20/5.0

Postby xeno74 » Sat Nov 10, 2018 7:03 pm

Hypex wrote:And what did they say? Looks like this could be a goer for a future kernel.


They haven’t answered yet. Yes, it would be great to have a ppc64le kernel and distribution on the X1000.

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

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

Re: Kernel 4.20/5.0

Postby xeno74 » Sat Nov 10, 2018 11:59 pm

We have an answer.

Olof Johansson wrote:Nobody has done the work to get the kernel to work in little endian on these platforms. I wouldn't expect it to work without quite a bit of effort.


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

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

Re: Kernel 4.20/5.0

Postby xeno74 » Mon Nov 12, 2018 2:49 pm

Hi All,

Linus Torvalds released the RC2 of kernel 4.20 for testing today.

New:


Download: vmlinux-4.20-rc2-AmigaOne_X1000_X5000.tar.gz

Screenshot of ubuntu MATE 16.04.5 LTS PowerPC with the kernel 4.20-rc2 and with connected Bluetooth devices:

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
xeno74
 
Posts: 5357
Joined: Fri Mar 23, 2012 8:58 am

Re: Kernel 4.20/5.0

Postby Hypex » Tue Nov 13, 2018 11:33 am

xeno74 wrote:We have an answer.

Olof Johansson wrote:Nobody has done the work to get the kernel to work in little endian on these platforms. I wouldn't expect it to work without quite a bit of effort.


-Olof


Ah okay. Can't they just flick a few switches and recompile it? :lol:
User avatar
Hypex
Beta Tester
Beta Tester
 
Posts: 402
Joined: Mon Dec 20, 2010 3:23 pm
Location: Vic. Australia.

Re: Kernel 4.20/5.0

Postby tbreeden » Wed Nov 14, 2018 5:31 am

Re: Kernel 4.20/5.0
Download: vmlinux-4.20-rc2-AmigaOne_X1000_X5000.tar.gz
Please test it.


Ok :!:
4.20-rc2 is up and going well here (4.19.1 as well).

The compressed kernel comes off CF0: noticeably faster.
Loading ramdisk first and using
setenv bootargs "root=LABEL=AMIGAONE rw"
works.
(without "rw" I get lots of failures during boot)

But I don't understand how the ramdisk enables the
boot to use the LABEL= bit. How do they communicate
that?

tom

4.20-rc2.png
User avatar
tbreeden
 
Posts: 160
Joined: Sat Jun 18, 2011 1:57 am
Location: Charlottesville, VA, USA

Re: Kernel 4.20/5.0

Postby xeno74 » Wed Nov 14, 2018 9:35 am

tbreeden wrote:4.20-rc2 is up and going well here (4.19.1 as well).


Thanks a lot for testing the RC2 of kernel 4.20 and the stable kernel 4.19.1! :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.20/5.0

Postby xeno74 » Fri Nov 16, 2018 9:34 am

tbreeden wrote:But I don't understand how the ramdisk enables the
boot to use the LABEL= bit. How do they communicate
that?

tom


Muli Ben-Yehuda wrote:Technical musings - how does root=LABEL=xxx really work?
Yesterday I spent a fun couple of hours trying to figure out what kernel support is required for booting with a root=LABEL=xxx kernel command line parameter.

The "standard" way to specify the root partition is passing a kernel command line parameter such as "root=/dev/hda1". RedHat, YellowDog and possibly other distributions switched a few years ago to use "root=LABEL=xxx". Rather than telling the kernel to use e.g. the first partition on the first IDE disk (/dev/hda1), we tell it to use the partition that has a label of 'xxx', regardless of where it's located. How is it implemented, though?

The kernel starts booting, and loads an initrd (initial ram disk). Normally, no initrd is required for a Linux kernel to boot. However, an initrd *is* required for root=LABEL=xxx support, since as we'll soon see, the initrd is what actually does the work.
The kernel runs the 'linuxrc' script in the initrd. This script is interpreted by the 'nash' interpreter. One of the stages in the linux script is creation of the root device, via a nash directive.
When the 'createRootDev' nash directive is called, and the root=XXX kernel command line parameter starts with LABEL=xxx, nash builds a translation table of labels to partitions. It does this by
parsing the output of /proc/partitions to know which partitions are recognized on the machine.
for each partition in /proc/partitions, open it as a raw device and look for an ext2/3 or xfs file system. If such a file system is found, get the label from the s_volume_name member of the superblock, and add this (label, partition) pair to the translation table.
Once the table is built, find the (major, minor) pair of the root partition in it based on its label.
Create a device file with these (major, minor) numbers, and mount it.
Use pivot_root to make it the current root.
At this stage the linuxrc ends, and boot continues, with the fs that has the label xxx mounted as the root fs.
At first, I kept looking for the code that deals with LABEL in the RH kernel sources, and couldn't find it. This was particularly annoying since I distinctly remember seeing it a couple of weeks ago. After an hour or so of digging, a light dawned on me, that I'm probably not looking in the right place. I opened up the nash code in emacs, and immediately found the code dealing with labels.


Link: mulix.livejournal.com
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.20/5.0

Postby xeno74 » Fri Nov 16, 2018 6:37 pm

FYI: PowerPC fixes 4.20-3

Code: Select all
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.20/5.0

Postby tbreeden » Sat Nov 17, 2018 5:36 am

Thanks Christian for the info on initrd.
Technical musings - how does root=LABEL=xxx really work?
...
The kernel starts booting, and loads an initrd (initial ram disk).
The kernel runs the 'linuxrc' script in the initrd.
...
Use pivot_root to make it the current root.

Since CFE loads initrd in our case, not the kernel it seems a little different.

I was wondering how the kernel knows how to find how to call the
code in initrd (and whether the initrd was even loaded).
Our kernel hardcoded to know that initrd is at 0x2400000?

not that I'm anywhere near to building kernels here however. :D

tom
User avatar
tbreeden
 
Posts: 160
Joined: Sat Jun 18, 2011 1:57 am
Location: Charlottesville, VA, USA

PreviousNext

Return to Platform: AmigaOne X1000 - Linux Only

Who is online

Users browsing this forum: No registered users and 8 guests

cron