Idwer Vollering has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48977 )
Change subject: util/amdfwtool: add inttypes.h to build this tool on FreeBSD ......................................................................
util/amdfwtool: add inttypes.h to build this tool on FreeBSD
Signed-off-by: Idwer Vollering vidwer@gmail.com Change-Id: I295fd308b0f5e2902931f02c9455823a614976de --- M util/amdfwtool/data_parse.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/48977/1
diff --git a/util/amdfwtool/data_parse.c b/util/amdfwtool/data_parse.c index 017c689..07618ca 100644 --- a/util/amdfwtool/data_parse.c +++ b/util/amdfwtool/data_parse.c @@ -2,6 +2,7 @@ #include <regex.h> #include <string.h> #include <stdlib.h> +#include <inttypes.h>
#include "amdfwtool.h"
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48977
to look at the new patch set (#2).
Change subject: util/amdfwtool: add inttypes.h to build this tool on FreeBSD ......................................................................
util/amdfwtool: add inttypes.h to build this tool on FreeBSD
Signed-off-by: Idwer Vollering vidwer@gmail.com Change-Id: I295fd308b0f5e2902931f02c9455823a614976de --- M util/amdfwtool/data_parse.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/48977/2
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48977 )
Change subject: util/amdfwtool: add inttypes.h to build this tool on FreeBSD ......................................................................
Patch Set 4:
doesn't including stdint.h without any other guards around it also fix the issue? stdint.h is definitely missing in there and i'd like to avoid OS specific hacks in the code
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48977
to look at the new patch set (#5).
Change subject: util/amdfwtool: add stdint.h to build this tool on FreeBSD ......................................................................
util/amdfwtool: add stdint.h to build this tool on FreeBSD
Signed-off-by: Idwer Vollering vidwer@gmail.com Change-Id: I295fd308b0f5e2902931f02c9455823a614976de --- M util/amdfwtool/data_parse.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/48977/5
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48977 )
Change subject: util/amdfwtool: add stdint.h to build this tool on FreeBSD ......................................................................
Patch Set 4:
Patch Set 4:
doesn't including stdint.h without any other guards around it also fix the issue? stdint.h is definitely missing in there and i'd like to avoid OS specific hacks in the code
Right, I looked at inteltool/powermgt.c for clues.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48977
to look at the new patch set (#7).
Change subject: util/amdfwtool: add stdint.h to build this tool on FreeBSD ......................................................................
util/amdfwtool: add stdint.h to build this tool on FreeBSD
Signed-off-by: Idwer Vollering vidwer@gmail.com Change-Id: I295fd308b0f5e2902931f02c9455823a614976de --- M util/amdfwtool/amdfwtool.c M util/amdfwtool/data_parse.c 2 files changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/48977/7
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48977
to look at the new patch set (#8).
Change subject: util/amdfwtool: portability fixes for FreeBSD ......................................................................
util/amdfwtool: portability fixes for FreeBSD
Add the stdint.h header, and drop the GLIBC section to build this tool on FreeBSD.
Signed-off-by: Idwer Vollering vidwer@gmail.com Change-Id: I295fd308b0f5e2902931f02c9455823a614976de --- M util/amdfwtool/amdfwtool.c M util/amdfwtool/amdfwtool.h M util/amdfwtool/data_parse.c 3 files changed, 2 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/48977/8
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48977
to look at the new patch set (#9).
Change subject: util/amdfwtool: portability fixes for FreeBSD ......................................................................
util/amdfwtool: portability fixes for FreeBSD
Add the stdint.h header, and drop the GLIBC section from amdfwtool.h to build this tool on FreeBSD as well as Linux.
Signed-off-by: Idwer Vollering vidwer@gmail.com Change-Id: I295fd308b0f5e2902931f02c9455823a614976de --- M util/amdfwtool/amdfwtool.c M util/amdfwtool/amdfwtool.h M util/amdfwtool/data_parse.c 3 files changed, 2 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/48977/9
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48977 )
Change subject: util/amdfwtool: portability fixes for FreeBSD ......................................................................
Patch Set 9: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/48977/9/util/amdfwtool/amdfwtool.h File util/amdfwtool/amdfwtool.h:
https://review.coreboot.org/c/coreboot/+/48977/9/util/amdfwtool/amdfwtool.h@... PS9, Line 12: this file also uses some types from stdint.h, so it probably should also be included here
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48977 )
Change subject: util/amdfwtool: portability fixes for FreeBSD ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48977/9/util/amdfwtool/amdfwtool.h File util/amdfwtool/amdfwtool.h:
https://review.coreboot.org/c/coreboot/+/48977/9/util/amdfwtool/amdfwtool.h@... PS9, Line 12:
this file also uses some types from stdint. […]
WHy, for cleanliness? It builds and runs, and stdint.h is now nearer the implementation in andfwtool.c.
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48977 )
Change subject: util/amdfwtool: portability fixes for FreeBSD ......................................................................
Patch Set 9: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/48977/9/util/amdfwtool/amdfwtool.h File util/amdfwtool/amdfwtool.h:
https://review.coreboot.org/c/coreboot/+/48977/9/util/amdfwtool/amdfwtool.h@... PS9, Line 12:
WHy, for cleanliness? It builds and runs, and stdint. […]
i meant additionally, so that it's included in both the .h and the .c files. i won't insist on this, so if you think that your patch should stay the way it is, feel free to just click ack on this one
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48977 )
Change subject: util/amdfwtool: portability fixes for FreeBSD ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48977/9/util/amdfwtool/amdfwtool.h File util/amdfwtool/amdfwtool.h:
https://review.coreboot.org/c/coreboot/+/48977/9/util/amdfwtool/amdfwtool.h@... PS9, Line 12:
i meant additionally, so that it's included in both the .h and the .c files. […]
Ack
Idwer Vollering has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48977 )
Change subject: util/amdfwtool: portability fixes for FreeBSD ......................................................................
util/amdfwtool: portability fixes for FreeBSD
Add the stdint.h header, and drop the GLIBC section from amdfwtool.h to build this tool on FreeBSD as well as Linux.
Signed-off-by: Idwer Vollering vidwer@gmail.com Change-Id: I295fd308b0f5e2902931f02c9455823a614976de Reviewed-on: https://review.coreboot.org/c/coreboot/+/48977 Reviewed-by: Felix Held felix-coreboot@felixheld.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M util/amdfwtool/amdfwtool.c M util/amdfwtool/amdfwtool.h M util/amdfwtool/data_parse.c 3 files changed, 2 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index f167e5e..8b54876 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -57,6 +57,7 @@ #include <stdlib.h> #include <getopt.h> #include <libgen.h> +#include <stdint.h>
#include "amdfwtool.h"
diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index 6ae4675..b12b989 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -3,14 +3,6 @@ #ifndef _AMD_FW_TOOL_H_ #define _AMD_FW_TOOL_H_
-#if defined(__GLIBC__) -typedef unsigned long long int uint64_t; -typedef unsigned int uint32_t; -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -#endif - - typedef enum _amd_fw_type { AMD_FW_PSP_PUBKEY = 0, AMD_FW_PSP_BOOTLOADER = 1, diff --git a/util/amdfwtool/data_parse.c b/util/amdfwtool/data_parse.c index 017c689..b6e14a8 100644 --- a/util/amdfwtool/data_parse.c +++ b/util/amdfwtool/data_parse.c @@ -2,6 +2,7 @@ #include <regex.h> #include <string.h> #include <stdlib.h> +#include <stdint.h>
#include "amdfwtool.h"