Merge branch 'arm-port' of ssh://git.ipfire.org/pub/git/people/ms/ipfire-2.x into arm-port

This commit is contained in:
Arne Fitzenreiter
2011-09-07 12:15:08 +00:00
9 changed files with 123 additions and 22 deletions

View File

@@ -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)

View File

@@ -34,10 +34,6 @@ TARGET = $(DIR_INFO)/$(THISAPP)
PROG = mysql
PAK_VER = 1
ifeq "$(MACHINE)" "arm"
MAKETUNING = -j1
endif
###############################################################################
# Top-level Rules
###############################################################################

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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

42
make.sh
View File

@@ -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
@@ -622,7 +626,7 @@ buildipfire() {
ipfiremake strongswan
ipfiremake lsof
ipfiremake centerim
ipfiremake br2684ctl
#ipfiremake br2684ctl
ipfiremake pcmciautils
ipfiremake lm_sensors
ipfiremake liboping
@@ -633,12 +637,12 @@ buildipfire() {
ipfiremake igmpproxy
ipfiremake fbset
ipfiremake sdl
ipfiremake qemu
ipfiremake qemu-kqemu
#ipfiremake qemu
#ipfiremake qemu-kqemu
ipfiremake sane
ipfiremake netpbm
ipfiremake phpSANE
ipfiremake tunctl
#ipfiremake tunctl
ipfiremake nagios
ipfiremake nagios_nrpe
ipfiremake ebtables
@@ -649,7 +653,7 @@ buildipfire() {
ipfiremake faad2
ipfiremake ffmpeg
ipfiremake videolan
ipfiremake vdr
#ipfiremake vdr
ipfiremake w_scan
ipfiremake icecast
ipfiremake icegenerator
@@ -662,12 +666,14 @@ buildipfire() {
ipfiremake vnstat
ipfiremake vnstati
ipfiremake iw
ipfiremake wpa_supplicant
ipfiremake hostapd
#ipfiremake wpa_supplicant
#ipfiremake hostapd
ipfiremake urlgrabber
ipfiremake syslinux
if [ "${MACHINE:0:3}" != "arm" ]; then
ipfiremake syslinux
fi
ipfiremake tftpd
ipfiremake cpufrequtils
#ipfiremake cpufrequtils
ipfiremake dbus
ipfiremake bluetooth
ipfiremake gutenprint
@@ -690,7 +696,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
@@ -699,8 +707,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
@@ -746,9 +754,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

View File

@@ -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 <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <asm/page.h> /* For definition of PAGE_SIZE */
#include <linux/vt.h>
+#if defined(linux)
+#define HAS_MMAP_ANON
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <asm/page.h> /* 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);

View File

@@ -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 <sys/param.h> /* 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 <asm/page.h>. So
+ * PAGE_SHIFT no longer necessarily exists. So
* we use PAGE_SIZE to compute PAGE_SHIFT...
*/
#include <asm/page.h>
@@ -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;