aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-format109
-rw-r--r--.editorconfig8
-rw-r--r--.gitignore8
-rw-r--r--arch/riscv/bios/Makefile (renamed from bios/Makefile)0
-rw-r--r--arch/riscv/bios/config.ld (renamed from bios/config.ld)0
-rw-r--r--arch/riscv/bios/hello.s (renamed from bios/hello.s)0
-rw-r--r--arch/riscv/init/Makefile (renamed from init/Makefile)0
-rw-r--r--arch/riscv/init/file_list.txt (renamed from init/file_list.txt)0
-rw-r--r--arch/riscv/init/hello.c (renamed from init/hello.c)0
-rw-r--r--arch/riscv/init/initramfs.cpiobin0 -> 4959232 bytes
-rw-r--r--arch/riscv/init/little_shell.go (renamed from init/little_shell.go)0
-rw-r--r--arch/riscv/init/shell.c (renamed from init/shell.c)0
-rw-r--r--arch/riscv/kernel/Makefile (renamed from kernel/Makefile)0
-rw-r--r--arch/riscv/kernel/hello.ld (renamed from kernel/hello.ld)0
-rw-r--r--arch/riscv/kernel/hello.s (renamed from kernel/hello.s)0
-rw-r--r--arch/riscv/kernel/infinite.ld (renamed from kernel/infinite.ld)0
-rw-r--r--arch/riscv/kernel/infinite.s (renamed from kernel/infinite.s)0
-rw-r--r--arch/riscv/usr/Makefile (renamed from basics/Makefile)0
-rw-r--r--arch/riscv/usr/basics.c (renamed from basics/main.c)0
-rw-r--r--arch/riscv/usr/factorial.S (renamed from basics/factorial.S)0
-rw-r--r--arch/riscv/usr/float.S (renamed from basics/float.S)0
-rw-r--r--arch/riscv/usr/string.S (renamed from basics/string.S)0
-rwxr-xr-xinit/little_shellbin1896643 -> 0 bytes
23 files changed, 124 insertions, 1 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..d21d53a
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,109 @@
+# Modified from the Linux Kernel.
+---
+AccessModifierOffset: -4
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlines: Left
+AlignOperands: true
+AlignTrailingComments: false
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: false
+BinPackArguments: true
+BinPackParameters: true
+BraceWrapping:
+ AfterClass: false
+ AfterControlStatement: false
+ AfterEnum: false
+ AfterFunction: true
+ AfterNamespace: true
+ AfterObjCDeclaration: false
+ AfterStruct: false
+ AfterUnion: false
+ AfterExternBlock: false
+ BeforeCatch: false
+ BeforeElse: false
+ IndentBraces: false
+ SplitEmptyFunction: true
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Custom
+BreakBeforeInheritanceComma: false
+BreakBeforeTernaryOperators: false
+BreakConstructorInitializersBeforeComma: false
+BreakConstructorInitializers: BeforeComma
+BreakAfterJavaFieldAnnotations: false
+BreakStringLiterals: false
+ColumnLimit: 100
+CommentPragmas: '^ IWYU pragma:'
+CompactNamespaces: false
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: false
+DerivePointerAlignment: false
+DisableFormat: false
+ExperimentalAutoDetectBinPacking: false
+FixNamespaceComments: false
+
+IncludeBlocks: Preserve
+IncludeCategories:
+ - Regex: '.*'
+ Priority: 1
+IncludeIsMainRegex: '(Test)?$'
+IndentCaseLabels: false
+IndentGotoLabels: false
+IndentPPDirectives: None
+IndentWidth: 4
+IndentWrappedFunctionNames: false
+JavaScriptQuotes: Leave
+JavaScriptWrapImports: true
+KeepEmptyLinesAtTheStartOfBlocks: false
+MacroBlockBegin: ''
+MacroBlockEnd: ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+ObjCBinPackProtocolList: Auto
+ObjCBlockIndentWidth: 4
+ObjCSpaceAfterProperty: true
+ObjCSpaceBeforeProtocolList: true
+
+PenaltyBreakAssignment: 10
+PenaltyBreakBeforeFirstCallParameter: 30
+PenaltyBreakComment: 10
+PenaltyBreakFirstLessLess: 0
+PenaltyBreakString: 10
+PenaltyExcessCharacter: 100
+PenaltyReturnTypeOnItsOwnLine: 60
+
+PointerAlignment: Right
+ReflowComments: false
+SortIncludes: false
+SortUsingDeclarations: false
+SpaceAfterCStyleCast: false
+SpaceAfterTemplateKeyword: true
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
+SpaceBeforeParens: ControlStatementsExceptForEachMacros
+SpaceBeforeRangeBasedForLoopColon: true
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles: false
+SpacesInContainerLiterals: false
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard: Latest
+TabWidth: 4
+UseTab: Always
+...
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..e7bd01a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,8 @@
+root = true
+
+[{*.{c,h,s,S},Makefile,Makefile.*}]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+indent_size = 4
diff --git a/.gitignore b/.gitignore
index 3dec258..c37ddf3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,8 @@
*.o
-basics/basics
+
+# arch/riscv
+arch/riscv/usr/basics
+arch/riscv/bios/hello
+arch/riscv/kernel/hello
+arch/riscv/init/init
+arch/riscv/init/little_shell
diff --git a/bios/Makefile b/arch/riscv/bios/Makefile
index 60e3cc4..60e3cc4 100644
--- a/bios/Makefile
+++ b/arch/riscv/bios/Makefile
diff --git a/bios/config.ld b/arch/riscv/bios/config.ld
index 085caa3..085caa3 100644
--- a/bios/config.ld
+++ b/arch/riscv/bios/config.ld
diff --git a/bios/hello.s b/arch/riscv/bios/hello.s
index f3aa20a..f3aa20a 100644
--- a/bios/hello.s
+++ b/arch/riscv/bios/hello.s
diff --git a/init/Makefile b/arch/riscv/init/Makefile
index 71405c3..71405c3 100644
--- a/init/Makefile
+++ b/arch/riscv/init/Makefile
diff --git a/init/file_list.txt b/arch/riscv/init/file_list.txt
index 9dd8872..9dd8872 100644
--- a/init/file_list.txt
+++ b/arch/riscv/init/file_list.txt
diff --git a/init/hello.c b/arch/riscv/init/hello.c
index d4e5892..d4e5892 100644
--- a/init/hello.c
+++ b/arch/riscv/init/hello.c
diff --git a/arch/riscv/init/initramfs.cpio b/arch/riscv/init/initramfs.cpio
new file mode 100644
index 0000000..802848e
--- /dev/null
+++ b/arch/riscv/init/initramfs.cpio
Binary files differ
diff --git a/init/little_shell.go b/arch/riscv/init/little_shell.go
index 7324323..7324323 100644
--- a/init/little_shell.go
+++ b/arch/riscv/init/little_shell.go
diff --git a/init/shell.c b/arch/riscv/init/shell.c
index d44b1c7..d44b1c7 100644
--- a/init/shell.c
+++ b/arch/riscv/init/shell.c
diff --git a/kernel/Makefile b/arch/riscv/kernel/Makefile
index e943353..e943353 100644
--- a/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
diff --git a/kernel/hello.ld b/arch/riscv/kernel/hello.ld
index e4af459..e4af459 100644
--- a/kernel/hello.ld
+++ b/arch/riscv/kernel/hello.ld
diff --git a/kernel/hello.s b/arch/riscv/kernel/hello.s
index eacd797..eacd797 100644
--- a/kernel/hello.s
+++ b/arch/riscv/kernel/hello.s
diff --git a/kernel/infinite.ld b/arch/riscv/kernel/infinite.ld
index 2eee384..2eee384 100644
--- a/kernel/infinite.ld
+++ b/arch/riscv/kernel/infinite.ld
diff --git a/kernel/infinite.s b/arch/riscv/kernel/infinite.s
index 855f58e..855f58e 100644
--- a/kernel/infinite.s
+++ b/arch/riscv/kernel/infinite.s
diff --git a/basics/Makefile b/arch/riscv/usr/Makefile
index 6e36dd6..6e36dd6 100644
--- a/basics/Makefile
+++ b/arch/riscv/usr/Makefile
diff --git a/basics/main.c b/arch/riscv/usr/basics.c
index 4b5f289..4b5f289 100644
--- a/basics/main.c
+++ b/arch/riscv/usr/basics.c
diff --git a/basics/factorial.S b/arch/riscv/usr/factorial.S
index 7e3df12..7e3df12 100644
--- a/basics/factorial.S
+++ b/arch/riscv/usr/factorial.S
diff --git a/basics/float.S b/arch/riscv/usr/float.S
index f481f3e..f481f3e 100644
--- a/basics/float.S
+++ b/arch/riscv/usr/float.S
diff --git a/basics/string.S b/arch/riscv/usr/string.S
index 0f3bcc1..0f3bcc1 100644
--- a/basics/string.S
+++ b/arch/riscv/usr/string.S
diff --git a/init/little_shell b/init/little_shell
deleted file mode 100755
index 5e2446c..0000000
--- a/init/little_shell
+++ /dev/null
Binary files differ