From 200fbe924466720bd2a8c5eb05b05d67b0a2414c Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 14 Mar 2013 15:42:19 +0100 Subject: Added support for ENEA OSE This port has support for both non-smp and smp. It contains a new way to do io checking in which erts_poll_wait receives the payload of the polled entity. This has implications for all linked-in drivers. --- make/ose_lm.mk.in | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 make/ose_lm.mk.in (limited to 'make') diff --git a/make/ose_lm.mk.in b/make/ose_lm.mk.in new file mode 100644 index 0000000000..38d40c4301 --- /dev/null +++ b/make/ose_lm.mk.in @@ -0,0 +1,71 @@ +#-*-makefile-*- ; force emacs to enter makefile-mode +# ---------------------------------------------------- +# Template target for generating an OSE5 load module +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2013. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% +# +# Author: Petre Pircalabu +# ---------------------------------------------------- + +# ---------------------------------------------------- +# build-ose-load-module +# Creates an OSE5 load module +# params: +# $(1) - The output target +# $(2) - Objects +# $(3) - Libraries +# $(4) - LM configuration file +# ---------------------------------------------------- + +ifeq ($(findstring ose,$(TARGET)),ose) +LDR1FLAGS = @erl_xcomp_ose_ldflags_pass1@ +LDR2FLAGS = @erl_xcomp_ose_ldflags_pass2@ +OSEROOT = @erl_xcomp_ose_OSEROOT@ +LCF = @erl_xcomp_ose_LM_LCF@ +LMCONF = @erl_xcomp_ose_LM_CONF@ +STRIP = @erl_xcomp_ose_STRIP@ +LM_POST_LINK = @erl_xcomp_ose_LM_POST_LINK@ +LM_SET_CONF = @erl_xcomp_ose_LM_SET_CONF@ +LM_ELF_SIZE = @erl_xcomp_ose_LM_ELF_SIZE@ +endif + +define build-ose-load-module + @echo " --- Linking $(1)" + + @echo " --- Linking $(1) (pass 1)" + $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured_ro -r \ + $(2) --start-group $(3) --end-group --cref --discard-none -M > $(1)_1.map + + @echo " --- Linking $(1) (pass 2)" + $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured \ + $(1)_unconfigured_ro -T $(LCF) -n --emit-relocs -e crt0_lm --cref \ + --discard-none -M > $(1)_2.map + + @echo " --- Inserting configuration" + $(ld_verbose) $(LM_SET_CONF) $(1)_unconfigured < $(4) + + @echo " --- Striping $(1)" +# $(ld_verbose) $(STRIP) $(1)_unconfigured + + @echo " --- Postlinking $(1)" + $(ld_verbose) $(LM_POST_LINK) $(1)_unconfigured + + @echo " --- Sizing $(1)" + $(ld_verbose) $(LM_ELF_SIZE) $(1)_unconfigured + mv $(1)_unconfigured $(1) +endef -- cgit v1.2.3 From a6788ea337a2319a2d1a42ee4618553a1c7765bf Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 30 Oct 2013 17:56:37 +0100 Subject: ose: Fix various build environment issues --- make/ose_lm.mk.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'make') diff --git a/make/ose_lm.mk.in b/make/ose_lm.mk.in index 38d40c4301..2e659ada1a 100644 --- a/make/ose_lm.mk.in +++ b/make/ose_lm.mk.in @@ -42,6 +42,8 @@ STRIP = @erl_xcomp_ose_STRIP@ LM_POST_LINK = @erl_xcomp_ose_LM_POST_LINK@ LM_SET_CONF = @erl_xcomp_ose_LM_SET_CONF@ LM_ELF_SIZE = @erl_xcomp_ose_LM_ELF_SIZE@ +OSE_CONFD = @erl_xcomp_ose_CONFD@ +CRT0_LM = @erl_xcomp_ose_CRT0_LM@ endif define build-ose-load-module -- cgit v1.2.3