* [Buildroot] [PATCH] vboot-utils: fix failing builds
@ 2024-06-16 15:41 Alex Suykov
2024-06-16 16:04 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Alex Suykov @ 2024-06-16 15:41 UTC (permalink / raw)
To: buildroot
A typo in the RSA patch and a missing include, which current gcc
apparently treats as hard errors and earlier ones probably didn't.
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
diff --git a/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch
index 86374ca854..259b2bb7b4 100644
--- a/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch
+++ b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch
@@ -35,7 +35,7 @@ index 9f98ccc..c2d01a5 100644
/* Private key data */
typedef struct VbPrivateKey {
- RSA* rsa_private_key; /* Private key data */
-+ struct rsa_rt* rsa_private_key; /* Private key data */
++ struct rsa_st* rsa_private_key; /* Private key data */
uint64_t algorithm; /* Algorithm to use when signing */
} VbPrivateKey;
diff --git a/package/vboot-utils/0008-firmware-stub-assert.patch b/package/vboot-utils/0008-firmware-stub-assert.patch
new file mode 100644
index 0000000000..01fc2c5abd
--- /dev/null
+++ b/package/vboot-utils/0008-firmware-stub-assert.patch
@@ -0,0 +1,17 @@
+Missing include, assert() is used without <assert.h>.
+
+Most likely it was getting included indirectly somehow but that
+changed in some recent glibc version so it fails to compile now.
+
+Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
+
+--- a/firmware/stub/tpm_lite_stub.c
++++ b/firmware/stub/tpm_lite_stub.c
+@@ -25,6 +25,7 @@
+ #include <sys/stat.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <assert.h>
+
+
+ #define TPM_DEVICE_PATH "/dev/tpm0"
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] vboot-utils: fix failing builds
2024-06-16 15:41 [Buildroot] [PATCH] vboot-utils: fix failing builds Alex Suykov
@ 2024-06-16 16:04 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2024-06-16 16:04 UTC (permalink / raw)
To: Alex Suykov; +Cc: buildroot
Alex, All,
Thanks for your patch. :-)
On 2024-06-16 18:41 +0300, Alex Suykov spake thusly:
> A typo in the RSA patch and a missing include, which current gcc
> apparently treats as hard errors and earlier ones probably didn't.
>
> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
>
> diff --git a/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch
> index 86374ca854..259b2bb7b4 100644
> --- a/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch
> +++ b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch
> @@ -35,7 +35,7 @@ index 9f98ccc..c2d01a5 100644
> /* Private key data */
> typedef struct VbPrivateKey {
> - RSA* rsa_private_key; /* Private key data */
> -+ struct rsa_rt* rsa_private_key; /* Private key data */
> ++ struct rsa_st* rsa_private_key; /* Private key data */
Whaoo, that's a hell of a typo, indeed. Good catch!
Since you changed that patch, please add your own SoB line below that of
Thomas and a small nit to explain what you did, e.g.:
[alex.suykov@gmail.com: fix typo: s/rsa_rt/rsa_st/]
Signed-off-by: You real Name <your email>
This way, that records all the people that touched that file.
> uint64_t algorithm; /* Algorithm to use when signing */
> } VbPrivateKey;
>
> diff --git a/package/vboot-utils/0008-firmware-stub-assert.patch b/package/vboot-utils/0008-firmware-stub-assert.patch
> new file mode 100644
> index 0000000000..01fc2c5abd
> --- /dev/null
> +++ b/package/vboot-utils/0008-firmware-stub-assert.patch
> @@ -0,0 +1,17 @@
> +Missing include, assert() is used without <assert.h>.
> +
> +Most likely it was getting included indirectly somehow but that
> +changed in some recent glibc version so it fails to compile now.
> +
> +Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Please, provide a git-formatted patch, and add an Upstream tag to
explain what the upstream status of that patch is:
$ ./utils/docker-run make check-package
package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
package/vboot-utils/0008-firmware-stub-assert.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation)
Also, I see that we are usig a very old version of vboot-utils, which
dates from 2015-11-06, almost 9 years ago now. Updating may also help
fix build failures with newer tools.
Could you alse look at doing the update, please?
Incidentally, I also recently sent two patches for the chromebook-snow
defconfig. It would be nice if you could review them (you were in Cc).
Thanks again for your patch!
Regards,
Yann E. MORIN.
> +--- a/firmware/stub/tpm_lite_stub.c
> ++++ b/firmware/stub/tpm_lite_stub.c
> +@@ -25,6 +25,7 @@
> + #include <sys/stat.h>
> + #include <time.h>
> + #include <unistd.h>
> ++#include <assert.h>
> +
> +
> + #define TPM_DEVICE_PATH "/dev/tpm0"
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-16 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16 15:41 [Buildroot] [PATCH] vboot-utils: fix failing builds Alex Suykov
2024-06-16 16:04 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.