1 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
7 CHOST
:= $(shell gcc
-dumpmachine
)
8 HOST_ARCH
:= $(firstword $(subst -, ,$(CHOST
)))
10 CBUILD
:= $(subst -gcc
,,$(lastword
$(subst /, ,$(firstword $(wildcard $(foreach bindir,$(subst :, ,$(PATH
)),$(bindir)/$(ARCH
)-*-gcc
))))))
12 $(error The toolchain for
$(ARCH
) is not installed
)
16 ARCH
:= $(firstword $(subst -, ,$(CBUILD
)))
19 # Set these from the environment to override
20 KERNEL_PATH ?
= $(PWD
)/..
/..
/..
/..
/..
21 BUILD_PATH ?
= $(PWD
)/build
/$(ARCH
)
22 DISTFILES_PATH ?
= $(PWD
)/distfiles
25 MIRROR
:= https
://download.wireguard.com
/qemu-test
/distfiles
/
29 # variable name, tarball project name, version, tarball extension, default URI base
32 $(1)_NAME
:= $(2)-$$($(1)_VERSION
)
33 $(1)_TAR
:= $(DISTFILES_PATH
)/$$($(1)_NAME
)$(4)
34 $(1)_PATH
:= $(BUILD_PATH
)/$$($(1)_NAME
)
35 $(call file_download
,$$($(1)_NAME
)$(4),$(5),$(6))
38 define file_download
=
39 $(DISTFILES_PATH
)/$(1):
40 mkdir
-p
$(DISTFILES_PATH
)
41 flock
-x
$$@.lock
-c
'[ -f $$@ ] && exit 0; wget -O $$@.tmp $(MIRROR)$(1) || wget -O $$@.tmp $(2)$(1) || rm -f $$@.tmp; [ -f $$@.tmp ] || exit 1; if echo "$(3) $$@.tmp" | sha256sum -c -; then mv $$@.tmp $$@; else rm -f $$@.tmp; exit 71; fi'
44 $(eval
$(call tar_download
,MUSL
,musl
,1.2.0,.
tar.gz
,https
://musl.libc.org
/releases
/,c6de7b191139142d3f9a7b5b702c9cae1b5ee6e7f57e582da9328629408fd4e8
))
45 $(eval
$(call tar_download
,IPERF
,iperf
,3.7,.
tar.gz
,https
://downloads.es.net
/pub
/iperf
/,d846040224317caf2f75c843d309a950a7db23f9b44b94688ccbe557d6d1710c
))
46 $(eval
$(call tar_download
,BASH
,bash
,5.0,.
tar.gz
,https
://ftp.gnu.org
/gnu
/bash
/,b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d
))
47 $(eval
$(call tar_download
,IPROUTE2
,iproute2
,5.6.0,.
tar.xz
,https
://www.kernel.org
/pub
/linux
/utils
/net
/iproute2
/,1b5b0e25ce6e23da7526ea1da044e814ad85ba761b10dd29c2b027c056b04692
))
48 $(eval
$(call tar_download
,IPTABLES
,iptables
,1.8.4,.
tar.bz2
,https
://www.netfilter.org
/projects
/iptables
/files
/,993a3a5490a544c2cbf2ef15cf7e7ed21af1845baf228318d5c36ef8827e157c
))
49 $(eval
$(call tar_download
,NMAP
,nmap
,7.80,.
tar.bz2
,https
://nmap.org
/dist/,fcfa5a0e42099e12e4bf7a68ebe6fde05553383a682e816a7ec9256ab4773faa
))
50 $(eval
$(call tar_download
,IPUTILS
,iputils
,s20190709
,.
tar.gz
,https
://github.com
/iputils
/iputils
/archive
/s20190709.
tar.gz
/#,a15720dd741d7538dd2645f9f516d193636ae4300ff7dbc8bfca757bf166490a))
51 $(eval
$(call tar_download
,WIREGUARD_TOOLS
,wireguard-tools
,1.0.20200206,.
tar.xz
,https
://git.zx2c4.com
/wireguard-tools
/snapshot
/,f5207248c6a3c3e3bfc9ab30b91c1897b00802ed861e1f9faaed873366078c64
))
53 KERNEL_BUILD_PATH
:= $(BUILD_PATH
)/kernel
$(if
$(findstring yes
,$(DEBUG_KERNEL
)),-debug
)
54 rwildcard
=$(foreach d
,$(wildcard $1*),$(call rwildcard
,$d/,$2) $(filter $(subst *,%,$2),$d))
55 WIREGUARD_SOURCES
:= $(call rwildcard
,$(KERNEL_PATH
)/drivers
/net
/wireguard
/,*)
57 export CFLAGS ?
= -O3
-pipe
59 export CPPFLAGS
:= -I
$(BUILD_PATH
)/include
61 ifeq ($(HOST_ARCH
),$(ARCH
))
62 CROSS_COMPILE_FLAG
:= --host
=$(CHOST
)
63 CFLAGS
+= -march
=native
66 $(info Cross compilation
: building for
$(CBUILD
) using
$(CHOST
))
67 CROSS_COMPILE_FLAG
:= --build
=$(CBUILD
) --host
=$(CHOST
)
68 export CROSS_COMPILE
=$(CBUILD
)-
69 STRIP
:= $(CBUILD
)-strip
71 ifeq ($(ARCH
),aarch64
)
74 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/arch
/arm64
/boot
/Image
75 ifeq ($(HOST_ARCH
),$(ARCH
))
76 QEMU_MACHINE
:= -cpu host
-machine virt
,gic_version
=host
,accel
=kvm
78 QEMU_MACHINE
:= -cpu cortex-a53
-machine virt
79 CFLAGS
+= -march
=armv8-a
-mtune
=cortex-a53
81 else ifeq ($(ARCH
),aarch64_be
)
84 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/arch
/arm64
/boot
/Image
85 ifeq ($(HOST_ARCH
),$(ARCH
))
86 QEMU_MACHINE
:= -cpu host
-machine virt
,gic_version
=host
,accel
=kvm
88 QEMU_MACHINE
:= -cpu cortex-a53
-machine virt
89 CFLAGS
+= -march
=armv8-a
-mtune
=cortex-a53
91 else ifeq ($(ARCH
),arm
)
94 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/arch
/arm
/boot
/zImage
95 ifeq ($(HOST_ARCH
),$(ARCH
))
96 QEMU_MACHINE
:= -cpu host
-machine virt
,gic_version
=host
,accel
=kvm
98 QEMU_MACHINE
:= -cpu cortex-a15
-machine virt
99 CFLAGS
+= -march
=armv7-a
-mtune
=cortex-a15
-mabi
=aapcs-linux
101 else ifeq ($(ARCH
),armeb
)
104 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/arch
/arm
/boot
/zImage
105 ifeq ($(HOST_ARCH
),$(ARCH
))
106 QEMU_MACHINE
:= -cpu host
-machine virt
,gic_version
=host
,accel
=kvm
108 QEMU_MACHINE
:= -cpu cortex-a15
-machine virt
109 CFLAGS
+= -march
=armv7-a
-mabi
=aapcs-linux
# We don't pass -mtune=cortex-a15 due to a compiler bug on big endian.
112 else ifeq ($(ARCH
),x86_64
)
114 KERNEL_ARCH
:= x86_64
115 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/arch
/x86
/boot
/bzImage
116 ifeq ($(HOST_ARCH
),$(ARCH
))
117 QEMU_MACHINE
:= -cpu host
-machine q35
,accel
=kvm
119 QEMU_MACHINE
:= -cpu Skylake-Server
-machine q35
120 CFLAGS
+= -march
=skylake-avx512
122 else ifeq ($(ARCH
),i686
)
125 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/arch
/x86
/boot
/bzImage
126 ifeq ($(subst x86_64
,i686
,$(HOST_ARCH
)),$(ARCH
))
127 QEMU_MACHINE
:= -cpu host
-machine q35
,accel
=kvm
129 QEMU_MACHINE
:= -cpu coreduo
-machine q35
130 CFLAGS
+= -march
=prescott
132 else ifeq ($(ARCH
),mips64
)
135 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/vmlinux
136 ifeq ($(HOST_ARCH
),$(ARCH
))
137 QEMU_MACHINE
:= -cpu host
-machine malta
,accel
=kvm
140 QEMU_MACHINE
:= -cpu MIPS64R2-generic
-machine malta
-smp
1
141 CFLAGS
+= -march
=mips64r2
-EB
143 else ifeq ($(ARCH
),mips64el
)
144 QEMU_ARCH
:= mips64el
146 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/vmlinux
147 ifeq ($(HOST_ARCH
),$(ARCH
))
148 QEMU_MACHINE
:= -cpu host
-machine malta
,accel
=kvm
151 QEMU_MACHINE
:= -cpu MIPS64R2-generic
-machine malta
-smp
1
152 CFLAGS
+= -march
=mips64r2
-EL
154 else ifeq ($(ARCH
),mips
)
157 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/vmlinux
158 ifeq ($(HOST_ARCH
),$(ARCH
))
159 QEMU_MACHINE
:= -cpu host
-machine malta
,accel
=kvm
162 QEMU_MACHINE
:= -cpu
24Kf
-machine malta
-smp
1
163 CFLAGS
+= -march
=mips32r2
-EB
165 else ifeq ($(ARCH
),mipsel
)
168 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/vmlinux
169 ifeq ($(HOST_ARCH
),$(ARCH
))
170 QEMU_MACHINE
:= -cpu host
-machine malta
,accel
=kvm
173 QEMU_MACHINE
:= -cpu
24Kf
-machine malta
-smp
1
174 CFLAGS
+= -march
=mips32r2
-EL
176 else ifeq ($(ARCH
),powerpc64le
)
178 KERNEL_ARCH
:= powerpc
179 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/vmlinux
180 ifeq ($(HOST_ARCH
),$(ARCH
))
181 QEMU_MACHINE
:= -cpu host
,accel
=kvm
-machine pseries
183 QEMU_MACHINE
:= -machine pseries
185 CFLAGS
+= -mcpu
=powerpc64le
-mlong-double-64
186 else ifeq ($(ARCH
),powerpc
)
188 KERNEL_ARCH
:= powerpc
189 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/arch
/powerpc
/boot
/uImage
190 ifeq ($(HOST_ARCH
),$(ARCH
))
191 QEMU_MACHINE
:= -cpu host
,accel
=kvm
-machine ppce500
193 QEMU_MACHINE
:= -machine ppce500
195 CFLAGS
+= -mcpu
=powerpc
-mlong-double-64
-msecure-plt
196 else ifeq ($(ARCH
),m68k
)
199 KERNEL_BZIMAGE
:= $(KERNEL_BUILD_PATH
)/vmlinux
200 KERNEL_CMDLINE
:= $(shell sed
-n
's/CONFIG_CMDLINE=\(.*\)/\1/p' arch
/m68k.config
)
201 ifeq ($(HOST_ARCH
),$(ARCH
))
202 QEMU_MACHINE
:= -cpu host
,accel
=kvm
-machine q800
-smp
1 -append
$(KERNEL_CMDLINE
)
204 QEMU_MACHINE
:= -machine q800
-smp
1 -append
$(KERNEL_CMDLINE
)
207 $(error I only build
: x86_64
, i686
, arm
, armeb
, aarch64
, aarch64_be
, mips
, mipsel
, mips64
, mips64el
, powerpc64le
, powerpc
, m68k
)
210 REAL_CC
:= $(CBUILD
)-gcc
211 MUSL_CC
:= $(BUILD_PATH
)/musl-gcc
212 export CC
:= $(MUSL_CC
)
213 USERSPACE_DEPS
:= $(MUSL_CC
) $(BUILD_PATH
)/include/.installed
$(BUILD_PATH
)/include/linux
/.installed
215 build
: $(KERNEL_BZIMAGE
)
216 qemu
: $(KERNEL_BZIMAGE
)
217 rm -f
$(BUILD_PATH
)/result
218 timeout
--foreground
20m qemu-system-
$(QEMU_ARCH
) \
223 -m
$$(grep
-q CONFIG_DEBUG_KMEMLEAK
=y
$(KERNEL_BUILD_PATH
)/.config
&& echo
1G || echo
256M
) \
225 -serial file
:$(BUILD_PATH
)/result \
229 grep
-Fq success
$(BUILD_PATH
)/result
231 $(BUILD_PATH
)/init-cpio-spec.txt
:
232 mkdir
-p
$(BUILD_PATH
)
233 echo
"file /init $(BUILD_PATH)/init 755 0 0" > $@
234 echo
"file /init.sh $(PWD)/../netns.sh 755 0 0" >> $@
235 echo
"dir /dev 755 0 0" >> $@
236 echo
"nod /dev/console 644 0 0 c 5 1" >> $@
237 echo
"dir /bin 755 0 0" >> $@
238 echo
"file /bin/iperf3 $(IPERF_PATH)/src/iperf3 755 0 0" >> $@
239 echo
"file /bin/wg $(WIREGUARD_TOOLS_PATH)/src/wg 755 0 0" >> $@
240 echo
"file /bin/bash $(BASH_PATH)/bash 755 0 0" >> $@
241 echo
"file /bin/ip $(IPROUTE2_PATH)/ip/ip 755 0 0" >> $@
242 echo
"file /bin/ss $(IPROUTE2_PATH)/misc/ss 755 0 0" >> $@
243 echo
"file /bin/ping $(IPUTILS_PATH)/ping 755 0 0" >> $@
244 echo
"file /bin/ncat $(NMAP_PATH)/ncat/ncat 755 0 0" >> $@
245 echo
"file /bin/xtables-legacy-multi $(IPTABLES_PATH)/iptables/xtables-legacy-multi 755 0 0" >> $@
246 echo
"slink /bin/iptables xtables-legacy-multi 777 0 0" >> $@
247 echo
"slink /bin/ping6 ping 777 0 0" >> $@
248 echo
"dir /lib 755 0 0" >> $@
249 echo
"file /lib/libc.so $(MUSL_PATH)/lib/libc.so 755 0 0" >> $@
250 echo
"slink /lib/ld-linux.so.1 libc.so 777 0 0" >> $@
252 $(KERNEL_BUILD_PATH
)/.config
: kernel.config arch
/$(ARCH
).config
253 mkdir
-p
$(KERNEL_BUILD_PATH
)
254 cp kernel.config
$(KERNEL_BUILD_PATH
)/minimal.config
255 printf
'CONFIG_NR_CPUS=$(NR_CPUS)\nCONFIG_INITRAMFS_SOURCE="$(BUILD_PATH)/init-cpio-spec.txt"\n' >> $(KERNEL_BUILD_PATH
)/minimal.config
256 cat arch
/$(ARCH
).config
>> $(KERNEL_BUILD_PATH
)/minimal.config
257 $(MAKE
) -C
$(KERNEL_PATH
) O
=$(KERNEL_BUILD_PATH
) ARCH
=$(KERNEL_ARCH
) allnoconfig
258 cd
$(KERNEL_BUILD_PATH
) && ARCH
=$(KERNEL_ARCH
) $(KERNEL_PATH
)/scripts
/kconfig
/merge_config.sh
-n
$(KERNEL_BUILD_PATH
)/.config
$(KERNEL_BUILD_PATH
)/minimal.config
259 $(if
$(findstring yes
,$(DEBUG_KERNEL
)),cp debug.config
$(KERNEL_BUILD_PATH
) && cd
$(KERNEL_BUILD_PATH
) && ARCH
=$(KERNEL_ARCH
) $(KERNEL_PATH
)/scripts
/kconfig
/merge_config.sh
-n
$(KERNEL_BUILD_PATH
)/.config debug.config
,)
261 $(KERNEL_BZIMAGE
): $(KERNEL_BUILD_PATH
)/.config
$(BUILD_PATH
)/init-cpio-spec.txt
$(MUSL_PATH
)/lib
/libc.so
$(IPERF_PATH
)/src
/iperf3
$(IPUTILS_PATH
)/ping
$(BASH_PATH
)/bash
$(IPROUTE2_PATH
)/misc
/ss
$(IPROUTE2_PATH
)/ip
/ip
$(IPTABLES_PATH
)/iptables
/xtables-legacy-multi
$(NMAP_PATH
)/ncat
/ncat
$(WIREGUARD_TOOLS_PATH
)/src
/wg
$(BUILD_PATH
)/init ..
/netns.sh
$(WIREGUARD_SOURCES
)
262 $(MAKE
) -C
$(KERNEL_PATH
) O
=$(KERNEL_BUILD_PATH
) ARCH
=$(KERNEL_ARCH
) CROSS_COMPILE
=$(CROSS_COMPILE
)
264 $(BUILD_PATH
)/include/linux
/.installed
: |
$(KERNEL_BUILD_PATH
)/.config
265 $(MAKE
) -C
$(KERNEL_PATH
) O
=$(KERNEL_BUILD_PATH
) INSTALL_HDR_PATH
=$(BUILD_PATH
) ARCH
=$(KERNEL_ARCH
) CROSS_COMPILE
=$(CROSS_COMPILE
) headers_install
268 $(MUSL_PATH
)/lib
/libc.so
: $(MUSL_TAR
)
269 mkdir
-p
$(BUILD_PATH
)
270 flock
-s
$<.lock
tar -C
$(BUILD_PATH
) -xf
$<
271 cd
$(MUSL_PATH
) && CC
=$(REAL_CC
) .
/configure
--prefix=/ --disable-static
--build
=$(CBUILD
)
272 $(MAKE
) -C
$(MUSL_PATH
)
275 $(BUILD_PATH
)/include/.installed
: $(MUSL_PATH
)/lib
/libc.so
276 $(MAKE
) -C
$(MUSL_PATH
) DESTDIR
=$(BUILD_PATH
) install-headers
279 $(MUSL_CC
): $(MUSL_PATH
)/lib
/libc.so
280 sh
$(MUSL_PATH
)/tools
/musl-gcc.specs.sh
$(BUILD_PATH
)/include $(MUSL_PATH
)/lib
/lib
/ld-linux.so
.1 > $(BUILD_PATH
)/musl-gcc.specs
281 printf
'#!/bin/sh\nexec "$(REAL_CC)" --specs="$(BUILD_PATH)/musl-gcc.specs" "$$@"\n' > $(BUILD_PATH
)/musl-gcc
282 chmod
+x
$(BUILD_PATH
)/musl-gcc
284 $(IPERF_PATH
)/.installed
: $(IPERF_TAR
)
285 mkdir
-p
$(BUILD_PATH
)
286 flock
-s
$<.lock
tar -C
$(BUILD_PATH
) -xf
$<
287 sed
-i
'1s/^/#include <stdint.h>/' $(IPERF_PATH
)/src
/cjson.h
$(IPERF_PATH
)/src
/timer.h
288 sed
-i
-r
's/-p?g//g' $(IPERF_PATH
)/src
/Makefile
*
291 $(IPERF_PATH
)/src
/iperf3
: |
$(IPERF_PATH
)/.installed
$(USERSPACE_DEPS
)
292 cd
$(IPERF_PATH
) && CFLAGS
="$(CFLAGS) -D_GNU_SOURCE" .
/configure
--prefix=/ $(CROSS_COMPILE_FLAG
) --enable-static
--disable-shared
--with-openssl
=no
293 $(MAKE
) -C
$(IPERF_PATH
)
296 $(WIREGUARD_TOOLS_PATH
)/.installed
: $(WIREGUARD_TOOLS_TAR
)
297 mkdir
-p
$(BUILD_PATH
)
298 flock
-s
$<.lock
tar -C
$(BUILD_PATH
) -xf
$<
301 $(WIREGUARD_TOOLS_PATH
)/src
/wg
: |
$(WIREGUARD_TOOLS_PATH
)/.installed
$(USERSPACE_DEPS
)
302 $(MAKE
) -C
$(WIREGUARD_TOOLS_PATH
)/src wg
305 $(BUILD_PATH
)/init
: init.c |
$(USERSPACE_DEPS
)
306 mkdir
-p
$(BUILD_PATH
)
307 $(MUSL_CC
) -o
$@
$(CFLAGS
) $(LDFLAGS
) -std
=gnu11
$<
310 $(IPUTILS_PATH
)/.installed
: $(IPUTILS_TAR
)
311 mkdir
-p
$(BUILD_PATH
)
312 flock
-s
$<.lock
tar -C
$(BUILD_PATH
) -xf
$<
315 $(IPUTILS_PATH
)/ping
: |
$(IPUTILS_PATH
)/.installed
$(USERSPACE_DEPS
)
316 sed
-i
/atexit
/d
$(IPUTILS_PATH
)/ping.c
317 cd
$(IPUTILS_PATH
) && $(CC
) $(CFLAGS
) -std
=c99
-o
$@ ping.c ping_common.c ping6_common.c iputils_common.c
-D_GNU_SOURCE
-D
'IPUTILS_VERSION(f)=f' -lresolv
$(LDFLAGS
)
320 $(BASH_PATH
)/.installed
: $(BASH_TAR
)
321 mkdir
-p
$(BUILD_PATH
)
322 flock
-s
$<.lock
tar -C
$(BUILD_PATH
) -xf
$<
325 $(BASH_PATH
)/bash
: |
$(BASH_PATH
)/.installed
$(USERSPACE_DEPS
)
326 cd
$(BASH_PATH
) && .
/configure
--prefix=/ $(CROSS_COMPILE_FLAG
) --without-bash-malloc
--disable-debugger
--disable-help-builtin
--disable-history
--disable-multibyte
--disable-progcomp
--disable-readline
--disable-mem-scramble
327 $(MAKE
) -C
$(BASH_PATH
)
330 $(IPROUTE2_PATH
)/.installed
: $(IPROUTE2_TAR
)
331 mkdir
-p
$(BUILD_PATH
)
332 flock
-s
$<.lock
tar -C
$(BUILD_PATH
) -xf
$<
333 printf
'CC:=$(CC)\nPKG_CONFIG:=pkg-config\nTC_CONFIG_XT:=n\nTC_CONFIG_ATM:=n\nTC_CONFIG_IPSET:=n\nIP_CONFIG_SETNS:=y\nHAVE_ELF:=n\nHAVE_MNL:=n\nHAVE_BERKELEY_DB:=n\nHAVE_LATEX:=n\nHAVE_PDFLATEX:=n\nCFLAGS+=-DHAVE_SETNS\n' > $(IPROUTE2_PATH
)/config.mk
334 printf
'lib: snapshot\n\t$$(MAKE) -C lib\nip/ip: lib\n\t$$(MAKE) -C ip ip\nmisc/ss: lib\n\t$$(MAKE) -C misc ss\n' >> $(IPROUTE2_PATH
)/Makefile
337 $(IPROUTE2_PATH
)/ip
/ip
: |
$(IPROUTE2_PATH
)/.installed
$(USERSPACE_DEPS
)
338 $(MAKE
) -C
$(IPROUTE2_PATH
) PREFIX
=/ ip
/ip
341 $(IPROUTE2_PATH
)/misc
/ss
: |
$(IPROUTE2_PATH
)/.installed
$(USERSPACE_DEPS
)
342 $(MAKE
) -C
$(IPROUTE2_PATH
) PREFIX
=/ misc
/ss
345 $(IPTABLES_PATH
)/.installed
: $(IPTABLES_TAR
)
346 mkdir
-p
$(BUILD_PATH
)
347 flock
-s
$<.lock
tar -C
$(BUILD_PATH
) -xf
$<
348 sed
-i
-e
"/nfnetlink=[01]/s:=[01]:=0:" -e
"/nfconntrack=[01]/s:=[01]:=0:" $(IPTABLES_PATH
)/configure
351 $(IPTABLES_PATH
)/iptables
/xtables-legacy-multi
: |
$(IPTABLES_PATH
)/.installed
$(USERSPACE_DEPS
)
352 cd
$(IPTABLES_PATH
) && .
/configure
--prefix=/ $(CROSS_COMPILE_FLAG
) --enable-static
--disable-shared
--disable-nftables
--disable-bpf-compiler
--disable-nfsynproxy
--disable-libipq
--disable-connlabel
--with-kernel
=$(BUILD_PATH
)/include
353 $(MAKE
) -C
$(IPTABLES_PATH
)
356 $(NMAP_PATH
)/.installed
: $(NMAP_TAR
)
357 mkdir
-p
$(BUILD_PATH
)
358 flock
-s
$<.lock
tar -C
$(BUILD_PATH
) -xf
$<
361 $(NMAP_PATH
)/ncat
/ncat
: |
$(NMAP_PATH
)/.installed
$(USERSPACE_DEPS
)
362 cd
$(NMAP_PATH
) && .
/configure
--prefix=/ $(CROSS_COMPILE_FLAG
) --enable-static
--disable-shared
--without-ndiff
--without-zenmap
--without-nping
--with-libpcap
=included
--with-libpcre
=included
--with-libdnet
=included
--without-liblua
--with-liblinear
=included
--without-nmap-update
--without-openssl
--with-pcap
=linux
--without-libssh
363 $(MAKE
) -C
$(NMAP_PATH
)/libpcap
364 $(MAKE
) -C
$(NMAP_PATH
)/ncat
371 rm -rf
$(DISTFILES_PATH
)
373 menuconfig
: $(KERNEL_BUILD_PATH
)/.config
374 $(MAKE
) -C
$(KERNEL_PATH
) O
=$(KERNEL_BUILD_PATH
) ARCH
=$(KERNEL_ARCH
) CROSS_COMPILE
=$(CROSS_COMPILE
) menuconfig
376 .PHONY
: qemu build
clean distclean menuconfig