Tags: Network, Programming, Wireless
If you've ever tried porting wpa_supplicant to a different operating system, you probably have come across this link on the wpa_supplicant documentation page: Porting to different target boards and operating systems. While it gives a good heads up, the end section describes the C files needed to build an initial compiling version from where to start building the operating support.
cc -o wpa_supplicant config.c eloop.c common.c md5.c rc4.c sha1.c \ config_none.c l2_packet_none.c tls_none.c wpa.c preauth.c \ aes_wrap.c wpa_supplicant.c events.c main_none.c drivers.c
This seems to be a bit outdated. The actual list should be:
cc -o wpa_supplicant config.c common.c md5.c sha1.c crypto_openssl.c \ config_none.c l2_packet_none.c tls_none.c wpa.c preauth.c \ wpa_supplicant.c events.c main_none.c drivers.c wpa_debug.c \ os_none.c sha1-pbkdf2.c wpabuf.c eloop_none.c wpa_common.c \ wpa_ie.c aes-unwrap.c blacklist.c scan.c notify.c bss.c sme.c \ wpas_glue.c eap_register.c ieee802_11_common.c
This also should have a couple of defines set in your build system:
There is one more issue; the file "eloop_none.c" has a couple of function prototypes which do not match the ones defined in the header. Change all occurrences of:
void (*handler)(int sock, void *eloop_ctx, void *sock_ctx)
in the function arguments to:
I just uncommented the actual use of that handler in the functions for now. We'll need to port it anyway...
At this point, the initial bits of wpa_supplicant compile and the actual work can start.