base-fiasco: migrate to new ports mechanism

Issue #1082
This commit is contained in:
Stefan Kalkowski 2014-05-23 12:06:08 +02:00 committed by Norman Feske
parent 5cdfb0a3a5
commit de4335b443
5 changed files with 18 additions and 60 deletions

View File

@ -1,57 +1 @@
#
# \brief Download, and unpack Fiasco and addtional needed tools (sigma0, bootstrap)
# \author Stefan Kalkowski
# \date 2011-07-18
#
VERBOSE ?= @
ECHO = @echo
DOWNLOAD_DIR = download
CONTRIB_DIR = contrib
FIASCO_ARCHIVE = 3rd_fiasco.tar.bz2
FIASCO_URI = http://downloads.sourceforge.net/project/genode/3rd/$(FIASCO_ARCHIVE)
PATCHES = $(shell find patches -name *.patch)
#
# Utility to check if a tool is installed
#
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
$(call check_tool,wget)
$(call check_tool,patch)
$(call check_tool,tar)
$(call check_tool,byacc)
#
# Print help information by default
#
help:
$(ECHO)
$(ECHO) "Prepare the Fiasco base repository"
$(ECHO)
$(ECHO) "--- available commands ---"
$(ECHO) "prepare - download and extract the Fiasco source code"
$(ECHO) "clean - clean everything except downloaded archives"
$(ECHO) "cleanall - clean everything including downloaded archives"
$(ECHO)
$(DOWNLOAD_DIR)/$(FIASCO_ARCHIVE):
$(ECHO) "downloading source code to '$(DOWNLOAD_DIR)/'"
$(VERBOSE)mkdir -p $(DOWNLOAD_DIR)
$(VERBOSE)wget -c $(FIASCO_URI) -O $@
$(CONTRIB_DIR): $(DOWNLOAD_DIR)/$(FIASCO_ARCHIVE)
$(ECHO) "unpacking source code to '$(CONTRIB_DIR)/'"
$(VERBOSE)tar xjf $<
$(VERBOSE)mv 3rd $@
$(ECHO) "applying patches to '$@/'"
$(VERBOSE)for i in $(PATCHES); do patch -d $@ -p0 < $$i; done
$(VERBOSE)touch $@
prepare: $(CONTRIB_DIR)
clean:
$(VERBOSE)rm -rf $(CONTRIB_DIR)
cleanall: clean
$(VERBOSE)rm -rf $(DOWNLOAD_DIR)
include ../../tool/prepare.mk

View File

@ -10,8 +10,8 @@
-include $(call select_from_repositories,etc/fiasco.conf)
-include $(BUILD_BASE_DIR)/etc/fiasco.conf
L4_BUILD_DIR ?= $(BUILD_BASE_DIR)/l4
L4_SRC_DIR ?= $(REP_DIR)/contrib/fiasco/snapshot
L4_BUILD_DIR := $(BUILD_BASE_DIR)/l4
L4_SRC_DIR := $(call select_from_ports,fiasco)/src/kernel/fiasco/fiasco/snapshot
#
# L4/sys headers

View File

@ -0,0 +1 @@
dummy

View File

@ -0,0 +1,13 @@
LICENSE := GPLv2
VERSION := 1.0
DOWNLOADS := fiasco.archive
URL(fiasco) := http://downloads.sourceforge.net/project/genode/3rd/3rd_fiasco.tar.bz2
SHA(fiasco) := 0e7e24ab8ff2780b1854e3a6372b9a9c09c5b47d
DIR(fiasco) := src/kernel/fiasco
PATCHES := $(shell find $(REP_DIR)/patches -name *.patch)
PATCH_OPT := -p0 -d src/kernel/fiasco
$(call check_tool,wget)
$(call check_tool,patch)
$(call check_tool,tar)
$(call check_tool,byacc)

View File

@ -2,7 +2,7 @@ TARGET = fiasco
REQUIRES += fiasco
FIASCO_BUILD_DIR = $(BUILD_BASE_DIR)/kernel/$(TARGET)
FIASCO = $(FIASCO_BUILD_DIR)/fiasco
FIASCO_SRC = $(REP_DIR)/contrib/fiasco/snapshot/kernel/fiasco
FIASCO_SRC = $(L4_SRC_DIR)/kernel/fiasco
STARTUP_LIB =
$(TARGET): $(FIASCO)