|
1 | 1 | # Busybox is always included, unless explicitly turned off |
2 | 2 | CONFIG_BUSYBOX ?= y |
3 | | -modules-$(CONFIG_BUSYBOX) += busybox |
4 | | - |
5 | | -busybox_version := 1.36.1 |
6 | | -busybox_dir := busybox-$(busybox_version) |
7 | | -busybox_tar := busybox-$(busybox_version).tar.bz2 |
8 | | -busybox_url := https://busybox.net/downloads/$(busybox_tar) |
9 | | -busybox_hash := b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314 |
10 | | - |
11 | | -busybox_configure := $(MAKE) CC="$(heads_cc)" oldconfig |
12 | | -busybox_config := config/busybox.config |
13 | | -busybox_output := busybox |
14 | | -busybox_target := \ |
| 3 | + |
| 4 | +ifeq "$(CONFIG_BUSYBOX_COMPACT)" "y" |
| 5 | +busybox_module := busybox-compact |
| 6 | +else |
| 7 | +busybox_module := busybox |
| 8 | +endif |
| 9 | + |
| 10 | +modules-$(CONFIG_BUSYBOX) += $(busybox_module) |
| 11 | + |
| 12 | +$(busybox_module)_version := 1.36.1 |
| 13 | +$(busybox_module)_dir := $(busybox_module)-$($(busybox_module)_version) |
| 14 | +$(busybox_module)_tar := busybox-$($(busybox_module)_version).tar.bz2 |
| 15 | +$(busybox_module)_url := https://busybox.net/downloads/$($(busybox_module)_tar) |
| 16 | +$(busybox_module)_hash := b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314 |
| 17 | +$(busybox_module)_module_file := busybox |
| 18 | +$(busybox_module)_patch_name_override := busybox-1.36.1 |
| 19 | +$(busybox_module)_depends := $(musl_dep) |
| 20 | + |
| 21 | +$(busybox_module)_configure := \ |
| 22 | + $(if $(filter y,$(CONFIG_BUSYBOX_COMPACT)), \ |
| 23 | + for symbol in \ |
| 24 | + I2CGET I2CSET I2CDUMP I2CDETECT \ |
| 25 | + ARP IFCONFIG IP NC NSLOOKUP NTPD PING ROUTE SSL_CLIENT \ |
| 26 | + TFTP TLS VCONFIG WGET UDHCPC; do \ |
| 27 | + sed -i "s/^CONFIG_$$$${symbol}=y$$$$/# CONFIG_$$$${symbol} is not set/" .config; \ |
| 28 | + done; \ |
| 29 | + sed -i 's/^# CONFIG_LSPCI is not set$$$$/CONFIG_LSPCI=y/' .config; \ |
| 30 | + ) \ |
| 31 | + $(MAKE) CC="$(heads_cc)" oldconfig |
| 32 | +$(busybox_module)_config := config/busybox.config |
| 33 | +$(busybox_module)_output := busybox |
| 34 | +$(busybox_module)_target := \ |
15 | 35 | $(CROSS_TOOLS) \ |
16 | 36 | $(MAKE_JOBS) \ |
17 | 37 | SOURCE_DATE_EPOCH=0 \ |
18 | 38 |
|
| 39 | +busybox_dir := $($(busybox_module)_dir) |
| 40 | + |
19 | 41 | # For reproducibility, busybox is linked without --gc-sections. |
20 | 42 | # SEE: patches/busybox-1.36.1/0004-trylink-reproducible.patch |
21 | 43 | # patches scripts/trylink to skip --gc-sections when SOURCE_DATE_EPOCH |
@@ -52,6 +74,3 @@ $(initrd_bin_dir)/busybox: $(build)/$(busybox_dir)/.build |
52 | 74 | $(VERBOSE_REDIRECT) \ |
53 | 75 | ) |
54 | 76 | @touch $< # ensure that our build file is still newer |
55 | | - |
56 | | - |
57 | | -busybox_depends := $(musl_dep) |
|
0 commit comments