ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion | IRC log http://irclog.whitequark.org/linux-rockchip | Community GH https://github.com/linux-rockchip | Rockchip GH https://github.com/rockchip-linux | ML https://groups.google.com/group/linux-rockchip
warpme_ has quit [Quit: Connection closed for inactivity]
kevery has joined #linux-rockchip
field^Zzz4 has quit [Ping timeout: 240 seconds]
vicencb has quit [Quit: Leaving.]
wens has quit [Ping timeout: 250 seconds]
wens has joined #linux-rockchip
stikonas has quit [Remote host closed the connection]
ganbold has quit [Remote host closed the connection]
ganbold has joined #linux-rockchip
vstehle has quit [Ping timeout: 250 seconds]
<wens> robmur01: I added that range to reserved memory, using u-boot `fdt rsvmem` command. doesn't seem to be enough
lkcl has quit [Ping timeout: 268 seconds]
tuxd3v has quit [Quit: Leaving]
lkcl has joined #linux-rockchip
tuxd3v has joined #linux-rockchip
<tuxd3v> Hello, anybody managed to boot mainline kernel on rk3399 rockpi4 ?
return0e has quit [Ping timeout: 250 seconds]
return0e has joined #linux-rockchip
drrty has quit [Ping timeout: 245 seconds]
vstehle has joined #linux-rockchip
_whitelogger has joined #linux-rockchip
ldevulder_ is now known as ldevulder
warpme_ has joined #linux-rockchip
jlandafk is now known as jlandsa
jlandsa is now known as jlanda
ldevulder has quit [Read error: Connection reset by peer]
ldevulder has joined #linux-rockchip
matthias_bgg has joined #linux-rockchip
_whitelogger has joined #linux-rockchip
anarsoul|2 has joined #linux-rockchip
anarsoul has quit [Ping timeout: 268 seconds]
EmilKarlson has quit [Quit: killed]
thefloweringash has quit [Quit: killed]
flacks has quit [Quit: killed]
eballetbo[m] has quit [Quit: killed]
psydroid has quit [Quit: killed]
vagrantc has joined #linux-rockchip
vicencb has joined #linux-rockchip
lerc has quit [Ping timeout: 250 seconds]
lerc has joined #linux-rockchip
nsaenz has joined #linux-rockchip
nsaenz has quit [Remote host closed the connection]
field^Zzz4 has joined #linux-rockchip
vagrantc has quit [Ping timeout: 252 seconds]
nsaenz has joined #linux-rockchip
nsaenz has quit [Remote host closed the connection]
thefloweringash has joined #linux-rockchip
flacks has joined #linux-rockchip
eballetbo[m] has joined #linux-rockchip
EmilKarlson has joined #linux-rockchip
psydroid has joined #linux-rockchip
vagrantc has joined #linux-rockchip
leah2 has quit [Remote host closed the connection]
leah2 has joined #linux-rockchip
vagrantc has quit [Ping timeout: 245 seconds]
wadim_ has joined #linux-rockchip
vicencb has quit [Quit: Leaving.]
vagrantc has joined #linux-rockchip
return0__ has joined #linux-rockchip
return0e has quit [Ping timeout: 240 seconds]
vagrantc has quit [Ping timeout: 276 seconds]
return0e has joined #linux-rockchip
return0__ has quit [Ping timeout: 265 seconds]
lkcl has quit [Ping timeout: 265 seconds]
lkcl has joined #linux-rockchip
vagrantc has joined #linux-rockchip
vagrantc has quit [Ping timeout: 250 seconds]
JohnDoe_71Rus has joined #linux-rockchip
vagrantc has joined #linux-rockchip
lkcl has quit [Ping timeout: 246 seconds]
field^Zzz4 has quit [Ping timeout: 246 seconds]
drrty has joined #linux-rockchip
tlwoerner has quit [Quit: Leaving]
tlwoerner has joined #linux-rockchip
vagrantc has quit [Ping timeout: 250 seconds]
field^Zzz4 has joined #linux-rockchip
vagrantc has joined #linux-rockchip
vagrantc has quit [Quit: leaving]
vicencb has joined #linux-rockchip
lkcl has joined #linux-rockchip
TomTheDragon has joined #linux-rockchip
<TomTheDragon> I've had more luck with kernel 4.4 for my rockpro64 (rk3399), is mainline still not there yet?
field^Zzz4 has quit [Ping timeout: 240 seconds]
lerc has quit [Quit: No Ping reply in 180 seconds.]
lerc has joined #linux-rockchip
lkcl has quit [Ping timeout: 268 seconds]
JohnDoe_71Rus has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
lkcl has joined #linux-rockchip
stikonas has joined #linux-rockchip
vagrantc has joined #linux-rockchip
field^Zzz4 has joined #linux-rockchip
vagrantc has quit [Ping timeout: 246 seconds]
matthias_bgg has quit [Quit: Leaving]
lkcl has quit [Ping timeout: 250 seconds]
fALSO has joined #linux-rockchip
<fALSO> yo
<fALSO> stikonas, you no longer update your kernel branch?
<fALSO> stikonas, or moved it somewhere else?
<stikonas> fALSO: hi
<stikonas> for rockpro64?
<fALSO> Hi!
<fALSO> yes
<stikonas> in the blog or where should I update?
<stikonas> I don't think I pushed any repository anywhere
<stikonas> I myself am on 5.4.2 at the moment on rockpro64...
<stikonas> with a single patch on top of it
<fALSO> oh man,, i confused your nick with sigmaris
<stikonas> oh ok. no problem
<tuxd3v> fALSO, how did you compiled all the amount of uboot partitions?
<tuxd3v> I tried
<tuxd3v> 1st: idbloader.img
<fALSO> im using a binary from someone here, while building myself, it always hanged on the ATF
<fALSO> stikonas, nice url - thanks :)
<tuxd3v> 2nd: u-boot.itb
<stikonas> tuxd3v: that's the only two things that you need
<tuxd3v> fALSO...exactlly
<stikonas> idbloader.img and u-boot.itb contains all 4 stages
<tuxd3v> I build bl31.elf
<stikonas> yes, bl31.elf is then in u-boot.irb
<tuxd3v> build idbloader.img and u-boot.itb
<stikonas> tuxd3v: which versions?
<stikonas> there were some incompatible changes...
<fALSO> last time i tried -> probably one or two months ago, it didnt boot
<fALSO> mainline atf, mainline uboot
<tuxd3v> I flash them directly to the offsets from here: http://opensource.rock-chips.com/wiki_Boot_option#u-boot.itb
<stikonas> e.g. commit 0aad563c74807195cc7fe2208d17e2d889157f1e in atf needs some changes in u-boot
<stikonas> which are not yet in u-boot's defconfig
<stikonas> so need to edit config after running defconfig
<tuxd3v> humm
<stikonas> sudo dd if=idbloader.img of=/dev/mmcblk1 seek=64
<stikonas> sudo dd if=u-boot.itb of=/dev/mmcblk1 seek=16384
<tuxd3v> make menuconfig, and then what you do in Uboot?
<fALSO> those steps should probably be documented
<stikonas> this is how I flash
<fALSO> the edit part
<tuxd3v> you flash to a partition?
<tuxd3v> I flash to /dev/sdb
<stikonas> tuxd3v: I flash to eMMC
<fALSO> i noticed that some people here also use grub
<tuxd3v> ho..forget, exactly its the same..
<stikonas> yeah, I use grub
<fALSO> i only have uboot -> kernel
<TomTheDragon> yeah, mmcblk1 is not a partition
<stikonas> oh yes, I have offset from device
<stikonas> not from partition
<stikonas> I do have partitions too
<stikonas> at those offsets, so I can just update my script
<stikonas> but this works with any partitioning
<stikonas> oh that CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x0 change I mentioned above is now in defconfig if I'm not mistaken
<fALSO> thats probably wwhat i was missing
<anarsoul|2> stikonas: they're already in
<anarsoul|2> also there's a patch for ATF to fix reboot
<stikonas> fALSO: basically, I marked one of my partitions as EFI ESP, so u-boot automatically boots from that partition from bootaa64.efi file (which is grub)
<stikonas> anarsoul|2: I appleid that patch, but somehow reboots are still hanging
<anarsoul|2> stikonas: one for ATF?
<stikonas> yes
<stikonas> maybe something to do with grub?
<stikonas> when grub loads kernel and initramfs, kernel doesn't boot
<stikonas> I didn't dig deeper though
<stikonas> yes
<stikonas> this one
<stikonas> it's in master
<stikonas> I just tried yesterday I think
<stikonas> from master
<anarsoul|2> it's not in master yet
<stikonas> oh
<anarsoul|2> check the patch ^^
<stikonas> oh, that's 2nd patch
<stikonas> ok, maybe not then
<stikonas> yes, it looks different
<stikonas> should try this one then
<anarsoul|2> you need this in addition to my patch
<stikonas> ok, building...
<stikonas> anarsoul|2: no, 3/3 times reboot failed
<anarsoul|2> :(
<stikonas> must be some other issue
<stikonas> I probably need to enable extra logging...
<stikonas> otherwise it's hard to tell
<stikonas> at which step boot fails
<stikonas> last thing I see is EFI stub: Exiting boot services and installing virtual address map...
<anarsoul|2> that's weird
<anarsoul|2> even when it hangs for me I see some logs from kernel
<stikonas> nothing at all from the kernel...
<stikonas> I probably need to enable earlycon
<anarsoul|2> I'd say it indicates that kernel hasn't started?
<stikonas> well, efi stub is already part of kernel, isn't it?
<stikonas> just gets stuck really early in loading process
<TomTheDragon> there's no way to just bypass the ATF altogether?
<tuxd3v> Maybe if we know how to compile OPTEE
<tuxd3v> it has no target string for rk3399
<tuxd3v> only for rk32xx cpus :(
<TomTheDragon> ah
<tuxd3v> we could use OPTEE instead of ATF
<tuxd3v> but how to compile it ?
<tuxd3v> I haven't figured out how..
<tuxd3v> but if so, you need to compile 'tee.bin', then rename it to bl31.elf
<tuxd3v> and also moove it into uboot
<tuxd3v> export var.. and so on equal to build uboot with ATF
<tuxd3v> BUT how to compile tee.bin?
<tuxd3v> to substitute bl31.elf stage of ATF?
<anarsoul|2> stikonas: oh, right
<anarsoul|2> TomTheDragon: ATF implements PSCI, so it's used to bring up secondary CPUs, reboot and poweroff the board
<anarsoul|2> (poweroff is not implemented for rk3399 though)
anarsoul|2 is now known as anarsoul
<stikonas> is that why fan stays on when I run shutdown?
<anarsoul> yes :)
<anarsoul> (board also stays on)
<anarsoul> it just spins in while(1) {} loop
<TomTheDragon> does anyone here have functional 4k video decoding, playing back in a window?
<stikonas> anarsoul: ocasionally, my reboots also hang much earlier in TPL before RAM is initialized (I only see U-Boot TPL 2020.01-rc4-00038-g94d022bb40-dirty (Dec 08 2019 - 00:55:1)
<stikonas> not even Channel 0: Channel 1: 256B stride
<anarsoul> are you booting off eMMC?
<stikonas> yes
<anarsoul> you need to limit max frequency to 25MHz
<stikonas> of CPU?
<anarsoul> sdhci driver in u-boot is broken and doesn't work well for high-speed modes
<anarsoul> for eMMC
<stikonas> oh
<stikonas> do you know where I can do that?
<stikonas> menuconfig?
<anarsoul> yes
<anarsoul> no
<anarsoul> :)
<anarsoul> dts
<stikonas> dts
<stikonas> oh ok
<stikonas> you solved quite a few of these reboot problems. Amazing work!
<anarsoul> thanks
<stikonas> this is what I see with earlycon... https://stikonas.eu/files/earlycon.txt
<stikonas> doesn't look like there is any problem here
<stikonas> which is strange...
<anarsoul> add console=ttyS2,115200 (or whatever baudrate you use) to cmdline
<stikonas> ok, better
<stikonas> although, this time it just booted...
<anarsoul> :D
<stikonas> well, it ocasionally boots
<anarsoul> heizenbug
<stikonas> well, if it happens 90% of time, you get annoyed enough and investigate
<stikonas> if it happens 5% of times, that's worse
<stikonas> not frequent enough to look at it
<stikonas> hard to reproduce...
<stikonas> anarsoul: successfully rebooted 3 more times... I blame your u-boot emmc 25 Mhz patch
<anarsoul> :)
<stikonas> thanks again!
<stikonas> interestengly, it was causing hangs in two different places
<anarsoul> yeah, if you load corrupted image it likely won't start
<stikonas> are you going to upstream it?
<anarsoul> I'm not sure if it gets accepted
<anarsoul> since we don't understand why it doesn't work at higher frequencies
<stikonas> hmm, worth trying... Maybe somebody will suggest something else
<stikonas> oh
<anarsoul> it works fine at HS200 in linux
<anarsoul> so hardware is fine
<anarsoul> so must be something with sdhci driver in u-boot
<stikonas> well, anyway, your hack is very useful here for me
<stikonas> especially when I'm not at home, unreliable reboot is unacceptable :D
<anarsoul> definitely
<stikonas> well, I have some way of remotely power cycling that machine, but it's a bit inconvenient
<anarsoul> guess it's time for me to buy smart outlet :)
<stikonas> I have a couple of Orvibo S20... Also did a bit of reverse engineering on them... But they probably don't sell them anymore.
<stikonas> well, my requirements are: works without cloud, locally with FOSS
<anarsoul> that's harder to find
<anarsoul> I think these do not require cloud: https://www.amazon.ca/dp/B07PWD6KSC
ldevulder_ has joined #linux-rockchip
ldevulder has quit [Ping timeout: 245 seconds]
vstehle has quit [Ping timeout: 250 seconds]
<stikonas> Sonoff S20 (I think it's not the same as Orvibo S20) can be even reflashed https://github.com/arendst/Tasmota/wiki/sonoff-s20)
vstehle has joined #linux-rockchip
<anarsoul> gosund is also supported: https://blakadder.github.io/templates/gosund_WP1-1.html
warpme_ has quit [Quit: Connection closed for inactivity]
vicencb has quit [Quit: Leaving.]