From: Matthias Fend <Matthias.Fend@wolfvision.net>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] Building hostapd for PTXdist and an ARM Target
Date: Tue, 7 May 2013 08:57:26 +0000 [thread overview]
Message-ID: <CC2A85E271C1FB479D9C17305347F69A10DACE@WOLFSERVER19.wolfvision-at.intra> (raw)
In-Reply-To: <CADj18OVJ+q0BcJwSi6g1y1=t7Kbybebvjgob1fB_05EyaLVw8A@mail.gmail.com>
Hi Pascal,
> Von: ptxdist-bounces@pengutronix.de [mailto:ptxdist-bounces@pengutronix.de] Im Auftrag von Pascal K
> Gesendet: Dienstag, 07. Mai 2013 10:18
> An: ptxdist@pengutronix.de
> Betreff: [ptxdist] Building hostapd for PTXdist and an ARM Target
>
> Hello all,
>
> I'am beginning to use PTXdist, so I followed the How to become a PTXdist Guru Manual to get started.
> But there is some information which I don't find/don't get.
>
> My task:
> -> Building hostapd-2.0.tar.gz for my ARM Cortex A8 target board
>
> So I tried to follow section 4.2.2 in the manual.
>
> $ ptxdist newpackage target
> edited the mandatory fields, added md5sum, selected the package in
> $ ptxdist menuconfig
> $ ptxdist get hostapd
> $ ptxdist extract hostapd
> $ ptxdist prepare hostapd
> and finally tried edited inside the hostapd folder the defconfig file to .config
> $ ptxdist compile hostapd
>
> now gives me the error that
>
> make[1]: Entering directory `/opt/PHYTEC_BSPs/phyCORE-AM335x-PD12.1.1/platform-phyCORE-AM335x/build-target/hostapd-2.0'
> make[1]: *** No targets specified and no makefile found. Stop.
> make[1]: Leaving directory `/opt/PHYTEC_BSPs/phyCORE-AM335x-PD12.1.1/platform-phyCORE-AM335x/build-target/hostapd-2.0'
> make: *** [/opt/PHYTEC_BSPs/phyCORE-AM335x-PD12.1.1/platform-phyCORE-AM335x/state/hostapd.compile] Error 2
>
>
> So I think I missed a step or a went with the wrong option at the beginning.
> Could someone give me an advice, that would be great!
>
>
> Best regards,
> Pascal
Here comes a patch which will add hostapd-2.0 to ptxdist. It's not yet finished and (most) probably not everything is working.
But maybe you can use it as starting point...
good luck,
~matthias
---
rules/hostapd.in | 411 ++++++++++++++++++++++++++++++++++++++++++++++++++++
rules/hostapd.make | 89 +++++++++++
2 files changed, 500 insertions(+), 0 deletions(-)
create mode 100644 rules/hostapd.in
create mode 100644 rules/hostapd.make
diff --git a/rules/hostapd.in b/rules/hostapd.in
new file mode 100644
index 0000000..78bef61
--- /dev/null
+++ b/rules/hostapd.in
@@ -0,0 +1,411 @@
+## SECTION=networking
+
+config HOSTAPD
+ bool
+ prompt "hostapd"
+ help
+ FIXME
+
+if HOSTAPD
+
+ config HOSTAPD_DRIVER_HOSTAP
+ bool
+ prompt "HOSTAP driver"
+ help
+ Driver interface for Host AP driver
+
+ config HOSTAPD_DRIVER_WIRED
+ bool
+ prompt "Wired driver"
+ help
+ Driver interface for wired authenticator
+
+ config HOSTAPD_DRIVER_NL80211
+ bool
+ prompt "NL80211 driver"
+ select LIBNL
+ help
+ Driver interface for drivers using the nl80211 kernel interface
+
+ config HOSTAPD_DRIVER_NONE
+ bool
+ prompt "no driver"
+ help
+ Driver interface for no driver (e.g., RADIUS server only)
+
+ config HOSTAPD_IAPP
+ bool
+ prompt "IEEE 802.11F/IAPP"
+ help
+ IEEE 802.11F/IAPP
+
+ config HOSTAPD_RSN_PREAUTH
+ bool
+ prompt "WPA2/IEEE 802.11i RSN pre-authentication"
+ help
+ WPA2/IEEE 802.11i RSN pre-authentication
+
+ config HOSTAPD_PEERKEY
+ bool
+ prompt "PeerKey handshake for Station to Station Link (IEEE 802.11e DLS)"
+ help
+ PeerKey handshake for Station to Station Link (IEEE 802.11e DLS)
+
+ config HOSTAPD_IEEE80211W
+ bool
+ prompt "IEEE 802.11w (management frame protection)"
+ help
+ IEEE 802.11w (management frame protection)
+ This version is an experimental implementation based on IEEE 802.11w/D1.0
+ draft and is subject to change since the standard has not yet been finalized.
+ Driver support is also needed for IEEE 802.11w.
+
+ config HOSTAPD_EAP
+ bool
+ prompt "Integrated EAP server"
+ help
+ Integrated EAP server
+
+ config HOSTAPD_EAP_MD5
+ bool
+ prompt "EAP-MD5 for the integrated EAP server"
+ help
+ EAP-MD5 for the integrated EAP server
+
+ config HOSTAPD_EAP_TLS
+ bool
+ prompt "EAP-TLS for the integrated EAP server"
+ help
+ EAP-TLS for the integrated EAP server
+
+ config HOSTAPD_EAP_MSCHAPV2
+ bool
+ prompt "EAP-MSCHAPv2 for the integrated EAP server"
+ help
+ EAP-MSCHAPv2 for the integrated EAP server
+
+ config HOSTAPD_EAP_PEAP
+ bool
+ prompt "EAP-PEAP for the integrated EAP server"
+ help
+ EAP-PEAP for the integrated EAP server
+
+ config HOSTAPD_EAP_GTC
+ bool
+ prompt "EAP-GTC for the integrated EAP server"
+ help
+ EAP-GTC for the integrated EAP server
+
+ config HOSTAPD_EAP_TTLS
+ bool
+ prompt "EAP-TTLS for the integrated EAP server"
+ help
+ EAP-TTLS for the integrated EAP server
+
+ config HOSTAPD_EAP_SIM
+ bool
+ prompt "EAP-SIM for the integrated EAP server"
+ help
+ EAP-SIM for the integrated EAP server
+
+ config HOSTAPD_EAP_AKA
+ bool
+ prompt "EAP-AKA for the integrated EAP server"
+ help
+ EAP-AKA for the integrated EAP server
+
+ config HOSTAPD_EAP_AKA_PRIME
+ bool
+ prompt "EAP-AKA' (AKA-Prime)"
+ help
+ EAP-AKA' (AKA-Prime) for the integrated EAP server
+ This requires CONFIG_EAP_AKA to be enabled, too.
+
+ config HOSTAPD_EAP_PAX
+ bool
+ prompt "EAP-PAX for the integrated EAP server"
+ help
+ EAP-PAX for the integrated EAP server
+
+ config HOSTAPD_EAP_PSK
+ bool
+ prompt "EAP-PSK for the integrated EAP server"
+ help
+ EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK)
+
+ config HOSTAPD_EAP_PWD
+ bool
+ prompt "EAP-pwd for the integrated EAP server"
+ help
+ EAP-pwd for the integrated EAP server (secure authentication with a password)
+
+ config HOSTAPD_EAP_SAKE
+ bool
+ prompt "EAP-SAKE for the integrated EAP server"
+ help
+ EAP-SAKE for the integrated EAP server
+
+ config HOSTAPD_EAP_GPSK
+ bool
+ prompt "EAP-GPSK for the integrated EAP server"
+ help
+ EAP-GPSK for the integrated EAP server
+
+ config HOSTAPD_EAP_GPSK_SHA256
+ bool
+ prompt "Include support for optional SHA256 cipher suite in EAP-GPSK"
+ help
+ Include support for optional SHA256 cipher suite in EAP-GPSK
+
+ config HOSTAPD_EAP_FAST
+ bool
+ prompt "EAP-FAST for the integrated EAP server"
+ help
+ EAP-FAST for the integrated EAP server
+ Note: Default OpenSSL package does not include support for all the
+ functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL,
+ the OpenSSL library must be patched (openssl-0.9.9-session-ticket.patch)
+ to add the needed functions.
+
+ config HOSTAPD_WPS
+ bool
+ prompt "Wi-Fi Protected Setup (WPS)"
+ help
+ Wi-Fi Protected Setup (WPS)
+
+ config HOSTAPD_WPS2
+ bool
+ prompt "Enable WSC 2.0 support"
+ help
+ Enable WSC 2.0 support
+
+ config HOSTAPD_WPS_UPNP
+ bool
+ prompt "Enable UPnP support for external WPS Registrars"
+ help
+ Enable UPnP support for external WPS Registrars
+
+ config HOSTAPD_WPS_NFC
+ bool
+ prompt "Enable WPS support with NFC config method"
+ help
+ Enable WPS support with NFC config method
+
+ config HOSTAPD_EAP_IKEV2
+ bool
+ prompt "EAP-IKEv2"
+ help
+ EAP-IKEv2
+
+ config HOSTAPD_EAP_TNC
+ bool
+ prompt "Trusted Network Connect (EAP-TNC)"
+ help
+ Trusted Network Connect (EAP-TNC)
+
+ config HOSTAPD_PKCS12
+ bool
+ prompt "PKCS#12 (PFX) support"
+ help
+ PKCS#12 (PFX) support (used to read private key and certificate file from
+ a file that usually has extension .p12 or .pfx)
+
+ config HOSTAPD_RADIUS_SERVER
+ bool
+ prompt "RADIUS authentication server"
+ help
+ RADIUS authentication server. This provides access to the integrated EAP
+ server from external hosts using RADIUS.
+
+ config HOSTAPD_IPV6
+ bool
+ prompt "Build IPv6 support for RADIUS operations"
+ help
+ Build IPv6 support for RADIUS operations
+
+ config HOSTAPD_IEEE80211R
+ bool
+ prompt "IEEE Std 802.11r-2008 (Fast BSS Transition)"
+ help
+ IEEE Std 802.11r-2008 (Fast BSS Transition)
+
+ config HOSTAPD_DRIVER_RADIUS_ACL
+ bool
+ prompt "Hostapd's IEEE 802.11 authentication (ACL)"
+ help
+ Use the hostapd's IEEE 802.11 authentication (ACL), but without
+ the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211)
+
+ config HOSTAPD_IEEE80211N
+ bool
+ prompt "IEEE 802.11n (High Throughput) support"
+ help
+ IEEE 802.11n (High Throughput) support
+
+ config HOSTAPD_WNM
+ bool
+ prompt "Wireless Network Management (IEEE Std 802.11v-2011) (EXPERIMENTAL)"
+ help
+ Wireless Network Management (IEEE Std 802.11v-2011)
+ Note: This is experimental and not complete implementation.
+
+ config HOSTAPD_IEEE80211AC
+ bool
+ prompt "IEEE 802.11ac (Very High Throughput) support"
+ help
+ IEEE 802.11ac (Very High Throughput) support
+
+ config HOSTAPD_NO_STDOUT_DEBUG
+ bool
+ prompt "Remove stdout debugging code"
+ help
+ Remove debugging code that is printing out debug messages to stdout.
+ This can be used to reduce the size of the hostapd considerably if debugging
+ code is not needed.
+
+ config HOSTAPD_DEBUG_FILE
+ bool
+ prompt "Log file support"
+ help
+ Add support for writing debug log to a file: -f /tmp/hostapd.log
+ Disabled by default.
+
+ config HOSTAPD_NO_ACCOUNTING
+ bool
+ prompt "Remove support for RADIUS accounting"
+ help
+ Remove support for RADIUS accounting
+
+ config HOSTAPD_NO_RADIUS
+ bool
+ prompt "Remove support for RADIUS"
+ help
+ Remove support for RADIUS
+
+ config HOSTAPD_NO_VLAN
+ bool
+ prompt "Remove support for VLANs"
+ help
+ Remove support for VLANs
+
+ config HOSTAPD_FULL_DYNAMIC_VLAN
+ bool
+ prompt "Fully dynamic VLAN support"
+ help
+ Enable support for fully dynamic VLANs. This enables hostapd to
+ automatically create bridge and VLAN interfaces if necessary.
+
+ config HOSTAPD_VLAN_NETLINK
+ bool
+ prompt "netlink-based kernel API for VLAN operations"
+ help
+ Use netlink-based kernel API for VLAN operations instead of ioctl()
+ Note: This requires libnl 3.1 or newer.
+
+ config HOSTAPD_NO_DUMP_STATE
+ bool
+ prompt "Remove SIGUSR1 state dump support"
+ help
+ Remove support for dumping state into a file on SIGUSR1 signal
+ This can be used to reduce binary size at the cost of disabling a debugging
+ option.
+
+ config HOSTAPD_WPA_TRACE
+ bool
+ prompt "Enable tracing code for developer debugging"
+ help
+ Enable tracing code for developer debugging
+ This tracks use of memory allocations and other registrations and reports
+ incorrect use with a backtrace of call (or allocation) location.
+
+ config HOSTAPD_NO_RANDOM_POOL
+ bool
+ prompt "Disabled hostapd's internal random pool"
+ help
+ hostapd depends on strong random number generation being available from the
+ operating system. os_get_random() function is used to fetch random data when
+ needed, e.g., for key generation. On Linux and BSD systems, this works by
+ reading /dev/urandom. It should be noted that the OS entropy pool needs to be
+ properly initialized before hostapd is started. This is important especially
+ on embedded devices that do not have a hardware random number generator and
+ may by default start up with minimal entropy available for random number
+ generation.
+
+ As a safety net, hostapd is by default trying to internally collect
+ additional entropy for generating random data to mix in with the data
+ fetched from the OS. This by itself is not considered to be very strong, but
+ it may help in cases where the system pool is not initialized properly.
+ However, it is very strongly recommended that the system pool is initialized
+ with enough entropy either by using hardware assisted random number
+ generator or by storing state over device reboots.
+
+ hostapd can be configured to maintain its own entropy store over restarts to
+ enhance random number generation. This is not perfect, but it is much more
+ secure than using the same sequence of random numbers after every reboot.
+ This can be enabled with -e<entropy file> command line option. The specified
+ file needs to be readable and writable by hostapd.
+
+ If the os_get_random() is known to provide strong random data (e.g., on
+ Linux/BSD, the board in question is known to have reliable source of random
+ data from /dev/urandom), the internal hostapd random pool can be disabled.
+ This will save some in binary size and CPU use. However, this should only be
+ considered for builds that are known to be used on devices that meet the
+ requirements described above.
+
+ config HOSTAPD_TLS
+ string
+ prompt "Select TLS implementation"
+ default "openssl"
+ help
+ Select TLS implementation
+ openssl = OpenSSL (default)
+ gnutls = GnuTLS
+ internal = Internal TLSv1 implementation (experimental)
+ none = Empty template
+
+ config HOSTAPD_TLSV11
+ bool
+ prompt "TLS v1.1"
+ help
+ TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1)
+ can be enabled to get a stronger construction of messages when block ciphers
+ are used.
+
+ config HOSTAPD_TLSV12
+ bool
+ prompt "TLS v1.2"
+ help
+ TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2)
+ can be enabled to enable use of stronger crypto algorithms.
+
+ config HOSTAPD_INTERNAL_LIBTOMMATH_FAST
+ bool
+ prompt "Internal LibTomMath"
+ help
+ At the cost of about 4 kB of additional binary size, the internal LibTomMath
+ can be configured to include faster routines for exptmod, sqr, and div to
+ speed up DH and RSA calculation considerably
+
+ config HOSTAPD_INTERWORKING
+ bool
+ prompt "Interworking (IEEE 802.11u)"
+ help
+ Interworking (IEEE 802.11u)
+ This can be used to enable functionality to improve interworking with
+ external networks.
+
+ config HOSTAPD_HS20
+ bool
+ prompt "Hotspot 2.0"
+ help
+ Hotspot 2.0
+
+ config HOSTAPD_SQLITE
+ bool
+ prompt "SQLite database support"
+ help
+ Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file
+
+endif
+
+
diff --git a/rules/hostapd.make b/rules/hostapd.make
new file mode 100644
index 0000000..0ca5dd5
--- /dev/null
+++ b/rules/hostapd.make
@@ -0,0 +1,89 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2013 by Matthias Fend <matthias.fend@wolfvision.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_HOSTAPD) += hostapd
+
+#
+# Paths and names
+#
+HOSTAPD_NAME := hostapd
+HOSTAPD_VERSION := 2.0
+HOSTAPD_MD5 := ba22e639bc57aa4035d2ea8ffa9bbbee
+HOSTAPD := $(HOSTAPD_NAME)-$(HOSTAPD_VERSION)
+HOSTAPD_SUFFIX := tar.gz
+HOSTAPD_URL := http://w1.fi/releases/$(HOSTAPD).$(HOSTAPD_SUFFIX)
+HOSTAPD_SOURCE := $(SRCDIR)/$(HOSTAPD).$(HOSTAPD_SUFFIX)
+HOSTAPD_DIR := $(BUILDDIR)/$(HOSTAPD)
+HOSTAPD_SUBDIR := $(HOSTAPD_NAME)
+HOSTAPD_CONFIG := $(BUILDDIR)/$(HOSTAPD)/$(HOSTAPD_SUBDIR)/.config
+HOSTAPD_LICENSE := BSD
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOSTAPD_PATH := PATH=$(CROSS_PATH)
+#HOSTAPD_CONF_TOOL := NO
+HOSTAPD_MAKE_ENV := \
+ $(CROSS_ENV) \
+ LIBDIR=/lib \
+ BINDIR=/sbin
+
+
+$(STATEDIR)/hostapd.prepare:
+ @$(call targetinfo)
+# # run 'make clean' as hostapd's build system does not recognize config changes
+ @-cd $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR) && \
+ $(HOSTAPD_MAKE_ENV) $(HOSTAPD_PATH) $(MAKE) clean
+
+ @echo "CC=$(CROSS_CC)" > $(HOSTAPD_CONFIG) && \
+ echo "CFLAGS += -I$(PTXDIST_SYSROOT_TARGET)/include" >> $(HOSTAPD_CONFIG) && \
+ echo "CFLAGS += -I$(PTXDIST_SYSROOT_TARGET)/usr/include" >> $(HOSTAPD_CONFIG) && \
+ echo "LDFLAGS += -L$(PTXDIST_SYSROOT_TARGET)/lib" >> $(HOSTAPD_CONFIG) && \
+ echo "LDFLAGS += -L$(PTXDIST_SYSROOT_TARGET)/usr/lib" >> $(HOSTAPD_CONFIG)
+
+ @grep -e PTXCONF_HOSTAPD_ $(PTXDIST_PTXCONFIG) | \
+ sed -e 's/PTXCONF_HOSTAPD_/CONFIG_/g' -e 's/\"//g' >> $(HOSTAPD_CONFIG)
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/hostapd.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, hostapd)
+ @$(call install_fixup, hostapd,PRIORITY,optional)
+ @$(call install_fixup, hostapd,SECTION,base)
+ @$(call install_fixup, hostapd,AUTHOR,"Matthias Fend <matthias.fend@wolfvision.com>")
+ @$(call install_fixup, hostapd,DESCRIPTION,missing)
+
+ @$(call install_copy, hostapd, 0, 0, 0755, $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/hostapd, /usr/bin/hostapd)
+
+ @$(call install_finish, hostapd)
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/hostapd.clean:
+ @$(call targetinfo)
+ @-cd $(HOSTAPD_DIR) && \
+ $(HOSTAPD_ENV) $(HOSTAPD_PATH) $(MAKE) clean
+ @$(call clean_pkg, HOSTAPD)
+
+# vim: syntax=make
--
1.7.0.4
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2013-05-07 8:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 8:17 Pascal K
2013-05-07 8:28 ` Juergen Beisert
2013-05-07 8:33 ` Pascal K
2013-05-07 8:39 ` Juergen Beisert
2013-05-07 8:51 ` Josef Holzmayr
2013-05-07 8:34 ` Josef Holzmayr
2013-05-07 8:57 ` Matthias Fend [this message]
2013-06-28 16:08 ` irfan rafique
2013-07-01 6:45 ` Matthias Fend
2013-07-01 7:14 ` Pascal K
2013-05-07 11:24 Pascal K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CC2A85E271C1FB479D9C17305347F69A10DACE@WOLFSERVER19.wolfvision-at.intra \
--to=matthias.fend@wolfvision.net \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox