Port Linux Mainline On Khadas VIM

Hi Tommy21,

There is a ubuntu mainline pre-alpha version.

Thanks.

Yes I have. The workaround is performing a hard power cycle instead of a reboot. Have you tried to start a mainline kernel with a mainline u-boot.

@numbqq well you should at try to fix it yourself or at least report to mainline kernel support so the devs who implement it could fix that issue.

I also used myself mainline kernel 4.12-rc7 and did not have such random crash, how do they occur?

This is all covered here.

Which defconfig and which dtb are you using?

I am using ArchLinuxArm packages, this package contains PKGBUILD and other files needed to build kernel under ArchLinuxArm, there you find the config file. The dtb file I also use from that packages, the ‘meson-gxl-s905x-khadas-vim.dtb’ one.

How to extract that pkg.tar.xz you can find in this how-to

Hi umiddelb,

I have not try mainline uboot yet.

Thanks.

Hi vrabac,

I will try the latest version in next few days to confirm whether this issue is exist or not.

Thanks.

I’ve merged the Archlinux aarch64 defaults into gx_defconfig.

This issue has gone with 4.12.

Yes, i thought about Ubuntu desktop image, not server, i was busy while i was writing this post so i totally forgot about this alpha version.

As i remember usb doesn’t work on this version, can this somehow be patched manually using 4.12 or do we have to wait for 4.13 release?

Do Mali drivers work for 4.12, do we get proper hardware acceleration, or we still need to wait for it?

What about changing screen resolution in Ubuntu, will it be possible in the near future?

as you wrote they are defaults, and many stuff will be build which may not be needed by Khadas VIM Pro but until Khadas Stuff don’t release they kvim_defconfig it could be a good start.

If you get any crash please report them to linux-amlogic mailing list

Hi umiddelb,

Thanks for your try.

It’s all there, feedback welcome.

1 Like

Do you use mainline u-boot? Does it work without issue on Khadas VIM Pro (also enabling multiboot)?

Hi umiddelb,

Thanks a lot, I’ll have a try.

I haven’t tried mainline u-boot so far (I don’t even know how to build it for the Khadas VIM).

Hi,
Can someone else also test this patch it is only dts change on Khadas VIM? I am currently not able to test.

Edit:
Forget to wrote that this patch should fix Ethernet problem with downloading large files or doing git clone linux repository!

Hi vrabac,

I just apply this patch to Vim_Ubuntu-server-16.04_Linux-Mainline-4.12-rc6_V170624_Pre-alpha.7z,

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index f85898d..527baf9 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -549,6 +549,7 @@
                                compatible = "ethernet-phy-id0181.4400", "ethernet-phy-ieee802.3-c22";
                                reg = <8>;
                                max-speed = <100>;
+                               eee-broken-100tx;
                        };
                };

and use scp to download a file about 30 times, it is all ok.

root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  16.1MB/s   00:02    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  16.1MB/s   00:02    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# 

Without this patch,just stalled in the 5th time:

root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .      
nick@192.168.1.253's password: 
test-file                                     100%   32MB  16.1MB/s   00:02    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                      11% 3648KB   1.0MB/s - stalled -^Croot@Khadas:~# 
root@Khadas:~# 

Thanks.

OK, I tried more times with this patch, and got stalled, too.Maybe more patches needed?

root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  16.1MB/s   00:02    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                     100%   32MB  10.7MB/s   00:03    
root@Khadas:~# scp nick@192.168.1.253:/home/nick/test-file .
nick@192.168.1.253's password: 
test-file                                      37%   12MB   2.6MB/s - stalled -^Croot@Khadas:~# ^C
root@Khadas:~#