Kernel 3.18 Tinkering

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Kernel 3.18 Tinkering

Post by mechanic »

Kernel 3.18.26 Tinkering.

I purchased a Tenda UG2 Ethernet PCIe card. It uses a Realtek rtl 8168B chip.

The source code is available here > https://github.com/mtorromeo/r8168.

I got the source built and installed without having to use an initrd to boot the computer. The problem is having to manually build and install the driver and module with each kernel build or kernel change.
Is there a way to insert the source code into each kernel source either manually or with a patch so it would be available to more people without having to jump through hoops to get these cards working. I have no clue as to where the code would go or how to reconfigure the .config file to include an option for this (or other) cards.

OH! I'm sorry, were you thinking of taking a nap? :lol:

P.S. When applying the 3.18 patch to 3.18.26 one patch is reported as already applied. I have built the kernel both with and without applying the patch and I don't think it is necessary at this time. Runs fine without it.
Last edited by mechanic on Sun May 01, 2016 12:49 am, edited 2 times in total.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Kernel 3.18.26 Tinkering

Post by mechanic »

In my most recent build of 3.18.26 I deleted all the libc5 system calls. Since I have not seen any programs that still use libc5 I see nothing to warrant keeping those calls active in the kernel.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18.26 Tinkering

Post by xeno74 »

mechanic wrote:In my most recent build of 3.18.26 I deleted all the libc5 system calls. Since I have not seen any programs that still use libc5 I see nothing to warrant keeping those calls active in the kernel.
Many thanks for the hint. :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Kernel 3.18.26 Tinkering

Post by mechanic »

Been doing some digging through the .config files for 3.18 and 4.5 kernels.

Hope I can explain this......

There was a split at kernels 3.16 and 3.17, neither of which are LongTerm kernels, as to which radeon drivers are used for the r7 and r9 cards, which are Southern Islands and Sea Islands.

Kernels 3.16 and below should use the Radeon drivers with UpperCase names and kernels 3.17 and above should use drivers with LowerCase names except for the UpperCase drivers that do not have a LowerCase counterpart for these cards.

For example;
Kernel 3.16 and older: radeon/VERDE_ce.bin radeon/VERDE_mc.bin radeon/VERDE_mc2.bin radeon/VERDE_me.bin radeon/VERDE_pfp.bin radeon/VERDE_rlc.bin radeon/VERDE_smc.bin radeon/TAHITI_uvd.bin

Kernel 3.17 and newer: radeon/verde_ce.bin radeon/verde_mc.bin radeon/verde_me.bin radeon/verde_pfp.bin radeon/verde_rlc.bin radeon/verde_smc.bin radeon/TAHITI_uvd.bin

Notice the TAHITI in the 3.17 setup.

I do not know if using the earlier code could cause problems in the later kernels but as we are using PPC and not everything is as "complete" as for the x86 world I see no reason to include the UpperCase counterparts in the 3.18 and later kernel builds.

I do not have a r7/r9 card to test with. This is a kernel thing, not Xorg thing or distro thing.

NOTE: For those people that may be building their own kernels.

You can use a text editor to modify the section of the .config that contains all the various radeon cards. Using cut&paste to change which cards will be supported by your kernel. The one rule for doing this is DO NOT TOUCH THE QUOTES at the beginning and end of that section. They rather act as place markers. If you do accidentally cut them, or paste other than between them, just start over with a new copy of the .config file.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 3.18.26 Tinkering

Post by xeno74 »

mechanic wrote:Been doing some digging through the .config files for 3.18 and 4.5 kernels.

Hope I can explain this......

There was a split at kernels 3.16 and 3.17, neither of which are LongTerm kernels, as to which radeon drivers are used for the r7 and r9 cards, which are Southern Islands and Sea Islands.

Kernels 3.16 and below should use the Radeon drivers with UpperCase names and kernels 3.17 and above should use drivers with LowerCase names except for the UpperCase drivers that do not have a LowerCase counterpart for these cards.

For example;
Kernel 3.16 and older: radeon/VERDE_ce.bin radeon/VERDE_mc.bin radeon/VERDE_mc2.bin radeon/VERDE_me.bin radeon/VERDE_pfp.bin radeon/VERDE_rlc.bin radeon/VERDE_smc.bin radeon/TAHITI_uvd.bin

Kernel 3.17 and newer: radeon/verde_ce.bin radeon/verde_mc.bin radeon/verde_me.bin radeon/verde_pfp.bin radeon/verde_rlc.bin radeon/verde_smc.bin radeon/TAHITI_uvd.bin

Notice the TAHITI in the 3.17 setup.
Thank you for your explanation. Are you sure with the UpperCase and LowerCase firmwares? I haven't read the difference before. I could remove the UpperCase firmwares from the Kernel config but I am not sure if it helps.
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.26 Tinkering

Post by xeno74 »

Mechanic,

You're right. :-)
On 3/8/2015 1:45 PM, Alex Deucher wrote:

On Sun, Mar 8, 2015 at 9:33 AM, Julian Margetson <runaway at candw.ms> <runaway at candw.ms> wrote:

With Kernel 3.19 HDMI audio works ok with Radeon HD 6670 but not Radeon HD 7750 on Acube Sam460ex AMCC powerpc 460ex board.Also a problem with direct firmware loading or the radeon firmware which loads ok for the Radeon HD 6670.

Make sure you've included the proper firmware images. Note the case. We switched to a new firmware format for SI and newer and the firmware files names are now lower case (new verde_pfp.bin vs old VERDE_pfp.bin). The older asics still use the old firmware format with the upper case names.
I will remove the UpperCase firmwares for SI and newer from the Kernel config. ;-) Many thanks for the hint. :-)

Cheers,

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

Running Linux on AmigaONEs can require some tinkering.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Kernel 3.18.26 Tinkering

Post by mechanic »

I will remove the UpperCase firmwares for SI and newer from the Kernel config. ;-) Many thanks for the hint. :-)

Cheers,

Christian
Most welcome.

I'm not sure at this time, but I think only TAHITI_uvd and BONAIRE_uvd/BONAIRE_vce uppercase are kept in config for Southern and Sea Island cards.

Again I'm using BARTS so can't check this stuff. :(
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Kernel 3.18.26/27 Tinkering

Post by mechanic »

Applied the new .27 patch to kernel 3.18. In the process of doing a build. I'll be back. :twisted:
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Kernel 3.18.26/27 Tinkering

Post by mechanic »

Just can't keep my fingers out of the gears.

Now working with 3.18.27.

Some changes I have made;

Set the interrupt clock from 1kHz to 250Hz. I have no intention of tracking near light speed asteroids anyway.
The idea is to get improved throughput by not having so many checks going on.

Changed both my Eth cards to modules instead of built-in. Since I don't have my other board set up yet too much time was being spent during boot trying to bring up both cards. Of course this means the kernel would not be good for doing an install, but I have others for that. I suppose I could not build in the Initrd stuff as well, maybe next time.

This was a fun part. Only the ext4 FS is built-in. Ext2 and 3 are modules. I have a distro on the PATA which is ext3. I copied the modules to that distro and booted it with the new kernel and at first thought it wouldn't work as it just sat there at one point for the longest time, went and got a cup of coffee, and when I got back it had booted. YIPPIE!

Since ext4 will read/write ext3 I changed the fstab file to ext4 (thanks to google), reboot and up it came. I only have 1 ext2 partition but would not need to get to that until after the system is running anyway so that works fine as a module.

Happy Hacking! :idea:
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Kernel 3.18.26/27 Tinkering

Post by mechanic »

Does anybody know of a PCIe sound card that will work with our Linux kernels?
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
Post Reply