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
_whitelogger has joined #linux-amlogic
kaspter has quit [Ping timeout: 240 seconds]
kaspter has joined #linux-amlogic
kaspter has quit [Remote host closed the connection]
kaspter has joined #linux-amlogic
warpme_ has quit [Quit: Connection closed for inactivity]
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 256 seconds]
nickotheus has quit [Quit: Leaving]
sputnik_ has quit [Ping timeout: 256 seconds]
sputnik_ has joined #linux-amlogic
camus1 has joined #linux-amlogic
kaspter has quit [Ping timeout: 264 seconds]
camus1 is now known as kaspter
<_49616e> hexdump0815: that was exactly I was looking for, thanks.
<_49616e> However, I've tried it but it only gave me a bl2.sign for some reason.
sputnik_ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
camus1 has joined #linux-amlogic
kaspter has quit [Ping timeout: 240 seconds]
camus1 is now known as kaspter
sputnik__ has joined #linux-amlogic
<_49616e> This is also on an S905L instead of S905X/W btw.
sputnik_ has quit [Ping timeout: 258 seconds]
kaspter has quit [Ping timeout: 246 seconds]
kaspter has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 258 seconds]
<chewitt> _49616e is there are reason you need/want to replace bl33?
<chewitt> or, what's the reason?
sputnik_ has joined #linux-amlogic
<chewitt> as a rule SBCs are well supported with mainline u-boot, but box devices are best left with vendor u-boot
sputnik_ has quit [Remote host closed the connection]
sputnik_ has joined #linux-amlogic
<_49616e> This is a tv box that I want to run mainline u-boot on. They've got an annoying splash that I want to get rid of, plus I want to experiment with UEFI on arm64.
<chewitt> the challenge will be that S905L is a low-end version of the SoC, and low-end devices tend to take more shortcuts with RAM chips, so it's hard to build mainline without FIP sources tweaked for the right RAM timings
<chewitt> make sure you back-up the emmc before you erase it for experiments
<_49616e> Yeah, I have a full dump of the emmc.
<chewitt> https://chewitt.libreelec.tv/testing/9.80/ has a bunch of images with mainline u-boot in them
<_49616e> By the way, is there any way that I can use the proprietary amlogic USB Burning Tool to write arbitrary emmc backups?
<chewitt> I don't think so, it's a writing tool
<chewitt> not a backup/capture tool
<_49616e> I have boards that doesn't have MicroSD slots, which naturally makes recovery very difficult if something goes wrong.
<chewitt> vendor u-boot should check USB too
<_49616e> > it's a writing tool
<_49616e> yes, I'm wondering if there is a way to write binary emmc backups I made with dd in that program
<chewitt> nope
<chewitt> amlogic .img != dd .img
<chewitt> https://chewitt.libreelec.tv/testing/9.80/u-boot/ <= has u-boot.bin.sd.bin files (renamed after their devices)
<_49616e> > vendor u-boot should check USB too
<_49616e> but I'm playing with u-boot, so if things go wrong there won't be a functional vendor u-boot for me to boot Linux with
kaspter has quit [Ping timeout: 240 seconds]
kaspter has joined #linux-amlogic
<chewitt> if the S905L board has an SD card you should be able to write the emmc dump to SD card and boot it
<chewitt> it might not boot fully to the OS, but the initial u-boot stage should be detected and work
<_49616e> > I have boards that doesn't have MicroSD slots, which naturally makes recovery very difficult if something goes wrong.
<chewitt> so does the S905L have an SD card slot or not?
<chewitt> it's not clear if you mean "this board" or "boards" in general
<chewitt> each device prob. needs it's own approach
<_49616e> I asked about the amlogic Windows utility because I do have boards without MicroSD card slots.
<_49616e> All of the boards that I'm *currently* playing with do have MicroSD slots, and that's what I've been using to test mainline u-boot.
<chewitt> mainline u-boot will prob. run fine on the board, it's the earlier stage bits (closed source Amlogic code, board specific bits) that will be the problem
<_49616e> which is exactly why I was trying to replace bl33 and keeping everything else stock
<chewitt> have you tried to edit the u-boot script that loads the splash?
<_49616e> This doesn't solve the UEFI problem.
<chewitt> which distro are you trying to run?
<_49616e> I'm not trying to solve a practical problem here, the distro is irrelevant. My goal is to have mainline u-boot on this board, not booting some distributions that otherwise wouldn't work without UEFI.
<_49616e> Fedora is a very good example if you *really* want to know. Their arm64 images are pretty much RPi-specific because they chose to use u-boot -> UEFI instead of loading the traditional legacy image directly.
<chewitt> lvrp16 what's the status of UEFI boot these days? .. I know you were working on Ubuntu support?
<lvrp16> chewitt: efi boot works fine since last year, just need to work on efi runtime services
<_49616e> I managed to get Fedora's arm64 image to work (kernel included) on allwinner H5 with mainline u-boot, but grub2 doesn't want to start Linux on my gxm board and it won't tell me why.
camus1 has joined #linux-amlogic
kaspter has quit [Ping timeout: 265 seconds]
camus1 is now known as kaspter
<lvrp16> _49616e: is grub going through the shim?
<lvrp16> chewitt: I have been cleaning up my own very dirty u-boot code and trying to make it maintainable and support all of the features I want. Probably be finished the second week of July after 2020.07 is release.
<chewitt> nice
<lvrp16> chewitt: testing hell though, no CI all manual, h3, 2 h5, s805x, 2 s905x, s905d, s912, rk3399, also linux min-configs for each of those XD
<chewitt> sounds like my LE kernel bump routine
<lvrp16> also so many bugs in distros upstream, so many kernel versions, and so many different kernel features and boot mechanisms
<chewitt> only that's now about 22x different GXBB > SM1 devices
<lvrp16> haha doing the job of the box manufactures for them :D
<lvrp16> should organize a mechanism and tell the box manufacturers to do their damn jobs
<chewitt> I think it was called Project Hailstorm? .. Google is probably the only entity they all care about
<lvrp16> hailstorm was netflix if my memory serves me correctly
<chewitt> ahh, right
buzzmarshall has quit [Remote host closed the connection]
camus1 has joined #linux-amlogic
kaspter has quit [Ping timeout: 256 seconds]
camus1 is now known as kaspter
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 258 seconds]
kaspter has quit [Ping timeout: 264 seconds]
kaspter has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 264 seconds]
kaspter has quit [Ping timeout: 265 seconds]
kaspter has joined #linux-amlogic
sputnik_ has joined #linux-amlogic
sputnik__ has joined #linux-amlogic
kaspter has quit [Remote host closed the connection]
sputnik_ has quit [Ping timeout: 260 seconds]
kaspter has joined #linux-amlogic
camus1 has joined #linux-amlogic
sputnik__ has quit [Remote host closed the connection]
sputnik_ has joined #linux-amlogic
kaspter has quit [Ping timeout: 258 seconds]
camus1 is now known as kaspter
warpme_ has joined #linux-amlogic
<repk> _49616e: bl2 is not encrypted that is why you only have bl2.sign
camus1 has joined #linux-amlogic
cmeerw has joined #linux-amlogic
kaspter has quit [Ping timeout: 246 seconds]
camus1 is now known as kaspter
sputnik_ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
sputnik_ has quit [Remote host closed the connection]
sputnik_ has joined #linux-amlogic
camus1 has joined #linux-amlogic
sputnik__ has joined #linux-amlogic
kaspter has quit [Ping timeout: 240 seconds]
camus1 is now known as kaspter
sputnik_ has quit [Ping timeout: 258 seconds]
sputnik__ has quit [Read error: Connection reset by peer]
sputnik__ has joined #linux-amlogic
<_49616e> repk: so is there a straightforward way that I can just carve bl2 out from the emmc dump?
<_49616e> Looks like I'm still missing acs, bl21, bl30, bl301 and bl31 so far.
<_49616e> > Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
<_49616e> > Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x00007600
<_49616e> > Load bl31 from eMMC, src: 0x0001c200, des: 0x10100000, size: 0x00019600
<_49616e> > New fip structure!
<_49616e> > Load bl301 from eMMC, src: 0x00018200, des: 0x01200000, size: 0x00002200
<_49616e> > Load bl33 from eMMC, src: 0x00038200, des: 0x01000000, size: 0x000e6800
<_49616e> Would I be able to extract bl30, bl301 and bl33 from the emmc dump with these info?
<repk> _49616e: if you have bl2.sign you have bl2. I don't understand what you are missing here
sputnik__ has quit [Ping timeout: 246 seconds]
sputnik_ has joined #linux-amlogic
<_49616e> Pardon my ignorance, I don't understand how these low level firmware works.
<_49616e> What about acs, bl21, bl30, bl301 and bl31?
<repk> Oh ok, my bad, you didn't get bl30* from the tool. What board is it ?
<repk> (acs, bl21 are in bl2.sign)
sputnik__ has joined #linux-amlogic
<_49616e> bl2.sign was the *only* binary I got unfortunately. The board is from a generic tv box.
sputnik_ has quit [Ping timeout: 256 seconds]
<repk> _49616e: do you have the sd dump accessible somewhere ?
<repk> s/sd/emmc/
<_49616e> Is the first 2MB enough? I could email it to you in a sec.
<repk> Yes should be more than enough
<repk> Maybe S905L uses amlogic boot image version 2. If it does gxlimg does not support it. It will eventually at some point as soon as I find a bit of time/courage to disass the binary again.
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 260 seconds]
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 260 seconds]
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 246 seconds]
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 260 seconds]
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 260 seconds]
<_49616e> email sent with a bit of additional info :)
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 260 seconds]
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 260 seconds]
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 256 seconds]
<repk> _49616e: Ok thats eMMC dump, forgot it but you have to skip 1st sector to have proper result.dd if=<emmc-dump>.bin of=boot-img.bin bs=512 skip=1
<repk> Then gxlimg -e boot-img.bin dir/
sputnik_ has joined #linux-amlogic
<repk> Then "./gxlimg -t bl2 -u dir/bl2.sign dir/bl2.bin" to get bl2.img without signature and "./gxlimg -t bl3x -d <dir/bl3*>.enc <dir/bl3*>.bin" to decode bl3*
sputnik__ has quit [Ping timeout: 256 seconds]
<repk> Does someone has a ref for a cheap TV box that uses signed boot v2 which can boot on SD card ? I could be able to find time this summer to get it supported in gxlimg
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 264 seconds]
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 264 seconds]
sputnik_ has quit [Ping timeout: 265 seconds]
sputnik_ has joined #linux-amlogic
sputnik__ has joined #linux-amlogic
<_49616e> Whoops. I did forget to discard the MBR region before calling gxlimg.
sputnik_ has quit [Ping timeout: 265 seconds]
<_49616e> Is the bootrom hardcoded to ignore the MBR region?
<repk> yes
<_49616e> So now I get bl2.sign, bl30.enc, fip and fip.enc.
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 260 seconds]
<_49616e> Does the bl2 I get from this utility include acs.bin and bl21.bin already?
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 256 seconds]
<repk> _49616e: yes
sputnik__ has quit [Ping timeout: 265 seconds]
<_49616e> Nice, and the bl30 I get also includes bl301?
<repk> yes that also
PPA has joined #linux-amlogic
<_49616e> Good to know. Is bl31 the only thing I'm missing here to be able to reconstruct a boot image right now?
sputnik_ has joined #linux-amlogic
<repk> _49616e: hm you should have got it also
sputnik_ has quit [Ping timeout: 264 seconds]
sputnik_ has joined #linux-amlogic
<_49616e> Unfortunately there's no bl31.enc.
<_49616e> I have compiled the tool with DEBUG=1 and it didn't print any additional info.
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 240 seconds]
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 260 seconds]
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 260 seconds]
sputnik_ has joined #linux-amlogic
sputnik__ has quit [Ping timeout: 246 seconds]
Xogium is now known as lsensum
sputnik_ has quit [Ping timeout: 256 seconds]
lsensum is now known as Xogium
<repk> _49616e: Ok your bl30's UUID is unexpected
sputnik_ has joined #linux-amlogic
sputnik_ has quit [Remote host closed the connection]
<repk> thats bl301 with CEC stuff
<_49616e> CEC was implemented in bl301? Interesting.
<repk> _49616e: I've updated gxlimg master branch. Now you should have enough to extract all you need to recreate a image from that
<_49616e> Thank you, I'll give it a shot right now.
<_49616e> > the bl30 I get also includes bl301?
<_49616e> So the bl30 I got *doesn't* include bl301?
<repk> yes it depends the board
<repk> the one you have have a separate entry for bl301
<_49616e> Good to know. What does "FIP" stand for by the way?
<_49616e> Very helpful, thanks.
<_49616e> repk: gxlimge doesn't seem to be able to merge bl301 back yet :)
<_49616e> Since I can't decrypt bl301 with this tool yet, I can't use blx_fix.sh from amlogic to generate a new boot image either.
<_49616e> s/boot image/bl30_new.bin
<repk> yes I'm doing that right now :)
<repk> its comming in a few sec
<repk> you can decrypt it can't you ?
<repk> _49616e:^
<repk> at least I am able to it
<repk> +do
<_49616e> Oh, I didn't understand the help text correctly. Should I use bl30 or bl3x for the type?
<repk> bl3x
<repk> _49616e: I've pushed support for bl301, can you try that it boots with both "gxlimg -t fip --bl2 bl2.sign --bl30 bl30.enc --bl301 bl301.enc --bl33 bl33.enc emmc-boot.bin" and the one without bl301.enc but with a bl30 that you got merged with blx_fix.sh ?
<_49616e> Sure, it'll take a moment though, please be patient :)
<repk> Sure thx
<_49616e> The image generated with gxlimg itself (with encrypted bl301) works great.
<_49616e> *as in "mainline u-boot could start properly"
<repk> ok perfect
<_49616e> I can't seem to decrypt the bl30.enc with `gxlimg -t bl30 -d bl30.enc bl30.bin`
<repk> bl3x
<repk> s/bl30/bl3x/
<_49616e> Ah, that worked. What's the bl30 type for then?
<repk> Thats a type thanks
<repk> well my bad bl30 has a different signature scheme than bl301
<repk> but for other boards, like g12a. See README.g12a if you are curious
<_49616e> Ah, so the bl30 type is for g12a, not gxl?
<repk> yes that is correct
<_49616e> Maybe consider updating the readme to make it clear :)
<repk> There is no mention to bl30 type in README
<repk> only in README.g12a
<_49616e> > the one without bl301.enc but with a bl30 that you got merged with blx_fix.sh
<_49616e> This one doesn't seem to work, I'm getting boot loops. It stops at `[0.xxxxxx Inits done]`
<repk> Ok maybe your board does not support a merge bl301 then
<_49616e> Still, I got to run mainline u-boot on my boards now thanks to you :)
buzzmarshall has joined #linux-amlogic
<repk> And by board I mean bl2
<repk> sure np
<_49616e> I'll try these on some S905D stuff I've got soon.
<_49616e> Do you think it's a good practice to keep everything other than bl33 stock? That's what I intend to do for all of the tvbox type boards.
<repk> you could also use opensourced bl31
<_49616e> Yeah, I've tried that and 4 out of the 8 available cores failed to start on S912 :P
Xogium has left #linux-amlogic ["leaving channel"]
<_49616e> I'll try that with S905L in a bit.
<repk> s905l should have better support
gavlee has quit []
pionen[m] has quit [Quit: killed]
psydruid has quit [Quit: killed]
l-as has quit [Quit: killed]
return0e[m] has quit [Quit: killed]
gavlee has joined #linux-amlogic
psydruid has joined #linux-amlogic
l-as has joined #linux-amlogic
return0e[m] has joined #linux-amlogic
vagrantc has joined #linux-amlogic
nickotheus has joined #linux-amlogic
nickotheus has quit [Remote host closed the connection]
sputnik_ has joined #linux-amlogic
cmeerw has quit [Ping timeout: 240 seconds]
vagrantc has quit [Quit: leaving]
ldevulder_ has joined #linux-amlogic
yann has quit [Ping timeout: 260 seconds]
ldevulder has quit [Ping timeout: 256 seconds]
Elpaulo has quit [Read error: Connection reset by peer]
Elpaulo has joined #linux-amlogic
nickotheus has joined #linux-amlogic