mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-05 01:17:45 +00:00
Add latest linux-fusion to allow DirectFB to build
Remove old fusion which only copies some files
This commit is contained in:
parent
5731eb9d55
commit
393ded18fb
@ -1,277 +0,0 @@
|
|||||||
#ifndef __LINUX__FUSION_H__
|
|
||||||
#define __LINUX__FUSION_H__
|
|
||||||
|
|
||||||
#include <asm/ioctl.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Fusion Kernel Device API Version
|
|
||||||
*/
|
|
||||||
#define FUSION_API_MAJOR 3 /* Increased if backward compatibility is dropped. */
|
|
||||||
#define FUSION_API_MINOR 2 /* Increased if new features are added. */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The Fusion ID is a unique identifier for one process consisting of threads.
|
|
||||||
*/
|
|
||||||
typedef unsigned long FusionID;
|
|
||||||
|
|
||||||
#define FUSION_ID_MASTER 1 /* This is the fusion id of the master (first process). */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Entering a world
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
struct {
|
|
||||||
int major; /* Must be set to FUSION_API_MAJOR before entering. */
|
|
||||||
int minor; /* Must be set to FUSION_API_MINOR before entering. */
|
|
||||||
} api;
|
|
||||||
|
|
||||||
FusionID fusion_id; /* Returns the fusion id of the entering process. */
|
|
||||||
} FusionEnter;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Forking in world
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
FusionID fusion_id; /* Returns the fusion id of the new (forked) fusionee. */
|
|
||||||
} FusionFork;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Sending a message
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
FusionID fusion_id; /* recipient */
|
|
||||||
|
|
||||||
int msg_id; /* optional message identifier */
|
|
||||||
int msg_size; /* message size, must be greater than zero */
|
|
||||||
const void *msg_data; /* message data, must not be NULL */
|
|
||||||
} FusionSendMessage;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Receiving a message
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
FMT_SEND, /* msg_id is an optional custom id */
|
|
||||||
FMT_CALL, /* msg_id is the call id */
|
|
||||||
FMT_REACTOR, /* msg_id is the reactor id */
|
|
||||||
FMT_SHMPOOL /* msg_id is the pool id */
|
|
||||||
} FusionMessageType;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
FusionMessageType msg_type; /* type (origin) of message */
|
|
||||||
|
|
||||||
int msg_id; /* message id (custom id or call/reactor/pool id) */
|
|
||||||
int msg_size; /* size of the following message data */
|
|
||||||
|
|
||||||
/* message data follows */
|
|
||||||
} FusionReadMessage;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Dispatching a message via a reactor
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int reactor_id;
|
|
||||||
int self;
|
|
||||||
|
|
||||||
int msg_size; /* message size, must be greater than zero */
|
|
||||||
const void *msg_data; /* message data, must not be NULL */
|
|
||||||
} FusionReactorDispatch;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Calling (synchronous RPC)
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int call_id; /* new call id returned */
|
|
||||||
|
|
||||||
void *handler; /* function pointer of handler to install */
|
|
||||||
void *ctx; /* optional handler context */
|
|
||||||
} FusionCallNew;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
FCEF_NONE = 0x00000000,
|
|
||||||
FCEF_ONEWAY = 0x00000001,
|
|
||||||
FCEF_ALL = 0x00000001
|
|
||||||
} FusionCallExecFlags;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int ret_val; /* return value of the call */
|
|
||||||
|
|
||||||
int call_id; /* id of the requested call, each call has a fixed owner */
|
|
||||||
|
|
||||||
int call_arg; /* optional int argument */
|
|
||||||
void *call_ptr; /* optional pointer argument (shared memory) */
|
|
||||||
|
|
||||||
FusionCallExecFlags flags; /* execution flags */
|
|
||||||
} FusionCallExecute;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int call_id; /* id of currently executing call */
|
|
||||||
|
|
||||||
int val; /* value to return */
|
|
||||||
} FusionCallReturn;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
void *handler; /* function pointer of handler to call */
|
|
||||||
void *ctx; /* optional handler context */
|
|
||||||
|
|
||||||
int caller; /* fusion id of the caller or zero if called from Fusion */
|
|
||||||
int call_arg; /* optional call parameter */
|
|
||||||
void *call_ptr; /* optional call parameter */
|
|
||||||
} FusionCallMessage;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Watching a reference
|
|
||||||
*
|
|
||||||
* This information is needed to have a specific call being executed if the
|
|
||||||
* reference count reaches zero. Currently one watch per reference is allowed.
|
|
||||||
*
|
|
||||||
* The call is made by Fusion and therefor has a caller id of zero.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int id; /* id of the reference to watch */
|
|
||||||
|
|
||||||
int call_id; /* id of the call to execute */
|
|
||||||
int call_arg; /* optional call parameter, e.g. the id of a user
|
|
||||||
space resource associated with that reference */
|
|
||||||
} FusionRefWatch;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Inheriting local count from other reference
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int id; /* own reference id */
|
|
||||||
int from; /* id of the reference to inherit from */
|
|
||||||
} FusionRefInherit;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Killing other fusionees (experimental)
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
FusionID fusion_id; /* fusionee to kill, zero means all but ourself */
|
|
||||||
int signal; /* signal to be delivered, e.g. SIGTERM */
|
|
||||||
int timeout_ms; /* -1 means no timeout, 0 means infinite, otherwise the
|
|
||||||
max. time to wait until the fusionee(s) terminated */
|
|
||||||
} FusionKill;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Shared memory pools
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int max_size; /* Maximum size that this pool will be allowed to grow to. */
|
|
||||||
|
|
||||||
int pool_id; /* Returns the new pool id. */
|
|
||||||
void *addr_base; /* Returns the base of the reserved virtual memory address space. */
|
|
||||||
} FusionSHMPoolNew;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int pool_id; /* The id of the pool to attach to. */
|
|
||||||
|
|
||||||
void *addr_base; /* Returns the base of the reserved virtual memory address space. */
|
|
||||||
int size; /* Returns the current size of the pool. */
|
|
||||||
} FusionSHMPoolAttach;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int pool_id; /* The id of the pool to notify. */
|
|
||||||
|
|
||||||
int size; /* New size of the pool. */
|
|
||||||
} FusionSHMPoolDispatch;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
FSMT_REMAP, /* Remap the pool due to a change of its size. */
|
|
||||||
FSMT_UNMAP /* Unmap the pool due to its destruction. */
|
|
||||||
} FusionSHMPoolMessageType;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
FusionSHMPoolMessageType type; /* Type of the message. */
|
|
||||||
|
|
||||||
int size; /* New size of the pool, if type is FSMT_REMAP. */
|
|
||||||
} FusionSHMPoolMessage;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Fusion types
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
FT_LOUNGE,
|
|
||||||
FT_MESSAGING,
|
|
||||||
FT_CALL,
|
|
||||||
FT_REF,
|
|
||||||
FT_SKIRMISH,
|
|
||||||
FT_PROPERTY,
|
|
||||||
FT_REACTOR,
|
|
||||||
FT_SHMPOOL
|
|
||||||
} FusionType;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set attributes like 'name' for an entry of the specified type.
|
|
||||||
*/
|
|
||||||
#define FUSION_ENTRY_INFO_NAME_LENGTH 24
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
FusionType type;
|
|
||||||
int id;
|
|
||||||
|
|
||||||
char name[FUSION_ENTRY_INFO_NAME_LENGTH];
|
|
||||||
} FusionEntryInfo;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define FUSION_ENTER _IOR(FT_LOUNGE, 0x00, FusionEnter)
|
|
||||||
#define FUSION_UNBLOCK _IO (FT_LOUNGE, 0x01)
|
|
||||||
#define FUSION_KILL _IOW(FT_LOUNGE, 0x02, FusionKill)
|
|
||||||
|
|
||||||
#define FUSION_ENTRY_SET_INFO _IOW(FT_LOUNGE, 0x03, FusionEntryInfo)
|
|
||||||
#define FUSION_ENTRY_GET_INFO _IOW(FT_LOUNGE, 0x04, FusionEntryInfo)
|
|
||||||
|
|
||||||
#define FUSION_FORK _IOW(FT_LOUNGE, 0x05, FusionFork)
|
|
||||||
|
|
||||||
#define FUSION_SEND_MESSAGE _IOW(FT_MESSAGING, 0x00, FusionSendMessage)
|
|
||||||
|
|
||||||
#define FUSION_CALL_NEW _IOW(FT_CALL, 0x00, FusionCallNew)
|
|
||||||
#define FUSION_CALL_EXECUTE _IOW(FT_CALL, 0x01, FusionCallExecute)
|
|
||||||
#define FUSION_CALL_RETURN _IOW(FT_CALL, 0x02, FusionCallReturn)
|
|
||||||
#define FUSION_CALL_DESTROY _IOW(FT_CALL, 0x03, int)
|
|
||||||
|
|
||||||
#define FUSION_REF_NEW _IOW(FT_REF, 0x00, int)
|
|
||||||
#define FUSION_REF_UP _IOW(FT_REF, 0x01, int)
|
|
||||||
#define FUSION_REF_UP_GLOBAL _IOW(FT_REF, 0x02, int)
|
|
||||||
#define FUSION_REF_DOWN _IOW(FT_REF, 0x03, int)
|
|
||||||
#define FUSION_REF_DOWN_GLOBAL _IOW(FT_REF, 0x04, int)
|
|
||||||
#define FUSION_REF_ZERO_LOCK _IOW(FT_REF, 0x05, int)
|
|
||||||
#define FUSION_REF_ZERO_TRYLOCK _IOW(FT_REF, 0x06, int)
|
|
||||||
#define FUSION_REF_UNLOCK _IOW(FT_REF, 0x07, int)
|
|
||||||
#define FUSION_REF_STAT _IOW(FT_REF, 0x08, int)
|
|
||||||
#define FUSION_REF_WATCH _IOW(FT_REF, 0x09, FusionRefWatch)
|
|
||||||
#define FUSION_REF_INHERIT _IOW(FT_REF, 0x0A, FusionRefInherit)
|
|
||||||
#define FUSION_REF_DESTROY _IOW(FT_REF, 0x0B, int)
|
|
||||||
|
|
||||||
#define FUSION_SKIRMISH_NEW _IOW(FT_SKIRMISH, 0x00, int)
|
|
||||||
#define FUSION_SKIRMISH_PREVAIL _IOW(FT_SKIRMISH, 0x01, int)
|
|
||||||
#define FUSION_SKIRMISH_SWOOP _IOW(FT_SKIRMISH, 0x02, int)
|
|
||||||
#define FUSION_SKIRMISH_DISMISS _IOW(FT_SKIRMISH, 0x03, int)
|
|
||||||
#define FUSION_SKIRMISH_DESTROY _IOW(FT_SKIRMISH, 0x04, int)
|
|
||||||
#define FUSION_SKIRMISH_LOCK_COUNT _IOW(FT_SKIRMISH, 0x05, int)
|
|
||||||
|
|
||||||
#define FUSION_PROPERTY_NEW _IOW(FT_PROPERTY, 0x00, int)
|
|
||||||
#define FUSION_PROPERTY_LEASE _IOW(FT_PROPERTY, 0x01, int)
|
|
||||||
#define FUSION_PROPERTY_PURCHASE _IOW(FT_PROPERTY, 0x02, int)
|
|
||||||
#define FUSION_PROPERTY_CEDE _IOW(FT_PROPERTY, 0x03, int)
|
|
||||||
#define FUSION_PROPERTY_HOLDUP _IOW(FT_PROPERTY, 0x04, int)
|
|
||||||
#define FUSION_PROPERTY_DESTROY _IOW(FT_PROPERTY, 0x05, int)
|
|
||||||
|
|
||||||
#define FUSION_REACTOR_NEW _IOW(FT_REACTOR, 0x00, int)
|
|
||||||
#define FUSION_REACTOR_ATTACH _IOW(FT_REACTOR, 0x01, int)
|
|
||||||
#define FUSION_REACTOR_DETACH _IOW(FT_REACTOR, 0x02, int)
|
|
||||||
#define FUSION_REACTOR_DISPATCH _IOW(FT_REACTOR, 0x03, FusionReactorDispatch)
|
|
||||||
#define FUSION_REACTOR_DESTROY _IOW(FT_REACTOR, 0x04, int)
|
|
||||||
|
|
||||||
#define FUSION_SHMPOOL_NEW _IOW(FT_SHMPOOL, 0x00, FusionSHMPoolNew)
|
|
||||||
#define FUSION_SHMPOOL_ATTACH _IOW(FT_SHMPOOL, 0x01, FusionSHMPoolAttach)
|
|
||||||
#define FUSION_SHMPOOL_DETACH _IOW(FT_SHMPOOL, 0x02, int)
|
|
||||||
#define FUSION_SHMPOOL_DISPATCH _IOW(FT_SHMPOOL, 0x03, FusionSHMPoolDispatch)
|
|
||||||
#define FUSION_SHMPOOL_DESTROY _IOW(FT_SHMPOOL, 0x04, int)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
#############################################################
|
|
||||||
#
|
|
||||||
# linux-fusion
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
LINUX_FUSION_VERSION:=3.2.3
|
|
||||||
LINUX_FUSION_SOURCE:=linux-fusion-$(LINUX_FUSION_VERSION).tar.gz
|
|
||||||
LINUX_FUSION_SITE:=http://www.directfb.org/downloads/Core
|
|
||||||
LINUX_FUSION_CAT:=$(ZCAT)
|
|
||||||
LINUX_FUSION_DIR:=$(TARGET_DIR)/etc/udev/rules.d
|
|
||||||
LINUX_FUSION:=40-fusion.rules
|
|
||||||
LINUX_FUSION_HEADER=$(STAGING_DIR)/usr/include/linux/fusion.h
|
|
||||||
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
# build linux-fusion
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
|
|
||||||
$(LINUX_FUSION_HEADER):
|
|
||||||
cp -dpf package/fusion/fusion.h $(LINUX_FUSION_HEADER)
|
|
||||||
|
|
||||||
$(LINUX_FUSION_DIR)/$(LINUX_FUSION):
|
|
||||||
mkdir -p $(LINUX_FUSION_DIR)
|
|
||||||
cp -dpf package/fusion/40-fusion.rules $(LINUX_FUSION_DIR)
|
|
||||||
touch -c $@
|
|
||||||
|
|
||||||
linux-fusion: $(LINUX_FUSION_DIR)/$(LINUX_FUSION) $(LINUX_FUSION_HEADER)
|
|
||||||
|
|
||||||
linux-fusion-clean:
|
|
||||||
rm -f $(LINUX_FUSION_DIR)/$(LINUX_FUSION)
|
|
||||||
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
# Toplevel Makefile options
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
ifeq ($(BR2_PACKAGE_LINUX_FUSION),y)
|
|
||||||
TARGETS+=linux-fusion
|
|
||||||
endif
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,5 @@
|
|||||||
config BR2_PACKAGE_LINUX_FUSION
|
config BR2_PACKAGE_LINUX_FUSION
|
||||||
bool "linux-fusion communication layer for DirectFB multi"
|
bool "linux-fusion communication layer for DirectFB multi"
|
||||||
depends on BR2_PACKAGE_DIRECTFB
|
|
||||||
help
|
help
|
||||||
DirectFB Communication Layer allowing multiple DirectFB
|
DirectFB Communication Layer allowing multiple DirectFB
|
||||||
applications to run concurrently
|
applications to run concurrently
|
100
package/linux-fusion/linux-fusion-8.0.2-cross-compile.patch
Normal file
100
package/linux-fusion/linux-fusion-8.0.2-cross-compile.patch
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
diff -urN linux-fusion-8.0.2-0rig//linux/drivers/char/fusion/shmpool.c linux-fusion-8.0.2/linux/drivers/char/fusion/shmpool.c
|
||||||
|
--- linux-fusion-8.0.2-0rig//linux/drivers/char/fusion/shmpool.c 2008-09-29 12:20:44.000000000 +0200
|
||||||
|
+++ linux-fusion-8.0.2/linux/drivers/char/fusion/shmpool.c 2009-01-11 17:00:19.000000000 +0100
|
||||||
|
@@ -20,6 +20,8 @@
|
||||||
|
#include <linux/slab.h>
|
||||||
|
#include <linux/smp_lock.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
+#include <asm/page.h>
|
||||||
|
+#include <linux/mm.h>
|
||||||
|
|
||||||
|
#include <linux/fusion.h>
|
||||||
|
|
||||||
|
@@ -28,8 +30,6 @@
|
||||||
|
#include "list.h"
|
||||||
|
#include "shmpool.h"
|
||||||
|
|
||||||
|
-
|
||||||
|
-
|
||||||
|
typedef struct {
|
||||||
|
FusionLink link;
|
||||||
|
unsigned long next_base;
|
||||||
|
diff -urN linux-fusion-8.0.2-0rig//Makefile linux-fusion-8.0.2/Makefile
|
||||||
|
--- linux-fusion-8.0.2-0rig//Makefile 2008-09-29 12:20:44.000000000 +0200
|
||||||
|
+++ linux-fusion-8.0.2/Makefile 2009-01-11 18:07:54.000000000 +0100
|
||||||
|
@@ -17,13 +17,15 @@
|
||||||
|
|
||||||
|
|
||||||
|
DESTDIR ?= $(SYSROOT)
|
||||||
|
-
|
||||||
|
+HEADERDIR ?= $(SYSROOT)
|
||||||
|
+# This location is valid for at least 2.6.27.10
|
||||||
|
+KERNEL_FUSION_LIB=$(KERNEL_MODLIB)/kernel/drivers/char/fusion
|
||||||
|
|
||||||
|
SUB = linux/drivers/char/fusion
|
||||||
|
|
||||||
|
export CONFIG_FUSION_DEVICE=m
|
||||||
|
|
||||||
|
-
|
||||||
|
+ARCH=avr32
|
||||||
|
ifeq ($(DEBUG),yes)
|
||||||
|
CPPFLAGS += -DFUSION_DEBUG_SKIRMISH_DEADLOCK
|
||||||
|
endif
|
||||||
|
@@ -45,25 +47,41 @@
|
||||||
|
ln -s Makefile-2.$(K_PATCHLEVEL) $(SUB)/Makefile
|
||||||
|
ifeq ($(call check-version,2,6,24),1)
|
||||||
|
$(MAKE) -C $(KERNEL_BUILD) \
|
||||||
|
- KCPPFLAGS="$(CPPFLAGS) -I`pwd`/linux/include" \
|
||||||
|
+ ARCH=avr32 \
|
||||||
|
+ CC=$(CROSS_COMPILE)gcc \
|
||||||
|
+ AS=$(CROSS_COMPILE)as \
|
||||||
|
+ KCPPFLAGS="$(CPPFLAGS) \
|
||||||
|
+ -I`pwd`/linux/include \
|
||||||
|
+ -I$(KERNEL_SOURCE)/include \
|
||||||
|
+ -I$(KERNEL_SOURCE)/arch/$(ARCH)/include" \
|
||||||
|
SUBDIRS=`pwd`/$(SUB) modules
|
||||||
|
else
|
||||||
|
$(MAKE) -C $(KERNEL_BUILD) \
|
||||||
|
- CPPFLAGS="$(CPPFLAGS) -D__KERNEL__ -I`pwd`/linux/include -I$(KERNEL_BUILD)/include -I$(KERNEL_SOURCE)/include $(AUTOCONF_H)" \
|
||||||
|
+ ARCH=avr32 \
|
||||||
|
+ CC=$(CROSS_COMPILE)gcc \
|
||||||
|
+ AS=$(CROSS_COMPILE)as \
|
||||||
|
+ CPPFLAGS="$(CPPFLAGS) \
|
||||||
|
+ -I`pwd`/linux/include \
|
||||||
|
+ -I$(KERNEL_BUILD)/include \
|
||||||
|
+ -I$(KERNEL_SOURCE)/include \
|
||||||
|
+ -I$(KERNEL_SOURCE)/arch/$(ARCH)/include \
|
||||||
|
+ $(AUTOCONF_H)" \
|
||||||
|
SUBDIRS=`pwd`/$(SUB) modules
|
||||||
|
endif
|
||||||
|
|
||||||
|
-install: all
|
||||||
|
+#-D__KERNEL__
|
||||||
|
+#-DHAVE_LINUX_CONFIG_H \
|
||||||
|
+
|
||||||
|
+install: all install-header
|
||||||
|
install -d $(DESTDIR)/usr/include/linux
|
||||||
|
install -m 644 linux/include/linux/fusion.h $(DESTDIR)/usr/include/linux
|
||||||
|
-
|
||||||
|
- install -d $(DESTDIR)$(KERNEL_MODLIB)/drivers/char/fusion
|
||||||
|
+ install -d $(DESTDIR)$(KERNEL_FUSION_LIB)
|
||||||
|
|
||||||
|
ifeq ($(K_PATCHLEVEL),4)
|
||||||
|
- install -m 644 $(SUB)/fusion.o $(DESTDIR)$(KERNEL_MODLIB)/drivers/char/fusion
|
||||||
|
+ install -m 644 $(SUB)/fusion.o $(DESTDIR)$(KERNEL_FUSION_LIB)
|
||||||
|
rm -f $(DESTDIR)$(KERNEL_MODLIB)/fusion.o
|
||||||
|
else
|
||||||
|
- install -m 644 $(SUB)/fusion.ko $(DESTDIR)$(KERNEL_MODLIB)/drivers/char/fusion
|
||||||
|
+ install -m 644 $(SUB)/fusion.ko $(DESTDIR)$(KERNEL_FUSION_LIB)
|
||||||
|
rm -f $(DESTDIR)$(KERNEL_MODLIB)/fusion.ko
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(DESTDIR)),)
|
||||||
|
@@ -72,6 +90,8 @@
|
||||||
|
/sbin/depmod -ae $(KERNEL_VERSION)
|
||||||
|
endif
|
||||||
|
|
||||||
|
+install-header:
|
||||||
|
+ install -m 644 linux/include/linux/fusion.h $(HEADERDIR)/usr/include/linux
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
83
package/linux-fusion/linux-fusion.mk
Normal file
83
package/linux-fusion/linux-fusion.mk
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
#############################################################
|
||||||
|
#
|
||||||
|
# linux-fusion
|
||||||
|
#
|
||||||
|
#############################################################
|
||||||
|
LINUX_FUSION_VERSION = 8.0.2
|
||||||
|
LINUX_FUSION_SOURCE = linux-fusion-$(LINUX_FUSION_VERSION).tar.gz
|
||||||
|
LINUX_FUSION_SITE = http://www.directfb.org/downloads/Core/
|
||||||
|
LINUX_FUSION_AUTORECONF = NO
|
||||||
|
LINUX_FUSION_INSTALL_STAGING = YES
|
||||||
|
LINUX_FUSION_INSTALL_TARGET = YES
|
||||||
|
|
||||||
|
LINUX_FUSION_CONF_OPT =
|
||||||
|
|
||||||
|
LINUX_FUSION_DEPENDENCIES = uclibc
|
||||||
|
|
||||||
|
# BR2_LINUX26_VERSION is not really dependable
|
||||||
|
# LINUX26_VERSION is not yet set.
|
||||||
|
# Retrieve REAL kernel version from file.
|
||||||
|
LINUX_FOR_FUSION=`cat $(PROJECT_BUILD_DIR)/.linux-version`
|
||||||
|
|
||||||
|
LINUX_FUSION_DIR:=$(BUILD_DIR)/linux-fusion-$(LINUX_FUSION_VERSION)
|
||||||
|
LINUX_FUSION_ETC_DIR:=$(TARGET_DIR)/etc/udev/rules.d
|
||||||
|
|
||||||
|
LINUX_FUSION_CAT:=$(ZCAT)
|
||||||
|
|
||||||
|
LINUX_FUSION_MAKE_OPTS:= KERNEL_VERSION=$(LINUX_FOR_FUSION)
|
||||||
|
LINUX_FUSION_MAKE_OPTS += KERNEL_BUILD=$(PROJECT_BUILD_DIR)/linux-$(LINUX_FOR_FUSION)
|
||||||
|
LINUX_FUSION_MAKE_OPTS += KERNEL_SOURCE=$(PROJECT_BUILD_DIR)/linux-$(LINUX_FOR_FUSION)
|
||||||
|
|
||||||
|
LINUX_FUSION_MAKE_OPTS += SYSROOT=$(STAGING_DIR)
|
||||||
|
LINUX_FUSION_MAKE_OPTS += ARCH=$(BR2_ARCH)
|
||||||
|
LINUX_FUSION_MAKE_OPTS += CROSS_COMPILE=$(TARGET_CROSS)
|
||||||
|
LINUX_FUSION_MAKE_OPTS += KERNEL_MODLIB=/lib/modules/$(LINUX_FOR_FUSION)
|
||||||
|
LINUX_FUSION_MAKE_OPTS += DESTDIR=$(PROJECT_BUILD_DIR)/root
|
||||||
|
LINUX_FUSION_MAKE_OPTS += HEADERDIR=$(STAGING_DIR)
|
||||||
|
#LINUX_FUSION_MAKE_OPTS +=
|
||||||
|
|
||||||
|
#LINUX_FUSION_MAKE_OPTS += __KERNEL__=$(LINUX26_VERSION)
|
||||||
|
|
||||||
|
$(DL_DIR)/$(LINUX_FUSION_SOURCE):
|
||||||
|
$(WGET) -P $(DL_DIR) $(LINUX_FUSION_SITE)/$(LINUX_FUSION_SOURCE)
|
||||||
|
|
||||||
|
$(LINUX_FUSION_DIR)/.unpacked: $(DL_DIR)/$(LINUX_FUSION_SOURCE)
|
||||||
|
$(LINUX_FUSION_CAT) $(DL_DIR)/$(LINUX_FUSION_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
||||||
|
toolchain/patch-kernel.sh $(LINUX_FUSION_DIR) package/linux-fusion/ linux-fusion\*.patch
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(LINUX_FUSION_DIR)/.install: $(LINUX_FUSION_DIR)/.unpacked
|
||||||
|
mkdir -p $(STAGING_DIR)/lib/modules/$(LINUX_FOR_FUSION)/source/include/linux
|
||||||
|
echo "LINUX=$(LINUX26_VERSION)"
|
||||||
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
||||||
|
$(LINUX_FUSION_MAKE_OPTS) \
|
||||||
|
-C $(LINUX_FUSION_DIR) install
|
||||||
|
rm -f $(TARGET_DIR)/usr/include/linux/fusion.h
|
||||||
|
mkdir -p $(LINUX_FUSION_ETC_DIR)
|
||||||
|
cp -dpf package/linux-fusion/40-fusion.rules $(LINUX_FUSION_ETC_DIR)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
|
linux-fusion-source: $(DL_DIR)/$(LINUX_FUSION_SOURCE)
|
||||||
|
|
||||||
|
linux-fusion-unpacked: $(LINUX_FUSION_DIR)/.unpacked
|
||||||
|
|
||||||
|
linux-fusion: uclibc linux26 $(LINUX_FUSION_DIR)/.install
|
||||||
|
|
||||||
|
linux-fusion-clean:
|
||||||
|
-$(MAKE) -C $(LINUX_FUSION_DIR) clean
|
||||||
|
rm -f $(STAGING_DIR)/usr/include/linux/fusion.h
|
||||||
|
rm -rf $(TARGET_DIR)/lib/modules/$(LINUX_FOR_FUSION)/drivers/char/fusion
|
||||||
|
rm -f $(LINUX_FUSION_DIR)/.install
|
||||||
|
|
||||||
|
linux-fusion-dirclean:
|
||||||
|
rm -rf $(LINUX_FUSION_DIR)
|
||||||
|
#############################################################
|
||||||
|
#
|
||||||
|
# Toplevel Makefile options
|
||||||
|
#
|
||||||
|
#############################################################
|
||||||
|
ifeq ($(BR2_PACKAGE_LINUX_FUSION),y)
|
||||||
|
TARGETS+=linux-fusion
|
||||||
|
endif
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user