build services

This commit is contained in:
songyanguang 2024-12-19 20:59:36 +08:00
parent 64ba03adef
commit 8f0c6bbd5c
11 changed files with 51 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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++

View File

@ -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++

View File

@ -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++

View File

@ -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++

View File

@ -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++

View File

@ -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++

View File

@ -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++

View File

@ -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