narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - Publicly Logged on https://irclog.whitequark.org/linux-amlogic
TheAssassin has quit [Ping timeout: 252 seconds]
TheAssassin has joined #linux-amlogic
jakogut_ has quit [Quit: jakogut_]
jakogut_ has joined #linux-amlogic
nashpa has quit [Ping timeout: 250 seconds]
_whitelogger has joined #linux-amlogic
The_Coolest has quit [Quit: FOLD For The Cause!!!]
yangxuan has joined #linux-amlogic
yangxuan has quit [Ping timeout: 240 seconds]
yangxuan has joined #linux-amlogic
yangxuan has quit [Ping timeout: 250 seconds]
vagrantc has quit [Quit: leaving]
jakogut_ has quit [Quit: jakogut_]
Darkmatter66 has joined #linux-amlogic
Darkmatter66_ has quit [Ping timeout: 245 seconds]
gaspode has quit [Quit: Woof bloody woof.]
gaspode has joined #linux-amlogic
_whitelogger has joined #linux-amlogic
Darkmatter66 has quit [Ping timeout: 250 seconds]
yangxuan has joined #linux-amlogic
yangxuan has quit [Quit: Leaving]
return0e has joined #linux-amlogic
return0e_ has quit [Ping timeout: 268 seconds]
Darkmatter66 has joined #linux-amlogic
Darkmatter66_ has joined #linux-amlogic
Darkmatter66 has quit [Ping timeout: 250 seconds]
Xogium has quit [Quit: Leaving.]
Xogium has joined #linux-amlogic
jakogut has quit [Quit: jakogut]
jakogut has joined #linux-amlogic
yangxuan has joined #linux-amlogic
yangxuan has quit [Quit: Leaving]
return0e_ has joined #linux-amlogic
return0e has quit [Ping timeout: 250 seconds]
return0e_ has quit [Ping timeout: 250 seconds]
return0e has joined #linux-amlogic
sputnik_ has quit [Remote host closed the connection]
filt3r has left #linux-amlogic ["x"]
filt3r has joined #linux-amlogic
hejux has joined #linux-amlogic
<hejux> hello, anyone has unstable ethernet issue with 905d chip?
filt3r has quit [Client Quit]
filt3r has joined #linux-amlogic
filt3r has quit [Client Quit]
<xdarklight> hejux: at Gigabit speeds?
<xdarklight> if the answer to that question is "yes" then you can apply this patch (or modify your .dtb in some way): https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic.git/commit/?h=v4.21/dt64&id=8b3e6f8999f8d704fccce225b9455b3fa639d1c9
<xdarklight> that patch is already queued for v4.21
vagrantc has joined #linux-amlogic
<hejux> xdarklight: hi, thanks, i modified via vim, i'm doing makepkg now
<hejux> xdarklight: is it possible to modify dtb or do i have to modify dts and recompile the kernel?
<hejux> oh my god, dtc can do that job, i don't need to compile a kernel.
<xdarklight> hejux: yes dtc can do it (even u-boot could) - you just need to translate IRQ_TYPE_LEVEL_HIGH into the correct numeric value
<hejux> xdarklight: i already downloaded all amlogic dts,
<hejux> there is a Makefile in there, but "make" does not work
<hejux> root@n1 ~/mybuild/amlogic $ ls
<hejux> Makefile meson-gxbb-p200.dts meson-gxbb-wetek.dtsi meson-gxl-s905d.dtsi meson-gxl-s905x-khadas-vim.dts meson-gxm-mali.dtsi
<hejux> ..... and so on
<xdarklight> dtc -I dtb -O dts -o hackme.dts existing.dtb
<xdarklight> that's the command to get a .dts from a .dtb
<xdarklight> for the other direction you need:
<xdarklight> dtc -I dts -O dtb -o hacked.dtb hackme.dts
<hejux> xdarklight: thanks, the thing is, the patch is issue on : arch/arm64/boot/dts/amlogic/meson-axg.dtsi and arch/arm64/boot/dts/amlogic/meson-gx.dtsi
<xdarklight> ah, yes
<hejux> i don't find these two DTBs in my running /boot/dtbs/
<xdarklight> a .dtb always contains the sum of the .dts and all of the .dtsi files which it included
<xdarklight> so there's no separate .dtb for the ".dtsi" ("i" stands for include), it's all part of your .dtb
<hejux> i have this: /boot/dtbs/amlogic/meson-gxl-s905d-p230.dtb, on my running alarm.
<hejux> but it is supposed to remove eee from this file.
<hejux> not replace with IRQ_TYPE_LEVEL_HIGH
<xdarklight> yes, that's one of the changes
<afaerber> ccaione, serial issue I mentioned may be a bug / changed behavior in util-linux 2.33 agetty, been able to reproduce it elsewhere: https://bugzilla.opensuse.org/show_bug.cgi?id=1120298
<xdarklight> do to the includes in the original .dts file your .dtb also contains the contents of arch/arm64/boot/dts/amlogic/meson-gx.dtsi
<xdarklight> and there's a change to the IRQ in meson-gx.dtsi which you need to apply as well
<afaerber> xdarklight, that change is only going into 4.21?
<xdarklight> afaerber: sorry, I was replying to hejux
<hejux> i mean, i can use dtc to make meson-gxl-s905d-p230.dts into meson-gxl-s905d-p230.dtb, no problem. but where do find the file related to amlogic/meson-axg.dtsi ?
<afaerber> yeah, I understand, but I was facing same/similar issue earlier
<hejux> there is no such file called meson-axg.dtsi (or DTB?) under /boot/dtbs/amlogic/ on my running arch
<afaerber> my plan was to write an overlay so apply on top of distro .dtb
<afaerber> *to
<xdarklight> afaerber: ah okay, I believe it can be backported to -stable once it hits mainline
<afaerber> hejux, you can also use dtc to convert from .dtb to .dts, apply your changes and go back to .dtb :)
<xdarklight> hejux: the contents of all .dtsi files are also part of your .dtb file (the .dts file states: include <some name>.dtsi - the "dtc" tool then goes ahead and takes all the contents from the .dts file and all referenced .dtsi files and builds a .dtb from that)
<hejux> xdarklight: grep -E "meson-axg" meson-gxl-s905d-p230.dts
<hejux> nothing shows up
<afaerber> why should it?
<xdarklight> hejux: s905d is not an AXG SoC, it's from the the GXL series
<hejux> grep -E "dtsi" meson-gxl-s905d-p230.dts : shows up : #include "meson-gxl-s905d.dtsi" #include "meson-gx-p23x-q20x.dtsi"
<hejux> so i got to modify meson-gxl-s905d.dtsi and meson-gx-p23x-q20x.dtsi, then dtc to compile meson-gxl-s905d-p230.dts ?
<xdarklight> hejux: wait, do you want to compile a full kernel or do you only want to patch your current .dtb (without re-building the kernel)?
<hejux> just to replace meson-gxl-s905d-p230.dtb on /boot/dtbs/ linked to /boot/dtb.img
<xdarklight> then what I would do is:
<xdarklight> dtc -I dtb -O dts -o meson-gxl-s905d-p230_modified.dts meson-gxl-s905d-p230.dtb
<hejux> but i already started compiling modified dts kernel 3 hours ago, it is still on going, compiling it right on my alarm.
<xdarklight> then if you open up meson-gxl-s905d-p230_modified.dts your should see two things:
<xdarklight> 1) eee-broken-1000t; is still listed in there, remove it
<xdarklight> 2) there's a a node with is compatible with "amlogic,meson-gxbb-dwmac", that probably still contains the wrong IRQ setting
<xdarklight> if you're done modifying that file you can use the following command to build a dtb again:
<xdarklight> dtc -I dts -O dtb -o meson-gxl-s905d-p230_modified.dtb meson-gxl-s905d-p230_modified.dts
<hejux> interrupts = < 0x00 0x08 0x01 >;
<hejux> interrupt-names = "macirq";
<hejux> this is from stock p230.dtb
<hejux> can i ignore these warnings
<xdarklight> I believe you can ignore these warnings
<hejux> i fount eee-broken-1000t, removed it
<xdarklight> OK
<xdarklight> now to the interrupts:
<xdarklight> interrupts = < 0x00 0x08 0x01 >;
<hejux> but i can't find interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>;
<xdarklight> 0x01 in there means IRQ_TYPE_EDGE_RISING
<xdarklight> you can get all possible values and their human-readable names from https://elixir.bootlin.com/linux/latest/source/include/dt-bindings/interrupt-controller/irq.h
<hejux> so change 0x01 to 0x04?
<xdarklight> yes
<hejux> more warnings
<xdarklight> I would ignore them for now
<xdarklight> and see if you can boot properly with meson-gxl-s905d-p230_modified.dts
<xdarklight> sorry, meson-gxl-s905d-p230_modified.dtb
<hejux> i guess it is save to cp meson-gxl-s905d-p230_modified.dt as /boot/dtb.img ?
<hejux> if so, i got to cancel the on going kernle compiling.
<hejux> yeah, i'll try now.
<xdarklight> yes, you probably have to save it as dtb.img (I'm not sure where the naming "dtb.img" comes from exactly, it it's simply a .dtb then it's correct to replace it)
<hejux> make some notes first.
<hejux> xdarklight: the kernel PKGBUILD has a line for that, copy /boot/yyy/xxx.dtb /boot/dtb.img
<hejux> xdarklight: normally we use uEnv.ini to define dtb, but this kernel i'm using, use /boot/dtb.img instead, nothing in uEnv.ini
hejux has quit [Remote host closed the connection]
hejux has joined #linux-amlogic
<hejux> xdarklight: i'm back.
<hejux> booted ok
<hejux> some dmesg diff, no difference
hejux_ has joined #linux-amlogic
<xdarklight> hejux: nice, now put some stress on your Ethernet connection :)
<hejux_> great thanks for the help, saved my time for stupid kernel compiling ...
<hejux_> stress like iperf3 test?
<xdarklight> either iperf3 - or just do whatever you did before where you noticed these Ethernet issues ;)
<hejux> xdarklight: i did flood ping
<hejux> ping -c 1000000 -f router.ip
<xdarklight> then try that again ;)
<hejux> it happened randomly.
<hejux> when it happens, i got very high ping form my computer to the s905d box
<hejux> sometimes 4000ms
hejux has quit [Quit: leaving]
<hejux_> xdarklight: testing now, a food ping on top and normal ping at the bottom
<hejux_> and this is another picture about the issue: https://paste.pics/4EEXP
<hejux_> 852937 packets transmitted, 852936 received, 0.000117242% packet loss, time 562ms
<xdarklight> hejux_: so is this now better than before?
<hejux_> rtt min/avg/max/mdev = 0.147/0.515/17.265/0.156 ms, pipe 2, ipg/ewma 0.608/0.482 ms
<hejux_> xdarklight: hard to say for such a short time food ping
<hejux_> flood *
<xdarklight> ok
<xdarklight> I'll get some dinner now, see you guys later
* afaerber testing with the above overlay applied now (needed to update my U-Boot first)
<hejux_> slightly better iperf3 performance than before. 240M to 250M now, under 300M wifi
<hejux_> xdarklight: see you, enjoy
<hejux_> thanks.
<hejux_> afaerber: how to use an overlay?
<afaerber> hejux_, I wrote a boot script for U-Boot (boot.scr) that uses the "fdt apply" command to apply my overlay on top of my unmodified distro .dtb
<hejux_> that's cool.
<hejux_> i have no idea about uboot, tried to take full use of the emmc of my Phicomm N1 by formating it from start to end... almost bricked the box
<hejux_> /dev/mmcblk1p1 221184 1269760 1048577 512M e W95 FAT16 (LBA)
<afaerber> ouch, yeah Amlogic is a bit tricky - was hoping to continue work on my meson-tools for S905X/S912 during the holidays...
<hejux_> /dev/mmcblk1p2 1400832 15269887 13869056 6.6G 83 Linux
<hejux_> i still don't understand why i have to format the mmc like this
<hejux_> there's free space that i can't use or i won't boot mmc or usb drive
<afaerber> part of the bootloader may sit around sector 97
<afaerber> (at least on Odroid-C2)
<hejux_> Odroid is much easier to deal with i guess, Phicomm N1 was a TV Set top box orig.
<afaerber> hmm, deleting the eee-broken-1000t property is not working the way I hoped
<hejux_> afaerber: along with the IRQ fix?
hejux has joined #linux-amlogic
<afaerber> hejux_, the interrupts override seems working okay - problem is that /delete-property/ doesn't seem to work for overlays and I find no alternative documented and see it as a to-do in https://elinux.org/Frank%27s_Evolving_Overlay_Thoughts
<hejux> isee, overlay did not overlay :)
<afaerber> well, 50% :)
<afaerber> should be an improvement over current state already
<hejux> what about sed
<hejux> :) with your script,
<afaerber> hmm, not a bad idea, let me try "fdt rm"...
<hejux> good luck
<afaerber> hejux, btw what I did on TV boxes of mine was to chain-load a newer U-Boot from the vendor U-Boot
<hejux> but still, not able to use all mmc space
<hejux> usually, for x86, there is 2M Bytes free space at the head, all the rest can be used by OS
<hejux> however, i'm already happy with that i can use bootstrap method to install alarm to mmc, that's easier than i thought
<afaerber> worked!
<hejux> figured out!
<hejux> cool
hejux has quit [Quit: leaving]
<afaerber> hejux_, here the first partition starts on sector 2048, i.e. 1048576
<hejux_> and?
<hejux_> finally i got that dts is like dsl to ACPI, while dtb is like aml.
<hejux_> intel got iasl, arm got dtc :)
<hejux_> that's easier for me to understand
<hejux_> :3
The_CooIest has quit [Ping timeout: 246 seconds]
The_Coolest has joined #linux-amlogic
The_Coolest has quit [Client Quit]
The_CooIest has joined #linux-amlogic
sputnik_ has joined #linux-amlogic
phh has quit [Remote host closed the connection]
phh has joined #linux-amlogic
hejux_ has quit [Remote host closed the connection]
Darkmatter66 has joined #linux-amlogic
Darkmatter66_ has quit [Ping timeout: 268 seconds]
sputnik_ has quit [Remote host closed the connection]
sputnik_ has joined #linux-amlogic