xypron changed the topic of #u-boot to: #u-boot SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot 2023.01 / Merge Window is OPEN, -next is CLOSED / Release v2023.01 is scheduled for 2023-01-09 / Channel archives at https://libera.irclog.whitequark.org/u-boot
<marex> apalos-: was it you who did the TPM2.x device support in U-Boot ?
vagrantc has quit [Quit: leaving]
torez has quit [Quit: torez]
mmu_man has quit [Ping timeout: 240 seconds]
qschulz has quit [Remote host closed the connection]
qschulz has joined #u-boot
tafama has joined #u-boot
tafa has quit [Ping timeout: 268 seconds]
camus has quit [Quit: camus]
umbramalison has quit [Quit: %So long and thanks for all the fish%]
umbramalison has joined #u-boot
umbramalison has quit [Client Quit]
umbramalison has joined #u-boot
thopiekar_ has joined #u-boot
thopiekar has quit [Ping timeout: 272 seconds]
camus has joined #u-boot
GNUtoo has quit [Ping timeout: 258 seconds]
jclsn has quit [Ping timeout: 240 seconds]
jclsn has joined #u-boot
GNUtoo has joined #u-boot
hanetzer has joined #u-boot
camus1 has joined #u-boot
camus has quit [Ping timeout: 250 seconds]
camus1 is now known as camus
xroumegue has quit [Ping timeout: 264 seconds]
xroumegue has joined #u-boot
ikarso has joined #u-boot
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #u-boot
jagan has quit [Ping timeout: 272 seconds]
ladis has joined #u-boot
ldevulder has quit [Quit: Leaving]
ldevulder has joined #u-boot
mncheck has joined #u-boot
guillaume_g has joined #u-boot
zibolo has joined #u-boot
frieder has joined #u-boot
m5zs7k has quit [Ping timeout: 250 seconds]
m5zs7k has joined #u-boot
xypron has left #u-boot [#u-boot]
xypron has joined #u-boot
thopiekar_ has quit [Ping timeout: 252 seconds]
mckoan|away is now known as mckoan
thopiekar has joined #u-boot
<apalos-> marex: not all of it
<apalos-> there was some preexisting support, I just cleaned up the drivers a lot
<apalos-> and I add a TCG layer, so we now need ~100 lines per driver, instead of 1500ish
<apalos-> i added the tpm mmio driver for qemu as well, but I haven't really touched the rest
<apalos-> (of the drivers)
sszy has joined #u-boot
apalos- is now known as apalos
macromorgan has quit [Read error: Connection reset by peer]
Algotech has joined #u-boot
<apalos> marex: which part are you looking at ?
Algotech has quit [Quit: Leaving]
Algotech has joined #u-boot
<marex> apalos: TPM2 support for drive encryption
<marex> apalos: if I understand it right, I can pick any TPM2.x compatible chip with I2C/SPI bus and that would work with the upstream U-Boot driver, because the register interface is standardized ?
<marex> apalos: and the TPM would allow me to pull out some sort of key in case the system wasn't tampered with on boot, which I can use to decrypt luks volume ?
GNUtoo has quit [Ping timeout: 258 seconds]
apritzel_ has joined #u-boot
GNUtoo has joined #u-boot
Algotech75 has joined #u-boot
<apalos> yes
<apalos> but you need efi for it
<apalos> and that is the part I wrote, it's the EFI_TCG protocol
camus has quit [Ping timeout: 240 seconds]
camus has joined #u-boot
<apalos> any spi tpm should work fine
<apalos> then you boot up, efi-stub on the kernel does a couple of more measurements (i added initrd and kerndl cmdline recently)
<apalos> and you have have an initrd to decrypt you luks volume with a key that's 'hidden' in th tpm
Algotech has quit [Quit: Leaving]
Algotech has joined #u-boot
thopiekar has quit [Ping timeout: 272 seconds]
<marex> apalos: and this is used to tie together the software on the platform with the TPM, so that nobody can pull out the storage from the system and use it elsewhere, right ?
thopiekar has joined #u-boot
mckoan is now known as mckoan|away
Algotech has quit [Quit: Leaving]
Algotech75 is now known as Algotech
naoki has quit [Quit: naoki]
naoki has joined #u-boot
prabhakarlad has quit [Quit: Client closed]
prabhakarlad has joined #u-boot
<apalos> marex: yes
<apalos> well it depends on the PCRs you use to seal the key against
<apalos> we usually just use PCR7 for now, which holds the EFI secure boot key values
<apalos> but you can use more PCRs when sealing e.g include the u-boot version -- the initrd you used etc
<apalos> the hard part is updating those measurements on a firmware upgrade
<apalos> People usually refer to it as 'PCR prediction'
<apalos> however there's an easier way to deal with it, which is called authenticated PCR policies
minimal has joined #u-boot
<apalos> This is a good read of the fundamentals tbh
mmu_man has joined #u-boot
<marex> apalos: nice, thanks !
yollom has joined #u-boot
<yollom> If I have an env in SPI flash programmed by a vendor how can I find the size? U-Boot seems to happily read it with ENV_IS_IN_SPI_FLASH
<yollom> I'm trying to read it from userspace with fw_printenv
ladis has quit [Ping timeout: 272 seconds]
<marex> yollom: if you have mtdparts defined, look at /proc/mtd
<marex> there might be separate mtdpart for just env
<yollom> The env doesn't have to be the same size. In my experience it is typically smaller
<yollom> And there's a hash over the ENV_SIZE, right?
<marex> yollom: see include/env_internal.h, there is crc(4byte)[,flags(byte) but optional, only in case of redundant env],data
<marex> yollom: often if the board does define mtdparts, the mtdpart for env is the same size as env
<marex> if all you get is the whole SPI NOR as flat mtdX device, hum
<marex> yollom: which board is this, custom ?
<yollom> Ah, the env size does equal the size of the mtd
<marex> yollom: it _might_
<marex> it is not an iron rule
<yollom> Yup, no, I just tested it
<yollom> A ADI reference board
<yollom> And the env in SPI flash doesn't seem to match what I could find in source
<marex> blackfin ? :)
<marex> errr
<yollom> All set, can read the env fw_printenv now. Thanks!
<marex> yollom: so it had mtdparts after all ?
<yollom> I just read /dev/mtd* form Linux and `du -b`
<marex> yollom: well that works too
monstr has joined #u-boot
jagan has joined #u-boot
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #u-boot
torez has joined #u-boot
macromorgan has joined #u-boot
ladis has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
thopiekar has quit [Ping timeout: 252 seconds]
mmu_man has quit [Ping timeout: 246 seconds]
thopiekar has joined #u-boot
mmu_man has joined #u-boot
zibolo has quit [Ping timeout: 272 seconds]
alan_o has quit [Quit: Leaving]
alan_o has joined #u-boot
alan_o has quit [Client Quit]
alan_o has joined #u-boot
<tlwoerner> marex: ADI has newer boards that aren't quite blackfin, but sorta are
<tlwoerner> i.e. the have a cortex-A5 for the SoC, but they still use bootroms that clearly are from the blackfin era (i.e. they use ldr)
* tlwoerner is working with one such board now
mmu_man has quit [Ping timeout: 276 seconds]
kmaincent[m] has quit [Quit: You have been kicked for being idle]
jagan has quit [Ping timeout: 240 seconds]
mmu_man has joined #u-boot
monstr has quit [Quit: Leaving]
mmu_man has quit [Ping timeout: 252 seconds]
guillaume_g has quit [Quit: Konversation terminated!]
frieder has quit [Remote host closed the connection]
PhoenixMage has quit [Ping timeout: 252 seconds]
PhoenixMage has joined #u-boot
vagrantc has joined #u-boot
PhoenixMage has quit [Ping timeout: 250 seconds]
PhoenixMage has joined #u-boot
PhoenixMage has quit [Ping timeout: 272 seconds]
PhoenixMage has joined #u-boot
<marex> tlwoerner: interesting
sszy has quit [Ping timeout: 272 seconds]
GNUtoo has quit [Remote host closed the connection]
GNUtoo has joined #u-boot
apritzel_ has quit [Ping timeout: 250 seconds]
thopiekar has quit [Ping timeout: 272 seconds]
alan_o has quit [Ping timeout: 272 seconds]
minimal has quit [Quit: Leaving]
thopiekar has joined #u-boot
pgreco_ is now known as pgreco
Gravis has quit [Ping timeout: 240 seconds]
mmu_man has joined #u-boot
torez has quit [Quit: torez]
ladis has quit [Ping timeout: 276 seconds]
Gravis has joined #u-boot
GNUtoo has quit [Ping timeout: 258 seconds]
mmu_man has quit [Ping timeout: 240 seconds]
mmu_man has joined #u-boot
prabhakarlad has quit [Quit: Client closed]
Gravis has quit [Ping timeout: 272 seconds]
minimal has joined #u-boot