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
GNUtoo has quit [Remote host closed the connection]
GNUtoo has joined #linux-amlogic
Barada has joined #linux-amlogic
_whitelogger has joined #linux-amlogic
yann has quit [Ping timeout: 240 seconds]
ldevulder_ is now known as ldevulder
yann has joined #linux-amlogic
<Darkmatter66_> HI
<Darkmatter66_> I have two questions about u-boot
<Darkmatter66_> 1- is it possible to extract the config from u-boot binary ? something like ./scripts/extract-ikconfig in Linux ?
<Darkmatter66_> 2- can I flash mainline u-boot on my box and still be able to boot to vendor Android ? or do I need Vendor u-boot to boot vendor u-boot?
chewitt has joined #linux-amlogic
<chewitt> Darkmatter66_ most vendor u-boot configs allow you to disrupt boot via uart (hit space or enter at the right moment) and this drops you to the u-boot console where you can run "print env" and it will show you the mountain of crap bootscript being used. As long as you replicate the same (or similar) you should be able to continue booting Android.
<Darkmatter66_> chewitt, Yes I was going to do that but thought i ask first if anyone tried it to avoid the pain of trying, also what about the TEXT_OFFSET difference between mainline and vendor kernel?
<chewitt> the alternative is chain-loading u-boot with a more vanilla version
<chewitt> s/the/an
<chewitt> we've been experimenting with that to sidestep the RGB/YUV issue on newer boards, but since those are still derived from "2015" vendor u-boot, the same approach should work
<chewitt> which text offset are you talking about?
<chewitt> nb: not my area of expertise, but two guesses are better than one, right!?
<chewitt> btw, I picked your commits from Kevin's 5.6 branch for LE use :)
<Darkmatter66_> chewitt, nice, I also sent an rc keymap patch to the linux-media guys but no response so far !
<Darkmatter66_> chewitt, ^ this is the TEXT_OFFSET patch I'm talking about
<ukleinek> in my experience chainloading in U-Boot is harder than should be necessary because you have to care for cache cleanup
<chewitt> I never had a response to any of the remotes that I submitted semi-recently .. until I got an "applied to branch" notification
<chewitt> remotes aren't particularly important so I guess they just trawl the list and merge them periodically
<Darkmatter66_> ukleinek, Cache cleanup ?
<Xogium> I tried to chainload vendor u-boot -> mainline u-boot once. I never made it work
<Darkmatter66_> chewitt, they are important for amlogic to use the power button to hibernate the device at least
<Xogium> I wanted to have a tiny u-boot in the spi flash, then chainload another u-boot that was on mmc
<Darkmatter66_> Xogium, I've sucessfully chainloaded vendor u-boot -> mainline u-boot before with the help of narmstrong, even got video output of u-boot
<Xogium> all I managed to do was to crash my board in a loop
<Xogium> I think it was because my chainloaded u-boot attempted to setup ram and all that
<Xogium> and the tiny u-boot had already done that
<narmstrong> Sees you chainloaded with the full binary packed with fip binaries, just use the result of make in uboot
<narmstrong> It works fine
<Darkmatter66_> Xogium, If I remember correctly you need to take the raw u-boot.bin
<Xogium> but I must not let it run the board_init or whatever
<Xogium> right ?
<Darkmatter66_> Xogium, as narmstrong said above, don't go through the fip packing steps, just take u-boot.bin from the main tree after running make
<Xogium> yeah but that u-boot.bin has a board_init function
<Xogium> I'll try to play with it some more
<Darkmatter66_> Xogium, just put u-boot.bin on an sd card, when the vendor u-boot starts interrupt it and chainload the mainline u-boot.bin
<Darkmatter66_> Xogium, These are the commands that worked for me https://termbin.com/wn5r
<Xogium> whoever ported this board to mainline did it wrong anyway… I'd switch to direct mainline, but its bugged, and I'm hoping to avoid these issues by chainloading from the vendor u-boot. The mainline version doesn't talk to ATF to determine available ram, the dts is done badly so that usb 3 is mixed up with pcie and crashes the board, and the env is saved to the wrong place
<Darkmatter66_> Xogium, be sure to change the partition number in the first command
<Xogium> fixing the dts and the place where the env is saved is easy, but fixing the code so that u-boot talks to ATF to check the ram amount… No bloody clue how
<chewitt> Xogium: which board?
<Xogium> a marvell one :p or should that be globalscale ? Espressobin
<Xogium> try to get a pcie port running at 6 gb/s, see if u-boot will agree :p
<Xogium> here it didn't, and got stuck in a boot loop :D no wonder, that pcie port is supposed to be 2.5 gbps afaik
<Xogium> also sata ain't working with mainline, but its not a big deal for me since I'm not using it
<Xogium> its just that the vendor fork will be a year old in a couple days, and I doubt it will evolve further, not even to backport bugfix
warpme_ has joined #linux-amlogic
<Xogium> scratch that, the u-boot itself is nearly 2 years old
<Xogium> I'll try to mess around with chainloading, thanks narmstrong and Darkmatter66_
chewitt has quit [Quit: Zzz..]
Darkmatter66 has joined #linux-amlogic
Darkmatter66_ has quit [Ping timeout: 265 seconds]
chewitt has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 276 seconds]
<ukleinek> Darkmatter66: yes, if you chainload another bootloader using "go" the first U-Boot doesn't do cache maintenance and the 2nd assumes a clean and disabled cache. Believe me, that is really bad to debug and can take much time to debug and understand
<narmstrong> haven't got any issue with chainloading for now...
<narmstrong> and the board_init() on amlogic u-boot doesn't initialize DDR or anything, so it's safe to chainload
<ukleinek> narmstrong: some U-Boot binaries don't enable Caching at all, in this case it's safe.
<ukleinek> narmstrong: alternatively you must wrap the image using mkimage and use bootm to start it. Then the caching is handled as expected.
Barada has quit [Quit: Barada]
nashpa has quit [Ping timeout: 268 seconds]
sputnik_ has joined #linux-amlogic
nashpa has joined #linux-amlogic
chewitt has quit [Quit: Zzz..]
Darkmatter66_ has joined #linux-amlogic
Darkmatter66 has quit [Ping timeout: 265 seconds]
Darkmatter66 has joined #linux-amlogic
Darkmatter66_ has quit [Ping timeout: 250 seconds]
yann has quit [Ping timeout: 252 seconds]
yann has joined #linux-amlogic
nsaenz has joined #linux-amlogic
nsaenz has quit [Client Quit]
yann has quit [Ping timeout: 245 seconds]
The_Coolest has quit [Read error: Connection reset by peer]
The_Coolest has joined #linux-amlogic
The_Coolest has quit [Read error: Connection reset by peer]
The_Coolest has joined #linux-amlogic
<Darkmatter66> narmstrong, If I've burnt the u-boot to the sdcard how do i tell the device to load the u-boot on the sdcard ?
<Darkmatter66> narmstrong, at the time I added support to my board to u-boot i didn't use the fip package, i only chainloaded so I copy pasted the instructions from other READMEs but looking at them now they are incorrect
<Darkmatter66> narmstrong, these instructions use $FIPDIR/gxl blobs and tools while they should use $FIPDIR/gxbb
<Darkmatter66> narmstrong, I want to update these documents but I'm not able to execute the u-boot from sdcard
<Darkmatter66> narmstrong, also there are differences in instructions between gxb and gxl beyond the fip directory
<Darkmatter66> narmstrong, for example https://github.com/u-boot/u-boot/blob/master/board/amlogic/p200/README.odroid-c2 this uses fip_create while gxl boards don't use it
<Darkmatter66> narmstrong, this https://github.com/u-boot/u-boot/blob/master/board/amlogic/p212/README.p212 burn the u-boot.bin.sd.bin while other machines just burn the u-boot.bin
<Darkmatter66> narmstrong, so many steps and differences it's hard to know which step applies to my board
nsaenz has joined #linux-amlogic
sputnik_ has quit [Remote host closed the connection]
nsaenz has quit [Client Quit]
sputnik_ has joined #linux-amlogic
yann has joined #linux-amlogic
warpme_ has quit [Quit: Connection closed for inactivity]
port1024 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.5 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.5 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.5 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Client Quit]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Client Quit]
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Quit: ZNC 1.7.5 - https://znc.in]
Darkmatter66 has joined #linux-amlogic
warpme_ has joined #linux-amlogic
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 268 seconds]
<narmstrong> Darkmatter66: look at the nanopi-k2 steps, it should be close
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 265 seconds]
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 265 seconds]
sputnik__ has quit [Remote host closed the connection]
sputnik_ has joined #linux-amlogic
ldevulder_ has joined #linux-amlogic
ldevulder has quit [Ping timeout: 268 seconds]
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 268 seconds]