From 8f0c6bbd5c5294cb41e44223aa18b75b4dafe9c2 Mon Sep 17 00:00:00 2001 From: songyanguang <345810377@qq.com> Date: Thu, 19 Dec 2024 20:59:36 +0800 Subject: [PATCH] build services --- Ubiquitous/XiZi_AIoT/Makefile | 3 +-- Ubiquitous/XiZi_AIoT/services/Makefile | 6 ++++-- Ubiquitous/XiZi_AIoT/services/app/Makefile | 10 ++++++++++ Ubiquitous/XiZi_AIoT/services/fs/fs_server/Makefile | 5 +++++ Ubiquitous/XiZi_AIoT/services/fs/libfs/Makefile | 5 +++++ Ubiquitous/XiZi_AIoT/services/lib/ipc/Makefile | 5 +++++ Ubiquitous/XiZi_AIoT/services/lib/memory/Makefile | 5 +++++ Ubiquitous/XiZi_AIoT/services/lib/serial/Makefile | 5 +++++ Ubiquitous/XiZi_AIoT/services/lib/usyscall/Makefile | 5 +++++ .../XiZi_AIoT/services/shell/letter-shell/Makefile | 5 +++++ Ubiquitous/XiZi_AIoT/softkernel/memory/Makefile | 2 +- 11 files changed, 51 insertions(+), 5 deletions(-) diff --git a/Ubiquitous/XiZi_AIoT/Makefile b/Ubiquitous/XiZi_AIoT/Makefile index c78e94350..0f58c8fda 100755 --- a/Ubiquitous/XiZi_AIoT/Makefile +++ b/Ubiquitous/XiZi_AIoT/Makefile @@ -46,8 +46,7 @@ export CONFIG2H_EXE ?= $(HOSTTOOLS_DIR)/xsconfig.sh export CPPPATHS export SRC_APP_DIR := ../../APP_Framework -# export SRC_KERNEL_DIR := hardkernel kernel_actracer services softkernel -export SRC_KERNEL_DIR := hardkernel kernel_actracer softkernel +export SRC_KERNEL_DIR := hardkernel kernel_actracer services softkernel export SRC_DIR := $(SRC_KERNEL_DIR) export LIBCC diff --git a/Ubiquitous/XiZi_AIoT/services/Makefile b/Ubiquitous/XiZi_AIoT/services/Makefile index b3a5f2c41..873b26eef 100644 --- a/Ubiquitous/XiZi_AIoT/services/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/Makefile @@ -1,5 +1,7 @@ - +ifeq ($(BOARD), jh7110) +SRC_DIR := fs shell lib boards tools app +else SRC_DIR := fs shell lib boards drivers semaphore drivers tools net app - +endif include $(KERNEL_ROOT)/compiler.mk diff --git a/Ubiquitous/XiZi_AIoT/services/app/Makefile b/Ubiquitous/XiZi_AIoT/services/app/Makefile index 2b5808fe6..164a76a2e 100644 --- a/Ubiquitous/XiZi_AIoT/services/app/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/app/Makefile @@ -16,6 +16,12 @@ user_ldflags = -N -Ttext 0 cflags = -Wall -O2 -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie board_specs = stub.o endif +ifeq ($(BOARD), jh7110) +toolchain ?= riscv64-unknown-elf- +user_ldflags = -N -Ttext 0 +cflags = -Wall -O2 -std=c11 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie +board_specs = stub.o +endif cc = ${toolchain}gcc ld = ${toolchain}g++ @@ -45,7 +51,11 @@ INC_DIR = -I$(KERNEL_ROOT)/services/shell/letter-shell \ ifeq ($(BOARD), imx6q-sabrelite) all: test_fault simple_client simple_server shell fs_server semaphore_server test_semaphore test_ipc_null test_thread test_irq_hdlr test_irq_block test_irq_send eth_driver epit_server test_net lwip readme.txt | bin else +ifeq ($(BOARD), jh7110) +all: shell fs_server | bin +else all: test_fault simple_client simple_server shell fs_server semaphore_server test_ipc_null test_thread test_semaphore test_net lwip readme.txt eth_hal | bin +endif endif ../tools/mkfs/mkfs ./fs.img $^ @mv $(filter-out readme.txt, $^) bin diff --git a/Ubiquitous/XiZi_AIoT/services/fs/fs_server/Makefile b/Ubiquitous/XiZi_AIoT/services/fs/fs_server/Makefile index 9267ae0a5..be3c9e7c4 100644 --- a/Ubiquitous/XiZi_AIoT/services/fs/fs_server/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/fs/fs_server/Makefile @@ -14,6 +14,11 @@ toolchain ?= aarch64-none-elf- user_ldflags = -N -Ttext 0 cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie endif +ifeq ($(BOARD), jh7110) +toolchain ?= riscv64-unknown-elf- +user_ldflags = -N -Ttext 0 +cflags = -Wall -O0 -g -std=c11 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie +endif cc = ${toolchain}gcc ld = ${toolchain}g++ diff --git a/Ubiquitous/XiZi_AIoT/services/fs/libfs/Makefile b/Ubiquitous/XiZi_AIoT/services/fs/libfs/Makefile index dbbeb93e9..64814b1cd 100644 --- a/Ubiquitous/XiZi_AIoT/services/fs/libfs/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/fs/libfs/Makefile @@ -13,6 +13,11 @@ toolchain ?= aarch64-none-elf- user_ldflags = -N cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie endif +ifeq ($(BOARD), jh7110) +toolchain ?= riscv64-unknown-elf- +user_ldflags = -N +cflags = -Wall -O0 -g -std=c11 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie +endif cc = ${toolchain}gcc ld = ${toolchain}g++ diff --git a/Ubiquitous/XiZi_AIoT/services/lib/ipc/Makefile b/Ubiquitous/XiZi_AIoT/services/lib/ipc/Makefile index f8e1072cd..9d6c02a55 100644 --- a/Ubiquitous/XiZi_AIoT/services/lib/ipc/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/lib/ipc/Makefile @@ -14,6 +14,11 @@ toolchain ?= aarch64-none-elf- user_ldflags = -N -Ttext 0 cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie endif +ifeq ($(BOARD), jh7110) +toolchain ?= riscv64-unknown-elf- +user_ldflags = -N -Ttext 0 +cflags = -Wall -O0 -g -std=c11 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie +endif cc = ${toolchain}gcc ld = ${toolchain}g++ diff --git a/Ubiquitous/XiZi_AIoT/services/lib/memory/Makefile b/Ubiquitous/XiZi_AIoT/services/lib/memory/Makefile index a9516161f..6bfef9888 100644 --- a/Ubiquitous/XiZi_AIoT/services/lib/memory/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/lib/memory/Makefile @@ -13,6 +13,11 @@ toolchain ?= aarch64-none-elf- user_ldflags = -N -Ttext 0 cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie endif +ifeq ($(BOARD), jh7110) +toolchain ?= riscv64-unknown-elf- +user_ldflags = -N -Ttext 0 +cflags = -Wall -O0 -g -std=c11 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie +endif cc = ${toolchain}gcc ld = ${toolchain}g++ diff --git a/Ubiquitous/XiZi_AIoT/services/lib/serial/Makefile b/Ubiquitous/XiZi_AIoT/services/lib/serial/Makefile index ac290a6eb..b11994f45 100644 --- a/Ubiquitous/XiZi_AIoT/services/lib/serial/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/lib/serial/Makefile @@ -13,6 +13,11 @@ toolchain ?= aarch64-none-elf- user_ldflags = -N -Ttext 0 cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie endif +ifeq ($(BOARD), jh7110) +toolchain ?= riscv64-unknown-elf- +user_ldflags = -N -Ttext 0 +cflags = -Wall -O0 -g -std=c11 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie +endif cc = ${toolchain}gcc ld = ${toolchain}g++ diff --git a/Ubiquitous/XiZi_AIoT/services/lib/usyscall/Makefile b/Ubiquitous/XiZi_AIoT/services/lib/usyscall/Makefile index 9cedf87e8..6f13b4713 100644 --- a/Ubiquitous/XiZi_AIoT/services/lib/usyscall/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/lib/usyscall/Makefile @@ -13,6 +13,11 @@ toolchain ?= aarch64-none-elf- user_ldflags = -N -Ttext 0 cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie endif +ifeq ($(BOARD), jh7110) +toolchain ?= riscv64-unknown-elf- +user_ldflags = -N -Ttext 0 +cflags = -Wall -O0 -g -std=c11 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie +endif cc = ${toolchain}gcc ld = ${toolchain}g++ diff --git a/Ubiquitous/XiZi_AIoT/services/shell/letter-shell/Makefile b/Ubiquitous/XiZi_AIoT/services/shell/letter-shell/Makefile index 4c22e10af..3910ec988 100644 --- a/Ubiquitous/XiZi_AIoT/services/shell/letter-shell/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/shell/letter-shell/Makefile @@ -13,6 +13,11 @@ toolchain ?= aarch64-none-elf- user_ldflags = -N -Ttext 0 cflags = -Wall -O0 -g -std=c11 -mtune=cortex-a55 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie endif +ifeq ($(BOARD), jh7110) +toolchain ?= riscv64-unknown-elf- +user_ldflags = -N -Ttext 0 +cflags = -Wall -O0 -g -std=c11 -nostdlib -nodefaultlibs -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie +endif cc = ${toolchain}gcc ld = ${toolchain}g++ diff --git a/Ubiquitous/XiZi_AIoT/softkernel/memory/Makefile b/Ubiquitous/XiZi_AIoT/softkernel/memory/Makefile index 35bd24a90..f31e00964 100644 --- a/Ubiquitous/XiZi_AIoT/softkernel/memory/Makefile +++ b/Ubiquitous/XiZi_AIoT/softkernel/memory/Makefile @@ -9,7 +9,7 @@ ifneq ($(findstring $(BOARD), imx6q-sabrelite zynq7000-zc702), ) SRC_FILES:= kalloc.c pagetable.c pagetable_level2.c buddy.c object_allocator.c share_page.c endif ifneq ($(findstring $(BOARD), jh7110), ) -SRC_FILES := kalloc.c pagetable.c pagetable_level3.c buddy.c object_allocator.c share_page.c +SRC_FILES := kalloc.c pagetable_riscv.c pagetable_riscv_level3.c buddy.c object_allocator.c share_page.c endif