Integrate the spec-library into the spec-sw recipe and point to the right…

Integrate the spec-library into the spec-sw recipe and point to the right sysroot in sdb-lib Makefile
parent 5c9728c1
......@@ -13,7 +13,6 @@ IMAGE_INSTALL += " \
spec-init \
nic-bitstream \
nic-wrc \
spec-library \
demo-dio \
demo-user \
demo-python \
......
......@@ -13,7 +13,6 @@ IMAGE_INSTALL += " \
spec-init \
nic-bitstream \
nic-wrc \
spec-library \
demo-dio \
demo-user \
demo-python \
......
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
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:
SUMMARY = "Provides libspec dynamic library intended for user-space SPEC control"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
inherit module
PR = "r0"
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 = "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"
do_install() {
install -d ${D}${libdir}
install -m 0755 ${S}/tools/libspec.so ${D}${libdir}
}
# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.
diff -Naur a/fmc-bus/sdb-lib/Makefile b/fmc-bus/sdb-lib/Makefile
--- a/fmc-bus/sdb-lib/Makefile 2016-02-21 04:32:36.547159230 +0100
+++ b/fmc-bus/sdb-lib/Makefile 2016-02-21 04:34:32.755904847 +0100
@@ -9,1 +9,1 @@
-LINUX ?= /lib/modules/$(shell uname -r)/build
+LINUX ?= $(KERNEL_SRC)
@@ -37,1 +37,2 @@
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
+CFLAGS += --sysroot=${CROSS_COMPILE_SYSROOT}
......@@ -12,6 +12,7 @@ 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-sdb-lib.patch \
file://makefile-fmc-tools.patch \
file://makefile-fmc-tools-ipmi.patch \
file://makefile-fmc-fix.patch"
......@@ -30,10 +31,14 @@ do_fetch_extra(){
addtask fetch_extra after do_unpack before do_patch
FILES_${PN} += "${bindir}/*"
FILES_${PN} += "${bindir}/* ${libdir}/*.so"
FILES_${PN}-staticdev = "${bindir}/libspec.a"
FILES_SOLIBSDEV = ""
do_install_extra() {
install -d ${D}${libdir}
install -m 0755 ${S}/tools/libspec.so ${D}${libdir}
install -d ${D}${bindir}
install -m 0755 ${S}/tools/spec-cl ${D}${bindir}
install -m 0755 ${S}/tools/spec-fwloader ${D}${bindir}
......
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