aboutsummaryrefslogtreecommitdiffstats
path: root/target/x86/syslinux/syslinux.mk
blob: a1f5d7f8e2c0286f992c0a6a2eb4e21304d1cb47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SYSLINUX_SUPPORTED_ARCH=n
ifeq ($(ARCH),i386)
SYSLINUX_SUPPORTED_ARCH=y
endif
ifeq ($(ARCH),i486)
SYSLINUX_SUPPORTED_ARCH=y
endif
ifeq ($(ARCH),i586)
SYSLINUX_SUPPORTED_ARCH=y
endif
ifeq ($(ARCH),i686)
SYSLINUX_SUPPORTED_ARCH=y
endif
ifeq ($(ARCH),x86_64)
SYSLINUX_SUPPORTED_ARCH=y
endif
ifeq ($(SYSLINUX_SUPPORTED_ARCH),y)

#############################################################
#
# syslinux to make target msdos/iso9660 filesystems bootable
#
#############################################################

SYSLINUX_VERSION:=3.31
SYSLINUX_DIR=$(BUILD_DIR)/syslinux-$(SYSLINUX_VERSION)
SYSLINUX_DIR2=$(TOOL_BUILD_DIR)/syslinux-$(SYSLINUX_VERSION)
SYSLINUX_SOURCE=syslinux-$(SYSLINUX_VERSION).tar.bz2
SYSLINUX_CAT:=$(BZCAT)
SYSLINUX_SITE=http://www.kernel.org/pub/linux/utils/boot/syslinux
SYSLINUX_BIN=$(SYSLINUX_DIR2)/mtools/syslinux


$(DL_DIR)/$(SYSLINUX_SOURCE):
	 $(WGET) -P $(DL_DIR) $(SYSLINUX_SITE)/$(SYSLINUX_SOURCE)

syslinux-source: $(DL_DIR)/$(SYSLINUX_SOURCE)

$(SYSLINUX_DIR)/Makefile: $(DL_DIR)/$(SYSLINUX_SOURCE) $(SYSLINUX_PATCH)
	$(SYSLINUX_CAT) $(DL_DIR)/$(SYSLINUX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
	toolchain/patch-kernel.sh $(SYSLINUX_DIR) target/x86/syslinux/ \*.patch
	touch -c $@

$(SYSLINUX_DIR)/isolinux.bin: $(SYSLINUX_DIR)/Makefile
	$(MAKE) -C $(SYSLINUX_DIR)
	touch -c $@

syslinux: $(SYSLINUX_DIR)/isolinux.bin

syslinux-clean:
	-$(MAKE) -C $(SYSLINUX_DIR) clean

syslinux-dirclean:
	rm -rf $(SYSLINUX_DIR)

endif

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_TARGET_SYSLINUX)),y)
TARGETS+=syslinux
endif