oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #tegra
marvin24 has quit [Ping timeout: 252 seconds]
marvin24 has joined #tegra
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #tegra
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #tegra
gouchi has joined #tegra
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #tegra
<DavidHeidelberg> is Jonas Schwöbel around?
<jenneron[m]> David Heidelberg: ask, i have his contact
<DavidHeidelberg> just missing his driver Documentation ;)
<jenneron[m]> right, it may not exist
<jenneron[m]> i sent him your message
<DavidHeidelberg> thx jenneron
<DavidHeidelberg> anyone bored? these txt's waiting for yaml conversion [ad,tegra-audio-plutux, nvidia,tegra-audio-wm8903] [ad,tegra-audio-wm8903-medcom-wide, nvidia,tegra-audio-wm8903] [ad,tegra-audio-wm8903-tec, nvidia,tegra-audio-wm8903] [nvidia,tegra114-ahb, nvidia,tegra30-ahb] [nvidia,tegra114-ahub] [nvidia,tegra114-apbdma] [nvidia,... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/af8d4bcf734a8ed8d488a74a8ae2b6d90433947b)
<pgwipeout[m]> Hey, quick question, does anyone know why u-boot on T30 will work fine unencrypted, but fails to execute when encrypted? Is there a special header I need to add to it or something for it to load correctly when encrypted?
<pgwipeout[m]> I know it's passing the crypto check, because I can flash a modified fastboot bootloader in the same way and it works still.
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #tegra
gouchi has quit [Read error: Connection reset by peer]
gouchi has joined #tegra
gouchi has quit [Remote host closed the connection]
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #tegra
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #tegra
<digetx> pgwipeout[m]: I don't know, but you may try to flash something simple as reboot via PMC one-line assembly, it either should work or there is indeed some extra check
gouchi has joined #tegra
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #tegra
gouchi has quit [Remote host closed the connection]
gouchi has joined #tegra
gouchi has quit [Remote host closed the connection]
oldgalileo has quit [Remote host closed the connection]
<DavidHeidelberg> digetx are u ok with changing "samsung_p3,isa1200_vibrator" to "samsung,isa1200_vibrator" ?
<DavidHeidelberg> since first string should be vendor, samsung_p3 doesn't seems to identify anything (also tried search it on the web)
<digetx> shouldn't it be imagis,isa1200?
<DavidHeidelberg> oh, yes. Right, are u ok with that change?
<DavidHeidelberg> to imagis
<digetx> yes
<m4t> pgwipeout[m]: how are you flashing the encrypted vs unencrypted bootloader?
<m4t> same way eh
<m4t> are you trying to pre-encrypt it with openssl?
<pgwipeout[m]> m4t: Encrypted with the nvencrypt tool for the n7 off device unbrick. Allows use of nvflash as is.
<pgwipeout[m]> Also tried using fastboot to flash it (the cracked bootloader lets flashing unsigned images).
<pgwipeout[m]> That was the original way I tried, but it would fail to boot, I thought it was a problem with the encryption.
<pgwipeout[m]> But then I found that encrypted and sending it via nvflash it doesn't even fire off, but sending it unencrypted with security disabled it does.
<pgwipeout[m]> Examining the official unencrypted fastboot bootloader I see a few extra things in there. One is TZ, but I think the other is the signed and encrypted miniloader.
<pgwipeout[m]> There's not much left of the L4T documentation from the T3 days but it seems to suggest there needs to be a miniloader signed by nvidia included in the encrypted bootloader. Unencrypted nvflash sends this miniloader during the initialization sequence.
<pgwipeout[m]> But the L4T links from that era are broken.
<digetx> webarchive doesn't help?
<pgwipeout[m]> digetx: No, these were behind the nvidia developer login.
<pgwipeout[m]> I know it's flashing correctly because I successfully encrypted and flashed the cracked boot loader. The BCT is also getting updated correctly.
<m4t> iirc n7 doesn't expect bootloader to be encrypted, ouya does
<m4t> not sure if it's a fuse, odmdata, or some flag in the partition
<m4t> i don't think it's just a header prepending the bootloader data though
<m4t> ouya has odmdata 0x40099000 and n7 is 0x40000000, i can't find any docs on it though. and messing with it is a good way to brick the board ime.
<pgwipeout[m]> Oh no, N7's bootloader is encrypted as well.
<DavidHeidelberg> digetx https://github.com/grate-driver/linux/pull/76 and good night :)
<DavidHeidelberg> best score 2864 lines of output. so ~= 2500 warnings remains
<m4t> pgwipeout[m]: oh, well the only flash dumps i have show it unencrypted
<m4t> maybe they're just of failed attempts to reflash
<m4t> oh duh, looking at another more recent one, it's definitely encrypted :P
<m4t> this must've been from an early attempt to reflash using nvflash
zombah has quit [Quit: leaving]
<m4t> pgwipeout[m]: is there a reason you're trying to pre-encrypt? to avoid the intermediate step of a bootloader with signing disabled?
<m4t> cbootimage seems to use a hard-coded aes key of 0x0, i wonder if you could modify it to use the sbk
<pgwipeout[m]> cbootimg expects a ssl key pair, it doesn't like a text sbk.
<pgwipeout[m]> In the absence of a SBK, 0x0 is used.
<pgwipeout[m]> Because essentially encryption is always on, it's just a default key of 0x0.
<m4t> isn't rsa only for newer chips? cbootimage seems to support t20 t30
<pgwipeout[m]> <m4t> "pgwipeout: is there a reason you..." <- Originally I had an issue with flashing u-boot this way, I thought it might only work with the original bootloader. Now that I have working nvflash I realize that isn't the issue, and there's something that only breaks when u-boot is encrypted.
<pgwipeout[m]> T30 is an AES-128 key.
<pgwipeout[m]> Essentially, if you have working nvflash native, you know your encryption is good.
<m4t> where does cbootimage expect rsa for t30?
<m4t> it seems to just encrypt with aes and put the hash into the bct
<m4t> samples/sign.sh does but that's for t124/t210
<m4t> "encrypts" since its 0x0
<pgwipeout[m]> I'm confused where rsa is coming from.
<m4t> ssl key pair?
<m4t> https://github.com/NVIDIA/cbootimage/blob/master/src/crypto.c#L51-L53 maybe it's possible to just change that to sbk, or modify it to accept sbk from command line parameter
<m4t> it doesn't seem to require that, maybe i'm missing something
<pgwipeout[m]> Yeah, the nvidia tools expect either a sbk in a signed key file or a pre encrypted blob.
<m4t> oh you mean nvflash?
<m4t> were you able to generate a working blob using wheelie?
<pgwipeout[m]> Any tool that supports flashing encrypted bootloaders. Can't say if cboot supports it on T20 or T30, but nvflash does. TegraRCM does not.
<pgwipeout[m]> Wheelie doesn't generate blobs, it consumes them like nvflash does.
<pgwipeout[m]> It might also be the lack of ATF that's killing it. encryption may demand ATF.
<m4t> wheelie generates blobs
<pgwipeout[m]> Wheelie is just a reimplementation of the nvflash protocol.
<pgwipeout[m]> " Support pre-encrypted blobs"
<pgwipeout[m]> "Supports bootstrapping a pre-encrypted bootloader from USB BootROM (APX)"
<m4t> er, sorry i meant flatline
<m4t> *were you able to generate a working blob using flatline?
<m4t> i couldn't get it to work
<pgwipeout[m]> From a quick search flatline requires on device encryption working.
<pgwipeout[m]> nvcrypttools supports off device encryption.
<pgwipeout[m]> (Though getting it to build is a bloody nightmare)
<m4t> the blob flatline generates should allow nvflash to be used without any patched miniload etc.
<m4t> was wondering if you got that part to work
<pgwipeout[m]> Yes, but all of the on device solutions are unsupported, dead, or don't work.
<pgwipeout[m]> And yes, I've gotten nvflash native working with nvcrypttools off device generation.
<m4t> were you able to generate a blob for ouya?
<pgwipeout[m]> Yes, that's nvcrypttools.
<m4t> ya i couldn't get it to compile before
<m4t> that was jevinskie's fork though i think
<m4t> as is this. it was issues with mbedtls iirc
<pgwipeout[m]> Yeah, that's what I ran into as well it's a problem with the configuration of the distro mbedtls. It builds on ubuntu 21.04. I'd like to fork it and make a few fixes, like the file generation leaves a lot to be desired.
<m4t> doesn't seem to like gcc-10
<m4t> i think i tried building on alpine then gave up
<m4t> ouya:~/devel$ ls -ld nvcrypttools/
<m4t> drwxr-xr-x 8 matt matt 3488 Mar 23 2020 nvcrypttools/
zombah has joined #tegra
<m4t> oh i got it to compile on alpine actually, the gcc command line needed libraries placed after the .o