Skip to content

Commit f367397

Browse files
committed
feat: remove redundant codes under virt64, c906
Changes: - create new folder name `common64` and save all common codes of rv64 inside Signed-off-by: Shell <[email protected]>
1 parent ec09588 commit f367397

File tree

12 files changed

+13
-324
lines changed

12 files changed

+13
-324
lines changed

libcpu/risc-v/SConscript

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ from building import *
55

66
Import('rtconfig')
77

8+
common64_arch = ['virt64', 'c906']
89
cwd = GetCurrentDir()
910
group = []
1011
list = os.listdir(cwd)
1112

1213
# add common code files
13-
if rtconfig.CPU == "virt64" :
14-
group = group
15-
elif rtconfig.CPU == "c906" :
16-
group = group
14+
if rtconfig.CPU in common64_arch :
15+
group += SConscript(os.path.join('common64', 'SConscript'))
1716
else :
18-
group = group + SConscript(os.path.join('common', 'SConscript'))
17+
group += SConscript(os.path.join('common', 'SConscript'))
1918

2019
# cpu porting code files
2120
if rtconfig.CPU == "c906":

libcpu/risc-v/common64/SConscript

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from building import *
2+
3+
cwd = GetCurrentDir()
4+
src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S')
5+
CPPPATH = [cwd]
6+
7+
group = DefineGroup('libcpu', src, depend = [''], CPPPATH = CPPPATH)
8+
9+
Return('group')
File renamed without changes.
File renamed without changes.

libcpu/risc-v/virt64/asm-generic.h

-26
This file was deleted.

libcpu/risc-v/virt64/backtrace.c

-125
This file was deleted.

libcpu/risc-v/virt64/mmu.h

-77
This file was deleted.

libcpu/risc-v/virt64/riscv.h

-29
This file was deleted.

libcpu/risc-v/virt64/syscall_c.c

-62
This file was deleted.

0 commit comments

Comments
 (0)