View previous topic :: View next topic |
Author |
Message |
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Fri Jul 21, 2017 9:09 pm Post subject: |
|
|
mDup wrote: | erm67 wrote: | Great ... hopefully also cryptodev works with 4.12, on 3.14.29 it just fills the log with 'CryptoAPI failure: -22' message .... I upgraded to a S912 board and it would be nice to be able to use the ARM crypto extensions. |
I have no s912 (yet) to test ARM crypto extensions. My s905 does not support the kernel configs and complains when I modprobe the modules. |
That's normal the S905 doesn't have the arm crypto extension, it's the aes flag in /proc/cpuinfo:
Quote: | erm67 ~ # cat /proc/cpuinfo
Processor : AArch64 Processor rev 4 (aarch64)
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : Amlogic
|
_________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
oczkers n00b
Joined: 13 Jun 2017 Posts: 9
|
Posted: Tue Jul 25, 2017 4:43 pm Post subject: |
|
|
Quote: | but on s905x I see no hdmi output and there is no
USB support (no keyboard no mouse). |
I've got hdmi running fine with kernel from Armbian_5.27_S9xxx_Ubuntu_xenial_4.12.0+_mate_20170711.img.xz but usb is not working so cannot boot without installing to internal. Any idea is this kernel config issue or just wrong dtb? |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Tue Jul 25, 2017 7:55 pm Post subject: |
|
|
oczkers wrote: | Quote: | but on s905x I see no hdmi output and there is no
USB support (no keyboard no mouse). |
I've got hdmi running fine with kernel from Armbian_5.27_S9xxx_Ubuntu_xenial_4.12.0+_mate_20170711.img.xz but usb is not working so cannot boot without installing to internal. Any idea is this kernel config issue or just wrong dtb? |
Some boxes cannot boot from usb, I was never able with my beelink. Some boxes have two usb port and only one can be used for booting, usually the one that doesn't support OTG ....
A lot of people have problems booting from usb. It might be a dtb problem, but 4.12 dtb are experimental so probably you'll have to fix it by yourself.
Try to decompile the dtb you are using and compare it with the dtb your box came with. _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
oczkers n00b
Joined: 13 Jun 2017 Posts: 9
|
Posted: Tue Jul 25, 2017 9:45 pm Post subject: |
|
|
I've copied few lines from working dts but it doesn't change anything, anyway it's probably kernel config or boot script issue because i can see kernel output.
Working userspace partition with ROOTFS label of course exists so any help is welcome. |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Tue Jul 25, 2017 11:38 pm Post subject: |
|
|
According to the support table here USB support for the S905D and 905X is only partial, what model do you have exactly? I boot from the SD card and the rootfs is on and iscsi volume, it's faster than usb2 and full duplex
open source 4.12 dts are different and also driver names
Quote: | USB OTG for GXL/GXM (dwc3 is used for host-mode, dwc2 for device-mode and the first USB2 PHY switches the mode depending on what the USB3 PHY OTG detection logic tells it to) |
I think you have one of those boards with usb otg that aren't fully supported yet, since there are both dwc3 and dwc2 in the original dts
Also, try the nightly:
https://dl.armbian.com/odroidc2/nightly/ _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
|
Back to top |
|
|
mDup Apprentice
Joined: 14 Apr 2006 Posts: 212
|
Posted: Thu Nov 30, 2017 10:31 pm Post subject: |
|
|
Uploaded updated stage3 Gentoo_8gb_20171130.img.xz SD image
to https://drive.google.com/open?id=15R4uYNUgp4QYLcQyWh3rOVrVGdlA47db
md5sum 844db89ed809c325bf6c94388dc51dd7
(boot from SD)
Only tested on khadas vim2 (but other dtb's are in /boot).
Vanilla 4.14.2 kernel
- no USB (no mouse/keyboard)
- HDMI
- serial console
- ssh
u:root p:1234
u:user p:1
Contains some ebuild hacks |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Sat Dec 02, 2017 7:33 pm Post subject: |
|
|
mDup wrote: | Uploaded updated stage3 Gentoo_8gb_20171130.img.xz SD image
to https://drive.google.com/open?id=15R4uYNUgp4QYLcQyWh3rOVrVGdlA47db
md5sum 844db89ed809c325bf6c94388dc51dd7
(boot from SD)
Only tested on khadas vim2 (but other dtb's are in /boot).
Vanilla 4.14.2 kernel
- no USB (no mouse/keyboard)
- HDMI
- serial console
- ssh
u:root p:1234
u:user p:1
Contains some ebuild hacks |
On my S912 with 4.14.0 also the eth nework doesn't work well (probably), starting an rsync on a iscsi mounted drive hard crashes the device instantly .... I am back to the trusted 3.14.29, hopefully it will work better in the near future.
Also your 4.14.2 crashes under heavy eth load .... I will wait 4.15 maybe ... _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
mDup Apprentice
Joined: 14 Apr 2006 Posts: 212
|
Posted: Sun Dec 03, 2017 3:38 pm Post subject: |
|
|
erm67 wrote: | mDup wrote: | Uploaded updated stage3 Gentoo_8gb_20171130.img.xz SD image
to https://drive.google.com/open?id=15R4uYNUgp4QYLcQyWh3rOVrVGdlA47db
md5sum 844db89ed809c325bf6c94388dc51dd7
(boot from SD)
Only tested on khadas vim2 (but other dtb's are in /boot).
Vanilla 4.14.2 kernel
- no USB (no mouse/keyboard)
- HDMI
- serial console
- ssh
u:root p:1234
u:user p:1
Contains some ebuild hacks |
On my S912 with 4.14.0 also the eth nework doesn't work well (probably), starting an rsync on a iscsi mounted drive hard crashes the device instantly .... I am back to the trusted 3.14.29, hopefully it will work better in the near future.
Also your 4.14.2 crashes under heavy eth load .... I will wait 4.15 maybe ... |
@erm67
Thanks for trying.
Which s912 box do you use? Did you use dtb from my /boot/dtb ?
Did you try the patch (I think from jbrunet) to reserve 3MB extra
Code: | diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index d8dd329..fb8d76a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -49,6 +49,14 @@
/ {
compatible = "amlogic,meson-gxl";
+
+ reserved-memory {
+ /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
+ secmon_reserved_alt: secmon@05000000 {
+ reg = <0x0 0x05000000 0x0 0x300000>;
+ no-map;
+ };
+ };
};
ðmac {
--
|
?
It has fixed my ethernet issues. |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Mon Dec 04, 2017 2:12 pm Post subject: |
|
|
It's a KM8pro, unfortunately (for me) is apparently well known only in russian forums:
https://4pda.ru/forum/index.php?showtopic=795195
It boots only with the kvim2 dtb or the original one, they are quite similar anyway.
I played too muh with the EMMC of the beelink S905 and finally bricked it erasing the bootblock ....
the patch is for Meson gxl??
Code: | linux,secos {
status = "disable";
compatible = "amlogic, aml_secos_memory";
reg = <0x0 0x5300000 0x0 0x2000000>;
no-map;
};
|
In the original dtb there is something similar already, that's the memory region for the alternate OS running in background, it only requires 2M, better than the 2.5M required by minix running in Intel ME _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
mDup Apprentice
Joined: 14 Apr 2006 Posts: 212
|
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Mon Dec 04, 2017 8:23 pm Post subject: |
|
|
The dtb.img in your image already has the patch, it doesn't help unfortunately.
from the amlogic mailing list:
Quote: | It entirely depends on when the kernel use that region. It may never happen, or
it may happen very quickly.
.... |
For me it doesn't happen randomly but the first time eth activity spikes, with rsync or starting mariadb with the database on a network drive.
Quote: | So far, ATF and meson-gx.dtsi is aligned for all known gxbb devices.
It's more tricky for gxl and gxm. Some early released devices (such as the kvim)
use the old 0x10000000-0x10200000 (OK) region while most recent one uses
0x5000000-0x5300000 (will trigger the problem). |
mine is recent and uses a different region, it uses 0x5300000-0x7300000 if I get it right .....
This is my dts that defines 2 regions, the old 0x10000000-0x10200000 and a different region: 0x5300000 - 0x7300000
Code: | linux,secmon {
compatible = "amlogic, aml_secmon_memory";
reg = <0x0 0x10000000 0x0 0x200000>;
no-map;
linux,phandle = <0x16>;
phandle = <0x16>;
};
linux,secos {
status = "disable";
compatible = "amlogic, aml_secos_memory";
reg = <0x0 0x5300000 0x0 0x2000000>;
no-map;
};
|
This instead is in your dts:
Quote: | secmon@10000000 {
reg = <0x0 0x10000000 0x0 0x200000>;
no-map;
};
secmon@05000000 {
reg = <0x0 0x5000000 0x0 0x300000>;
no-map;
}; |
The patch is already present, but maybe I need a different patch. I will try later to play a bit with the dts so that the NSA backdor doesn't get overwritten. Or maybe I'll ask in themeson-amlogic mailing list first, the board is my mail server, and I hate mail messages like: ' Delivery incomplete
There was a temporary problem delivering your message to xxxx@xxxx. Gmail will retry for 45 more hours. You'll be notified if the delivery fails permanently. ' _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
mDup Apprentice
Joined: 14 Apr 2006 Posts: 212
|
Posted: Mon Dec 04, 2017 9:19 pm Post subject: |
|
|
erm67 wrote: | The dtb.img in your image already has the patch, it doesn't help unfortunately.[...] |
OK. You must be right since meson-gxl.dtsi seems nowhere included.
Maybe I installed another u-boot, in any case: previously I could see quickly the following
Code: | kernel: Bad mode in Error handler detected on CPU6, code 0xbf000000 -- SError
kernel: Internal error: Oops - bad mode: 0 [#1] PREEMPT SMP
|
under heavy building and now it is totally gone.
Also, for another device (minimx-g meson-gxbb-p200 dts) I have fixed eth stalls by setting
Code: | amlogic,tx-delay-ns = <4>; | But I doubt if this applies to other eth drivers.
Good luck. |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Tue Dec 05, 2017 2:41 pm Post subject: |
|
|
I also need to recompile the kernel since I also switched to Fedora Server aarch64, with selinux enabled, and if I boot your kernel without selinux the fs is marked as dirty and when I reboot the kernel with selinux enabled it forces a relabes of the entire filesystem, and that is slow on a SD card , ~30 minutes ...
I will try both your tips. _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Wed Dec 06, 2017 6:35 pm Post subject: |
|
|
It works now, I merged the protected memory region from the original dtb with the memory defined in the new dtb and viola apparently everything works:
Code: |
secmon@05000000 {
reg = <0x0 0x5000000 0x0 0x2300000>;
no-map;
};
|
The NSA will can happily use the backdoor. I might give a look at what's inside it:
http://www.fredericb.info/2016/10/amlogic-s905-soc-bypassing-not-so.html
You did a great job with your gentoo image but I have just a tip for you, you should really use stable
Code: | ACCEPT_KEYWORDS="*" |
~* (devel) is too much for most users, there is enough to do to maintain a gentoo system using stable ....... and most user prefer to have to update the minimum possible.
keep
Code: | ACCEPT_KEYWORDS="arm64" |
alive like it is now is a useless waste of time for everybody involved in gentoo .... and will just scare users away.
When I switched to fedora server I kept my gentoo system running in a docker container to use the old gcc to compile thekernel, now that mainline has arrived I think that I don't need it anymore. There are a lot of precompiled aarch64 docker images available .... _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54643 Location: 56N 3W
|
Posted: Wed Dec 06, 2017 7:12 pm Post subject: |
|
|
erm67,
Code: | ACCEPT_KEYWORDS="*" | will lead to a lot uf users who don't understand what that does to cry for help with things like icedtea-bin, firefox-bin and any other package that won't run on arm64.
Code: | ACCEPT_KEYWORDS="~arm64" | is much safer, both for users and helpers The code has at least been build tested by someone.
More adventurous users can keyword their own packages.
At least its possible to help with that. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
mDup Apprentice
Joined: 14 Apr 2006 Posts: 212
|
Posted: Wed Dec 06, 2017 10:41 pm Post subject: |
|
|
@erm67 @NeddySeagoon
I agree I am not on solid ground with my make.conf (so I rather call it bleeding edge)
But I want to proactively help figure out which things potentially need attention and report them upstream.
Have a nice day. |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Thu Dec 07, 2017 9:11 am Post subject: |
|
|
NeddySeagoon wrote: | erm67,
Code: | ACCEPT_KEYWORDS="*" | will lead to a lot uf users who don't understand what that does to cry for help with things like icedtea-bin, firefox-bin and any other package that won't run on arm64.
|
A sticky post 'how to fix *-bin packages in the gentoo-arm forum would be probably enough
At least they did not leave imediately because every package is severely outdated, the current status of arm64 is undefendable, but it is not only a problem of ebuild and maintainers, the problem is with portage itself that is not able to find the correct ebuild to autounmask .... but that can be easily fixed manually adding ~amd64 or ~* in /etc/portage/package.accept_keywords. Probaly mDup uses ~* because it solves the problem. It is a bug in portage that IMHO should be fixed. * should be treated just like any other arch: if a * packages is not available and a ~* is it should be suggested even if the main ARCH is wrong, I accept * already so I don't care about the ARCH of ~* packages as well.
As I said several times the whitelisting approach is totally useless in this case as the number of packages that requires special treatmens is really minimal, since the all other distro in the world uses the same packages for arm64 and amd64 (apart a few).
Fedora Ubuntu Archlinux build on aarch64 server farms of professional arm64 board provided by Linaro and the pakages are in line with amd64, you can't really tell users they have to use everely outdated software until someone has whitelisted it compiling and testing on their raspberry-pi or qemu emulators, they will just laugh and go away to a more serious distro. (not to mention the ridiculous list of hard-masked packages ...)
@mDup don't worry your make.conf is a lot better than their, at least you hhave a modern and usable system OS on a fast system. _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54643 Location: 56N 3W
|
Posted: Thu Dec 07, 2017 9:57 am Post subject: |
|
|
erm67,
erm67 wrote: | A sticky post 'how to fix *-bin packages in the gentoo-arm forum would be probably enough |
That's a good idea. You write the post and give a worked example, I'll sticky it.
I have found very few arm64 specific issues when I've been building things.
A QEMU chroot isn't 100% helpful but it will run Xorg using the nouveau driver.
That took me by surprise since I didn't expect the arm64 and amd64 bits to communicate very well.
Its very slow though.
Feel free to contribute to arm64 keywording too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Fri Dec 08, 2017 10:34 am Post subject: |
|
|
Now there are a few tweaks to attempt in the dtb to fix eth problems:
http://elixir.free-electrons.com/linux/latest/source/Documentation/devicetree/bindings/net/meson-dwmac.txt
Quote: |
In Linux applications, the simplest way to enable or disable the internal clock delays is through the device tree. The device tree will contain a section for each of your Ethernet interfaces and it should look similar to the one shown to the right.
To enable or disable the internal clock delays, we specify a particular value for the “phy-mode” parameter.
Both internal delays DISABLED:
phy-mode = "rgmii";
Both internal delays ENABLED:
phy-mode = "rgmii-id";
Only RX internal delay ENABLED:
phy-mode = "rgmii-rxid";
Only TX internal delay ENABLED:
phy-mode = "rgmii-txid";
|
Quote: | Optional properties on Meson8b and newer:
- amlogic,tx-delay-ns: The internal RGMII TX clock delay (provided
by this driver) in nanoseconds. Allowed values
are: 0ns, 2ns, 4ns, 6ns.
When phy-mode is set to "rgmii" then the TX
delay should be explicitly configured. When
not configured a fallback of 2ns is used.
When the phy-mode is set to either "rgmii-id"
or "rgmii-txid" the TX clock delay is already
provided by the PHY. In that case this
property should be set to 0ns (which disables
the TX clock delay in the MAC to prevent the
clock from going off because both PHY and MAC
are adding a delay).
Any configuration is ignored when the phy-mode
is set to "rmii". |
_________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
fanthom n00b
Joined: 31 May 2007 Posts: 60
|
Posted: Sat Feb 03, 2018 7:49 pm Post subject: |
|
|
@mDup
Did you manage to resolve missing USB support in your Gentoo image?
I have used your kernel config and compiled all usb related stuff directly into it, including:
Still, I cant boot from usb stick my usb and worse - keyboard is dead when booting stops at the initrd stage.
Unfortunately i cant use microSD card + SSH for debugging. SD card cant be seated properly in the microSD slot on my W95 box and pops up immediately (well - you get what you pay for).
Thanks |
|
Back to top |
|
|
mDup Apprentice
Joined: 14 Apr 2006 Posts: 212
|
Posted: Sat Feb 03, 2018 10:33 pm Post subject: |
|
|
fanthom wrote: | @mDup
Did you manage to resolve missing USB support in your Gentoo image?
I have used your kernel config and compiled all usb related stuff directly into it, including:
Still, I cant boot from usb stick my usb and worse - keyboard is dead when booting stops at the initrd stage.
Unfortunately i cant use microSD card + SSH for debugging. SD card cant be seated properly in the microSD slot on my W95 box and pops up immediately (well - you get what you pay for).
Thanks |
@fanthom
My latest own built kernel 4.14.13-gentoo has no USB support (I tried only on kvim2).
I read on khadas forum vanilla 4.15.0 has no USB support either (I will build 4.15.0-gentoo soon).
http://linux-meson.com matrix confirms lack of full support (on S905D S905X S912). |
|
Back to top |
|
|
fanthom n00b
Joined: 31 May 2007 Posts: 60
|
Posted: Sun Feb 04, 2018 11:30 am Post subject: |
|
|
This is very useful link, looks like I will have to wait a bit more to get full support for my box in upstream kernel.
Unless its dtb issue, will try other and report in case of success.
As last resort i consider going back to 3.14.29 kernel where everything works. There are custom (Amlogic?) kernel patches available for each hardware component.
That would be a pity though ...
Thank you. |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
|
Back to top |
|
|
mDup Apprentice
Joined: 14 Apr 2006 Posts: 212
|
Posted: Sat Feb 10, 2018 10:42 pm Post subject: |
|
|
@fanthom
My kvim2 also has no USB working yet on 4.15.0-gentoo, so, in terms of documented 'meson' S912 'Partial' USB support, it falls into not supported category for now. Unless if I missed something in kernel config.
have a nice day |
|
Back to top |
|
|
|