Repository navigation
Add video-codecs meson option to limit the supported codecs - #6
Conversation
|
Option and meson implementation is based on the option with the same name in mesa |
d7c7833 to
9f06f88
Compare
8be883f to
6b3c125
Compare
| @@ -0,0 +1,12 @@ | |||
| SECTIONS { | |||
| . = 0x00000000; | |||
| .vectors : { *(.vectors) } | |||
There was a problem hiding this comment.
Can we put config/license after vectors? vectors should use at most 0x400 bytes, 240 interrupts + 16 entries (sp, nmi and friends). I kinda wanna reserve at least 256 bytes for config
There was a problem hiding this comment.
done. It's a little tight with the text. only 12 byte remaining from 0x280 to 0x300
There was a problem hiding this comment.
What about something like
.vectors : { *(.vectors) }
. = 0x00000400;
.config : { *(.config) }
. = 0x00000500;
.license : { *(.license) } =0x00
.text : { *(.text*) }
Each version of hardware has gotten more interrupts, this should work as long as its an Cortex-m3
There was a problem hiding this comment.
I misread your comment. that layout is fine by me. I'll update the PR
| ] | ||
|
|
||
| conf_data = configuration_data() | ||
| conf_data.set_quoted('AVD_FW_VERSION', meson.project_version()) |
There was a problem hiding this comment.
Is there a downside to using git tags instead?
There was a problem hiding this comment.
The are not available in tarballs downloaded from git tags. Switched anyway and using https://mesonbuild.com/Creating-releases.html#cement-a-version-obtained-from-vcs which means we have to use github releases and upload our own tarballs generated by meson dist
There was a problem hiding this comment.
Sorry. I should have made it clear that it was more of a question. I was not aware of the tarballs missing the tags.
Manual tarballs seem kinda annoying and i think it would break how distros package it. I dont think its worth the tradeoff
There was a problem hiding this comment.
it's a tradeoff. The hardcoded version in meson build is also something which can be easily forgotten and then build will report a different version than the tag.
I plan to write a CI workflow which produces dist tarballs. Still requires to download the tag's artifacts and upload them to the release. There doesn't seem to be a way tell github that (I haven't searched for it either though).
I'll split this off to a separate PR
fc7755c to
0b166e1
Compare
Otherwise the targets won't be rebuilt on avd-cm3.ld changes. Fixes: 1bc7a80 ("build: Add meson build") Signed-off-by: Janne Grunau <j@jannau.net>
Those includes define data and must be included only once. Allows to use avd.h to define values and data types as expected from a header. Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
The bitmask of enabled codecs is embedded in the 256-byte large config struct at offset 0x400 of the firmware binary. This uses meson's configuration_data / configure_file so remove the Makefile as it is no longer supported. Signed-off-by: Janne Grunau <j@jannau.net>
bf13855 to
d3fea30
Compare
| option( | ||
| 'video-codecs', | ||
| type : 'array', | ||
| value : ['all_free'], |
There was a problem hiding this comment.
Would either all or none, be a better default? Using all would be to mirror the fw we would submit to linux-firmware while not having a default would be to avoid confusion
There was a problem hiding this comment.
This is uses the same default as mesa and is based on the principle of least bad surprise for distro packagers. I'd argue the default matters even less since linux firmware will distribute binaries. To avoid confusion the change adding the firmware binaries to linux-firmware should mention that. It might make sense to to include both all and all_free builds in linux-firmware so distros can chose in their packaging.
There was a problem hiding this comment.
For linux-firmware we would still need to choose a default, which would presumably be the all build. In my head it was better if the distro packagers already knew that our fw would need special handling. Hence the default of all (convenient and no breaking change) or none (needs an active choice, impossible to ignore).
It does not really matter. The all_free default does not hurt anyone and is easy spot so im ok with it, thanks
|
The last commit still refers to the old layout. Please also enable all codecs in the ci |
Embed the project name, version and copyright information before the firmware code after the embedded config struct. Signed-off-by: Janne Grunau <j@jannau.net>
f7620b9 to
b94106b
Compare
…ilds Replaces the previous ci workflow. Signed-off-by: Janne Grunau <j@jannau.net>
b94106b to
d1b5744
Compare
For legal reasons distribution might not be able to ship support for all codecs. Allow them to limit the support in the firmware. User will be able to install firmware with full support to
/lib/firmware/updates/.Goes together with AsahiLinux/linux@0f086c1
Also embed basic firmware information in the binary. The Makefile build does not support this so drop it rather than adding support.
This is based on the same option in mesa's
meson.build/meson.optionsand defaults to "all_free" which is av1 and vp9.Please check all boxes that apply:
Signed-off-by:trailer to every commitAll boxes must be checked before your pull request can be reviewed.