mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-11 03:41:43 +00:00
parent
6adbb9e438
commit
abcb0f62d7
@ -1,101 +1 @@
|
|||||||
#
|
include ../../tool/prepare.mk
|
||||||
# \brief Checkout and patch L4Linux/L4android source code
|
|
||||||
# \author Stefan Kalkowski
|
|
||||||
# \date 2011-03-10
|
|
||||||
|
|
||||||
CONTRIB_DIR = contrib
|
|
||||||
VERBOSE ?= @
|
|
||||||
ECHO = @echo
|
|
||||||
TARGET ?= l4linux
|
|
||||||
|
|
||||||
PATCH-l4linux =
|
|
||||||
REV-l4linux = r37-3.9.0
|
|
||||||
REPO-l4linux = https://github.com/ssumpf/l4linux.git
|
|
||||||
|
|
||||||
PATCH-l4android = $(addprefix patches/,l4lx_genode.patch icmp_align.patch tcp_mem.patch android_binder.patch)
|
|
||||||
REV-l4android = bf83cc85e672bfafddc0fb85398129e427d6780f
|
|
||||||
REPO-l4android = git://git.l4android.org/kernel.git
|
|
||||||
|
|
||||||
UPDATE_PATCH = $(word 1, $(PATCH-$(TARGET)))
|
|
||||||
|
|
||||||
#
|
|
||||||
# Utility to check if a tool is installed
|
|
||||||
#
|
|
||||||
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
|
|
||||||
|
|
||||||
$(call check_tool,patch)
|
|
||||||
$(call check_tool,bc)
|
|
||||||
|
|
||||||
ifeq ($(TARGET), l4android)
|
|
||||||
$(call check_tool,git)
|
|
||||||
DIFF = git diff
|
|
||||||
UPDATE = cd $(REAL_CONTRIB_DIR)/l4android; git fetch; git reset --hard $(REV-l4android)
|
|
||||||
PATCH = patch -p0
|
|
||||||
else
|
|
||||||
$(call check_tool,svn)
|
|
||||||
DIFF = git diff
|
|
||||||
UPDATE = cd $(REAL_CONTRIB_DIR)/l4linux; git fetch origin; git checkout $(REV-l4linux); \
|
|
||||||
git rebase origin/$(REV-l4linux)
|
|
||||||
PATCH = patch -p0
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# realpath is there to follow symlink; if contrib dir does not exists yet,
|
|
||||||
# create new directory
|
|
||||||
REAL_CONTRIB_DIR := $(realpath $(CONTRIB_DIR))
|
|
||||||
ifeq ($(REAL_CONTRIB_DIR),)
|
|
||||||
REAL_CONTRIB_DIR := $(CONTRIB_DIR)
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
|
||||||
# Print help information by default
|
|
||||||
#
|
|
||||||
help:
|
|
||||||
$(ECHO)
|
|
||||||
$(ECHO) "Prepare the L4Linux/L4Android repository"
|
|
||||||
$(ECHO)
|
|
||||||
$(ECHO) "--- available commands ---"
|
|
||||||
$(ECHO) "prepare - checkout and patch the L4Linux/L4Android source code"
|
|
||||||
$(ECHO) "update-patch - updates patch to the original code"
|
|
||||||
$(ECHO) "clean - revert patch from fetched code"
|
|
||||||
$(ECHO) "cleanall - delete all fetched code"
|
|
||||||
$(ECHO)
|
|
||||||
$(ECHO) "Set the variable TARGET=l4android if you want to checkout,"
|
|
||||||
$(ECHO) "update, or clean L4Android in contrast to L4Linux code."
|
|
||||||
$(ECHO)
|
|
||||||
|
|
||||||
prepare: clean
|
|
||||||
$(VERBOSE)$(UPDATE)
|
|
||||||
$(ECHO) "applying patches to '$(REAL_CONTRIB_DIR)/$(TARGET)'"
|
|
||||||
$(VERBOSE)for i in $(PATCH-$(TARGET)); do $(PATCH) -d $(REAL_CONTRIB_DIR)/$(TARGET) < $$i; done
|
|
||||||
$(VERBOSE)ln -s $(shell pwd)/src/drivers $(REAL_CONTRIB_DIR)/$(TARGET)/arch/l4/drivers
|
|
||||||
$(ECHO)
|
|
||||||
$(ECHO) "Preparation completed!"
|
|
||||||
$(ECHO) "Now, go to your Genode build directory and type 'make $(TARGET)'."
|
|
||||||
$(ECHO) "Hint: don't forget to put '$(shell pwd)' "
|
|
||||||
$(ECHO) " as a repository into your build.conf"
|
|
||||||
$(ECHO)
|
|
||||||
|
|
||||||
$(CONTRIB_DIR):
|
|
||||||
$(VERBOSE)mkdir -p $@
|
|
||||||
|
|
||||||
$(REAL_CONTRIB_DIR)/l4linux:
|
|
||||||
$(VERBOSE)git clone $(REPO-l4linux) $@
|
|
||||||
|
|
||||||
$(REAL_CONTRIB_DIR)/l4android:
|
|
||||||
$(VERBOSE)git clone $(REPO-l4android) $@
|
|
||||||
|
|
||||||
update-patch:
|
|
||||||
$(ECHO) "Save changes to original code in $(UPDATE_PATCH)"
|
|
||||||
$(VERBOSE)(cd $(REAL_CONTRIB_DIR)/$(TARGET); LC_COLLATE=C $(DIFF)) > $(UPDATE_PATCH) || true
|
|
||||||
|
|
||||||
clean: clean-$(TARGET)
|
|
||||||
$(VERBOSE)rm -f $(CONTRIB_DIR)/$(TARGET)/arch/l4/drivers
|
|
||||||
|
|
||||||
clean-l4linux: $(REAL_CONTRIB_DIR)/$(TARGET)
|
|
||||||
|
|
||||||
clean-l4android: $(REAL_CONTRIB_DIR)/$(TARGET)
|
|
||||||
$(VERBOSE)cd $(REAL_CONTRIB_DIR)/l4android; git checkout -f
|
|
||||||
|
|
||||||
cleanall:
|
|
||||||
$(VERBOSE)rm -rf $(CONTRIB_DIR)
|
|
||||||
|
@ -9,6 +9,7 @@ GENODE_LIBS := $(foreach l,$(GENODE_LIBS),$(BUILD_BASE_DIR)/var/libcache/
|
|||||||
GENODE_LIBS_SORTED = $(sort $(wildcard $(GENODE_LIBS)))
|
GENODE_LIBS_SORTED = $(sort $(wildcard $(GENODE_LIBS)))
|
||||||
GENODE_LIBS_SORTED += $(shell $(CC) $(CC_MARCH) -print-libgcc-file-name)
|
GENODE_LIBS_SORTED += $(shell $(CC) $(CC_MARCH) -print-libgcc-file-name)
|
||||||
|
|
||||||
|
L4LX_CONTRIB_DIR := $(call select_from_ports,$(LX_TARGET))/src
|
||||||
L4LX_BUILD = $(BUILD_BASE_DIR)/$(LX_TARGET)
|
L4LX_BUILD = $(BUILD_BASE_DIR)/$(LX_TARGET)
|
||||||
L4LX_BINARY = $(L4LX_BUILD)/$(TARGET)
|
L4LX_BINARY = $(L4LX_BUILD)/$(TARGET)
|
||||||
L4LX_SYMLINK = $(BUILD_BASE_DIR)/bin/$(LX_TARGET)
|
L4LX_SYMLINK = $(BUILD_BASE_DIR)/bin/$(LX_TARGET)
|
||||||
@ -18,7 +19,7 @@ $(TARGET): $(L4LX_BINARY)
|
|||||||
|
|
||||||
$(L4LX_BINARY): $(L4LX_CONFIG)
|
$(L4LX_BINARY): $(L4LX_CONFIG)
|
||||||
$(VERBOSE_MK)$(MAKE) $(VERBOSE_DIR) \
|
$(VERBOSE_MK)$(MAKE) $(VERBOSE_DIR) \
|
||||||
-C $(REP_DIR)/contrib/$(LX_TARGET) \
|
-C $(L4LX_CONTRIB_DIR)/$(LX_TARGET) \
|
||||||
O=$(L4LX_BUILD) \
|
O=$(L4LX_BUILD) \
|
||||||
CROSS_COMPILE="$(CROSS_DEV_PREFIX)" \
|
CROSS_COMPILE="$(CROSS_DEV_PREFIX)" \
|
||||||
CC="$(CC)" \
|
CC="$(CC)" \
|
||||||
@ -36,4 +37,3 @@ clean:
|
|||||||
$(VERBOSE)rm -rf $(L4LX_BUILD)
|
$(VERBOSE)rm -rf $(L4LX_BUILD)
|
||||||
|
|
||||||
.PHONY: $(L4LX_BINARY)
|
.PHONY: $(L4LX_BINARY)
|
||||||
|
|
||||||
|
1
repos/ports-foc/ports/l4android.hash
Normal file
1
repos/ports-foc/ports/l4android.hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
dummy
|
15
repos/ports-foc/ports/l4android.port
Normal file
15
repos/ports-foc/ports/l4android.port
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
LICENSE := GPLv2
|
||||||
|
VERSION := git
|
||||||
|
DOWNLOADS := l4android.git
|
||||||
|
URL(l4android) := http://git.l4android.org/kernel
|
||||||
|
REV(l4android) := bf83cc85e672bfafddc0fb85398129e427d6780f
|
||||||
|
DIR(l4android) := src/l4android
|
||||||
|
PATCH_OPT := -p0 -d src/l4android
|
||||||
|
PATCHES = $(addprefix $(REP_DIR)/patches/,l4lx_genode.patch icmp_align.patch tcp_mem.patch android_binder.patch)
|
||||||
|
sym_link := src/l4android/arch/l4/drivers
|
||||||
|
|
||||||
|
default: $(sym_link)
|
||||||
|
|
||||||
|
# make sure to have downloaded the files before symlinking into it
|
||||||
|
$(sym_link) : $(DOWNLOADS)
|
||||||
|
$(VERBOSE)ln -sfT $(REP_DIR)/src/drivers $@
|
1
repos/ports-foc/ports/l4linux.hash
Normal file
1
repos/ports-foc/ports/l4linux.hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
dummy
|
13
repos/ports-foc/ports/l4linux.port
Normal file
13
repos/ports-foc/ports/l4linux.port
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
LICENSE := GPLv2
|
||||||
|
VERSION := git
|
||||||
|
DOWNLOADS := l4linux.git
|
||||||
|
URL(l4linux) := https://github.com/ssumpf/l4linux.git
|
||||||
|
REV(l4linux) := 75354b3f0f6ed7b9ebec118670213062c5a4c78e
|
||||||
|
DIR(l4linux) := src/l4linux
|
||||||
|
sym_link := src/l4linux/arch/l4/drivers
|
||||||
|
|
||||||
|
default: $(sym_link)
|
||||||
|
|
||||||
|
# make sure to have downloaded the files before symlinking into it
|
||||||
|
$(sym_link) : $(DOWNLOADS)
|
||||||
|
$(VERBOSE)ln -sfT $(REP_DIR)/src/drivers $@
|
Loading…
x
Reference in New Issue
Block a user