tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Adding ESRT and EFI vars support for fwupd
Date: Fri, 19 Aug 2022 12:40:11 +0200
From: =?UTF-8?Q?Pawe=c5=82_Cichowski?= <pawel.cichowski%3mdeb.com@localhost>
Message-ID: <56898e46-7714-200b-4528-afffddd6d51d%3mdeb.com@localhost>
| I've built the kernel and release for evbarm aarch64 from the latest
| sources and ran it on QEMU. Unfortunately, /dev/efi wasn't present on
| the system.
That's just because it is not installed by default - as it currently
exists (with no tools to use it yet committed) there is little point.
However /dev/MAKEDEV should be able to make it, just "sh /dev/MAKEDEV efi"
| Is it linked to the issue you talked about (no conversion
| between EFI device paths and disks)?
No, that's missing userland code. That is, an EFI boot variable (or
driver variable) will contain strings which (perhaps indirectly) reference
the busses, port numbers, unit numbers, using EFI terminology.
A disk name is something more like /dev/wd0e (or NAME=wedge).
For the user interface, we'd like to be able to reference devices and
partitions using unix style names, not EFI paths.
| How should I approach implementing it?
As above, that is all it should take (I have done it before).
| Or is making a device node manually using mknod the case (I thought
| MAKEDEV.tmpl should've added it automatically)?
You could also use mknod if you prefer, /sbin/mknod /dev/efi c 361 0
Add options to set the uid/gid/perms if you need (or apply chown[/chgrp]
and chmod after, or just accept the default).
| Additionally, what ways to debug kernel drivers would you recommend?
| `printk` or `aprint_debug`?
Depends what the issue is, but in general, while it does need some minor
work, that driver works I thing, for as much as it does.
| - get table - returns table address by uuid (efi_ops)
| - copy table - copies the table from memory to a variable passed by
| reference (efi_ops)
| - get table size - helper function, returns size of table in bytes
| - other operations on efi vars are a second priority, since the main
| task is to support ESRT
That all sounds reasonable to me.
| I reckon these not only need to be added to /dev/efi, but efi_runtime
| too (so they become machine dependent). If you have a different view or
| any other ideas to extend the implementation please let me know.
That I will leave for Jared or someone else to comment on.
kre
Home |
Main Index |
Thread Index |
Old Index