Upgrade spec-sw version and introduce the appropriated SYSROOT to GCC

parent 4882cd3d
diff -Naur a/Makefile b/Makefile
--- a/Makefile 2014-11-09 06:17:52.657700773 +0100
+++ b/Makefile 2014-11-09 06:19:26.030800405 +0100
@@ -1,13 +1,6 @@
diff -Naur a/kernel/Makefile b/kernel/Makefile
--- a/kernel/Makefile 2014-11-08 04:17:52.657700773 +0100
+++ b/kernel/Makefile 2014-11-08 04:19:26.030800405 +0100
@@ -1,5 +1,5 @@
-LINUX ?= /lib/modules/$(shell uname -r)/build
+LINUX ?= $(KERNEL_SRC)
FMC_DRV ?= $(shell ../check-fmc-bus)
export FMC_DRV
-# We have a problem here: this package may be a submodule of something
-# else (for example: fine-delay). If this is the case, fmc-bus is on ../
-# This external script returns the pathname of the "kernel" subdir of fmc-bus
-FMC_DRV ?= $(shell ./check-fmc-bus)
-export FMC_DRV
-
-RUNME := $(shell test -d $(FMC_DRV) || git submodule update --init)
-
-DIRS = $(FMC_DRV) kernel tools
+# This is a dirty hack: just compile the tools
+DIRS = tools
all clean modules install modules_install:
for d in $(DIRS); do $(MAKE) -C $$d $@ || exit 1; done
diff -Naur a/fmc-bus/kernel/Makefile b/fmc-bus/kernel/Makefile
--- a/fmc-bus/kernel/Makefile 2014-11-08 04:36:30.957186266 +0100
+++ b/fmc-bus/kernel/Makefile 2014-11-08 04:50:12.313185206 +0100
@@ -1,7 +1,7 @@
# include parent_common.mk for buildsystem's defines
# It allows you to inherit an environment configuration from larger project
REPO_PARENT=../..
-include $(REPO_PARENT)/parent_common.mk
-LINUX ?= /lib/modules/$(shell uname -r)/build
+LINUX ?= $(KERNEL_SRC)
GIT_VERSION = $(shell git describe --dirty --long --tags)
diff -Naur a/fmc-bus/tools/libipmi/Makefile b/fmc-bus/tools/libipmi/Makefile
--- a/fmc-bus/tools/libipmi/Makefile 2016-02-21 04:44:20.171454270 +0100
+++ b/fmc-bus/tools/libipmi/Makefile 2016-02-21 04:45:32.193437476 +0100
@@ -15,6 +15,7 @@
GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS+=-fPIC -shared -Wall -Wextra -ggdb $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
+CFLAGS += --sysroot=${CROSS_COMPILE_SYSROOT}
all: $(OUT) $(OUT_SO)
diff -Naur a/fmc-bus/tools/Makefile b/fmc-bus/tools/Makefile
--- a/fmc-bus/tools/Makefile 2016-02-21 04:32:36.547159230 +0100
+++ b/fmc-bus/tools/Makefile 2016-02-21 04:34:32.755904847 +0100
@@ -11,6 +11,7 @@
GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS = -Wall -ggdb -O2 -I../kernel/include $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
+CFLAGS += --sysroot=${CROSS_COMPILE_SYSROOT}
PROGS = fru-dump fmc-mem
all: $(PROGS)
diff -Naur a/tools/Makefile b/tools/Makefile
--- a/tools/Makefile 2016-02-21 03:58:58.163683244 +0100
+++ b/tools/Makefile 2016-02-21 04:13:12.787749303 +0100
@@ -10,6 +10,7 @@
GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS += -ggdb -Wall -fPIC -I../kernel $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
+CFLAGS += --sysroot=${CROSS_COMPILE_SYSROOT}
LIB = libspec.a
LIBOBJ = speclib.o loader-ll.o
@@ -31,7 +32,7 @@
${CC} $(CFLAGS) -c $^ -I .
$(LIBSHARED): $(LIB)
- $(CC) -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive
+ $(CC) --sysroot=${CROSS_COMPILE_SYSROOT} -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive
clean:
......@@ -10,11 +10,24 @@ PV = "0.1"
SRC_URI = "git://ohwr.org/fmc-projects/spec/spec-sw.git \
file://makefile-fix.patch"
SRCREV = "aed186b9a3783b1f3763eb0ba64613d536250b9d"
file://makefile-fix.patch \
file://makefile-tools.patch \
file://makefile-fmc-tools.patch \
file://makefile-fmc-tools-ipmi.patch \
file://makefile-fmc-fix.patch"
SRCREV = "d56cd47c9ba68630b907488288c57e251eb5c2d3"
S = "${WORKDIR}/git"
export CROSS_COMPILE_SYSROOT = "${STAGING_DIR_TARGET}"
# Most of spec-sw is in git submodules that still need to be fetched.
do_fetch_extra(){
git submodule update --init --recursive
}
addtask fetch_extra after do_unpack before do_patch
FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/*.so"
......
......@@ -2,11 +2,12 @@
diff -Naur a/fmc-bus/kernel/Makefile b/fmc-bus/kernel/Makefile
--- a/fmc-bus/kernel/Makefile 2014-11-08 04:36:30.957186266 +0100
+++ b/fmc-bus/kernel/Makefile 2014-11-08 04:50:12.313185206 +0100
@@ -1,5 +1,5 @@
@@ -1,7 +1,7 @@
# include parent_common.mk for buildsystem's defines
# It allows you to inherit an environment configuration from larger project
REPO_PARENT=../..
-include $(REPO_PARENT)/parent_common.mk
-LINUX ?= /lib/modules/$(shell uname -r)/build
+LINUX ?= $(KERNEL_SRC)
ccflags-y += -I$M/include
GIT_VERSION = $(shell git describe --dirty --long --tags)
diff -Naur a/fmc-bus/tools/libipmi/Makefile b/fmc-bus/tools/libipmi/Makefile
--- a/fmc-bus/tools/libipmi/Makefile 2016-02-21 04:44:20.171454270 +0100
+++ b/fmc-bus/tools/libipmi/Makefile 2016-02-21 04:45:32.193437476 +0100
@@ -15,6 +15,7 @@
GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS+=-fPIC -shared -Wall -Wextra -ggdb $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
+CFLAGS += --sysroot=${CROSS_COMPILE_SYSROOT}
all: $(OUT) $(OUT_SO)
diff -Naur a/fmc-bus/tools/Makefile b/fmc-bus/tools/Makefile
--- a/fmc-bus/tools/Makefile 2016-02-21 04:32:36.547159230 +0100
+++ b/fmc-bus/tools/Makefile 2016-02-21 04:34:32.755904847 +0100
@@ -11,6 +11,7 @@
GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS = -Wall -ggdb -O2 -I../kernel/include $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
+CFLAGS += --sysroot=${CROSS_COMPILE_SYSROOT}
PROGS = fru-dump fmc-mem
all: $(PROGS)
diff -Naur a/tools/Makefile b/tools/Makefile
--- a/tools/Makefile 2016-02-21 03:58:58.163683244 +0100
+++ b/tools/Makefile 2016-02-21 04:13:12.787749303 +0100
@@ -10,6 +10,7 @@
GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS += -ggdb -Wall -fPIC -I../kernel $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
+CFLAGS += --sysroot=${CROSS_COMPILE_SYSROOT}
LIB = libspec.a
LIBOBJ = speclib.o loader-ll.o
@@ -31,7 +32,7 @@
${CC} $(CFLAGS) -c $^ -I .
$(LIBSHARED): $(LIB)
- $(CC) -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive
+ $(CC) --sysroot=${CROSS_COMPILE_SYSROOT} -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive
clean:
......@@ -11,11 +11,16 @@ PV = "0.1"
SRC_URI = "git://ohwr.org/fmc-projects/spec/spec-sw.git \
file://makefile-fix.patch \
file://makefile-tools.patch \
file://makefile-fmc-tools.patch \
file://makefile-fmc-tools-ipmi.patch \
file://makefile-fmc-fix.patch"
SRCREV = "eb9b9d03e3f54657fe29fca93021e2b45380da05"
SRCREV = "d56cd47c9ba68630b907488288c57e251eb5c2d3"
S = "${WORKDIR}/git"
export CROSS_COMPILE_SYSROOT = "${STAGING_DIR_TARGET}"
# Most of spec-sw is in git submodules that still need to be fetched.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment