mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
make.sh: Cleanup of polluted environment
The build environment is using a number of variables which occasionally conflicted with some other build systems. This patch cleans that up by renaming some variables and later unexporting them in the lfs files. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
11
lfs/Config
11
lfs/Config
@@ -30,6 +30,9 @@
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Cleanup environment from any variables
|
||||
unexport BUILD_ARCH BUILD_PLATFORM BUILDTARGET CROSSTARGET TOOLCHAIN
|
||||
|
||||
# URLs that are common sources of downloads. If you're having trouble with
|
||||
# a site you should change its URL to that of a suitable mirror site.
|
||||
#
|
||||
@@ -117,13 +120,13 @@ define POSTBUILD
|
||||
if [ -s "$(TARGET)_diff" ]; then \
|
||||
LFS_SCRIPT=$(firstword $(MAKEFILE_LIST))$(KCFG); \
|
||||
echo $(LFS_SCRIPT); \
|
||||
ROOTFILE=$$(find $(DIR_SRC)/config/rootfiles/{common,packages}/{$(MACHINE),} -maxdepth 1 -type f -name $$LFS_SCRIPT 2>/dev/null | head -1); \
|
||||
ROOTFILE=$$(find $(DIR_SRC)/config/rootfiles/{common,packages}/{$(BUILD_ARCH),} -maxdepth 1 -type f -name $$LFS_SCRIPT 2>/dev/null | head -1); \
|
||||
if [ "$$ROOTFILE" = "" ]; then \
|
||||
touch $(TARGET)_missing_rootfile; \
|
||||
ROOTFILE=$(TARGET)_missing_rootfile ; \
|
||||
echo "error $$LFS_SCRIPT not found in config/rootfiles"; \
|
||||
fi; \
|
||||
sed -e "s/BUILDTARGET/$(BUILDTARGET)/g" -e "s/KVER/$(KVER)/g" -e "s/MACHINE/$(MACHINE)/g" $$ROOTFILE > $(TARGET)_rootfile; \
|
||||
sed -e "s/BUILDTARGET/$(BUILDTARGET)/g" -e "s/KVER/$(KVER)/g" -e "s/MACHINE/$(BUILD_ARCH)/g" $$ROOTFILE > $(TARGET)_rootfile; \
|
||||
for line in `cat $(TARGET)_diff`; do \
|
||||
if grep -qG "^#$$line$$" $(TARGET)_rootfile; then echo "#$$line" >> $(TARGET); \
|
||||
elif grep -qG "^$$line$$" $(TARGET)_rootfile ; then echo "$$line" >> $(TARGET); \
|
||||
@@ -178,13 +181,13 @@ define PAK
|
||||
cp -f /usr/src/src/paks/default/{,un}install.sh /usr/src/src/paks/default/update.sh \
|
||||
/install/packages/package; \
|
||||
fi
|
||||
for i in $(DIR_SRC)/config/rootfiles/packages/{$(MACHINE),}/$(PROG); do \
|
||||
for i in $(DIR_SRC)/config/rootfiles/packages/{$(BUILD_ARCH),}/$(PROG); do \
|
||||
if [ -e "$${i}" ]; then \
|
||||
cp -v $${i} /install/packages/package/ROOTFILES; \
|
||||
break; \
|
||||
fi; \
|
||||
done
|
||||
sed -e 's/BUILDTARGET/$(BUILDTARGET)/g' -e 's/KVER/$(KVER)/g' -e 's/MACHINE/$(MACHINE)/g' -i /install/packages/package/ROOTFILES
|
||||
sed -e 's/BUILDTARGET/$(BUILDTARGET)/g' -e 's/KVER/$(KVER)/g' -e 's/MACHINE/$(BUILD_ARCH)/g' -i /install/packages/package/ROOTFILES
|
||||
sed -e 's/xxxKVERxxx/$(KVER)/g' -i /install/packages/package/install.sh
|
||||
chmod 755 /install/packages/package/{{,un}install,update}.sh
|
||||
cd / && tar cf /install/packages/package/files.tmp --files-from=/install/packages/package/ROOTFILES --exclude='#*' \
|
||||
|
||||
@@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-kmod-$(KVER)-$(VERSUFIX)
|
||||
|
||||
#ifeq "$(MACHINE_TYPE)" "arm"
|
||||
#ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
CFLAGS += -fno-PIC
|
||||
#endif
|
||||
|
||||
@@ -87,7 +87,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-ipfire-build.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-4.2.6-1-grsecurity.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-4.2.6-1-add_usbnet_modules.patch
|
||||
ifeq "$(MACHINE)" "x86_64"
|
||||
ifeq "$(BUILD_ARCH)" "x86_64"
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch
|
||||
endif
|
||||
|
||||
@@ -126,7 +126,7 @@ endif
|
||||
cd $(DIR_APP) && sed -i -e "s/CPTCFG_CFG80211_DEFAULT_PS=y/# CPTCFG_CFG80211_DEFAULT_PS is not set/g" .config
|
||||
cd $(DIR_APP) && sed -i -e "s/CPTCFG_NFC=m/# CPTCFG_NFC is not set/g" .config
|
||||
|
||||
ifeq "$(MACHINE)" "x86_64"
|
||||
ifeq "$(BUILD_ARCH)" "x86_64"
|
||||
cd $(DIR_APP) && sed -i -e "s/CPTCFG_LIBERTAS_UAP=m/# CPTCFG_LIBERTAS_UAP is not set/g" .config
|
||||
endif
|
||||
|
||||
|
||||
12
lfs/binutils
12
lfs/binutils
@@ -72,7 +72,7 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "armv5tel"
|
||||
ifeq "$(BUILD_ARCH)" "armv5tel"
|
||||
EXTRA_CONFIG += \
|
||||
--with-abi=aapcs-linux \
|
||||
--with-float=soft
|
||||
@@ -124,15 +124,15 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
# Prevent installing libiberty to lib64.
|
||||
cd $(DIR_APP) && sed -i 's%\(^MULTIOSDIR = \).*%\1 ../lib%' libiberty/Makefile.in
|
||||
|
||||
cd $(DIR_SRC)/binutils-build && $(EXTRA_ENV) MACHINE= $(DIR_APP)/configure $(EXTRA_CONFIG)
|
||||
cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING) MACHINE=
|
||||
cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install MACHINE=
|
||||
cd $(DIR_SRC)/binutils-build && $(EXTRA_ENV) $(DIR_APP)/configure $(EXTRA_CONFIG)
|
||||
cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING)
|
||||
cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
|
||||
ifeq "$(ROOT)" ""
|
||||
cp -v $(DIR_APP)/include/libiberty.h /usr/include
|
||||
else
|
||||
ifeq "$(PASS)" "2"
|
||||
cd $(DIR_SRC)/binutils-build && make -C ld clean MACHINE=
|
||||
cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib MACHINE=
|
||||
cd $(DIR_SRC)/binutils-build && make -C ld clean
|
||||
cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib
|
||||
cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
|
||||
endif
|
||||
endif
|
||||
|
||||
14
lfs/cdrom
14
lfs/cdrom
@@ -29,7 +29,7 @@ VER = ipfire
|
||||
THISAPP = cdrom
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
TAR_OPTIONS =
|
||||
else
|
||||
TAR_OPTIONS = --lzma
|
||||
@@ -64,7 +64,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
echo > /etc/mtab
|
||||
|
||||
# Create filelist for packaging.
|
||||
BUILDTARGET="$(BUILDTARGET)" MACHINE="$(MACHINE)" KVER="$(KVER)" \
|
||||
BUILDTARGET="$(BUILDTARGET)" BUILD_ARCH="$(BUILD_ARCH)" KVER="$(KVER)" \
|
||||
$(DIR_SRC)/src/scripts/archive.files \
|
||||
$(DIR_SRC)/config/rootfiles/common \
|
||||
> /tmp/ROOTFILES
|
||||
@@ -89,7 +89,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
# Make the ISO
|
||||
mkdir -p /install/cdrom/boot/isolinux
|
||||
dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog
|
||||
ifneq "$(MACHINE_TYPE)" "arm"
|
||||
ifneq "$(BUILD_PLATFORM)" "arm"
|
||||
cp /boot/vmlinuz-$(KVER)-ipfire /install/cdrom/boot/isolinux/vmlinuz
|
||||
dracut --force -a "installer" --strip --xz /install/cdrom/boot/isolinux/instroot $(KVER)-ipfire
|
||||
cp $(DIR_SRC)/config/syslinux/boot.png /install/cdrom/boot/isolinux/boot.png
|
||||
@@ -106,12 +106,12 @@ endif
|
||||
xargs md5sum > md5sum.txt
|
||||
|
||||
mkdir -p /install/images
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
|
||||
. > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso
|
||||
. > /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso
|
||||
else
|
||||
cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
|
||||
-b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
-c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso
|
||||
isohybrid /install/images/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso
|
||||
-c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso
|
||||
isohybrid /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso
|
||||
endif
|
||||
|
||||
@@ -36,7 +36,7 @@ PAK_VER = 34
|
||||
|
||||
DEPS = ""
|
||||
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
CONFIGURE_FLAGS = --disable-fanotify
|
||||
endif
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ core/%:
|
||||
$(DIR_SRC)/src/scripts/archive.files \
|
||||
$(DIR_SRC)/config/rootfiles/$@/filelists \
|
||||
$(DIR_SRC)/config/rootfiles/$@/files \
|
||||
$(DIR_SRC)/config/rootfiles/$@/files.$(MACHINE) \
|
||||
$(DIR_SRC)/config/rootfiles/$@/files.$(BUILD_ARCH) \
|
||||
> /tmp/ROOTFILES.tmp
|
||||
|
||||
#remove excluded files from ROOTFILES
|
||||
|
||||
@@ -34,9 +34,9 @@ PART_BOOT = /dev/mapper/$(patsubst /dev/%,%,$(DEVICE))p1
|
||||
PART_ROOT = /dev/mapper/$(patsubst /dev/%,%,$(DEVICE))p3
|
||||
|
||||
ifeq "$(SCON)" "1"
|
||||
IMAGE_FILE = /install/images/$(SNAME)-$(VERSION).1gb-ext4-scon.$(MACHINE)-full-core$(CORE).img.gz
|
||||
IMAGE_FILE = /install/images/$(SNAME)-$(VERSION).1gb-ext4-scon.$(BUILD_ARCH)-full-core$(CORE).img.gz
|
||||
else
|
||||
IMAGE_FILE = /install/images/$(SNAME)-$(VERSION).1gb-ext4.$(MACHINE)-full-core$(CORE).img.gz
|
||||
IMAGE_FILE = /install/images/$(SNAME)-$(VERSION).1gb-ext4.$(BUILD_ARCH)-full-core$(CORE).img.gz
|
||||
endif
|
||||
|
||||
FSTAB_FMT = UUID=%s %-8s %-4s %-10s %d %d\n
|
||||
@@ -60,7 +60,7 @@ MNThdd := /install/harddisk
|
||||
IMG := /install/images/image.img
|
||||
|
||||
# All sizes in blocks
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
BOOTLOADER =
|
||||
S_OFFSET = 8192
|
||||
|
||||
@@ -117,7 +117,7 @@ endif
|
||||
mount $(PART_BOOT) $(MNThdd)/boot
|
||||
|
||||
# Install Pandaboard MLO and uboot first
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
cp -v /boot/MLO $(MNThdd)/boot/
|
||||
cp -v /boot/u-boot.img $(MNThdd)/boot/
|
||||
cp -v /boot/zImage-ipfire-multi $(MNThdd)/boot/
|
||||
@@ -135,7 +135,7 @@ ifeq "$(MACHINE_TYPE)" "arm"
|
||||
endif
|
||||
|
||||
# Install IPFire
|
||||
ifneq "$(MACHINE_TYPE)" "arm"
|
||||
ifneq "$(BUILD_PLATFORM)" "arm"
|
||||
tar -x --lzma -C $(MNThdd)/ -f /install/cdrom/distro.img
|
||||
else
|
||||
tar -x -C $(MNThdd)/ -f /install/cdrom/distro.img
|
||||
@@ -154,7 +154,7 @@ ifeq "$(SCON)" "1"
|
||||
sed -i -e "s|6:2345:respawn:|#6:2345:respawn:|g" $(MNThdd)/etc/inittab
|
||||
sed -i -e "s|#7:2345:respawn:|7:2345:respawn:|g" $(MNThdd)/etc/inittab
|
||||
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
sed -i -e "s| console=tty1 | console=ttyAMA0,115200n8 |g" $(MNThdd)/boot/cmdline.txt
|
||||
sed -i -e "s| console=tty1 | console=ttyO2,115200n8 |g" $(MNThdd)/boot/uEnv.txt
|
||||
endif
|
||||
@@ -228,7 +228,7 @@ endif
|
||||
# not copied to a block device)
|
||||
dd if=/dev/zero bs=1M count=$(PADDING) >> $(IMG)
|
||||
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
# Install u-boot for LeMaker Banana Pi into image 8KB
|
||||
dd if=/usr/share/u-boot/banana_pi/u-boot-sunxi-with-spl.bin of=$(IMG) bs=1K seek=8 conv=notrunc
|
||||
endif
|
||||
|
||||
8
lfs/gcc
8
lfs/gcc
@@ -133,24 +133,24 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "armv7hl"
|
||||
ifeq "$(BUILD_ARCH)" "armv7hl"
|
||||
EXTRA_CONFIG += \
|
||||
--with-float=hard
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "armv5tel"
|
||||
ifeq "$(BUILD_ARCH)" "armv5tel"
|
||||
EXTRA_CONFIG += \
|
||||
--with-float=soft \
|
||||
--disable-sjlj-exceptions
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
EXTRA_CONFIG += \
|
||||
--with-arch=i586 \
|
||||
--with-tune=generic
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "x86_64"
|
||||
ifeq "$(BUILD_ARCH)" "x86_64"
|
||||
EXTRA_CONFIG += \
|
||||
--disable-multilib
|
||||
endif
|
||||
|
||||
33
lfs/glibc
33
lfs/glibc
@@ -53,16 +53,16 @@ endif
|
||||
# Enable some extra optimization for the glibc code
|
||||
CFLAGS = -O3 -DNDEBUG -fasynchronous-unwind-tables -fPIC -DPIC
|
||||
|
||||
ifeq "$(MACHINE)" "armv7hl"
|
||||
ifeq "$(BUILD_ARCH)" "armv7hl"
|
||||
CFLAGS += -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
CFLAGS += -march=i586 -mtune=generic -mno-tls-direct-seg-refs
|
||||
endif
|
||||
|
||||
# Disable hardware FP for armv5tel
|
||||
ifeq "$(MACHINE)" "armv5tel"
|
||||
ifeq "$(BUILD_ARCH)" "armv5tel"
|
||||
EXTRA_CONFIG += \
|
||||
--without-fp
|
||||
endif
|
||||
@@ -117,19 +117,21 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
||||
@mkdir $(DIR_SRC)/glibc-build
|
||||
|
||||
ifeq "$(ROOT)" ""
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.3 -o|' \
|
||||
scripts/test-installation.pl
|
||||
else
|
||||
ifeq "$(MACHINE)" "x86_64"
|
||||
ifneq "$(TOOLCHAIN)" "1"
|
||||
ifeq "$(BUILD_ARCH)" "x86_64"
|
||||
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib64 -Wl,-dynamic-linker=/lib64/ld-linux-x86-64.so.2 -o|' \
|
||||
scripts/test-installation.pl
|
||||
else
|
||||
endif
|
||||
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
|
||||
scripts/test-installation.pl
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq "$(BUILD_ARCH)" "armv5tel"
|
||||
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.3 -o|' \
|
||||
scripts/test-installation.pl
|
||||
endif
|
||||
endif
|
||||
|
||||
cd $(DIR_SRC)/glibc-build && \
|
||||
@@ -141,15 +143,16 @@ endif
|
||||
|
||||
cd $(DIR_SRC)/glibc-build && make install
|
||||
|
||||
ifeq "$(ROOT)" ""
|
||||
ifeq "$(TOOLCHAIN)" "1"
|
||||
ln -svf lib /tools/lib64
|
||||
else
|
||||
# Creating the locales
|
||||
mkdir -p /usr/lib/locale
|
||||
cd $(DIR_SRC)/glibc-build && make localedata/install-locales
|
||||
|
||||
# Timezone data will be shipped by tzdata.
|
||||
rm -rfv /usr/share/zoneinfo
|
||||
else
|
||||
ln -svf lib /tools/lib64
|
||||
endif
|
||||
|
||||
@rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
|
||||
@$(POSTBUILD)
|
||||
|
||||
6
lfs/gmp
6
lfs/gmp
@@ -32,9 +32,9 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
CONFIGURE_ARGS = ABI=32
|
||||
BUILDTARGET_PENTIUM4 = $(patsubst $(MACHINE)-%,pentium4-%,$(BUILDTARGET))
|
||||
BUILDTARGET_PENTIUM4 = $(patsubst $(BUILD_ARCH)-%,pentium4-%,$(BUILDTARGET))
|
||||
endif
|
||||
|
||||
CONFIGURE_OPTIONS = \
|
||||
@@ -89,7 +89,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && make $(MAKETUNING)
|
||||
cd $(DIR_APP) && make install
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
# Build SSE/SSE2 optimised version for x86
|
||||
cd $(DIR_APP) && make clean
|
||||
cd $(DIR_APP) && \
|
||||
|
||||
@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
CONFIGURE_ARGS = ABI=32
|
||||
endif
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ $(TARGET) :
|
||||
done
|
||||
|
||||
# ARM does not need acpid, intel no swconfig
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
rm -vf /etc/rc.d/init.d/acpid
|
||||
ln -sf ../init.d/swconfig /etc/rc.d/rcsysinit.d/S73swconfig
|
||||
else
|
||||
|
||||
@@ -31,7 +31,7 @@ DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
SLOGAN = An Open Source Firewall Solution
|
||||
DOWNLOAD_URL = http://downloads.ipfire.org/releases/ipfire-2.x/$(VERSION)-core$(CORE)/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso
|
||||
DOWNLOAD_URL = http://downloads.ipfire.org/releases/ipfire-2.x/$(VERSION)-core$(CORE)/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
|
||||
34
lfs/linux
34
lfs/linux
@@ -40,10 +40,16 @@ CXXFLAGS =
|
||||
PAK_VER = 73
|
||||
DEPS = ""
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
KERNEL_ARCH = i386
|
||||
else
|
||||
KERNEL_ARCH = $(MACHINE)
|
||||
KERNEL_ARCH = $(BUILD_ARCH)
|
||||
endif
|
||||
|
||||
ifeq "$(BUILD_ARCH)" "aarch64"
|
||||
HEADERS_ARCH = arm64
|
||||
else
|
||||
HEADERS_ARCH = $(BUILD_PLATFORM)
|
||||
endif
|
||||
|
||||
VERSUFIX=ipfire$(KCFG)
|
||||
@@ -56,26 +62,6 @@ else
|
||||
HEADERS_PREFIX = /usr
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "armv7hl"
|
||||
HEADERS_ARCH=arm
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "armv5tel"
|
||||
HEADERS_ARCH=arm
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "aarch64"
|
||||
HEADERS_ARCH=arm64
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "x86_64"
|
||||
HEADERS_ARCH=x86
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
HEADERS_ARCH=x86
|
||||
endif
|
||||
|
||||
ifeq "$(KCFG)" ""
|
||||
LASTKERNEL=1
|
||||
endif
|
||||
@@ -264,7 +250,7 @@ else
|
||||
drivers/video/logo/logo_linux_clut224.ppm
|
||||
|
||||
# Cleanup kernel source
|
||||
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE)-$(VERSUFIX) $(DIR_APP)/.config
|
||||
cp $(DIR_SRC)/config/kernel/kernel.config.$(BUILD_ARCH)-$(VERSUFIX) $(DIR_APP)/.config
|
||||
cd $(DIR_APP) && make oldconfig
|
||||
cd $(DIR_APP) && make clean
|
||||
cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ -$(VERSUFIX)/' Makefile
|
||||
@@ -295,7 +281,7 @@ endif
|
||||
cd $(DIR_APP) && make $(MAKETUNING) modules_install
|
||||
cd $(DIR_APP) && make $(MAKETUNING) firmware_install
|
||||
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
cd $(DIR_APP) && make $(MAKETUNING) dtbs
|
||||
cd $(DIR_APP) && for f in $$(find arch/arm/boot/dts/ -name *.dtb); do \
|
||||
mkdir -p /boot/dtb-$(VER)-$(VERSUFIX) ; \
|
||||
|
||||
@@ -76,7 +76,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
# gcc-4.9.3 produce a corrupted version of memtest
|
||||
# we use the precomp version at the moment
|
||||
|
||||
#ifeq "$(MACHINE)" "i586"
|
||||
#ifeq "$(BUILD_ARCH)" "i586"
|
||||
# # Enable SMP as default
|
||||
# cd $(DIR_APP) && sed -i -e "s|CONSERVATIVE_SMP 1|CONSERVATIVE_SMP 0|g" config.h
|
||||
# cd $(DIR_APP) && sed -i -e "s|scp |echo |g" Makefile
|
||||
|
||||
@@ -63,11 +63,11 @@ CONFIGURE_OPTIONS = \
|
||||
no-srp \
|
||||
-DSSL_FORBID_ENULL
|
||||
|
||||
ifeq "$(MACHINE)" "x86_64"
|
||||
ifeq "$(BUILD_ARCH)" "x86_64"
|
||||
CONFIGURE_OPTIONS += linux-x86_64
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
CONFIGURE_OPTIONS += linux-elf
|
||||
|
||||
ifneq "$(KCFG)" "-sse2"
|
||||
@@ -75,7 +75,7 @@ ifneq "$(KCFG)" "-sse2"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq "$(MACHINE)" "armv5tel"
|
||||
ifeq "$(BUILD_ARCH)" "armv5tel"
|
||||
CONFIGURE_OPTIONS += linux-generic32
|
||||
endif
|
||||
|
||||
@@ -123,7 +123,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2g-disable-sslv2v3.patch
|
||||
|
||||
# i586 specific patches
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2a_auto_enable_padlock.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/openssl-1.0.2a_disable_ssse3_for_amd.patch
|
||||
endif
|
||||
|
||||
@@ -30,10 +30,10 @@ THISAPP = pakfire
|
||||
DIR_APP = /opt/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
PAKFIRE_VERSION = $(VERSION)
|
||||
else
|
||||
PAKFIRE_VERSION = $(VERSION)-$(MACHINE)
|
||||
PAKFIRE_VERSION = $(VERSION)-$(BUILD_ARCH)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
|
||||
2
lfs/php
2
lfs/php
@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
ifeq "$(BUILD_PLATFORM)" "arm"
|
||||
CFLAGS := $(patsubst -march=%,,$(CFLAGS))
|
||||
endif
|
||||
|
||||
|
||||
@@ -48,5 +48,5 @@ install : $(DIR_INFO)/_build.othersrc-list.log
|
||||
|
||||
# make the sources CDROM iso
|
||||
cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
|
||||
. > /install/images/$(SNAME)-sources-cd-$(VERSION).$(MACHINE).iso
|
||||
. > /install/images/$(SNAME)-sources-cd-$(VERSION).$(BUILD_ARCH).iso
|
||||
rm -rf /install/cdrom/*
|
||||
|
||||
@@ -64,7 +64,7 @@ $(TARGET) :
|
||||
# Symlink /var/run -> /run.
|
||||
ln -svf ../run /var/run
|
||||
|
||||
ifeq "$(MACHINE)" "x86_64"
|
||||
ifeq "$(BUILD_ARCH)" "x86_64"
|
||||
ln -svf lib /lib64
|
||||
ln -svf lib /usr/lib64
|
||||
endif
|
||||
|
||||
@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/strongswan-$(VER)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
CONFIGURE_OPTIONS = \
|
||||
--enable-padlock
|
||||
else
|
||||
|
||||
@@ -72,7 +72,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && make -f unix/Makefile clean
|
||||
cd $(DIR_APP)/unix && ./configure
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
cd $(DIR_APP) && make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 generic
|
||||
else
|
||||
# ARM/x86_64 cannot use the x86 32 bit assembly code.
|
||||
|
||||
@@ -102,7 +102,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP)* && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
||||
|
||||
ifeq "$(MACHINE)" "i586"
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
# Build an SSE enabled version.
|
||||
$(call BUILD,-sse)
|
||||
endif
|
||||
|
||||
@@ -47,7 +47,7 @@ md5 :
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
IMGinst := /install/images/$(SNAME)-$(VERSION).xen.$(MACHINE)-downloader-core$(CORE).tar.bz2
|
||||
IMGinst := /install/images/$(SNAME)-$(VERSION).xen.$(BUILD_ARCH)-downloader-core$(CORE).tar.bz2
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
rm -rf /install/images/$(SNAME) $(IMGinst) && mkdir -p /install/images/$(SNAME)
|
||||
|
||||
Reference in New Issue
Block a user