mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 07:22:25 +00:00
parent
85a2ebc1c4
commit
35cf48cdc8
2
.gitignore
vendored
2
.gitignore
vendored
@ -11,8 +11,6 @@
|
|||||||
/repos/base-foc/contrib
|
/repos/base-foc/contrib
|
||||||
/repos/base-nova/contrib
|
/repos/base-nova/contrib
|
||||||
/repos/base-nova/download
|
/repos/base-nova/download
|
||||||
/repos/base-okl4/contrib
|
|
||||||
/repos/base-okl4/download
|
|
||||||
/repos/base-pistachio/contrib
|
/repos/base-pistachio/contrib
|
||||||
/repos/dde_ipxe/contrib
|
/repos/dde_ipxe/contrib
|
||||||
/repos/dde_linux/contrib
|
/repos/dde_linux/contrib
|
||||||
|
@ -2,37 +2,9 @@
|
|||||||
# \brief Download, unpack and patch OKL4 source code
|
# \brief Download, unpack and patch OKL4 source code
|
||||||
# \author Stefan Kalkowski
|
# \author Stefan Kalkowski
|
||||||
# \date 2011-05-02
|
# \date 2011-05-02
|
||||||
|
|
||||||
DOWNLOAD_DIR = download
|
|
||||||
CONTRIB_DIR = contrib/okl4
|
|
||||||
|
|
||||||
VERBOSE ?= @
|
|
||||||
ECHO = @echo
|
|
||||||
OKL4_VERSION = okl4_2.1.1-patch.9
|
|
||||||
OKL4_ARCHIVE = $(OKL4_VERSION).tar.gz
|
|
||||||
OKL4_URI = http://wiki.ok-labs.com/downloads/release-2.1.1-patch.9/$(OKL4_ARCHIVE)
|
|
||||||
PATCHES = $(shell find patches -name *.patch)
|
|
||||||
SHELL = bash
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Utility to check if a tool is installed
|
|
||||||
#
|
|
||||||
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
|
|
||||||
|
|
||||||
$(call check_tool,wget)
|
VERBOSE ?= @
|
||||||
$(call check_tool,patch)
|
|
||||||
$(call check_tool,sed)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Determine python version to use for OKL4's elfweaver
|
|
||||||
#
|
|
||||||
PYTHON2 := $(notdir $(lastword $(shell which python2 python2.{4,5,6,7,8})))
|
|
||||||
ifeq ($(PYTHON2),)
|
|
||||||
prepare: python_not_installed
|
|
||||||
python_not_installed:
|
|
||||||
$(ECHO) "Error: OKL4 needs Python 2 to be installed"
|
|
||||||
@false;
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Print help information by default
|
# Print help information by default
|
||||||
@ -43,29 +15,9 @@ help:
|
|||||||
$(ECHO)
|
$(ECHO)
|
||||||
$(ECHO) "--- available commands ---"
|
$(ECHO) "--- available commands ---"
|
||||||
$(ECHO) "prepare - download and extract the OKL4 source code"
|
$(ECHO) "prepare - download and extract the OKL4 source code"
|
||||||
$(ECHO) "clean - clean everything except downloaded archives"
|
|
||||||
$(ECHO) "cleanall - clean everything including downloaded archives"
|
|
||||||
$(ECHO)
|
$(ECHO)
|
||||||
|
|
||||||
$(DOWNLOAD_DIR)/$(OKL4_ARCHIVE):
|
prepare:
|
||||||
$(ECHO) "downloading source code to '$(DOWNLOAD_DIR)/'"
|
$(VERBOSE)../../tool/ports/prepare_port okl4
|
||||||
$(VERBOSE)mkdir -p $(DOWNLOAD_DIR)
|
|
||||||
$(VERBOSE)wget -c $(OKL4_URI) -O $@
|
|
||||||
|
|
||||||
$(CONTRIB_DIR): clean
|
clean cleanall:
|
||||||
|
|
||||||
$(CONTRIB_DIR): $(DOWNLOAD_DIR)/$(OKL4_ARCHIVE)
|
|
||||||
$(ECHO) "unpacking source code to '$(CONTRIB_DIR)/'"
|
|
||||||
$(VERBOSE)tar xzf $<
|
|
||||||
$(VERBOSE)mv $(OKL4_VERSION) $@
|
|
||||||
$(ECHO) "applying patches to '$(CONTRIB_DIR)/'"
|
|
||||||
$(VERBOSE)for i in $(PATCHES); do patch -d $@ -p1 < $$i; done
|
|
||||||
$(VERBOSE)sed -i "s/env python/env $(PYTHON2)/" $(CONTRIB_DIR)/tools/pyelf/elfweaver
|
|
||||||
|
|
||||||
prepare: $(CONTRIB_DIR)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(VERBOSE)rm -rf $(CONTRIB_DIR)
|
|
||||||
|
|
||||||
cleanall: clean
|
|
||||||
$(VERBOSE)rm -rf $(DOWNLOAD_DIR)
|
|
||||||
|
@ -55,3 +55,14 @@ $(BUILD_BASE_DIR)/include/bootinfo: $(OKL4_DIR)/libs/bootinfo/include
|
|||||||
$(VERBOSE)ln -sf $< $@
|
$(VERBOSE)ln -sf $< $@
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create symlink to elfweaver so that the run tool can use it from within the
|
||||||
|
# build directory.
|
||||||
|
#
|
||||||
|
HOST_TOOLS += $(BUILD_BASE_DIR)/tool/okl4/elfweaver
|
||||||
|
|
||||||
|
$(BUILD_BASE_DIR)/tool/okl4/elfweaver:
|
||||||
|
mkdir -p $(dir $@)
|
||||||
|
ln -sf $(OKL4_DIR)/tools/pyelf/elfweaver $@
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
OKL4_BUILD_DIR = $(BUILD_BASE_DIR)/kernel
|
OKL4_BUILD_DIR = $(BUILD_BASE_DIR)/kernel
|
||||||
OKL4_SRC_DIR = $(REP_DIR)/contrib/okl4
|
OKL4_SRC_DIR = $(call select_from_ports,okl4)/src/kernel/okl4
|
||||||
ARCH_DIR = $(OKL4_SRC_DIR)/arch/ia32
|
ARCH_DIR = $(OKL4_SRC_DIR)/arch/ia32
|
||||||
PLAT_DIR = $(OKL4_SRC_DIR)/platform/pc99
|
PLAT_DIR = $(OKL4_SRC_DIR)/platform/pc99
|
||||||
INC_SYMLINKS = arch/apic.h \
|
INC_SYMLINKS = arch/apic.h \
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# If no OKL4 source directory is set, we use the standard contrib directory
|
# If no OKL4 source directory is set, we use the standard contrib directory
|
||||||
#
|
#
|
||||||
OKL4_DIR ?= $(BASE_DIR)/../base-okl4/contrib/okl4
|
OKL4_DIR ?= $(call select_from_ports,okl4)/src/kernel/okl4
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make sure that symlink modification times are handled correctly.
|
# Make sure that symlink modification times are handled correctly.
|
||||||
|
1
repos/base-okl4/ports/okl4.hash
Normal file
1
repos/base-okl4/ports/okl4.hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
dummy
|
10
repos/base-okl4/ports/okl4.port
Normal file
10
repos/base-okl4/ports/okl4.port
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
LICENSE := OKL4
|
||||||
|
VERSION := 2.1.1
|
||||||
|
DOWNLOADS := okl4.archive
|
||||||
|
|
||||||
|
URL(okl4) := http://wiki.ok-labs.com/downloads/release-2.1.1-patch.9/okl4_2.1.1-patch.9.tar.gz
|
||||||
|
SHA(okl4) := ff3062344fd6b0a3bd69d99583aa271d3bb13911
|
||||||
|
DIR(okl4) := src/kernel/okl4
|
||||||
|
|
||||||
|
PATCHES := $(wildcard $(REP_DIR)/patches/*.patch)
|
||||||
|
PATCH_OPT := -p1 -d src/kernel/okl4
|
@ -166,7 +166,7 @@ proc build_boot_image {binaries} {
|
|||||||
#
|
#
|
||||||
# Run ELF Weaver to create a boot image
|
# Run ELF Weaver to create a boot image
|
||||||
#
|
#
|
||||||
set ret [exec "[okl4_dir]/tools/pyelf/elfweaver" merge --output "[run_dir]/image.elf" "[run_dir].weaver.xml"]
|
set ret [exec "./tool/okl4/elfweaver" merge --output "[run_dir]/image.elf" "[run_dir].weaver.xml"]
|
||||||
if {[regexp "error" $ret dummy]} {
|
if {[regexp "error" $ret dummy]} {
|
||||||
puts stderr "Elfweaver failed: $ret"
|
puts stderr "Elfweaver failed: $ret"
|
||||||
exit -6
|
exit -6
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
TARGET = kernel
|
TARGET = kernel
|
||||||
OKL4_SRC_DIR = $(REP_DIR)/contrib/okl4
|
OKL4_SRC_DIR = $(call select_from_ports,okl4)/src/kernel/okl4
|
||||||
OKL4_BUILD_DIR = $(BUILD_BASE_DIR)/kernel
|
OKL4_BUILD_DIR = $(BUILD_BASE_DIR)/kernel
|
||||||
REQUIRES += okl4
|
REQUIRES += okl4
|
||||||
STARTUP_LIB =
|
STARTUP_LIB =
|
||||||
|
@ -47,10 +47,10 @@ LD_TEXT_ADDR = 0xf0100000
|
|||||||
|
|
||||||
-include $(PRG_DIR)/../target.inc
|
-include $(PRG_DIR)/../target.inc
|
||||||
|
|
||||||
LD_SCRIPT_STATIC = $(OKL4_SRC_DIR)/../generated/x86/linker.ld
|
LD_SCRIPT_STATIC = $(REP_DIR)/contrib/generated/x86/linker.ld
|
||||||
INC_DIR = $(OKL4_BUILD_DIR)/include \
|
INC_DIR = $(OKL4_BUILD_DIR)/include \
|
||||||
$(OKL4_SRC_DIR)/../generated/x86 \
|
$(REP_DIR)/contrib/generated/x86 \
|
||||||
$(OKL4_SRC_DIR)/pistachio/include
|
$(OKL4_SRC_DIR)/pistachio/include
|
||||||
|
|
||||||
vpath macro_sets.cc $(OKL4_SRC_DIR)/../generated/x86
|
vpath macro_sets.cc $(REP_DIR)/contrib/generated/x86
|
||||||
vpath %.spp $(OKL4_SRC_DIR)/arch/ia32/pistachio/src
|
vpath %.spp $(OKL4_SRC_DIR)/arch/ia32/pistachio/src
|
||||||
|
Loading…
Reference in New Issue
Block a user