1 #############################################################
5 #############################################################
7 ifeq ($(strip $(BR2_PACKAGE_BUSYBOX_SNAPSHOT
)),y
)
8 # Be aware that this changes daily....
9 BUSYBOX_DIR
:=$(BUILD_DIR
)/busybox
10 BUSYBOX_SOURCE
:=busybox-snapshot.
tar.bz2
11 BUSYBOX_SITE
:=http
://www.busybox.net
/downloads
/snapshots
14 BUSYBOX_DIR
:=$(BUILD_DIR
)/busybox-
$(BUSYBOX_VER
)
15 BUSYBOX_SOURCE
:=busybox-
$(BUSYBOX_VER
).
tar.bz2
16 BUSYBOX_SITE
:=http
://www.busybox.net
/downloads
19 BUSYBOX_CONFIG
:=.
/busybox.config
21 $(DL_DIR
)/$(BUSYBOX_SOURCE
):
22 $(WGET
) -P
$(DL_DIR
) $(BUSYBOX_SITE
)/$(BUSYBOX_SOURCE
)
24 busybox-source
: $(DL_DIR
)/$(BUSYBOX_SOURCE
) $(BUSYBOX_CONFIG
)
26 $(BUSYBOX_DIR
)/.unpacked
: $(DL_DIR
)/$(BUSYBOX_SOURCE
)
27 $(BUSYBOX_UNZIP
) $(DL_DIR
)/$(BUSYBOX_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
28 # Allow busybox patches.
29 $(PATCH
) $(BUSYBOX_DIR
) .
/patches
30 touch
$(BUSYBOX_DIR
)/.unpacked
32 $(BUSYBOX_DIR
)/.configured
: $(BUSYBOX_DIR
)/.unpacked
$(BUSYBOX_CONFIG
)
33 $(SCRIPT_DIR
)/gen_busybox_config.pl
$(TOPDIR
)/.config
> $(BUSYBOX_DIR
)/.config
34 # cp $(BUSYBOX_CONFIG) $(BUSYBOX_DIR)/.config
35 # $(SED) "s,^CROSS.*,CROSS=$(TARGET_CROSS)\n\
36 # PREFIX=$(TARGET_DIR),;" $(BUSYBOX_DIR)/Rules.mak
37 #ifeq ($(BR2_LARGEFILE),y)
38 # $(SED) "s/^.*CONFIG_LFS.*/CONFIG_LFS=y/;" $(BUSYBOX_DIR)/.config
40 # $(SED) "s/^.*CONFIG_LFS.*/CONFIG_LFS=n/;" $(BUSYBOX_DIR)/.config
41 # $(SED) "s/^.*FDISK_SUPPORT_LARGE_DISKS.*/FDISK_SUPPORT_LARGE_DISKS=n/;" $(BUSYBOX_DIR)/.config
43 $(MAKE
) CC
=$(TARGET_CC
) CROSS
="$(TARGET_CROSS)" -C
$(BUSYBOX_DIR
) oldconfig
44 touch
$(BUSYBOX_DIR
)/.configured
46 $(BUSYBOX_DIR
)/busybox
: $(BUSYBOX_DIR
)/.configured
47 $(MAKE
) CC
=$(TARGET_CC
) CROSS
="$(TARGET_CROSS)" PREFIX
="$(TARGET_DIR)" \
48 EXTRA_CFLAGS
="$(TARGET_CFLAGS)" -C
$(BUSYBOX_DIR
)
50 $(TARGET_DIR
)/bin
/busybox
: $(BUSYBOX_DIR
)/busybox
51 $(MAKE
) CC
=$(TARGET_CC
) CROSS
="$(TARGET_CROSS)" PREFIX
="$(TARGET_DIR)" \
52 EXTRA_CFLAGS
="$(TARGET_CFLAGS)" -C
$(BUSYBOX_DIR
) install
53 $(STRIP
) $(TARGET_DIR
)/bin
/busybox
55 -chmod a
+x
$(TARGET_DIR
)/usr
/share
/udhcpc
/default.script
57 busybox
: $(TARGET_DIR
)/bin
/busybox
60 rm -f
$(TARGET_DIR
)/bin
/busybox
61 -$(MAKE
) -C
$(BUSYBOX_DIR
) clean