Skip to content

Commit

Permalink
add sparcv8leon3-generic target
Browse files Browse the repository at this point in the history
JIRA: RTOS-887
  • Loading branch information
lukileczo committed Aug 14, 2024
1 parent 1b0b01d commit 4a86cb2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
37 changes: 37 additions & 0 deletions build-core-sparcv8leon3-generic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
#
# Shell script for building Phoenix-RTOS firmware
#
# Builder for Phoenix-RTOS core components
#
# Copyright 2023 Phoenix Systems
# Author: Lukasz Leczkowski
#

# fail immediately if any of the commands fails
set -e

b_log "Building phoenix-rtos-kernel"
make -C "phoenix-rtos-kernel" all

if [ "$LIBPHOENIX_DEVEL_MODE" = "y" ]; then
make -C "phoenix-rtos-kernel" install-headers

b_log "Building libphoenix"
make -C "libphoenix" all install
fi

b_log "Building phoenix-rtos-corelibs"
make -C "phoenix-rtos-corelibs" all

b_log "Building phoenix-rtos-filesystems"
make -C "phoenix-rtos-filesystems" all install

b_log "Building phoenix-rtos-devices"
make -C "phoenix-rtos-devices" all install

b_log "Building coreutils"
make -C "phoenix-rtos-utils" all install

b_log "Building posixsrv"
make -C "phoenix-rtos-posixsrv" all install
3 changes: 2 additions & 1 deletion makes/include-target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ endif
# SPARCV8 LEON 3
TARGETS_SPARC := \
sparcv8leon3-gr716 \
sparcv8leon3-gr712rc
sparcv8leon3-gr712rc \
sparcv8leon3-generic

TARGETS += $(TARGETS_SPARC)
ifneq (,$(filter $(TARGETS_SPARC),$(TARGET_FAMILY)-$(TARGET_SUBFAMILY)))
Expand Down
19 changes: 17 additions & 2 deletions target/sparcv8leon3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# SPARCv8 LEON3 options
#
# Copyright 2022, 2023 Phoenix Systems
# Copyright 2022-2024 Phoenix Systems
#
# %LICENSE%
#
Expand Down Expand Up @@ -41,7 +41,22 @@ else ifeq ($(TARGET_SUBFAMILY), gr712rc)
endif
STRIP := $(CROSS)strip
VADDR_KERNEL_INIT := 0xc0000000
CFLAGS += -mfix-gr712rc -DLEON3_TN_0018_FIX
CFLAGS += -mfix-gr712rc
CPPFLAGS += -DLEON3_TN_0018_FIX
LDFLAGS += -Wl,-z,max-page-size=0x1000

HAVE_MMU := y
else ifeq ($(TARGET_SUBFAMILY), generic)
ifeq ($(KERNEL), 1)
CFLAGS +=
# `mno-user-mode flag affects only `casa` instruction
# funnily enough, real hw can run without it
# but qemu will throw an exception
CFLAGS += -msoft-float -mno-user-mode
endif

STRIP := $(CROSS)strip
VADDR_KERNEL_INIT := 0xc0000000
LDFLAGS += -Wl,-z,max-page-size=0x1000

HAVE_MMU := y
Expand Down

0 comments on commit 4a86cb2

Please sign in to comment.