Trying to compile mktplinkfw, installed the dependencies, went through the same steps as the post from last year with a very similar problem. His solution didn't work for me. I'm getting this when running gcc -Os mktplinkfw.c mktplinkfw-lib.c md5.c -o mktplinkfw
mktplinkfw.c: In function ‘fill_header’:
mktplinkfw.c:412:34: warning: implicit declaration of function ‘bswap_32’ [-Wimplicit-function-declaration]
412 | hdr->kernel_la = bswap_32(hdr->kernel_la);
| ^~~~~~~~
In file included from mktplinkfw.c:27:
mktplinkfw.c: At top level:
mktplinkfw-lib.h:61:13: warning: inline function ‘inspect_fw_pmd5sum’ declared but never defined
61 | inline void inspect_fw_pmd5sum(const char *label, const uint8_t *val, const char *text);
| ^~~~~~~~~~~~~~~~~~
mktplinkfw-lib.h:60:13: warning: inline function ‘inspect_fw_phexdec’ declared but never defined
60 | inline void inspect_fw_phexdec(const char *label, uint32_t val);
| ^~~~~~~~~~~~~~~~~~
mktplinkfw-lib.h:59:13: warning: inline function ‘inspect_fw_phex’ declared but never defined
59 | inline void inspect_fw_phex(const char *label, uint32_t val);
| ^~~~~~~~~~~~~~~
mktplinkfw-lib.h:58:13: warning: inline function ‘inspect_fw_pstr’ declared but never defined
58 | inline void inspect_fw_pstr(const char *label, const char *str);
| ^~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccK4fYsa.o: in function `fill_header':
mktplinkfw.c:(.text+0x1cf): undefined reference to `bswap_32'
/usr/bin/ld: mktplinkfw.c:(.text+0x1dc): undefined reference to `bswap_32'
/usr/bin/ld: /tmp/ccK4fYsa.o: in function `main':
mktplinkfw.c:(.text.startup+0x678): undefined reference to `inspect_fw_pstr'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x688): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x6ce): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x732): undefined reference to `inspect_fw_pmd5sum'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x753): undefined reference to `inspect_fw_pmd5sum'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x764): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x777): undefined reference to `inspect_fw_pmd5sum'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x788): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x7a0): undefined reference to `inspect_fw_pstr'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x7ae): undefined reference to `inspect_fw_pstr'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x7bd): undefined reference to `inspect_fw_phex'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x7cc): undefined reference to `inspect_fw_phex'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x7db): undefined reference to `inspect_fw_phex'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x7f7): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x809): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x818): undefined reference to `inspect_fw_phex'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x827): undefined reference to `inspect_fw_phex'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x839): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x84b): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x85d): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x86f): undefined reference to `inspect_fw_phexdec'
/usr/bin/ld: mktplinkfw.c:(.text.startup+0x87e): undefined reference to `inspect_fw_phexdec'
collect2: error: ld returned 1 exit status
Any idea what I am missing?
Thank you.
Fred