genode/repos/dde_linux/ports/dde_linux.port
2014-12-05 11:00:15 +01:00

124 lines
3.8 KiB
Makefile

LICENSE := GPL
VERSION := 1
DOWNLOADS := dwc_otg.git usb.archive lxip.archive wifi.archive \
libnl.archive wpa_supplicant.archive
#
# Tools
#
$(call check_tool,flex)
$(call check_tool,bison)
FLEX = flex
YACC = bison
#
# The git checkout checks for the existence of SRC_DIR, which is created by the
# Linux extraction, therefore make sure to checkout the GIT sources first.
#
usb.archive: dwc_otg.git
#
# USB
#
SRC_DIR_USB := src/lib/usb
VERSION_USB := 3.14.5
URL(usb) := http://www.kernel.org/pub/linux/kernel/v3.x/linux-$(VERSION_USB).tar.gz
SHA(usb) := 675bb3446cbf0889d59a048f6af177ca0a7aacb5
DIR(usb) := $(SRC_DIR_USB)
TAR_OPT(usb) := --strip-components=1 --files-from $(REP_DIR)/usb.list
HASH_INPUT += $(REP_DIR)/usb.list
#
# Raspberry Pi USB controller
#
URL(dwc_otg) := https://github.com/nfeske/dwc_otg.git
REV(dwc_otg) := r2
DIR(dwc_otg) := $(SRC_DIR_USB)/drivers/usb/host/dwc_otg
#
# mac80211 stack, iwlwifi and iwslegacy sources
#
SRC_DIR_WIFI := src/lib/wifi
URL(wifi) := ${URL(usb)}
SHA(wifi) := ${SHA(usb)}
DIR(wifi) := $(SRC_DIR_WIFI)
TAR_OPT(wifi) := --strip-components=1 --files-from $(REP_DIR)/wifi.list
HASH_INPUT += $(REP_DIR)/wifi.list
#
# IP stack sources
#
SRC_DIR_LXIP := src/lib/lxip
VERSION_LXIP := 3.9
URL(lxip) := http://www.kernel.org/pub/linux/kernel/v3.x/linux-$(VERSION_LXIP).tar.gz
SHA(lxip) := 7979f0d670838d0552c7ede5cc06497b81dcd812
DIR(lxip) := $(SRC_DIR_LXIP)
TAR_OPT(lxip) := --strip-components=1 --files-from $(REP_DIR)/lxip.list
HASH_INPUT += $(REP_DIR)/lxip.list
# libnl sources
#
URL(libnl) := http://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz
SHA(libnl) := b7a4981f7edf7398256d35fd3c0b87bc84ae27d1
DIR(libnl) := src/lib/libnl
default: generate_libnl_files
generate_libnl_files: $(DOWNLOADS)
@$(MSG_PREFIX)"generate libnl files "
$(VERBOSE)$(FLEX) --header-file=${DIR(libnl)}/lib/route/pktloc_grammar.h \
-o ${DIR(libnl)}/lib/route/pktloc_grammar.c \
${DIR(libnl)}/lib/route/pktloc_grammar.l
$(VERBOSE)$(YACC) -d -o ${DIR(libnl)}/lib/route/pktloc_syntax.c \
${DIR(libnl)}/lib/route/pktloc_syntax.y
$(VERBOSE)$(FLEX) --header-file=${DIR(libnl)}/lib/route/cls/ematch_grammar.h \
-o ${DIR(libnl)}/lib/route/cls/ematch_grammar.c \
${DIR(libnl)}/lib/route/cls/ematch_grammar.l
$(VERBOSE)$(YACC) -d -o ${DIR(libnl)}/lib/route/cls/ematch_syntax.c \
${DIR(libnl)}/lib/route/cls/ematch_syntax.y
#
# wpa_supplicant sources
#
URL(wpa_supplicant) := http://w1.fi/releases/wpa_supplicant-2.2.tar.gz
SHA(wpa_supplicant) := 0c2ff4fd2e2f6325147cca0357d6c9f524efa26a
DIR(wpa_supplicant) := src/app/wpa_supplicant
#
# Patches
#
PATCHES := $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/*.patch)))
# USB
USB_OPT = -p1 -d$(SRC_DIR_USB)
PATCH_OPT(patches/usb_ax88179.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_csum.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_evdev.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_mem.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_usbnet.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_xchi-quirks.patch) := $(USB_OPT)
#IP stack
LXIP_OPT = -p1 -d$(SRC_DIR_LXIP)
PATCH_OPT(patches/lxip_icmp.patch) := $(LXIP_OPT)
PATCH_OPT(patches/lxip_ip_config.patch) := $(LXIP_OPT)
PATCH_OPT(patches/lxip_skbuff.patch) := $(LXIP_OPT)
PATCH_OPT(patches/lxip_tcp.patch) := $(LXIP_OPT)
PATCH_OPT(patches/lxip_netlink.patch) := $(LXIP_OPT)
# WIFI
WIFI_OPT = -p1 -d$(SRC_DIR_WIFI)
PATCH_OPT(patches/wifi.patch) := $(WIFI_OPT)
PATCH_OPT(patches/wifi_crypto.patch) := $(WIFI_OPT)
PATCH_OPT(patches/wifi_mem.patch) := $(WIFI_OPT)
# libnl
PATCH_OPT(patches/libnl.patch) := -p1 -d ${DIR(libnl)}
# WPA supplicant
PATCH_OPT(patches/wpa_supplicant.patch) := -p1 -d ${DIR(wpa_supplicant)}
# vi: set ft=make :