From 265b164378a3ed56c1d992c2da30684961918ac8 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 4 Sep 2011 19:21:44 +0000 Subject: [PATCH 01/18] sysstat: Build fix because of header update. --- lfs/sysstat | 2 ++ src/patches/sysstat-6.0.2-sysconf.patch | 26 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/patches/sysstat-6.0.2-sysconf.patch diff --git a/lfs/sysstat b/lfs/sysstat index 8961355f7..dc15765e8 100644 --- a/lfs/sysstat +++ b/lfs/sysstat @@ -70,6 +70,8 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/sysstat-6.0.2-sysconf.patch + cd $(DIR_APP) && sed "/asm\/page.h/d" -i common.c cd $(DIR_APP) && cp -vf $(DIR_SRC)/config/sysstat/CONFIG build/ cd $(DIR_APP) && make $(MAKETUNING) cd $(DIR_APP) && make install diff --git a/src/patches/sysstat-6.0.2-sysconf.patch b/src/patches/sysstat-6.0.2-sysconf.patch new file mode 100644 index 000000000..829cc8fca --- /dev/null +++ b/src/patches/sysstat-6.0.2-sysconf.patch @@ -0,0 +1,26 @@ +--- sysstat-6.0.2/common.c.sysc 2005-11-28 11:14:29.000000000 +0100 ++++ sysstat-6.0.2/common.c 2006-05-11 10:40:18.000000000 +0200 +@@ -31,8 +31,9 @@ + #include /* for HZ */ + + /* ++ * PAGE_SIZE should be get by sysconf function - + * For PAGE_SIZE (which may be itself a call to getpagesize()). +- * PAGE_SHIFT no longer necessarily exists in . So ++ * PAGE_SHIFT no longer necessarily exists. So + * we use PAGE_SIZE to compute PAGE_SHIFT... + */ + #include +@@ -408,8 +409,10 @@ + { + int shift = 0; + int size; ++ int p_size; + +- size = PAGE_SIZE >> 10; /* Assume that a page has a minimum size of 1 kB */ ++ p_size = sysconf(_SC_PAGE_SIZE); ++ size = p_size >> 10; /* Assume that a page has a minimum size of 1 kB */ + while (size > 1) { + shift++; + size >>= 1; + From 4266ca8544e1eb877fb4c35e6260c085e16f8827 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 4 Sep 2011 19:25:59 +0000 Subject: [PATCH 02/18] Use less parallelism on ARM builds. We are occasionally hitting an out of memory error. --- make.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index c9ef62a41..88fc995a4 100755 --- a/make.sh +++ b/make.sh @@ -189,7 +189,11 @@ prepareenv() { set +h LC_ALL=POSIX if [ -z $MAKETUNING ]; then - MAKETUNING="-j6" + if [ "${MACHINE:0:3}" = "arm" ]; then + MAKETUNING="-j2" + else + MAKETUNING="-j6" + fi fi export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD From b5a93c6c6ec8c89d3e1730eab5d211aee03b73c1 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 4 Sep 2011 19:26:58 +0000 Subject: [PATCH 03/18] Revert "mysql: Force to build with -j1 on ARM." This reverts commit e49e0513a9ede1d3bea7b29e1d50d36674c84086. --- lfs/mysql | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lfs/mysql b/lfs/mysql index b505fc8c1..410dad6c4 100644 --- a/lfs/mysql +++ b/lfs/mysql @@ -34,10 +34,6 @@ TARGET = $(DIR_INFO)/$(THISAPP) PROG = mysql PAK_VER = 1 -ifeq "$(MACHINE)" "arm" - MAKETUNING = -j1 -endif - ############################################################################### # Top-level Rules ############################################################################### From dcc3afea60ea7662ed75e52237b9ba492adeaa70 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Sep 2011 08:33:45 +0000 Subject: [PATCH 04/18] br2684ctl: Does not compile because linux-atm is missing. --- make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make.sh b/make.sh index 88fc995a4..d4cf60ce8 100755 --- a/make.sh +++ b/make.sh @@ -623,7 +623,7 @@ buildipfire() { ipfiremake strongswan ipfiremake lsof ipfiremake centerim - ipfiremake br2684ctl + #ipfiremake br2684ctl ipfiremake pcmciautils ipfiremake lm_sensors ipfiremake liboping From f1369a6a961922dc49531ede3335154f275f4f53 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Sep 2011 08:34:12 +0000 Subject: [PATCH 05/18] sdl: Fix build with newer kernel headers. --- lfs/sdl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lfs/sdl b/lfs/sdl index 5197e431d..2e5f0f271 100644 --- a/lfs/sdl +++ b/lfs/sdl @@ -77,6 +77,10 @@ dist: $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) +ifeq "$(MACHINE)" "arm" + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/SDL-1.2.11-asm-page.h.patch + cd $(DIR_APP) && sed "/asm\/page.h/d" -i src/video/fbcon/SDL_fbvideo.c +endif cd $(DIR_APP) && ./configure --prefix=/usr cd $(DIR_APP) && make $(MAKETUNING) cd $(DIR_APP) && make install From 7f525abb529f2c94d3e618d5973935867f891ffe Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Sep 2011 08:35:58 +0000 Subject: [PATCH 06/18] qemu: Disable build. --- make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make.sh b/make.sh index d4cf60ce8..b5c88771c 100755 --- a/make.sh +++ b/make.sh @@ -634,8 +634,8 @@ buildipfire() { ipfiremake igmpproxy ipfiremake fbset ipfiremake sdl - ipfiremake qemu - ipfiremake qemu-kqemu + #ipfiremake qemu + #ipfiremake qemu-kqemu ipfiremake sane ipfiremake netpbm ipfiremake phpSANE From 7242d46d5d963b4b90a6da9e08507e7e29a0e4f0 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Sep 2011 16:39:08 +0000 Subject: [PATCH 07/18] tunctl: Disable build (requires linux-atm). --- make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make.sh b/make.sh index b5c88771c..a298e6a36 100755 --- a/make.sh +++ b/make.sh @@ -639,7 +639,7 @@ buildipfire() { ipfiremake sane ipfiremake netpbm ipfiremake phpSANE - ipfiremake tunctl + #ipfiremake tunctl ipfiremake nagios ipfiremake nagios_nrpe ipfiremake ebtables From 3de0befca759258d7fbf07522323740a3b122c35 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Sep 2011 16:39:27 +0000 Subject: [PATCH 08/18] directfb: Disable building of omapfb. --- lfs/directfb | 1 + 1 file changed, 1 insertion(+) diff --git a/lfs/directfb b/lfs/directfb index 218cbbc8b..e406af820 100644 --- a/lfs/directfb +++ b/lfs/directfb @@ -81,6 +81,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && sed -i "s/checkfor_matrox=yes/checkfor_matrox=no/g" configure cd $(DIR_APP) && sed -i "s/checkfor_cle266=no/checkfor_cle266=yes/g" configure + cd $(DIR_APP) && sed -i "s/checkfor_omap=.*/checkfor_omap=no/g" configure cd $(DIR_APP) && ./configure --prefix=/usr --disable-x11 --enable-sdl \ --enable-video4linux2 cd $(DIR_APP) && make $(MAKETUNING) From 80541bbec3b26f165b7214d57e0148bce6d1bae2 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Sep 2011 16:39:51 +0000 Subject: [PATCH 09/18] Add forgotten patch file. --- src/patches/SDL-1.2.11-asm-page.h.patch | 59 +++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/patches/SDL-1.2.11-asm-page.h.patch diff --git a/src/patches/SDL-1.2.11-asm-page.h.patch b/src/patches/SDL-1.2.11-asm-page.h.patch new file mode 100644 index 000000000..ece702d8d --- /dev/null +++ b/src/patches/SDL-1.2.11-asm-page.h.patch @@ -0,0 +1,59 @@ +diff -urN SDL-1.2.11.orig/src/video/fbcon/SDL_fbvideo.c SDL-1.2.11/src/video/fbcon/SDL_fbvideo.c +--- SDL-1.2.11.orig/src/video/fbcon/SDL_fbvideo.c 2006-05-17 06:16:06.000000000 +0300 ++++ SDL-1.2.11/src/video/fbcon/SDL_fbvideo.c 2007-06-24 22:19:41.000000000 +0300 +@@ -29,9 +29,17 @@ + #include + #include + #include +-#include /* For definition of PAGE_SIZE */ + #include + ++#if defined(linux) ++#define HAS_MMAP_ANON ++#include ++#include ++#include /* PAGE_SIZE */ ++#define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */ ++#define HAS_GETPAGESIZE ++#endif /* linux */ ++ + #include "SDL_video.h" + #include "SDL_mouse.h" + #include "../SDL_sysvideo.h" +@@ -474,6 +482,7 @@ + unsigned int current_h; + const char *SDL_fbdev; + FILE *modesdb; ++ int pagesize = -1; + + /* Initialize the library */ + SDL_fbdev = SDL_getenv("SDL_FBDEV"); +@@ -545,9 +554,27 @@ + } + } + ++#if defined(_SC_PAGESIZE) && defined(HAS_SC_PAGESIZE) ++ pagesize = sysconf(_SC_PAGESIZE); ++#endif ++#ifdef _SC_PAGE_SIZE ++ if (pagesize == -1) ++ pagesize = sysconf(_SC_PAGE_SIZE); ++#endif ++#ifdef HAS_GETPAGESIZE ++ if (pagesize == -1) ++ pagesize = getpagesize(); ++#endif ++#ifdef PAGE_SIZE ++ if (pagesize == -1) ++ pagesize = PAGE_SIZE; ++#endif ++ if (pagesize == -1) ++ pagesize = 4096; ++ + /* Memory map the device, compensating for buggy PPC mmap() */ + mapped_offset = (((long)finfo.smem_start) - +- (((long)finfo.smem_start)&~(PAGE_SIZE-1))); ++ (((long)finfo.smem_start)&~(pagesize-1))); + mapped_memlen = finfo.smem_len+mapped_offset; + mapped_mem = do_mmap(NULL, mapped_memlen, + PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0); From d0d770f9daa70b09076513f2f46a5cc8e86d1cd9 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 6 Sep 2011 20:35:50 +0000 Subject: [PATCH 10/18] splix: Buildfix for ARM. --- lfs/splix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lfs/splix b/lfs/splix index e45872d8b..bc82cf311 100644 --- a/lfs/splix +++ b/lfs/splix @@ -77,6 +77,9 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) +ifeq "$(MACHINE)" "arm" + cd $(DIR_APP) && sed -e "s/ceill/ceil/g" -i src/*.cpp +endif cd $(DIR_APP) && make DISABLE_JBIG=1 $(MAKETUNING) $(EXTRA_MAKE) cd $(DIR_APP) && make install @rm -rf $(DIR_APP) From 8f610b49eb4b8d709e836a43c4daf090ab1377b2 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Sep 2011 09:29:01 +0000 Subject: [PATCH 11/18] vdr: Disable because V4L does not build at the moment. --- make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make.sh b/make.sh index a298e6a36..b68173e9a 100755 --- a/make.sh +++ b/make.sh @@ -650,7 +650,7 @@ buildipfire() { ipfiremake faad2 ipfiremake ffmpeg ipfiremake videolan - ipfiremake vdr + #ipfiremake vdr ipfiremake w_scan ipfiremake icecast ipfiremake icegenerator From c457dda66fc42d6ca97035f66bf6cea8fb66bb39 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Sep 2011 09:29:39 +0000 Subject: [PATCH 12/18] Disable wpa_supplicant and hostapd. The do not build because compat-wireless does not build. --- make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make.sh b/make.sh index b68173e9a..28a1cc3c0 100755 --- a/make.sh +++ b/make.sh @@ -663,8 +663,8 @@ buildipfire() { ipfiremake vnstat ipfiremake vnstati ipfiremake iw - ipfiremake wpa_supplicant - ipfiremake hostapd + #ipfiremake wpa_supplicant + #ipfiremake hostapd ipfiremake urlgrabber ipfiremake syslinux ipfiremake tftpd From 4ec6c3f69fe6359579f211a425c77072fa58e42b Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Sep 2011 09:30:38 +0000 Subject: [PATCH 13/18] syslinux: Does not build on ARM. --- make.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index 28a1cc3c0..3c53e4a76 100755 --- a/make.sh +++ b/make.sh @@ -666,7 +666,9 @@ buildipfire() { #ipfiremake wpa_supplicant #ipfiremake hostapd ipfiremake urlgrabber - ipfiremake syslinux + if [ "${MACHINE:0:3}" != "arm" ]; then + ipfiremake syslinux + fi ipfiremake tftpd ipfiremake cpufrequtils ipfiremake dbus From 749a783bc91dda1dafe34f2c1bc7f4f90dcb4382 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Sep 2011 09:35:32 +0000 Subject: [PATCH 14/18] cpufrequtils: Does not build because it contains x86 ASM code. --- make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make.sh b/make.sh index 3c53e4a76..9865b2a83 100755 --- a/make.sh +++ b/make.sh @@ -670,7 +670,7 @@ buildipfire() { ipfiremake syslinux fi ipfiremake tftpd - ipfiremake cpufrequtils + #ipfiremake cpufrequtils ipfiremake dbus ipfiremake bluetooth ipfiremake gutenprint From d613a7bdf1689467f7a2aaabd8c4ca04b4fafeeb Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Sep 2011 09:36:46 +0000 Subject: [PATCH 15/18] openvmtools: ARM is not supported here. --- make.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index 9865b2a83..f8cddc2cf 100755 --- a/make.sh +++ b/make.sh @@ -693,7 +693,9 @@ buildipfire() { ipfiremake perl-DBD-mysql ipfiremake cacti ipfiremake icecc - ipfiremake openvmtools + if [ "${MACHINE:0:3}" != "arm" ]; then + ipfiremake openvmtools + fi ipfiremake nagiosql ipfiremake iftop ipfiremake motion From 1a33e89eb331d6eeeccfbc3d1d4f34acd0563127 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Sep 2011 11:43:51 +0000 Subject: [PATCH 16/18] python-lzma: Fix build on other architectures. --- lfs/python-lzma | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lfs/python-lzma b/lfs/python-lzma index f2f6aabe0..0d2fcc412 100644 --- a/lfs/python-lzma +++ b/lfs/python-lzma @@ -80,8 +80,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && python setup.py install # unzip the egg because it won't work without cd /usr/lib/python2.7/site-packages && \ - unzip pyliblzma-$(VER)-py2.7-linux-i686.egg - rm -rf /usr/lib/python2.7/site-packages/pyliblzma-$(VER)-py2.7-linux-i686.egg + unzip pyliblzma-$(VER)-py2.7-linux-$(shell uname -m).egg + rm -rf /usr/lib/python2.7/site-packages/pyliblzma-$(VER)-py2.7-linux-$(shell uname -m).egg rm -rf /usr/lib/python2.7/site-packages/EGG-INFO @rm -rf $(DIR_APP) @$(POSTBUILD) From 2aa4da9f94530e1410b6f4cf60103f4bb17fbd9f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Sep 2011 11:44:25 +0000 Subject: [PATCH 17/18] Disable asterisk and lcr, which to not build. --- make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make.sh b/make.sh index f8cddc2cf..1cab6b2cb 100755 --- a/make.sh +++ b/make.sh @@ -704,8 +704,8 @@ buildipfire() { ipfiremake watchdog ipfiremake libpri ipfiremake dahdi - ipfiremake asterisk - ipfiremake lcr + #ipfiremake asterisk + #ipfiremake lcr ipfiremake usb_modeswitch ipfiremake usb_modeswitch_data ipfiremake zerofree From bb48bae92a0de818551f6e81111fab19335fe956 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Sep 2011 11:44:47 +0000 Subject: [PATCH 18/18] Disable build of memtest86 (and dependencies). This is not supported on ARM. --- make.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/make.sh b/make.sh index 1cab6b2cb..516edd511 100755 --- a/make.sh +++ b/make.sh @@ -751,9 +751,11 @@ buildinstaller() { # Run installer scripts one by one LOGFILE="$BASEDIR/log/_build.installer.log" export LOGFILE - ipfiremake as86 - ipfiremake mbr - ipfiremake memtest + if [ "${MACHINE:0:3}" != "arm" ]; then + ipfiremake as86 + ipfiremake mbr + ipfiremake memtest + fi ipfiremake installer cp -f $BASEDIR/doc/COPYING $BASEDIR/build/install/initrd/ installmake strip