The following packages will be installed: efitools Fetching README... 0%100%100%100%100%100%Done Fetching efitools.SlackBuild... 0%100%100%100%100%100%Done Fetching efitools.info... 0%100%100%100%100%100%Done Fetching slack-desc... 0%100%100%100%100%100%Done efitools-1.9.2/ efitools-1.9.2/.gitignore efitools-1.9.2/COPYING efitools-1.9.2/HashTool.c efitools-1.9.2/HelloWorld.c efitools-1.9.2/KeyTool.c efitools-1.9.2/Loader.c efitools-1.9.2/LockDown.c efitools-1.9.2/Make.rules efitools-1.9.2/Makefile efitools-1.9.2/PreLoader.c efitools-1.9.2/README efitools-1.9.2/ReadVars.c efitools-1.9.2/SetNull.c efitools-1.9.2/ShimReplace.c efitools-1.9.2/UpdateVars.c efitools-1.9.2/cert-to-efi-hash-list.c efitools-1.9.2/cert-to-efi-sig-list.c efitools-1.9.2/doc/ efitools-1.9.2/doc/cert-to-efi-hash-list.1.in efitools-1.9.2/doc/cert-to-efi-sig-list.1.in efitools-1.9.2/doc/efi-readvar.1.in efitools-1.9.2/doc/efi-updatevar.1.in efitools-1.9.2/doc/hash-to-efi-sig-list.1.in efitools-1.9.2/doc/sig-list-to-certs.1.in efitools-1.9.2/doc/sign-efi-sig-list.1.in efitools-1.9.2/efi-keytool.c efitools-1.9.2/efi-readvar.c efitools-1.9.2/efi-updatevar.c efitools-1.9.2/flash-var.c efitools-1.9.2/hash-to-efi-sig-list.c efitools-1.9.2/include/ efitools-1.9.2/include/PeImage.h efitools-1.9.2/include/buildefi.h efitools-1.9.2/include/configtable.h efitools-1.9.2/include/console.h efitools-1.9.2/include/efiauthenticated.h efitools-1.9.2/include/errors.h efitools-1.9.2/include/execute.h efitools-1.9.2/include/guid.h efitools-1.9.2/include/kernel_efivars.h efitools-1.9.2/include/openssl_sign.h efitools-1.9.2/include/pecoff.h efitools-1.9.2/include/pkcs7verify.h efitools-1.9.2/include/security_policy.h efitools-1.9.2/include/sha256.h efitools-1.9.2/include/shell.h efitools-1.9.2/include/shim_protocol.h efitools-1.9.2/include/simple_file.h efitools-1.9.2/include/variableformat.h efitools-1.9.2/include/variables.h efitools-1.9.2/include/variables_iterators.h efitools-1.9.2/include/version.h efitools-1.9.2/include/wincert.h efitools-1.9.2/include/x509.h efitools-1.9.2/lib/ efitools-1.9.2/lib/Makefile efitools-1.9.2/lib/asn1/ efitools-1.9.2/lib/asn1/.gitignore efitools-1.9.2/lib/asn1/Makefile efitools-1.9.2/lib/asn1/asn1.c efitools-1.9.2/lib/asn1/asn1.h efitools-1.9.2/lib/asn1/asn1_parser.c efitools-1.9.2/lib/asn1/asn1_parser.h efitools-1.9.2/lib/asn1/chunk.c efitools-1.9.2/lib/asn1/chunk.h efitools-1.9.2/lib/asn1/enumerator.c efitools-1.9.2/lib/asn1/enumerator.h efitools-1.9.2/lib/asn1/identification.c efitools-1.9.2/lib/asn1/identification.h efitools-1.9.2/lib/asn1/oid.c efitools-1.9.2/lib/asn1/oid.h efitools-1.9.2/lib/asn1/oid.pl efitools-1.9.2/lib/asn1/oid.txt efitools-1.9.2/lib/asn1/test.c efitools-1.9.2/lib/asn1/typedefs.h efitools-1.9.2/lib/asn1/x509.c efitools-1.9.2/lib/configtable.c efitools-1.9.2/lib/console.c efitools-1.9.2/lib/execute.c efitools-1.9.2/lib/guid.c efitools-1.9.2/lib/kernel_efivars.c efitools-1.9.2/lib/openssl_sign.c efitools-1.9.2/lib/pecoff.c efitools-1.9.2/lib/pkcs7verify.c efitools-1.9.2/lib/security_policy.c efitools-1.9.2/lib/sha256.c efitools-1.9.2/lib/shell.c efitools-1.9.2/lib/shim_protocol.c efitools-1.9.2/lib/simple_file.c efitools-1.9.2/lib/variables.c efitools-1.9.2/mkusb.sh efitools-1.9.2/ms-kek.crt efitools-1.9.2/ms-uefi.crt efitools-1.9.2/sig-list-to-certs.c efitools-1.9.2/sign-efi-sig-list.c efitools-1.9.2/xxdi.pl make -C lib lib-efi.a make[1]: Entering directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib' cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c simple_file.c -o simple_file.efi.o simple_file.c: In function ‘simple_file_open_by_handle’: simple_file.c:31:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 31 | Print(L"Unable to find simple file protocol (%d)\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c:38:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 38 | Print(L"Failed to open drive volume (%d)\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_file_open’: simple_file.c:65:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 65 | Print(L"Unable to generate load path for %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_dir_read_all_by_handle’: simple_file.c:90:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 90 | Print(L"Failed to get file info\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c:94:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 94 | Print(L"Not a directory %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_dir_read_all’: simple_file.c:140:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 140 | Print(L"failed to open file %s: %d\n", name, status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_file_read_all’: simple_file.c:160:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 160 | Print(L"Failed to get file info\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c:169:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 169 | Print(L"Failed to allocate buffer of size %d\n", *size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_volume_selector’: simple_file.c:237:64: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 237 | if (!name || StrLen(name) == 0 || StrCmp(name, L" ") == 0) | ^~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c: In function ‘simple_dir_filter’: simple_file.c:338:44: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 338 | if (StrCmp(next->FileName, L".") == 0) | ^~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:361:44: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 361 | if (StrCmp(next->FileName, L"../") == 0) { | ^~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:374:39: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 374 | (*result)[(*count)++] = L"./"; | ^ simple_file.c: In function ‘simple_file_selector’: simple_file.c:403:22: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 403 | name = L"\\"; | ^ simple_file.c:405:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 405 | filter = L""; | ^ simple_file.c:443:38: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 443 | if (StrCmp(selected, L"./") == 0) { | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:446:45: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 446 | } else if (StrCmp(selected, L"../") == 0) { | ^~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:459:42: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 459 | if (StrCmp(name, L"\\") != 0 | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:460:49: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 460 | && StrCmp(&name[i], L"..") != 0) { | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:472:41: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 472 | StrCat(newname, L"\\"); | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src simple_file.c:487:41: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 487 | StrCat(*result, L"\\"); | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c pecoff.c -o pecoff.efi.o pecoff.c: In function ‘pecoff_read_header’: pecoff.c:81:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 81 | Print(L"Unsupported image type\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:86:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 86 | Print(L"Unsupported image - Relocations have been stripped\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:92:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 92 | Print(L"Only IA32 or X64 images supported\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:120:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 120 | Print(L"Malformed security header\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c: In function ‘pecoff_image_layout’: pecoff.c:145:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 145 | Print(L"Invalid section size\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c: In function ‘pecoff_relocate’: pecoff.c:178:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 178 | Print(L"pecoff_image_layout: failed to layout image\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:189:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 189 | Print(L"Image has no relocation entry\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:197:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 197 | Print(L"Reloc table overflows binary %d %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:210:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 210 | Print(L"Reloc entry overflows binary\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:216:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 216 | Print(L"Invalid fixupbase\n"); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:265:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 265 | Print(L"Unknown relocation\n"); | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c: In function ‘pecoff_check_mok’: pecoff.c:314:36: warning: passing argument 1 of ‘get_variable_attr’ from incompatible pointer type [-Wincompatible-pointer-types] 314 | status = get_variable_attr(L"MokSBState", &data, &len, | ^~~~~~~~~~~~~ | | | int * In file included from pecoff.c:65: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:23:27: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner, | ~~~~~~~~^~~ pecoff.c:329:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 329 | if (find_in_variable_esl(L"dbx", SIG_DB, hash, SHA256_DIGEST_SIZE) | ^~~~~~ | | | int * In file included from pecoff.c:65: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ pecoff.c:334:36: warning: passing argument 1 of ‘get_variable_attr’ from incompatible pointer type [-Wincompatible-pointer-types] 334 | status = get_variable_attr(L"MokList", &data, &len, MOK_OWNER, &attr); | ^~~~~~~~~~ | | | int * In file included from pecoff.c:65: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:23:27: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner, | ~~~~~~~~^~~ pecoff.c:342:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 342 | if (find_in_variable_esl(L"MokList", MOK_OWNER, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS) | ^~~~~~~~~~ | | | int * In file included from pecoff.c:65: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ pecoff.c:346:36: warning: passing argument 1 of ‘get_variable_attr’ from incompatible pointer type [-Wincompatible-pointer-types] 346 | status = get_variable_attr(L"tmpHashList", &data, &len, MOK_OWNER, | ^~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:65: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:23:27: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner, | ~~~~~~~~^~~ pecoff.c:349:37: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 349 | && find_in_variable_esl(L"tmpHashList", MOK_OWNER, hash, | ^~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:65: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ pecoff.c: In function ‘pecoff_execute_image’: pecoff.c:402:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 402 | Print(L"Failed to read %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:406:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 406 | Print(L"Read %d bytes from %s\n", DataSize, name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:409:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 409 | Print(L"Failed to read header\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:415:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 415 | Print(L"Failed to relocate image\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pecoff.c:421:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 421 | Print(L"Invalid entry point\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pecoff.c:52: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c guid.c -o guid.efi.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c sha256.c -o sha256.efi.o sha256.c: In function ‘sha256_get_pecoff_digest_mem’: sha256.c:295:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 295 | Print(L"Failed to read header\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from sha256.c:22: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, | ^ sha256.c:360:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 360 | Print(L"Invalid Data Size %d bytes too small\n", DataSize + context.SecDir->Size - sum_of_bytes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from sha256.c:22: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, | ^ sha256.c: In function ‘sha256_StrCat_hash’: sha256.c:378:42: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 378 | SPrint(buf, sizeof(buf), L"%02x", hash[i]); | ^~~~~~~ | | | int * In file included from sha256.c:22: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, | ^ sha256.c: In function ‘sha256_get_pecoff_digest’: sha256.c:393:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 393 | Print(L"Failed to open %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from sha256.c:22: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, | ^ sha256.c:399:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 399 | Print(L"Failed to read %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from sha256.c:22: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, | ^ cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c console.c -o console.efi.o console.c: In function ‘console_print_box_at’: console.c:106:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 106 | Print(L"Starting Position (%d,%d) is off screen\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from console.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, | ^ console.c:120:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 120 | Print(L"Failed Allocation\n"); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from console.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, | ^ console.c: In function ‘console_yes_no’: console.c:300:54: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 300 | return console_select(str_arr, (CHAR16 *[]){ L"No", L"Yes", NULL }, 0); | ^~~~~ console.c:300:54: note: (near initialization for ‘(anonymous)[0]’) console.c:300:61: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 300 | return console_select(str_arr, (CHAR16 *[]){ L"No", L"Yes", NULL }, 0); | ^~~~~~ console.c:300:61: note: (near initialization for ‘(anonymous)[1]’) console.c: In function ‘console_alertbox’: console.c:306:45: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 306 | console_select(title, (CHAR16 *[]){ L"OK", 0 }, 0); | ^~~~~ console.c:306:45: note: (near initialization for ‘(anonymous)[0]’) console.c: In function ‘console_errorbox’: console.c:313:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 313 | L"ERROR", | ^~~~~~~~ console.c:313:17: note: (near initialization for ‘(anonymous)[0]’) console.c:314:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 314 | L"", | ^~~ console.c:314:17: note: (near initialization for ‘(anonymous)[1]’) console.c: In function ‘err_string’: console.c:377:50: warning: returning ‘WCHAR *’ {aka ‘int *’} from a function with incompatible return type ‘CHAR16 *’ {aka ‘short unsigned int *’} [-Wincompatible-pointer-types] 377 | return error_table[Index].Desc; | ~~~~~~~~~~~~~~~~~~^~~~~ console.c:381:16: warning: returning ‘int *’ from a function with incompatible return type ‘CHAR16 *’ {aka ‘short unsigned int *’} [-Wincompatible-pointer-types] 381 | return L""; | ^~~ console.c: In function ‘console_error’: console.c:389:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 389 | L"ERROR", | ^~~~~~~~ console.c:389:17: note: (near initialization for ‘(anonymous)[0]’) console.c:390:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 390 | L"", | ^~~ console.c:390:17: note: (near initialization for ‘(anonymous)[1]’) console.c:396:34: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 396 | SPrint(str, sizeof(str), L"%s: (%d) %s", err, status, err_string(status)); | ^~~~~~~~~~~~~~ | | | int * In file included from console.c:7: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, | ^ cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c execute.c -o execute.efi.o execute.c: In function ‘generate_path’: execute.c:77:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 77 | Print(L"Failed to allocate path buffer\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from execute.c:42: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, execute.c:85:35: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 85 | StrCat(*PathName, L"\\"); | ^~~~~ | | | int * In file included from execute.c:42: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c configtable.c -o configtable.efi.o configtable.c: In function ‘configtable_find_image’: configtable.c:87:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 87 | Print(L"Image Execution Information table corrupt\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from configtable.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, configtable.c:100:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 100 | Print(L"Image Execution Information table corrupt\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from configtable.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c shell.c -o shell.efi.o shell.c: In function ‘argsplit’: shell.c:25:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 25 | Print(L"Failed to get arguments\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from shell.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c security_policy.c -o security_policy.efi.o security_policy.c: In function ‘security_policy_mok_override’: security_policy.c:63:36: warning: passing argument 1 of ‘get_variable_attr’ from incompatible pointer type [-Wincompatible-pointer-types] 63 | status = get_variable_attr(L"MokSBState", &VarData, &VarLen, | ^~~~~~~~~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:23:27: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner, | ~~~~~~~~^~~ security_policy.c: In function ‘security_policy_mok_deny’: security_policy.c:85:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 85 | if (find_in_variable_esl(L"dbx", SIG_DB, hash, SHA256_DIGEST_SIZE) | ^~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ security_policy.c:90:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 90 | if (find_in_variable_esl(L"MokListX", SIG_DB, hash, SHA256_DIGEST_SIZE) | ^~~~~~~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ security_policy.c: In function ‘security_policy_mok_allow’: security_policy.c:110:36: warning: passing argument 1 of ‘get_variable_attr’ from incompatible pointer type [-Wincompatible-pointer-types] 110 | status = get_variable_attr(L"MokList", &VarData, &VarLen, MOK_OWNER, | ^~~~~~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:23:27: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner, | ~~~~~~~~^~~ security_policy.c:120:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 120 | if (find_in_variable_esl(L"MokList", MOK_OWNER, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS) | ^~~~~~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c shim_protocol.c -o shim_protocol.efi.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c pkcs7verify.c -o pkcs7verify.efi.o pkcs7verify.c:13:24: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 13 | static CHAR16 *p7bin = L"\\Pkcs7VerifyDxe.efi"; | ^~~~~~~~~~~~~~~~~~~~~~~ pkcs7verify.c: In function ‘pkcs7verify_get_protocol’: pkcs7verify.c:31:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 31 | Print(L"Platform doesn't provide PKCS7_VERIFY protocol, trying to load\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pkcs7verify.c:2: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pkcs7verify.c:35:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 35 | *error = L"Can't find loaded image protocol"; | ^ pkcs7verify.c:41:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 41 | *error = L"generate_path failed"; | ^ pkcs7verify.c:47:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 47 | *error = L"LoadImage failed for external module"; | ^ pkcs7verify.c:53:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 53 | *error = L"StartImage failed for external module (loaded OK)"; | ^ pkcs7verify.c:61:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 61 | *error = L"Loaded module but it didn't provide the pkcs7Verify protocol"; | ^ pkcs7verify.c: In function ‘pkcs7verify_is_hash_present’: pkcs7verify.c:104:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 104 | Print(L"FIXME: found an unrecognised hash algorithm %g\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pkcs7verify.c:2: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pkcs7verify.c: In function ‘pkcs7verify_deny’: pkcs7verify.c:122:44: warning: passing argument 1 of ‘pkcs7verify_is_hash_present’ from incompatible pointer type [-Wincompatible-pointer-types] 122 | deny = pkcs7verify_is_hash_present(L"dbx", SIG_DB, data, len); | ^~~~~~ | | | int * pkcs7verify.c:73:37: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 73 | pkcs7verify_is_hash_present(CHAR16 *var, EFI_GUID owner, VOID *data, UINTN len) | ~~~~~~~~^~~ pkcs7verify.c:127:44: warning: passing argument 1 of ‘pkcs7verify_is_hash_present’ from incompatible pointer type [-Wincompatible-pointer-types] 127 | deny = pkcs7verify_is_hash_present(L"MokListX", MOK_OWNER, data, len); | ^~~~~~~~~~~ | | | int * pkcs7verify.c:73:37: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 73 | pkcs7verify_is_hash_present(CHAR16 *var, EFI_GUID owner, VOID *data, UINTN len) | ~~~~~~~~^~~ pkcs7verify.c: In function ‘pkcs7verify_allow’: pkcs7verify.c:169:29: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 169 | CHAR16 *check[] = { L"MokList", L"db" }; | ^~~~~~~~~~ pkcs7verify.c:169:29: note: (near initialization for ‘check[0]’) pkcs7verify.c:169:41: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 169 | CHAR16 *check[] = { L"MokList", L"db" }; | ^~~~~ pkcs7verify.c:169:41: note: (near initialization for ‘check[1]’) pkcs7verify.c:170:30: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 170 | CHAR16 *forbid[] = { L"MokListX", L"dbx" }; | ^~~~~~~~~~~ pkcs7verify.c:170:30: note: (near initialization for ‘forbid[0]’) pkcs7verify.c:170:43: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 170 | CHAR16 *forbid[] = { L"MokListX", L"dbx" }; | ^~~~~~ pkcs7verify.c:170:43: note: (near initialization for ‘forbid[1]’) pkcs7verify.c:189:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 189 | if (find_in_variable_esl(L"MokList", MOK_OWNER, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS || | ^~~~~~~~~~ | | | int * In file included from pkcs7verify.c:7: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ pkcs7verify.c:190:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 190 | find_in_variable_esl(L"db", SIG_DB, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS) { | ^~~~~ | | | int * In file included from pkcs7verify.c:7: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c variables.c -o variables.o variables.c: In function ‘SetSecureVariable’: variables.c:152:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 152 | Print(L"Failed to create %s certificate %d\n", var, efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from variables.c:23: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, variables.c:164:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 164 | Print(L"Failed to create time based payload %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from variables.c:23: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, variables.c: In function ‘GetOSIndications’: variables.c:186:38: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 186 | efi_status = RT->GetVariable(L"OsIndicationsSupported", &GV_GUID, NULL, &DataSize, &indications); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * variables.c:186:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ variables.c: In function ‘SETOSIndicationsAndReboot’: variables.c:199:38: warning: passing argument 1 of ‘RT->SetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 199 | efi_status = RT->SetVariable(L"OsIndications", | ^~~~~~~~~~~~~~~~ | | | int * variables.c:199:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ variables.c: In function ‘variable_is_setupmode’: variables.c:336:25: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 336 | RT->GetVariable(L"SetupMode", &GV_GUID, NULL, &DataSize, &SetupMode); | ^~~~~~~~~~~~ | | | int * variables.c:336:25: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ variables.c: In function ‘variable_is_secureboot’: variables.c:349:25: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 349 | RT->GetVariable(L"SecureBoot", &GV_GUID, NULL, &DataSize, &SecureBoot); | ^~~~~~~~~~~~~ | | | int * variables.c:349:25: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ ar rcv lib-efi.a simple_file.efi.o pecoff.efi.o guid.efi.o sha256.efi.o console.efi.o execute.efi.o configtable.efi.o shell.efi.o security_policy.efi.o shim_protocol.efi.o pkcs7verify.efi.o variables.o a - simple_file.efi.o a - pecoff.efi.o a - guid.efi.o a - sha256.efi.o a - console.efi.o a - execute.efi.o a - configtable.efi.o a - shell.efi.o a - security_policy.efi.o a - shim_protocol.efi.o a - pkcs7verify.efi.o a - variables.o make[1]: Leaving directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib' cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c HelloWorld.c -o HelloWorld.o HelloWorld.c: In function ‘efi_main’: HelloWorld.c:12:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 12 | L"HelloWorld", | ^~~~~~~~~~~~~ HelloWorld.c:12:25: note: (near initialization for ‘(anonymous)[0]’) HelloWorld.c:13:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 13 | L"", | ^~~ HelloWorld.c:13:25: note: (near initialization for ‘(anonymous)[1]’) HelloWorld.c:14:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 14 | L"This file is used to prove you have managed", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HelloWorld.c:14:25: note: (near initialization for ‘(anonymous)[2]’) HelloWorld.c:15:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 15 | L"To execute an unsigned binary in secure boot mode", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HelloWorld.c:15:25: note: (near initialization for ‘(anonymous)[3]’) ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds HelloWorld.o lib/lib-efi.a -o HelloWorld.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D HelloWorld.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 HelloWorld.so HelloWorld.efi openssl req -new -x509 -newkey rsa:2048 -subj "/CN=DB/" -keyout DB.key -out DB.crt -days 3650 -nodes -sha256 Generating a RSA private key ..................+++++ .........................................................+++++ writing new private key to 'DB.key' ----- sbsign --key DB.key --cert DB.crt --output HelloWorld-signed.efi HelloWorld.efi warning: data remaining[46592 vs 56413]: gaps between PE/COFF sections? warning: data remaining[46592 vs 56416]: gaps between PE/COFF sections? Signing Unsigned original image openssl req -new -x509 -newkey rsa:2048 -subj "/CN=PK/" -keyout PK.key -out PK.crt -days 3650 -nodes -sha256 Generating a RSA private key .+++++ ...................................................+++++ writing new private key to 'PK.key' ----- cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c cert-to-efi-sig-list.c -o cert-to-efi-sig-list.o make -C lib lib.a make[1]: Entering directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib' cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c simple_file.c -o simple_file.o simple_file.c: In function ‘simple_file_open_by_handle’: simple_file.c:31:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 31 | Print(L"Unable to find simple file protocol (%d)\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c:38:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 38 | Print(L"Failed to open drive volume (%d)\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_file_open’: simple_file.c:65:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 65 | Print(L"Unable to generate load path for %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_dir_read_all_by_handle’: simple_file.c:90:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 90 | Print(L"Failed to get file info\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c:94:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 94 | Print(L"Not a directory %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_dir_read_all’: simple_file.c:140:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 140 | Print(L"failed to open file %s: %d\n", name, status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_file_read_all’: simple_file.c:160:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 160 | Print(L"Failed to get file info\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c:169:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 169 | Print(L"Failed to allocate buffer of size %d\n", *size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, simple_file.c: In function ‘simple_volume_selector’: simple_file.c:237:64: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 237 | if (!name || StrLen(name) == 0 || StrCmp(name, L" ") == 0) | ^~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c: In function ‘simple_dir_filter’: simple_file.c:338:44: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 338 | if (StrCmp(next->FileName, L".") == 0) | ^~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:361:44: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 361 | if (StrCmp(next->FileName, L"../") == 0) { | ^~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:374:39: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 374 | (*result)[(*count)++] = L"./"; | ^ simple_file.c: In function ‘simple_file_selector’: simple_file.c:403:22: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 403 | name = L"\\"; | ^ simple_file.c:405:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 405 | filter = L""; | ^ simple_file.c:443:38: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 443 | if (StrCmp(selected, L"./") == 0) { | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:446:45: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 446 | } else if (StrCmp(selected, L"../") == 0) { | ^~~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:459:42: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 459 | if (StrCmp(name, L"\\") != 0 | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:460:49: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 460 | && StrCmp(&name[i], L"..") != 0) { | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 simple_file.c:472:41: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 472 | StrCat(newname, L"\\"); | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src simple_file.c:487:41: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 487 | StrCat(*result, L"\\"); | ^~~~~ | | | int * In file included from simple_file.c:8: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c pecoff.c -o pecoff.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c guid.c -o guid.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c sha256.c -o sha256.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c console.c -o console.o console.c: In function ‘console_print_box_at’: console.c:106:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 106 | Print(L"Starting Position (%d,%d) is off screen\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from console.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, | ^ console.c:120:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 120 | Print(L"Failed Allocation\n"); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from console.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, | ^ console.c: In function ‘console_yes_no’: console.c:300:54: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 300 | return console_select(str_arr, (CHAR16 *[]){ L"No", L"Yes", NULL }, 0); | ^~~~~ console.c:300:54: note: (near initialization for ‘(anonymous)[0]’) console.c:300:61: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 300 | return console_select(str_arr, (CHAR16 *[]){ L"No", L"Yes", NULL }, 0); | ^~~~~~ console.c:300:61: note: (near initialization for ‘(anonymous)[1]’) console.c: In function ‘console_alertbox’: console.c:306:45: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 306 | console_select(title, (CHAR16 *[]){ L"OK", 0 }, 0); | ^~~~~ console.c:306:45: note: (near initialization for ‘(anonymous)[0]’) console.c: In function ‘console_errorbox’: console.c:313:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 313 | L"ERROR", | ^~~~~~~~ console.c:313:17: note: (near initialization for ‘(anonymous)[0]’) console.c:314:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 314 | L"", | ^~~ console.c:314:17: note: (near initialization for ‘(anonymous)[1]’) console.c: In function ‘err_string’: console.c:377:50: warning: returning ‘WCHAR *’ {aka ‘int *’} from a function with incompatible return type ‘CHAR16 *’ {aka ‘short unsigned int *’} [-Wincompatible-pointer-types] 377 | return error_table[Index].Desc; | ~~~~~~~~~~~~~~~~~~^~~~~ console.c:381:16: warning: returning ‘int *’ from a function with incompatible return type ‘CHAR16 *’ {aka ‘short unsigned int *’} [-Wincompatible-pointer-types] 381 | return L""; | ^~~ console.c: In function ‘console_error’: console.c:389:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 389 | L"ERROR", | ^~~~~~~~ console.c:389:17: note: (near initialization for ‘(anonymous)[0]’) console.c:390:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 390 | L"", | ^~~ console.c:390:17: note: (near initialization for ‘(anonymous)[1]’) console.c:396:34: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 396 | SPrint(str, sizeof(str), L"%s: (%d) %s", err, status, err_string(status)); | ^~~~~~~~~~~~~~ | | | int * In file included from console.c:7: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, | ^ cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c execute.c -o execute.o execute.c: In function ‘generate_path’: execute.c:77:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 77 | Print(L"Failed to allocate path buffer\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from execute.c:42: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, execute.c:85:35: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 85 | StrCat(*PathName, L"\\"); | ^~~~~ | | | int * In file included from execute.c:42: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c configtable.c -o configtable.o configtable.c: In function ‘configtable_find_image’: configtable.c:87:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 87 | Print(L"Image Execution Information table corrupt\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from configtable.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, configtable.c:100:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 100 | Print(L"Image Execution Information table corrupt\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from configtable.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c shell.c -o shell.o shell.c: In function ‘argsplit’: shell.c:25:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 25 | Print(L"Failed to get arguments\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from shell.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c security_policy.c -o security_policy.o security_policy.c: In function ‘security_policy_mok_override’: security_policy.c:63:36: warning: passing argument 1 of ‘get_variable_attr’ from incompatible pointer type [-Wincompatible-pointer-types] 63 | status = get_variable_attr(L"MokSBState", &VarData, &VarLen, | ^~~~~~~~~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:23:27: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner, | ~~~~~~~~^~~ security_policy.c: In function ‘security_policy_mok_deny’: security_policy.c:85:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 85 | if (find_in_variable_esl(L"dbx", SIG_DB, hash, SHA256_DIGEST_SIZE) | ^~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ security_policy.c:90:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 90 | if (find_in_variable_esl(L"MokListX", SIG_DB, hash, SHA256_DIGEST_SIZE) | ^~~~~~~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ security_policy.c: In function ‘security_policy_mok_allow’: security_policy.c:110:36: warning: passing argument 1 of ‘get_variable_attr’ from incompatible pointer type [-Wincompatible-pointer-types] 110 | status = get_variable_attr(L"MokList", &VarData, &VarLen, MOK_OWNER, | ^~~~~~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:23:27: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner, | ~~~~~~~~^~~ security_policy.c:120:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 120 | if (find_in_variable_esl(L"MokList", MOK_OWNER, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS) | ^~~~~~~~~~ | | | int * In file included from security_policy.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c shim_protocol.c -o shim_protocol.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c pkcs7verify.c -o pkcs7verify.o pkcs7verify.c:13:24: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 13 | static CHAR16 *p7bin = L"\\Pkcs7VerifyDxe.efi"; | ^~~~~~~~~~~~~~~~~~~~~~~ pkcs7verify.c: In function ‘pkcs7verify_get_protocol’: pkcs7verify.c:31:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 31 | Print(L"Platform doesn't provide PKCS7_VERIFY protocol, trying to load\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pkcs7verify.c:2: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pkcs7verify.c:35:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 35 | *error = L"Can't find loaded image protocol"; | ^ pkcs7verify.c:41:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 41 | *error = L"generate_path failed"; | ^ pkcs7verify.c:47:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 47 | *error = L"LoadImage failed for external module"; | ^ pkcs7verify.c:53:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 53 | *error = L"StartImage failed for external module (loaded OK)"; | ^ pkcs7verify.c:61:24: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 61 | *error = L"Loaded module but it didn't provide the pkcs7Verify protocol"; | ^ pkcs7verify.c: In function ‘pkcs7verify_is_hash_present’: pkcs7verify.c:104:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 104 | Print(L"FIXME: found an unrecognised hash algorithm %g\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from pkcs7verify.c:2: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, pkcs7verify.c: In function ‘pkcs7verify_deny’: pkcs7verify.c:122:44: warning: passing argument 1 of ‘pkcs7verify_is_hash_present’ from incompatible pointer type [-Wincompatible-pointer-types] 122 | deny = pkcs7verify_is_hash_present(L"dbx", SIG_DB, data, len); | ^~~~~~ | | | int * pkcs7verify.c:73:37: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 73 | pkcs7verify_is_hash_present(CHAR16 *var, EFI_GUID owner, VOID *data, UINTN len) | ~~~~~~~~^~~ pkcs7verify.c:127:44: warning: passing argument 1 of ‘pkcs7verify_is_hash_present’ from incompatible pointer type [-Wincompatible-pointer-types] 127 | deny = pkcs7verify_is_hash_present(L"MokListX", MOK_OWNER, data, len); | ^~~~~~~~~~~ | | | int * pkcs7verify.c:73:37: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 73 | pkcs7verify_is_hash_present(CHAR16 *var, EFI_GUID owner, VOID *data, UINTN len) | ~~~~~~~~^~~ pkcs7verify.c: In function ‘pkcs7verify_allow’: pkcs7verify.c:169:29: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 169 | CHAR16 *check[] = { L"MokList", L"db" }; | ^~~~~~~~~~ pkcs7verify.c:169:29: note: (near initialization for ‘check[0]’) pkcs7verify.c:169:41: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 169 | CHAR16 *check[] = { L"MokList", L"db" }; | ^~~~~ pkcs7verify.c:169:41: note: (near initialization for ‘check[1]’) pkcs7verify.c:170:30: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 170 | CHAR16 *forbid[] = { L"MokListX", L"dbx" }; | ^~~~~~~~~~~ pkcs7verify.c:170:30: note: (near initialization for ‘forbid[0]’) pkcs7verify.c:170:43: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 170 | CHAR16 *forbid[] = { L"MokListX", L"dbx" }; | ^~~~~~ pkcs7verify.c:170:43: note: (near initialization for ‘forbid[1]’) pkcs7verify.c:189:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 189 | if (find_in_variable_esl(L"MokList", MOK_OWNER, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS || | ^~~~~~~~~~ | | | int * In file included from pkcs7verify.c:7: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ pkcs7verify.c:190:34: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 190 | find_in_variable_esl(L"db", SIG_DB, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS) { | ^~~~~ | | | int * In file included from pkcs7verify.c:7: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c kernel_efivars.c -o kernel_efivars.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c openssl_sign.c -o openssl_sign.o ar rcv lib.a simple_file.o pecoff.o guid.o sha256.o console.o execute.o configtable.o shell.o security_policy.o shim_protocol.o pkcs7verify.o kernel_efivars.o openssl_sign.o a - simple_file.o a - pecoff.o a - guid.o a - sha256.o a - console.o a - execute.o a - configtable.o a - shell.o a - security_policy.o a - shim_protocol.o a - pkcs7verify.o a - kernel_efivars.o a - openssl_sign.o make[1]: Leaving directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib' cc -o cert-to-efi-sig-list cert-to-efi-sig-list.o lib/lib.a -lcrypto ./cert-to-efi-sig-list -g 11111111-2222-3333-4444-123456789abc PK.crt PK.esl openssl req -new -x509 -newkey rsa:2048 -subj "/CN=KEK/" -keyout KEK.key -out KEK.crt -days 3650 -nodes -sha256 Generating a RSA private key ............................................................+++++ ...................+++++ writing new private key to 'KEK.key' ----- cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c sign-efi-sig-list.c -o sign-efi-sig-list.o cc -o sign-efi-sig-list sign-efi-sig-list.o lib/lib.a -lcrypto ./sign-efi-sig-list -c PK.crt -k PK.key PK PK.esl PK.auth Timestamp is 2022-6-13 00:13:53 Authentication Payload size 855 Signature of size 1148 Signature at: 40 ./xxdi.pl PK.auth > PK.h ./cert-to-efi-sig-list -g 11111111-2222-3333-4444-123456789abc KEK.crt KEK.esl ./sign-efi-sig-list -c PK.crt -k PK.key KEK KEK.esl KEK.auth Timestamp is 2022-6-13 00:13:53 Authentication Payload size 861 Signature of size 1148 Signature at: 40 ./xxdi.pl KEK.auth > KEK.h ./cert-to-efi-sig-list -g 11111111-2222-3333-4444-123456789abc DB.crt DB.esl ./sign-efi-sig-list -c KEK.crt -k KEK.key db DB.esl DB.auth Timestamp is 2022-6-13 00:13:53 Authentication Payload size 855 Signature of size 1151 Signature at: 40 ./xxdi.pl DB.auth > DB.h cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c LockDown.c -o LockDown.o LockDown.c: In function ‘efi_main’: LockDown.c:25:38: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 25 | efi_status = RT->GetVariable(L"SetupMode", &GV_GUID, NULL, &DataSize, &SetupMode); | ^~~~~~~~~~~~ | | | int * LockDown.c:25:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ LockDown.c:28:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 28 | Print(L"No SetupMode variable ... is platform secure boot enabled?\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:33:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 33 | Print(L"Platform is not in Setup Mode, cannot install Keys\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:37:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 37 | Print(L"Platform is in Setup Mode\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:39:38: warning: passing argument 1 of ‘RT->SetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 39 | efi_status = RT->SetVariable(L"KEK", &GV_GUID, | ^~~~~~ | | | int * LockDown.c:39:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ LockDown.c:46:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 46 | Print(L"Failed to enroll KEK: %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:49:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 49 | Print(L"Created KEK Cert\n"); | ^~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:50:38: warning: passing argument 1 of ‘RT->SetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 50 | efi_status = RT->SetVariable(L"db", &SIG_DB, | ^~~~~ | | | int * LockDown.c:50:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ LockDown.c:57:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 57 | Print(L"Failed to enroll db: %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:60:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 60 | Print(L"Created db Cert\n"); | ^~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:71:38: warning: passing argument 1 of ‘RT->SetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 71 | efi_status = RT->SetVariable(L"PK", &GV_GUID, | ^~~~~ | | | int * LockDown.c:71:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ LockDown.c:80:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 80 | Print(L"Failed to enroll PK: %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:83:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 83 | Print(L"Created PK Cert\n"); | ^~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:85:38: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 85 | efi_status = RT->GetVariable(L"SetupMode", &GV_GUID, NULL, &DataSize, &SetupMode); | ^~~~~~~~~~~~ | | | int * LockDown.c:85:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ LockDown.c:87:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 87 | Print(L"Failed to get SetupMode variable: %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:90:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 90 | Print(L"Platform is in %s Mode\n", SetupMode ? L"Setup" : L"User"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:94:38: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 94 | efi_status = RT->GetVariable(L"SecureBoot", &GV_GUID, NULL, &DataSize, &SecureBoot); | ^~~~~~~~~~~~~ | | | int * LockDown.c:94:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ LockDown.c:97:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 97 | Print(L"Failed to get SecureBoot variable: %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, LockDown.c:100:15: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 100 | Print(L"Platform %s set to boot securely\n", SecureBoot ? L"is" : L"is not"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from LockDown.c:7: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds LockDown.o lib/lib-efi.a -o LockDown.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D LockDown.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 LockDown.so LockDown.efi sbsign --key DB.key --cert DB.crt --output LockDown-signed.efi LockDown.efi warning: data remaining[48640 vs 58773]: gaps between PE/COFF sections? warning: data remaining[48640 vs 58776]: gaps between PE/COFF sections? Signing Unsigned original image cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c Loader.c -o Loader.o Loader.c:21:18: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 21 | CHAR16 *loader = L"\\linux-loader.efi"; | ^~~~~~~~~~~~~~~~~~~~~ Loader.c: In function ‘ask_to_boot’: Loader.c:27:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 27 | L"WARNING: This Binary is unsigned (and should be a Linux boot loader)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:27:17: note: (near initialization for ‘(anonymous)[0]’) Loader.c:28:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 28 | L"", | ^~~ Loader.c:28:17: note: (near initialization for ‘(anonymous)[1]’) Loader.c:29:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 29 | L"Are you sure you wish to run an unsigned binary", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:29:17: note: (near initialization for ‘(anonymous)[2]’) Loader.c:30:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 30 | L"in a secure environment?", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:30:17: note: (near initialization for ‘(anonymous)[3]’) Loader.c:31:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 31 | L"", | ^~~ Loader.c:31:17: note: (near initialization for ‘(anonymous)[4]’) Loader.c:32:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 32 | L"To avoid this question in future place the platform into setup mode", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:32:17: note: (near initialization for ‘(anonymous)[5]’) Loader.c:33:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 33 | L"See http://www.linuxfoundation.org/uefi", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:33:17: note: (near initialization for ‘(anonymous)[6]’) Loader.c:34:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 34 | L"And reboot.", | ^~~~~~~~~~~~~~ Loader.c:34:17: note: (near initialization for ‘(anonymous)[7]’) Loader.c: In function ‘ask_install_keys’: Loader.c:44:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 44 | L"You are in Setup Mode", | ^~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:44:17: note: (near initialization for ‘(anonymous)[0]’) Loader.c:45:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 45 | L"", | ^~~ Loader.c:45:17: note: (near initialization for ‘(anonymous)[1]’) Loader.c:46:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 46 | L"Do you wish me to install the signature", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:46:17: note: (near initialization for ‘(anonymous)[2]’) Loader.c:47:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 47 | L"of the binary into the allowed signatures database?", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:47:17: note: (near initialization for ‘(anonymous)[3]’) Loader.c:48:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 48 | L"", | ^~~ Loader.c:48:17: note: (near initialization for ‘(anonymous)[4]’) Loader.c:49:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 49 | L"If you say \"yes\" here, the platform will no longer ask permission", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:49:17: note: (near initialization for ‘(anonymous)[5]’) Loader.c:50:17: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 50 | L"to run the binary on every boot", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loader.c:50:17: note: (near initialization for ‘(anonymous)[6]’) Loader.c: In function ‘efi_main’: Loader.c:69:38: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 69 | efi_status = RT->GetVariable(L"SecureBoot", &GV_GUID, NULL, &DataSize, &SecureBoot); | ^~~~~~~~~~~~~ | | | int * Loader.c:69:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ Loader.c:72:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 72 | Print(L"Not a Secure Boot Platform %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:74:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 74 | Print(L"Secure Boot Disabled\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:78:25: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 78 | RT->GetVariable(L"SetupMode", &GV_GUID, NULL, &DataSize, &SetupMode); | ^~~~~~~~~~~~ | | | int * Loader.c:78:25: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ Loader.c:82:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 82 | Print(L"Failed to init loaded image protocol: %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:88:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 88 | Print(L"Unable to generate load path for %s: %d\n", loader, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:98:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 98 | Print(L"Starting file via StartImage\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:103:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 103 | Print(L"Failed to load the image: %d\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:110:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 110 | Print(L"Refusing to boot %s\n", loader); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:113:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 113 | Print(L"Booting %s with Present User Authorisation\n", loader); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:117:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 117 | Print(L"Failed to open %s\n", loader); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:128:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 128 | Print(L"HASH IS "); | ^~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:130:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 130 | Print(L"%02x", hash[i]); | ^~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:131:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 131 | Print(L"\n"); | ^~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, Loader.c:133:42: warning: passing argument 1 of ‘find_in_variable_esl’ from incompatible pointer type [-Wincompatible-pointer-types] 133 | if (find_in_variable_esl(L"db", SIG_DB, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS) | ^~~~~ | | | int * In file included from Loader.c:15: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:28:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen); | ~~~~~~~~^~~ Loader.c:146:56: warning: passing argument 1 of ‘SetSecureVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 146 | efi_status = SetSecureVariable(L"db", sig, sizeof(sig), SIG_DB, EFI_VARIABLE_APPEND_WRITE, 0); | ^~~~~ | | | int * In file included from Loader.c:15: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/variables.h:19:27: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 19 | SetSecureVariable(CHAR16 *var, UINT8 *Data, UINTN len, EFI_GUID owner, UINT32 options, int createtimebased); | ~~~~~~~~^~~ Loader.c:148:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 148 | Print(L"Failed to add signature to db: %s\n", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from Loader.c:10: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds Loader.o lib/lib-efi.a -o Loader.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D Loader.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 Loader.so Loader.efi sbsign --key DB.key --cert DB.crt --output Loader-signed.efi Loader.efi warning: data remaining[88576 vs 100732]: gaps between PE/COFF sections? warning: data remaining[88576 vs 100736]: gaps between PE/COFF sections? Signing Unsigned original image make -C lib/asn1 libasn1-efi.a make[1]: Entering directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib/asn1' cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c asn1.c -o asn1.efi.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c asn1_parser.c -o asn1_parser.efi.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c enumerator.c -o enumerator.efi.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c chunk.c -o chunk.efi.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c oid.c -o oid.efi.o cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c identification.c -o identification.efi.o In file included from identification.c:18: identification.c: In function ‘dntoa’: typedefs.h:11:43: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 11 | #define snprintf(s, l, f...) SPrint(s, l, L ## f) | ^ | | | int * identification.c:178:35: note: in expansion of macro ‘snprintf’ 178 | written = snprintf(buf, len, "UNKNOWN-OID="); | ^~~~~~~~ In file included from typedefs.h:3, from identification.c:18: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, In file included from identification.c:18: typedefs.h:11:43: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 11 | #define snprintf(s, l, f...) SPrint(s, l, L ## f) | ^ | | | int * identification.c:182:35: note: in expansion of macro ‘snprintf’ 182 | written = snprintf(buf, len,"%" STRA "=", oid_names[oid].name); | ^~~~~~~~ In file included from typedefs.h:3, from identification.c:18: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, In file included from identification.c:18: typedefs.h:11:43: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 11 | #define snprintf(s, l, f...) SPrint(s, l, L ## f) | ^ | | | int * identification.c:192:27: note: in expansion of macro ‘snprintf’ 192 | written = snprintf(buf, len, "%.*" STRA, (int)printable.len, printable.ptr); | ^~~~~~~~ In file included from typedefs.h:3, from identification.c:18: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, In file included from identification.c:18: typedefs.h:11:43: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 11 | #define snprintf(s, l, f...) SPrint(s, l, L ## f) | ^ | | | int * identification.c:203:35: note: in expansion of macro ‘snprintf’ 203 | written = snprintf(buf, len, ", "); | ^~~~~~~~ In file included from typedefs.h:3, from identification.c:18: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, In file included from identification.c:18: typedefs.h:11:43: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 11 | #define snprintf(s, l, f...) SPrint(s, l, L ## f) | ^ | | | int * identification.c:219:17: note: in expansion of macro ‘snprintf’ 219 | snprintf(buf, len, ""); | ^~~~~~~~ In file included from typedefs.h:3, from identification.c:18: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, In file included from identification.c:18: typedefs.h:11:43: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 11 | #define snprintf(s, l, f...) SPrint(s, l, L ## f) | ^ | | | int * identification.c:223:17: note: in expansion of macro ‘snprintf’ 223 | snprintf(buf, len, "(invalid ID_DER_ASN1_DN)"); | ^~~~~~~~ In file included from typedefs.h:3, from identification.c:18: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c x509.c -o x509.efi.o In file included from x509.c:1: x509.c: In function ‘x509_to_str’: typedefs.h:11:43: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 11 | #define snprintf(s, l, f...) SPrint(s, l, L ## f) | ^ | | | int * x509.c:51:9: note: in expansion of macro ‘snprintf’ 51 | snprintf(buf, sizeof(buf), "MISPARSE"); | ^~~~~~~~ In file included from typedefs.h:3, from x509.c:1: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, ar rcv libasn1-efi.a asn1.efi.o asn1_parser.efi.o enumerator.efi.o chunk.efi.o oid.efi.o identification.efi.o x509.efi.o a - asn1.efi.o a - asn1_parser.efi.o a - enumerator.efi.o a - chunk.efi.o a - oid.efi.o a - identification.efi.o a - x509.efi.o make[1]: Leaving directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib/asn1' cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c ReadVars.c -o ReadVars.o ReadVars.c: In function ‘parse_db’: ReadVars.c:36:29: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 36 | ext = L"X509"; | ^ ReadVars.c:38:29: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 38 | ext = L"RSA2048"; | ^ ReadVars.c:40:29: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 40 | ext = L"PKCS7"; | ^ ReadVars.c:42:29: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 42 | ext = L"SHA256"; | ^ ReadVars.c:44:29: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 44 | ext = L"Unknown"; | ^ ReadVars.c:47:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 47 | Print(L"%s: List %d, type %s\n", name, count, ext); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:50:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 50 | Print(L" Signature %d, size %d, owner %g\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:54:41: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 54 | if (StrCmp(ext, L"X509") == 0) { | ^~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 ReadVars.c:61:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 61 | Print(L" Subject: %s\n", buf1); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:67:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 67 | Print(L" Issuer: %s\n", buf1); | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:69:48: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 69 | } else if (StrCmp(ext, L"SHA256") == 0) { | ^~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 ReadVars.c:72:46: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 72 | StrCpy(buf1, L"Hash: "); | ^~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src ReadVars.c:74:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 74 | Print(L" %s\n", buf1); | ^~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:78:48: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 78 | SPrint(buf, 0, L"%s-%d-%d-%s-%g", name, count, Index, ext, &Cert->SignatureOwner); | ^~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, ReadVars.c:79:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 79 | Print(L"Writing to file %s\n", buf); | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:82:47: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 82 | Print(L"Failed to open file %s: %d\n", buf, status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:88:47: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 88 | Print(L"Failed to write signature to file %s: %d\n", buf, status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c: In function ‘efi_main’: ReadVars.c:112:43: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 112 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~ ReadVars.c:112:43: note: (near initialization for ‘(anonymous)[0]’) ReadVars.c:112:50: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 112 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~~ ReadVars.c:112:50: note: (near initialization for ‘(anonymous)[1]’) ReadVars.c:112:58: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 112 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~ ReadVars.c:112:58: note: (near initialization for ‘(anonymous)[2]’) ReadVars.c:112:65: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 112 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~~ ReadVars.c:112:65: note: (near initialization for ‘(anonymous)[3]’) ReadVars.c:112:73: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 112 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~~ ReadVars.c:112:73: note: (near initialization for ‘(anonymous)[4]’) ReadVars.c:112:81: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 112 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~~~~~~ ReadVars.c:112:81: note: (near initialization for ‘(anonymous)[5]’) ReadVars.c:115:43: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 115 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~ ReadVars.c:115:43: note: (near initialization for ‘(anonymous)[0]’) ReadVars.c:115:50: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 115 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~~ ReadVars.c:115:50: note: (near initialization for ‘(anonymous)[1]’) ReadVars.c:115:58: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 115 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~ ReadVars.c:115:58: note: (near initialization for ‘(anonymous)[2]’) ReadVars.c:115:65: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 115 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~~ ReadVars.c:115:65: note: (near initialization for ‘(anonymous)[3]’) ReadVars.c:115:73: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 115 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~~~~~~ ReadVars.c:115:73: note: (near initialization for ‘(anonymous)[4]’) ReadVars.c:122:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 122 | Print(L"Failed to parse arguments: %d\n", status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:128:37: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 128 | if (StrCmp(ARGV[1], L"-s") == 0) { | ^~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 ReadVars.c:132:44: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 132 | } else if (StrCmp(ARGV[1], L"-n") == 0) { | ^~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 ReadVars.c:143:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 143 | Print(L"Usage: %s: [-s|-n] [var]\n", progname); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:151:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 151 | Print(L"Variable %s has no entries\n", variables[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:153:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 153 | Print(L"Failed to get %s: %d\n", variables[i], status); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:155:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 155 | Print(L"Variable %s length %d\n", variables[i], len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:169:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 169 | Print(L"Invalid Variable %s\nVariable must be one of: ", var); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:171:39: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 171 | Print(L"%s ", variables[i]); | ^~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:172:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 172 | Print(L"\n"); | ^~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:177:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 177 | Print(L"Variable %s has no entries\n", variables[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:179:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 179 | Print(L"Failed to get %s: %d\n", variables[i], status); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ReadVars.c:181:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 181 | Print(L"Variable %s length %d\n", variables[i], len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ReadVars.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds ReadVars.o lib/lib-efi.a lib/asn1/libasn1-efi.a -o ReadVars.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D ReadVars.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 ReadVars.so ReadVars.efi sbsign --key DB.key --cert DB.crt --output ReadVars-signed.efi ReadVars.efi warning: data remaining[116736 vs 129823]: gaps between PE/COFF sections? warning: data remaining[116736 vs 129824]: gaps between PE/COFF sections? Signing Unsigned original image cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c UpdateVars.c -o UpdateVars.o UpdateVars.c: In function ‘efi_main’: UpdateVars.c:35:43: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 35 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~ UpdateVars.c:35:43: note: (near initialization for ‘(anonymous)[0]’) UpdateVars.c:35:50: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 35 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~~ UpdateVars.c:35:50: note: (near initialization for ‘(anonymous)[1]’) UpdateVars.c:35:58: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 35 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~ UpdateVars.c:35:58: note: (near initialization for ‘(anonymous)[2]’) UpdateVars.c:35:65: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 35 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~~ UpdateVars.c:35:65: note: (near initialization for ‘(anonymous)[3]’) UpdateVars.c:35:73: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 35 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~~ UpdateVars.c:35:73: note: (near initialization for ‘(anonymous)[4]’) UpdateVars.c:35:81: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 35 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"dbt", L"MokList" , NULL}; | ^~~~~~~~~~ UpdateVars.c:35:81: note: (near initialization for ‘(anonymous)[5]’) UpdateVars.c:38:43: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 38 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~ UpdateVars.c:38:43: note: (near initialization for ‘(anonymous)[0]’) UpdateVars.c:38:50: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 38 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~~ UpdateVars.c:38:50: note: (near initialization for ‘(anonymous)[1]’) UpdateVars.c:38:58: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 38 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~ UpdateVars.c:38:58: note: (near initialization for ‘(anonymous)[2]’) UpdateVars.c:38:65: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 38 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~~ UpdateVars.c:38:65: note: (near initialization for ‘(anonymous)[3]’) UpdateVars.c:38:73: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 38 | variables = (CHAR16 *[]){ L"PK", L"KEK", L"db", L"dbx", L"MokList" , NULL}; | ^~~~~~~~~~ UpdateVars.c:38:73: note: (near initialization for ‘(anonymous)[4]’) UpdateVars.c:45:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 45 | Print(L"Failed to parse arguments: %d\n", status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:51:37: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 51 | if (StrCmp(ARGV[1], L"-a") == 0) { | ^~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 UpdateVars.c:55:44: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 55 | } else if (StrCmp(ARGV[1], L"-g") == 0) { | ^~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 UpdateVars.c:59:44: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 59 | } else if (StrCmp(ARGV[1], L"-e") == 0) { | ^~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 UpdateVars.c:63:44: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 63 | } else if (StrCmp(ARGV[1], L"-b") == 0) { | ^~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 UpdateVars.c:75:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 75 | Print(L"Usage: %s: [-g guid] [-a] [-e] [-b] var file\n", progname); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:89:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 89 | Print(L"Invalid Variable %s\nVariable must be one of: ", var); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:91:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 91 | Print(L"%s ", variables[i]); | ^~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:92:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 92 | Print(L"\n"); | ^~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:98:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 98 | Print(L"MoK variables can only be updated in ESL mode\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:114:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 114 | Print(L"Failed to open file %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:120:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 120 | Print(L"Failed to read file %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:130:31: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 130 | Print(L"Failed to get hash of %s\n", name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, UpdateVars.c:145:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 145 | Print(L"Failed to update variable %s: %d\n", var, status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from UpdateVars.c:11: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds UpdateVars.o lib/lib-efi.a -o UpdateVars.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D UpdateVars.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 UpdateVars.so UpdateVars.efi sbsign --key DB.key --cert DB.crt --output UpdateVars-signed.efi UpdateVars.efi warning: data remaining[87040 vs 99206]: gaps between PE/COFF sections? warning: data remaining[87040 vs 99208]: gaps between PE/COFF sections? Signing Unsigned original image cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c KeyTool.c -o KeyTool.o KeyTool.c:41:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 41 | .name = L"PK", | ^~~~~ KeyTool.c:41:25: note: (near initialization for ‘keyinfo[0].name’) KeyTool.c:42:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 42 | .text = L"The Platform Key (PK)", | ^~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:42:25: note: (near initialization for ‘keyinfo[0].text’) KeyTool.c:48:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 48 | .name = L"KEK", | ^~~~~~ KeyTool.c:48:25: note: (near initialization for ‘keyinfo[1].name’) KeyTool.c:49:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 49 | .text = L"The Key Exchange Key Database (KEK)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:49:25: note: (near initialization for ‘keyinfo[1].text’) KeyTool.c:55:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 55 | .name = L"db", | ^~~~~ KeyTool.c:55:25: note: (near initialization for ‘keyinfo[2].name’) KeyTool.c:56:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 56 | .text = L"The Allowed Signatures Database (db)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:56:25: note: (near initialization for ‘keyinfo[2].text’) KeyTool.c:62:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 62 | .name = L"dbx", | ^~~~~~ KeyTool.c:62:25: note: (near initialization for ‘keyinfo[3].name’) KeyTool.c:63:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 63 | .text = L"The Forbidden Signatures Database (dbx)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:63:25: note: (near initialization for ‘keyinfo[3].text’) KeyTool.c:69:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 69 | .name = L"dbt", | ^~~~~~ KeyTool.c:69:25: note: (near initialization for ‘keyinfo[4].name’) KeyTool.c:70:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 70 | .text = L"The Timestamp Signatures Database (dbt)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:70:25: note: (near initialization for ‘keyinfo[4].text’) KeyTool.c:76:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 76 | .name = L"MokList", | ^~~~~~~~~~ KeyTool.c:76:25: note: (near initialization for ‘keyinfo[5].name’) KeyTool.c:77:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 77 | .text = L"The Machine Owner Key List (MokList)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:77:25: note: (near initialization for ‘keyinfo[5].text’) KeyTool.c:90:19: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 90 | .name = L"X509", | ^~~~~~~ KeyTool.c:90:19: note: (near initialization for ‘signatures[0].name’) KeyTool.c:93:19: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 93 | .name = L"RSA2048", | ^~~~~~~~~~ KeyTool.c:93:19: note: (near initialization for ‘signatures[1].name’) KeyTool.c:96:19: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 96 | .name = L"SHA256 signature", | ^~~~~~~~~~~~~~~~~~~ KeyTool.c:96:19: note: (near initialization for ‘signatures[2].name’) KeyTool.c:99:19: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 99 | .name = L"X509 SHA256 signature", | ^~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:99:19: note: (near initialization for ‘signatures[3].name’) KeyTool.c:102:19: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 102 | .name = L"X509 SHA384 signature", | ^~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:102:19: note: (near initialization for ‘signatures[4].name’) KeyTool.c:105:19: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 105 | .name = L"X509 SHA256 signature", | ^~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:105:19: note: (near initialization for ‘signatures[5].name’) KeyTool.c: In function ‘select_and_apply’: KeyTool.c:119:41: warning: passing argument 3 of ‘simple_file_selector’ from incompatible pointer type [-Wincompatible-pointer-types] 119 | simple_file_selector(&h, title, L"\\", ext, &file_name); | ^~~~~ | | | int * In file included from KeyTool.c:12: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/simple_file.h:18:62: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 18 | simple_file_selector(EFI_HANDLE *im, CHAR16 **title, CHAR16 *name, | ~~~~~~~~^~~~ KeyTool.c:134:55: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 134 | if (StrCmp(&file_name[StrLen(file_name) - 4], L".esl") == 0) { | ^~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 KeyTool.c:139:62: warning: passing argument 2 of ‘StrCmp’ from incompatible pointer type [-Wincompatible-pointer-types] 139 | } else if (StrCmp(&file_name[StrLen(file_name) - 5], L".auth") == 0) { | ^~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:308:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 308 | IN CONST CHAR16 *s2 KeyTool.c:146:42: warning: passing argument 1 of ‘console_errorbox’ from incompatible pointer type [-Wincompatible-pointer-types] 146 | console_errorbox(L"Can't set MOK variables with a .auth file"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:14:26: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 14 | console_errorbox(CHAR16 *err); | ~~~~~~~~^~~ KeyTool.c:161:39: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 161 | console_error(L"Failed to create proper ESL", status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c:179:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 179 | console_error(L"Failed to update variable", status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c: In function ‘delete_key’: KeyTool.c:245:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 245 | console_error(L"Failed to delete key", status); | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c: In function ‘show_key’: KeyTool.c:266:34: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 266 | SPrint(str, sizeof(str), L"Sig[%d] - owner: %g", offset, &Cert->SignatureOwner); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:270:18: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 270 | title[c] = L"Unknown"; | ^ KeyTool.c:274:52: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 274 | SPrint(str1, sizeof(str1), L"Type: %s", signatures[i].name); | ^~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:281:30: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 281 | StrCpy(str2, L"Hash: "); | ^~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src KeyTool.c:290:28: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 290 | title[++c] = L""; | ^ KeyTool.c:291:28: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 291 | title[++c] = L"Subject:"; | ^ KeyTool.c:305:28: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 305 | title[++c] = L"Issuer:"; | ^ KeyTool.c:310:30: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 310 | StrCpy(str2, L"Hash: "); | ^~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src KeyTool.c:315:24: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 315 | L"Revocation Timestamp: %d-%d-%d %02d:%02d:%02d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:328:30: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 328 | options[o++] = L"Delete"; | ^ KeyTool.c:331:22: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 331 | options[o++] = L"Save to File"; | ^ KeyTool.c:334:30: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 334 | options[o++] = L"Delete with .auth File"; | ^ KeyTool.c:350:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 350 | L"Save Key", | ^~~~~~~~~~~ KeyTool.c:350:33: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c:351:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 351 | L"", | ^~~ KeyTool.c:351:33: note: (near initialization for ‘(anonymous)[1]’) KeyTool.c:352:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 352 | L"Select a disk Volume to save the key file to", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:352:33: note: (near initialization for ‘(anonymous)[2]’) KeyTool.c:353:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 353 | L"The Key file will be saved in the top level directory", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:353:33: note: (near initialization for ‘(anonymous)[3]’) KeyTool.c:354:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 354 | L"", | ^~~ KeyTool.c:354:33: note: (near initialization for ‘(anonymous)[4]’) KeyTool.c:355:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 355 | L"Note: For USB volumes, some UEFI implementations aren't", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:355:33: note: (near initialization for ‘(anonymous)[5]’) KeyTool.c:356:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 356 | L"very good at hotplug, so you may have to boot with the USB", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:356:33: note: (near initialization for ‘(anonymous)[6]’) KeyTool.c:357:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 357 | L"Key already plugged in to see the volume", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:357:33: note: (near initialization for ‘(anonymous)[7]’) KeyTool.c:367:37: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 367 | SPrint(filename, 0, L"%s-%d.esl", keyinfo[key].name, offset); | ^~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:377:50: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 377 | SPrint(str, sizeof(str), L"Failed to write %s", filename); | ^~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:382:52: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 382 | SPrint(str1, sizeof(str1), L"Key %s[%d]", keyinfo[key].name, offset); | ^~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:383:52: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 383 | SPrint(str2, sizeof(str2), L"With GUID: %g", &Cert->SignatureOwner); | ^~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:384:52: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 384 | SPrint(str3, sizeof(str3), L"saved to %s", filename); | ^~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:387:41: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 387 | L"Successfully Saved", | ^~~~~~~~~~~~~~~~~~~~~ KeyTool.c:387:41: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c:388:41: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 388 | L"", | ^~~ KeyTool.c:388:41: note: (near initialization for ‘(anonymous)[1]’) KeyTool.c:397:26: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 397 | title[0] = L"Select authority bundle to remove PK"; | ^ KeyTool.c:399:41: warning: passing argument 2 of ‘select_and_apply’ from incompatible pointer type [-Wincompatible-pointer-types] 399 | select_and_apply(title, L".auth", key, 0); | ^~~~~~~~ | | | int * KeyTool.c:111:42: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 111 | select_and_apply(CHAR16 **title, CHAR16 *ext, int key, UINTN options) | ~~~~~~~~^~~ KeyTool.c: In function ‘add_new_key’: KeyTool.c:408:23: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 408 | CHAR16 *ext = (key != KEY_PK && variable_is_setupmode()) | ^ KeyTool.c:411:18: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 411 | title[0] = L"Select File containing additional key for"; | ^ KeyTool.c: In function ‘enroll_hash’: KeyTool.c:428:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 428 | L"Select Binary", | ^~~~~~~~~~~~~~~~ KeyTool.c:428:25: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c:429:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 429 | L"", | ^~~ KeyTool.c:429:25: note: (near initialization for ‘(anonymous)[1]’) KeyTool.c:430:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 430 | L"The Selected Binary will have its hash Enrolled", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:430:25: note: (near initialization for ‘(anonymous)[2]’) KeyTool.c:431:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 431 | L"This means it will Subsequently Boot with no prompting", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:431:25: note: (near initialization for ‘(anonymous)[3]’) KeyTool.c:432:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 432 | L"Remember to make sure it is a genuine binary before Enrolling its hash", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:432:25: note: (near initialization for ‘(anonymous)[4]’) KeyTool.c:434:20: warning: passing argument 3 of ‘simple_file_selector’ from incompatible pointer type [-Wincompatible-pointer-types] 434 | }, L"\\", NULL, &file_name); | ^~~~~ | | | int * In file included from KeyTool.c:12: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/simple_file.h:18:62: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 18 | simple_file_selector(EFI_HANDLE *im, CHAR16 **title, CHAR16 *name, | ~~~~~~~~^~~~ KeyTool.c:442:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 442 | console_error(L"Hash failed (is efi binary valid?)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c:447:22: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 447 | StrCpy(buf0, L"Enroll hash into "); | ^~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src KeyTool.c:450:18: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 450 | title[1] = L""; | ^ KeyTool.c:451:22: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 451 | StrCpy(buf1, L"File: "); | ^~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src KeyTool.c:454:22: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 454 | StrCpy(buf2, L"Hash: "); | ^~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src KeyTool.c:465:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 465 | console_error(L"Failed to add signature to db", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c: In function ‘save_key_internal’: KeyTool.c:484:39: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 484 | StrCat(error, L": Variable has no entries"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src KeyTool.c:486:45: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 486 | SPrint(error, 1024, L"%s: Failed to get variable (Error: %d)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:490:27: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 490 | StrCpy(file_name, L"\\"); | ^~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src KeyTool.c:492:27: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 492 | StrCat(file_name, L".esl"); | ^~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src KeyTool.c:498:37: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 498 | SPrint(error, 1024, L"%s: Failed to open file %s (Error: %d)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:505:37: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 505 | SPrint(error, 1024, L"%s: Failed to write to %s (Error: %d)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:509:23: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 509 | StrCat(error, L": Successfully written to "); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src KeyTool.c: In function ‘save_key’: KeyTool.c:520:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 520 | L"Save Key", | ^~~~~~~~~~~ KeyTool.c:520:25: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c:521:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 521 | L"", | ^~~ KeyTool.c:521:25: note: (near initialization for ‘(anonymous)[1]’) KeyTool.c:522:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 522 | L"Select a disk Volume to save the key file to", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:522:25: note: (near initialization for ‘(anonymous)[2]’) KeyTool.c:523:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 523 | L"The key file will be saved in the top level directory", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:523:25: note: (near initialization for ‘(anonymous)[3]’) KeyTool.c:524:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 524 | L"", | ^~~ KeyTool.c:524:25: note: (near initialization for ‘(anonymous)[4]’) KeyTool.c:525:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 525 | L"Note: For USB volumes, some UEFI implementations aren't", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:525:25: note: (near initialization for ‘(anonymous)[5]’) KeyTool.c:526:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 526 | L"very good at hotplug, so you may have to boot with the USB", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:526:25: note: (near initialization for ‘(anonymous)[6]’) KeyTool.c:527:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 527 | L"USB device already plugged in to see the volume", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:527:25: note: (near initialization for ‘(anonymous)[7]’) KeyTool.c: In function ‘manipulate_key’: KeyTool.c:551:18: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 551 | title[0] = L"Manipulating Contents of"; | ^ KeyTool.c:559:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 559 | console_error(L"Failed to get DataSize", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c:566:42: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 566 | SPrint(str, sizeof(str), L"Failed to allocate %d", DataSize); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:574:28: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 574 | title[t++] = L"Variable is Empty"; | ^ KeyTool.c:576:36: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 576 | title[t++] = L"WARNING: Setting PK will take the platform out of Setup Mode"; | ^ KeyTool.c:579:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 579 | console_error(L"Failed to get variable", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c:598:72: warning: passing argument 3 of ‘UnicodeSPrint’ from incompatible pointer type [-Wincompatible-pointer-types] 598 | SPrint(guids[cert_count++], 64*sizeof(CHAR16), L"%g", &Cert->SignatureOwner); | ^~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:542:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 542 | IN CONST CHAR16 *fmt, KeyTool.c:604:28: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 604 | guids[g++] = L"Add New Key"; | ^ KeyTool.c:607:20: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 607 | guids[g++] = L"Replace Key(s)"; | ^ KeyTool.c:611:28: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 611 | guids[g++] = L"Enroll hash of binary"; | ^ KeyTool.c:616:28: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 616 | guids[g++] = L"Save key"; | ^ KeyTool.c: In function ‘select_key’: KeyTool.c:655:51: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 655 | i = console_select( (CHAR16 *[]){ L"Select Key to Manipulate", NULL }, keys, i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:655:51: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c: In function ‘save_keys’: KeyTool.c:669:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 669 | L"Save Keys", | ^~~~~~~~~~~~ KeyTool.c:669:25: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c:670:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 670 | L"", | ^~~ KeyTool.c:670:25: note: (near initialization for ‘(anonymous)[1]’) KeyTool.c:671:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 671 | L"Select a disk Volume to save all the key files to", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:671:25: note: (near initialization for ‘(anonymous)[2]’) KeyTool.c:672:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 672 | L"Key files will be saved in the top level directory", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:672:25: note: (near initialization for ‘(anonymous)[3]’) KeyTool.c:673:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 673 | L"", | ^~~ KeyTool.c:673:25: note: (near initialization for ‘(anonymous)[4]’) KeyTool.c:674:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 674 | L"Note: For USB volumes, some UEFI implementations aren't", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:674:25: note: (near initialization for ‘(anonymous)[5]’) KeyTool.c:675:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 675 | L"very good at hotplug, so you may have to boot with the USB", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:675:25: note: (near initialization for ‘(anonymous)[6]’) KeyTool.c:676:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 676 | L"USB device already plugged in to see the volume", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:676:25: note: (near initialization for ‘(anonymous)[7]’) KeyTool.c:687:22: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 687 | title[t_c++] = L"Results of Saving Keys"; | ^ KeyTool.c:688:22: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 688 | title[t_c++] = L""; | ^ KeyTool.c: In function ‘execute_binary’: KeyTool.c:711:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 711 | L"Select Binary to Execute", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyTool.c:711:25: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c:712:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 712 | L"", | ^~~ KeyTool.c:712:25: note: (near initialization for ‘(anonymous)[1]’) KeyTool.c:714:20: warning: passing argument 3 of ‘simple_file_selector’ from incompatible pointer type [-Wincompatible-pointer-types] 714 | }, L"\\", | ^~~~~ | | | int * In file included from KeyTool.c:12: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/simple_file.h:18:62: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 18 | simple_file_selector(EFI_HANDLE *im, CHAR16 **title, CHAR16 *name, | ~~~~~~~~^~~~ KeyTool.c:729:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 729 | console_error(L"Image failed to load", status); | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c:737:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 737 | console_error(L"Execution returned error", status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:10: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ KeyTool.c: In function ‘efi_main’: KeyTool.c:754:38: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 754 | efi_status = RT->GetVariable(L"SetupMode", &GV_GUID, NULL, &DataSize, &SetupMode); | ^~~~~~~~~~~~ | | | int * KeyTool.c:754:38: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ KeyTool.c:757:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 757 | Print(L"No SetupMode variable ... is platform secure boot enabled?\n"); return EFI_SUCCESS; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, KeyTool.c:769:31: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 769 | StrCat(line2, L"Platform is in "); | ^~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src KeyTool.c:770:57: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 770 | StrCat(line2, SetupMode ? L"Setup Mode" : L"User Mode"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src KeyTool.c:771:31: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 771 | StrCat(line3, L"Secure Boot is "); | ^~~~~~~~~~~~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src KeyTool.c:772:50: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 772 | StrCat(line3, SecureBoot ? L"on" : L"off"); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~ | | | int * In file included from KeyTool.c:9: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src KeyTool.c:773:39: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 773 | title = (CHAR16 *[]){L"KeyTool main menu", L"", line2, line3, NULL }; | ^~~~~~~~~~~~~~~~~~~~ KeyTool.c:773:39: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c:773:61: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 773 | title = (CHAR16 *[]){L"KeyTool main menu", L"", line2, line3, NULL }; | ^~~ KeyTool.c:773:61: note: (near initialization for ‘(anonymous)[1]’) KeyTool.c:776:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 776 | L"Save Keys", | ^~~~~~~~~~~~ KeyTool.c:776:33: note: (near initialization for ‘(anonymous)[0]’) KeyTool.c:777:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 777 | L"Edit Keys", | ^~~~~~~~~~~~ KeyTool.c:777:33: note: (near initialization for ‘(anonymous)[1]’) KeyTool.c:778:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 778 | L"Execute Binary", | ^~~~~~~~~~~~~~~~~ KeyTool.c:778:33: note: (near initialization for ‘(anonymous)[2]’) KeyTool.c:779:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 779 | L"Exit", | ^~~~~~~ KeyTool.c:779:33: note: (near initialization for ‘(anonymous)[3]’) ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds KeyTool.o lib/lib-efi.a lib/asn1/libasn1-efi.a -o KeyTool.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D KeyTool.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 KeyTool.so KeyTool.efi sbsign --key DB.key --cert DB.crt --output KeyTool-signed.efi KeyTool.efi warning: data remaining[129536 vs 143015]: gaps between PE/COFF sections? warning: data remaining[129536 vs 143016]: gaps between PE/COFF sections? Signing Unsigned original image cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c HashTool.c -o HashTool.o HashTool.c:20:29: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 20 | static CHAR16* keytoolbin = L"KeyTool.efi"; | ^~~~~~~~~~~~~~ HashTool.c: In function ‘enroll_hash’: HashTool.c:69:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 69 | L"Select Binary", | ^~~~~~~~~~~~~~~~ HashTool.c:69:25: note: (near initialization for ‘(anonymous)[0]’) HashTool.c:70:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 70 | L"", | ^~~ HashTool.c:70:25: note: (near initialization for ‘(anonymous)[1]’) HashTool.c:71:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 71 | L"The Selected Binary will have its hash Enrolled", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HashTool.c:71:25: note: (near initialization for ‘(anonymous)[2]’) HashTool.c:72:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 72 | L"This means it will Subsequently Boot with no prompting", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HashTool.c:72:25: note: (near initialization for ‘(anonymous)[3]’) HashTool.c:73:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 73 | L"Remember to make sure it is a genuine binary before Enroling its hash", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HashTool.c:73:25: note: (near initialization for ‘(anonymous)[4]’) HashTool.c:75:20: warning: passing argument 3 of ‘simple_file_selector’ from incompatible pointer type [-Wincompatible-pointer-types] 75 | }, L"\\", L"", &file_name); | ^~~~~ | | | int * In file included from HashTool.c:12: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/simple_file.h:18:62: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 18 | simple_file_selector(EFI_HANDLE *im, CHAR16 **title, CHAR16 *name, | ~~~~~~~~^~~~ HashTool.c:75:27: warning: passing argument 4 of ‘simple_file_selector’ from incompatible pointer type [-Wincompatible-pointer-types] 75 | }, L"\\", L"", &file_name); | ^~~ | | | int * In file included from HashTool.c:12: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/simple_file.h:19:30: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 19 | CHAR16 *filter, CHAR16 **result); | ~~~~~~~~^~~~~~ HashTool.c:83:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 83 | console_error(L"Hash failed (is efi binary valid?)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:15: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ HashTool.c:89:22: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 89 | StrCpy(buf0, L"Enroll this hash into "); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src HashTool.c:91:30: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 91 | StrCat(buf0, L"UEFI signature database?"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src HashTool.c:93:30: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 93 | StrCat(buf0, L"MOK database?"); | ^~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src HashTool.c:95:18: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 95 | title[1] = L""; | ^ HashTool.c:96:22: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 96 | StrCpy(buf1, L"File: "); | ^~~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src HashTool.c:99:22: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 99 | StrCpy(buf2, L"Hash: "); | ^~~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src HashTool.c:110:21: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 110 | var = L"db"; | ^ HashTool.c:113:21: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 113 | var = L"MokList"; | ^ HashTool.c:119:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 119 | console_error(L"Failed to add signature to db", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:15: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ HashTool.c: In function ‘transition_to_uefi_menu’: HashTool.c:131:34: warning: passing argument 1 of ‘console_errorbox’ from incompatible pointer type [-Wincompatible-pointer-types] 131 | console_errorbox(L"Platform Does not Support rebooting to firmware menu"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:15: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:14:26: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 14 | console_errorbox(CHAR16 *err); | ~~~~~~~~^~~ HashTool.c:136:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 136 | L"About to reboot to UEFI Setup Menu", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HashTool.c:136:25: note: (near initialization for ‘(anonymous)[0]’) HashTool.c:137:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 137 | L"", | ^~~ HashTool.c:137:25: note: (near initialization for ‘(anonymous)[1]’) HashTool.c:138:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 138 | L"For more details about your system's setup menu", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HashTool.c:138:25: note: (near initialization for ‘(anonymous)[2]’) HashTool.c:139:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 139 | L"Including how to reset the system to setup mode, see", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HashTool.c:139:25: note: (near initialization for ‘(anonymous)[3]’) HashTool.c:140:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 140 | L"", | ^~~ HashTool.c:140:25: note: (near initialization for ‘(anonymous)[4]’) HashTool.c:141:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 141 | L"http://www.linuxfoundation.org/uefi", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HashTool.c:141:25: note: (near initialization for ‘(anonymous)[5]’) HashTool.c: In function ‘efi_main’: HashTool.c:198:31: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 198 | StrCpy(line2, L"Platform is in "); | ^~~~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src HashTool.c:199:57: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 199 | StrCat(line2, SetupMode ? L"Setup Mode" : L"User Mode"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src HashTool.c:200:31: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 200 | StrCpy(line3, L"Secure Boot is "); | ^~~~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src HashTool.c:201:64: warning: passing argument 2 of ‘StrCat’ from incompatible pointer type [-Wincompatible-pointer-types] 201 | StrCat(line3, variable_is_secureboot() ? L"on" : L"off"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ | | | int * In file included from HashTool.c:10: /usr/include/efi/efilib.h:363:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 363 | IN CONST CHAR16 *Src HashTool.c:202:39: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 202 | title = (CHAR16 *[]){L"Hash Tool main menu", L"", line2, line3, NULL }; | ^~~~~~~~~~~~~~~~~~~~~~ HashTool.c:202:39: note: (near initialization for ‘(anonymous)[0]’) HashTool.c:202:63: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 202 | title = (CHAR16 *[]){L"Hash Tool main menu", L"", line2, line3, NULL }; | ^~~ HashTool.c:202:63: note: (near initialization for ‘(anonymous)[1]’) HashTool.c:203:30: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 203 | options[c++] = L"Enroll Hash"; | ^ HashTool.c:206:38: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 206 | options[c++] = L"Start UEFI Key Tool"; | ^ HashTool.c:214:46: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 214 | options[c++] = L"Enter User Mode"; | ^ HashTool.c:217:46: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 217 | options[c++] = L"Enter Setup Mode"; | ^ HashTool.c:223:38: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 223 | options[c++] = L"Reboot to UEFI Menu"; | ^ HashTool.c:227:30: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 227 | options[c++] = L"Reboot System"; | ^ HashTool.c:229:30: warning: assignment to ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 229 | options[c++] = L"Exit"; | ^ HashTool.c:241:47: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 241 | console_error(L"Failed to execute KeyTool", status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from HashTool.c:15: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ HashTool.c:251:41: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 251 | L"Are you sure you want to reboot?", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HashTool.c:251:41: note: (near initialization for ‘(anonymous)[0]’) ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds HashTool.o lib/lib-efi.a -o HashTool.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D HashTool.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 HashTool.so HashTool.efi sbsign --key DB.key --cert DB.crt --output HashTool-signed.efi HashTool.efi warning: data remaining[89088 vs 101294]: gaps between PE/COFF sections? warning: data remaining[89088 vs 101296]: gaps between PE/COFF sections? Signing Unsigned original image cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c SetNull.c -o SetNull.o ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds SetNull.o -o SetNull.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D SetNull.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 SetNull.so SetNull.efi sbsign --key DB.key --cert DB.crt --output SetNull-signed.efi SetNull.efi warning: data remaining[3584 vs 3825]: gaps between PE/COFF sections? warning: data remaining[3584 vs 3832]: gaps between PE/COFF sections? Signing Unsigned original image cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c ShimReplace.c -o ShimReplace.o ShimReplace.c:21:31: warning: initialization of ‘const CHAR16 *’ {aka ‘const short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 21 | static const CHAR16 *loader = L"\\grub.efi"; | ^~~~~~~~~~~~~ ShimReplace.c:22:33: warning: initialization of ‘const CHAR16 *’ {aka ‘const short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 22 | static const CHAR16 *fallback = L"\\fallback.efi"; | ^~~~~~~~~~~~~~~~~ ShimReplace.c: In function ‘efi_main’: ShimReplace.c:43:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 43 | console_error(L"Failed to install shim protocol", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ShimReplace.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ ShimReplace.c:49:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 49 | console_error(L"Failed to locate shim protocol", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ShimReplace.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ ShimReplace.c:51:37: warning: passing argument 2 of ‘execute’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 51 | efi_status = execute(image, loader); | ^~~~~~ In file included from ShimReplace.c:17: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/execute.h:5:35: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘const CHAR16 *’ {aka ‘const short unsigned int *’} 5 | execute(EFI_HANDLE image, CHAR16 *name); | ~~~~~~~~^~~~ ShimReplace.c:55:23: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 55 | console_error(L"Failed to start primary loader", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ShimReplace.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ ShimReplace.c:57:37: warning: passing argument 2 of ‘execute’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 57 | efi_status = execute(image, fallback); | ^~~~~~~~ In file included from ShimReplace.c:17: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/execute.h:5:35: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘const CHAR16 *’ {aka ‘const short unsigned int *’} 5 | execute(EFI_HANDLE image, CHAR16 *name); | ~~~~~~~~^~~~ ShimReplace.c:60:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 60 | console_error(L"Failed to start fallback loader", efi_status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from ShimReplace.c:14: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds ShimReplace.o lib/lib-efi.a -o ShimReplace.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D ShimReplace.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 ShimReplace.so ShimReplace.efi sbsign --key DB.key --cert DB.crt --output ShimReplace-signed.efi ShimReplace.efi warning: data remaining[89088 vs 101695]: gaps between PE/COFF sections? warning: data remaining[89088 vs 101696]: gaps between PE/COFF sections? Signing Unsigned original image cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c hash-to-efi-sig-list.c -o hash-to-efi-sig-list.o cc -o hash-to-efi-sig-list hash-to-efi-sig-list.o lib/lib.a ./hash-to-efi-sig-list HashTool.efi HashTool.hash HASH IS fbbc7a7b4a8106302c69b21be54e0476e2ec2ea2ab59333440a975150e4f388c cat HashTool.hash > /tmp/tmp.hash ./xxdi.pl /tmp/tmp.hash > hashlist.h rm -f /tmp/tmp.hash cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c PreLoader.c -o PreLoader.o PreLoader.c:19:18: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 19 | CHAR16 *loader = L"loader.efi"; | ^~~~~~~~~~~~~ PreLoader.c:20:20: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 20 | CHAR16 *hashtool = L"HashTool.efi"; | ^~~~~~~~~~~~~~~ PreLoader.c: In function ‘efi_main’: PreLoader.c:33:34: warning: passing argument 1 of ‘RT->GetVariable’ from incompatible pointer type [-Wincompatible-pointer-types] 33 | status = RT->GetVariable(L"SecureBoot", | ^~~~~~~~~~~~~ | | | int * PreLoader.c:33:34: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ PreLoader.c:36:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 36 | Print(L"Not a Secure Boot Platform %d\n", status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from PreLoader.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, PreLoader.c:41:23: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types] 41 | Print(L"Secure Boot Disabled\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from PreLoader.c:9: /usr/include/efi/efilib.h:528:24: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 528 | IN CONST CHAR16 *fmt, PreLoader.c:49:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 49 | console_error(L"Failed to install override security policy", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from PreLoader.c:11: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ PreLoader.c:70:29: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 70 | StrCpy(buf, L"Failed to start "); | ^~~~~~~~~~~~~~~~~~~ | | | int * In file included from PreLoader.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src PreLoader.c:78:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 78 | L"Failed to start loader", | ^~~~~~~~~~~~~~~~~~~~~~~~~ PreLoader.c:78:25: note: (near initialization for ‘(anonymous)[0]’) PreLoader.c:79:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 79 | L"", | ^~~ PreLoader.c:79:25: note: (near initialization for ‘(anonymous)[1]’) PreLoader.c:80:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 80 | L"It should be called loader.efi (in the current directory)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PreLoader.c:80:25: note: (near initialization for ‘(anonymous)[2]’) PreLoader.c:81:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 81 | L"Please enrol its hash and try again", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PreLoader.c:81:25: note: (near initialization for ‘(anonymous)[3]’) PreLoader.c:82:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 82 | L"", | ^~~ PreLoader.c:82:25: note: (near initialization for ‘(anonymous)[4]’) PreLoader.c:83:25: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 83 | L"I will now execute HashTool for you to do this", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PreLoader.c:83:25: note: (near initialization for ‘(anonymous)[5]’) PreLoader.c:94:37: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 94 | StrCpy(buf, L"Failed to start backup programme "); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from PreLoader.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src PreLoader.c:106:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 106 | L"loader is still giving a security error", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PreLoader.c:106:33: note: (near initialization for ‘(anonymous)[0]’) PreLoader.c:109:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 109 | L"Start HashTool", | ^~~~~~~~~~~~~~~~~ PreLoader.c:109:33: note: (near initialization for ‘(anonymous)[0]’) PreLoader.c:110:33: warning: initialization of ‘CHAR16 *’ {aka ‘short unsigned int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types] 110 | L"Exit", | ^~~~~~~ PreLoader.c:110:33: note: (near initialization for ‘(anonymous)[1]’) PreLoader.c:122:31: warning: passing argument 1 of ‘console_error’ from incompatible pointer type [-Wincompatible-pointer-types] 122 | console_error(L"Failed to uninstall security policy. Platform needs rebooting", status); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int * In file included from PreLoader.c:11: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/console.h:16:23: note: expected ‘CHAR16 *’ {aka ‘short unsigned int *’} but argument is of type ‘int *’ 16 | console_error(CHAR16 *err, EFI_STATUS); | ~~~~~~~~^~~ PreLoader.c:131:29: warning: passing argument 2 of ‘StrCpy’ from incompatible pointer type [-Wincompatible-pointer-types] 131 | StrCpy(buf, L"Failed to start "); | ^~~~~~~~~~~~~~~~~~~ | | | int * In file included from PreLoader.c:9: /usr/include/efi/efilib.h:337:25: note: expected ‘const CHAR16 *’ {aka ‘const short unsigned int *’} but argument is of type ‘int *’ 337 | IN CONST CHAR16 *Src ld -nostdlib -L /usr/lib64 -shared -Bsymbolic /usr/lib64/gnuefi/crt0-efi-x86_64.o -L /usr/lib64/gnuefi -L /usr/lib -L /usr/lib64 -T elf_x86_64_efi.lds PreLoader.o lib/lib-efi.a -o PreLoader.so -lefi -lgnuefi /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/libgcc.a # check we have no undefined symbols nm -D PreLoader.so | grep ' U ' && exit 1 || exit 0 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \ -j .reloc --target=efi-app-x86_64 PreLoader.so PreLoader.efi sbsign --key DB.key --cert DB.crt --output PreLoader-signed.efi PreLoader.efi warning: data remaining[88576 vs 101336]: gaps between PE/COFF sections? Signing Unsigned original image cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c sig-list-to-certs.c -o sig-list-to-certs.o cc -o sig-list-to-certs sig-list-to-certs.o lib/lib.a -lcrypto cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c efi-readvar.c -o efi-readvar.o cc -o efi-readvar efi-readvar.o lib/lib.a -lcrypto /usr/bin/ld: lib/lib.a(kernel_efivars.o): in function `kernel_variable_init': kernel_efivars.c:(.text+0x51): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp' cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c efi-updatevar.c -o efi-updatevar.o cc -o efi-updatevar efi-updatevar.o lib/lib.a -lcrypto /usr/bin/ld: lib/lib.a(kernel_efivars.o): in function `kernel_variable_init': kernel_efivars.c:(.text+0x51): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp' cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c cert-to-efi-hash-list.c -o cert-to-efi-hash-list.o cc -o cert-to-efi-hash-list cert-to-efi-hash-list.o lib/lib.a -lcrypto cc -I/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -std=gnu89 -O2 -fPIC -DCONFIG_x86_64 -c flash-var.c -o flash-var.o cc -o flash-var flash-var.o lib/lib.a help2man --no-info -i doc/cert-to-efi-hash-list.1.in -o doc/cert-to-efi-hash-list.1 ./cert-to-efi-hash-list help2man --no-info -i doc/cert-to-efi-sig-list.1.in -o doc/cert-to-efi-sig-list.1 ./cert-to-efi-sig-list help2man --no-info -i doc/efi-readvar.1.in -o doc/efi-readvar.1 ./efi-readvar help2man --no-info -i doc/efi-updatevar.1.in -o doc/efi-updatevar.1 ./efi-updatevar help2man --no-info -i doc/hash-to-efi-sig-list.1.in -o doc/hash-to-efi-sig-list.1 ./hash-to-efi-sig-list help2man --no-info -i doc/sig-list-to-certs.1.in -o doc/sig-list-to-certs.1 ./sig-list-to-certs help2man --no-info -i doc/sign-efi-sig-list.1.in -o doc/sign-efi-sig-list.1 ./sign-efi-sig-list > noPK.esl ./sign-efi-sig-list -t "2022-06-13 00:13:56" -c PK.crt -k PK.key PK noPK.esl noPK.auth Timestamp is 2022-6-13 00:13:56 Authentication Payload size 44 Signature of size 1148 Signature at: 40 openssl req -new -x509 -newkey rsa:2048 -subj "/CN=DB1/" -keyout DB1.key -out DB1.crt -days 3650 -nodes -sha256 Generating a RSA private key .........................................................+++++ .......+++++ writing new private key to 'DB1.key' ----- ./cert-to-efi-sig-list -g 11111111-2222-3333-4444-123456789abc DB1.crt DB1.esl ./sign-efi-sig-list -c KEK.crt -k KEK.key db DB1.esl DB1.auth Timestamp is 2022-6-13 00:13:55 Authentication Payload size 857 Signature of size 1151 Signature at: 40 openssl req -new -x509 -newkey rsa:2048 -subj "/CN=DB2/" -keyout DB2.key -out DB2.crt -days 3650 -nodes -sha256 Generating a RSA private key ..............+++++ ...................................+++++ writing new private key to 'DB2.key' ----- ./cert-to-efi-sig-list -g 11111111-2222-3333-4444-123456789abc DB2.crt DB2.esl ./sign-efi-sig-list -c KEK.crt -k KEK.key db DB2.esl DB2.auth Timestamp is 2022-6-13 00:13:55 Authentication Payload size 857 Signature of size 1151 Signature at: 40 ./cert-to-efi-sig-list -g 77FA9ABD-0359-4D32-BD60-28F4E78F784B ms-uefi.crt ms-uefi.esl ./sign-efi-sig-list -c KEK.crt -k KEK.key db ms-uefi.esl ms-uefi.auth Timestamp is 2022-6-13 00:13:55 Authentication Payload size 1644 Signature of size 1151 Signature at: 40 ./cert-to-efi-sig-list -g 77FA9ABD-0359-4D32-BD60-28F4E78F784B ms-kek.crt ms-kek.esl ./sign-efi-sig-list -c KEK.crt -k KEK.key db ms-kek.esl ms-kek.auth Timestamp is 2022-6-13 00:13:55 Authentication Payload size 1604 Signature of size 1151 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key PK PK.esl PK-update.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 855 Signature of size 1148 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key KEK KEK.esl KEK-update.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 861 Signature of size 1148 Signature at: 40 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key db DB.esl DB-update.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 855 Signature of size 1151 Signature at: 40 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key db DB1.esl DB1-update.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 857 Signature of size 1151 Signature at: 40 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key db DB2.esl DB2-update.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 857 Signature of size 1151 Signature at: 40 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key db ms-uefi.esl ms-uefi-update.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 1644 Signature of size 1151 Signature at: 40 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key db ms-kek.esl ms-kek-update.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 1604 Signature of size 1151 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key PK PK.esl PK-pkupdate.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 855 Signature of size 1148 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key KEK KEK.esl KEK-pkupdate.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 861 Signature of size 1148 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key db DB.esl DB-pkupdate.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 855 Signature of size 1148 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key db DB1.esl DB1-pkupdate.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 857 Signature of size 1148 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key db DB2.esl DB2-pkupdate.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 857 Signature of size 1148 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key db ms-uefi.esl ms-uefi-pkupdate.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 1644 Signature of size 1148 Signature at: 40 ./sign-efi-sig-list -a -c PK.crt -k PK.key db ms-kek.esl ms-kek-pkupdate.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 1604 Signature of size 1148 Signature at: 40 ./cert-to-efi-sig-list PK.crt PK-blacklist.esl ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx PK-blacklist.esl PK-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 859 Signature of size 1151 Signature at: 40 ./cert-to-efi-sig-list KEK.crt KEK-blacklist.esl ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx KEK-blacklist.esl KEK-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 861 Signature of size 1151 Signature at: 40 ./cert-to-efi-sig-list DB.crt DB-blacklist.esl ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx DB-blacklist.esl DB-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 859 Signature of size 1151 Signature at: 40 ./cert-to-efi-sig-list DB1.crt DB1-blacklist.esl ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx DB1-blacklist.esl DB1-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 861 Signature of size 1151 Signature at: 40 ./cert-to-efi-sig-list DB2.crt DB2-blacklist.esl ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx DB2-blacklist.esl DB2-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 861 Signature of size 1151 Signature at: 40 ./cert-to-efi-sig-list ms-uefi.crt ms-uefi-blacklist.esl ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx ms-uefi-blacklist.esl ms-uefi-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 1648 Signature of size 1151 Signature at: 40 ./cert-to-efi-sig-list ms-kek.crt ms-kek-blacklist.esl ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx ms-kek-blacklist.esl ms-kek-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 1608 Signature of size 1151 Signature at: 40 ./cert-to-efi-hash-list PK.crt PK-hash-blacklist.esl TimeOfRevocation is 0-0-0 00:00:00 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx PK-hash-blacklist.esl PK-hash-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 140 Signature of size 1151 Signature at: 40 ./cert-to-efi-hash-list KEK.crt KEK-hash-blacklist.esl TimeOfRevocation is 0-0-0 00:00:00 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx KEK-hash-blacklist.esl KEK-hash-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 140 Signature of size 1151 Signature at: 40 ./cert-to-efi-hash-list DB.crt DB-hash-blacklist.esl TimeOfRevocation is 0-0-0 00:00:00 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx DB-hash-blacklist.esl DB-hash-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 140 Signature of size 1151 Signature at: 40 ./cert-to-efi-hash-list DB1.crt DB1-hash-blacklist.esl TimeOfRevocation is 0-0-0 00:00:00 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx DB1-hash-blacklist.esl DB1-hash-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 140 Signature of size 1151 Signature at: 40 ./cert-to-efi-hash-list DB2.crt DB2-hash-blacklist.esl TimeOfRevocation is 0-0-0 00:00:00 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx DB2-hash-blacklist.esl DB2-hash-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 140 Signature of size 1151 Signature at: 40 ./cert-to-efi-hash-list ms-uefi.crt ms-uefi-hash-blacklist.esl TimeOfRevocation is 0-0-0 00:00:00 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx ms-uefi-hash-blacklist.esl ms-uefi-hash-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 140 Signature of size 1151 Signature at: 40 ./cert-to-efi-hash-list ms-kek.crt ms-kek-hash-blacklist.esl TimeOfRevocation is 0-0-0 00:00:00 ./sign-efi-sig-list -a -c KEK.crt -k KEK.key dbx ms-kek-hash-blacklist.esl ms-kek-hash-blacklist.auth Timestamp is 0-0-0 00:00:00 Authentication Payload size 140 Signature of size 1151 Signature at: 40 rm KEK-blacklist.esl SetNull.so KeyTool.o ms-kek.esl DB1.crt DB1.esl PK-hash-blacklist.esl ShimReplace.o ReadVars.o DB2-blacklist.esl ms-kek-blacklist.esl SetNull.o ms-uefi-hash-blacklist.esl HelloWorld.o ms-uefi-blacklist.esl UpdateVars.o KEK-hash-blacklist.esl DB-blacklist.esl HashTool.o DB1-hash-blacklist.esl ms-uefi.esl DB2.esl Loader.o DB2.crt ms-kek-hash-blacklist.esl PK-blacklist.esl DB2-hash-blacklist.esl DB-hash-blacklist.esl DB1-blacklist.esl make -C lib lib-efi.a make[1]: Entering directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib' make[1]: 'lib-efi.a' is up to date. make[1]: Leaving directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib' make -C lib lib.a make[1]: Entering directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib' make[1]: 'lib.a' is up to date. make[1]: Leaving directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib' make -C lib/asn1 libasn1-efi.a make[1]: Entering directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib/asn1' make[1]: 'libasn1-efi.a' is up to date. make[1]: Leaving directory '/usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2/lib/asn1' install -m 755 -d /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/man/man1 install -m 644 doc/cert-to-efi-hash-list.1 doc/cert-to-efi-sig-list.1 doc/efi-readvar.1 doc/efi-updatevar.1 doc/hash-to-efi-sig-list.1 doc/sig-list-to-certs.1 doc/sign-efi-sig-list.1 /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/man/man1 install -m 755 -d /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/share/efitools/efi install -m 755 HelloWorld.efi LockDown.efi Loader.efi ReadVars.efi UpdateVars.efi KeyTool.efi HashTool.efi SetNull.efi ShimReplace.efi PreLoader.efi /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/share/efitools/efi install -m 755 -d /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/bin install -m 755 cert-to-efi-sig-list sig-list-to-certs sign-efi-sig-list hash-to-efi-sig-list efi-readvar efi-updatevar cert-to-efi-hash-list flash-var /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/bin install -m 755 mkusb.sh /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/bin/efitool-mkusb install -m 755 -d /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/share/efitools install -m 644 README COPYING /usr/src/slapt-src-x86_64/system/efitools/package-efitools/usr/share/efitools Slackware package maker, version 3.14159265. Searching for symbolic links: No symbolic links were found, so we won't make an installation script. You can make your own later in ./install/doinst.sh and rebuild the package if you like. This next step is optional - you can set the directories in your package to some sane permissions. If any of the directories in your package have special permissions, then DO NOT reset them here! Would you like to reset all directory permissions to 755 (drwxr-xr-x) and directory ownerships to root.root ([y]es, [n]o)? n Creating Slackware package: /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2-x86_64-1salix15.0.txz ./ install/ install/slack-desc usr/ usr/bin/ usr/bin/cert-to-efi-hash-list usr/bin/cert-to-efi-sig-list usr/bin/efi-readvar usr/bin/efi-updatevar usr/bin/efitool-mkusb usr/bin/flash-var usr/bin/hash-to-efi-sig-list usr/bin/sig-list-to-certs usr/bin/sign-efi-sig-list usr/doc/ usr/doc/efitools-1.9.2/ usr/doc/efitools-1.9.2/COPYING usr/doc/efitools-1.9.2/README usr/doc/efitools-1.9.2/efitools.SlackBuild usr/man/ usr/man/man1/ usr/man/man1/cert-to-efi-hash-list.1.gz usr/man/man1/cert-to-efi-sig-list.1.gz usr/man/man1/efi-readvar.1.gz usr/man/man1/efi-updatevar.1.gz usr/man/man1/hash-to-efi-sig-list.1.gz usr/man/man1/sig-list-to-certs.1.gz usr/man/man1/sign-efi-sig-list.1.gz usr/share/ usr/share/efitools/ usr/share/efitools/efi/ usr/share/efitools/efi/HashTool.efi usr/share/efitools/efi/HelloWorld.efi usr/share/efitools/efi/KeyTool.efi usr/share/efitools/efi/Loader.efi usr/share/efitools/efi/LockDown.efi usr/share/efitools/efi/PreLoader.efi usr/share/efitools/efi/ReadVars.efi usr/share/efitools/efi/SetNull.efi usr/share/efitools/efi/ShimReplace.efi usr/share/efitools/efi/UpdateVars.efi Slackware package /usr/src/slapt-src-x86_64/system/efitools/efitools-1.9.2-x86_64-1salix15.0.txz created. Installing package efitools-1.9.2-x86_64-1salix15.0... | efitools (Tools for manipulating UEFI secure boot platforms) | | efitools is a set of tools for manipulating EFI secure boot platforms. | | | | | | | | | |