forked from Simple-XX/SimpleKernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Simple-XX#108 from MRNIU/master
update mastar
- Loading branch information
Showing
72 changed files
with
1,799 additions
and
1,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,78 +17,113 @@ jobs: | |
build_osx: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: get code | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup toolchain | ||
shell: bash | ||
run: | | ||
brew install x86_64-elf-gcc | ||
brew tap riscv/riscv | ||
brew install riscv-tools | ||
- name: make build dir | ||
shell: bash | ||
run: | | ||
mkdir ${{github.workspace}}/build | ||
- name: osx-i386 | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: | | ||
cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_CXX_COMPILER=x86_64-elf-g++ -DARCH=i386 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. | ||
make | ||
rm -rf ./* | ||
- name: osx-x86_64 | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: | | ||
cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_CXX_COMPILER=x86_64-elf-g++ -DARCH=x86_64 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. | ||
make | ||
rm -rf ./* | ||
- name: osx-riscv64 | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: | | ||
cmake -DTOOLCHAIN_PREFIX=riscv64-unknown-elf- -DCMAKE_C_COMPILER=riscv64-unknown-elf-gcc -DCMAKE_CXX_COMPILER=riscv64-unknown-elf-g++ -DARCH=riscv64 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. | ||
make | ||
rm -rf ./* | ||
build_ubuntu: | ||
runs-on: ubuntu-latest | ||
needs: [build_osx] | ||
steps: | ||
- name: get code | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup brew | ||
- name: setup toolchain | ||
shell: bash | ||
run: | | ||
brew install x86_64-elf-binutils | ||
brew install x86_64-elf-gcc | ||
brew tap riscv/riscv | ||
brew install riscv-tools | ||
sudo apt-get install -y gcc-riscv64-linux-gnu g++-riscv64-linux-gnu | ||
- name: make build dir | ||
shell: bash | ||
run: | | ||
mkdir ${{github.workspace}}/build | ||
- name: osx-i386 | ||
- name: ubuntu-i386 | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: | | ||
cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_CXX_COMPILER=x86_64-elf-g++ -DCMAKE_OBJCOPY=x86_64-elf-objcpy -DPLATFORM=bochs -DARCH=i386 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. | ||
cmake -DTOOLCHAIN_PREFIX= -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DARCH=i386 -DCMAKE_BUILD_TYPE=RELEASE .. | ||
make | ||
rm -rf ./* | ||
- name: osx-x86_64 | ||
- name: ubuntu-x86_64 | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: | | ||
cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_CXX_COMPILER=x86_64-elf-g++ -DCMAKE_OBJCOPY=x86_64-elf-objcpy -DPLATFORM=bochs -DARCH=x86_64 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. | ||
cmake -DTOOLCHAIN_PREFIX= -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DARCH=x86_64 -DCMAKE_BUILD_TYPE=RELEASE .. | ||
make | ||
rm -rf ./* | ||
- name: osx-riscv64 | ||
- name: ubuntu-riscv64 | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: | | ||
cmake -DTOOLCHAIN_PREFIX=riscv64-unknown-elf- -DCMAKE_C_COMPILER=riscv64-unknown-elf-gcc -DCMAKE_CXX_COMPILER=riscv64-unknown-elf-g++ -DCMAKE_OBJCOPY=riscv64-unknown-elf-objcpy -DPLATFORM=qemu -DARCH=riscv64 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. | ||
cmake -DTOOLCHAIN_PREFIX=riscv64-linux-gnu- -DCMAKE_C_COMPILER=riscv64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=riscv64-linux-gnu-g++ -DARCH=riscv64 -DCMAKE_BUILD_TYPE=RELEASE .. | ||
make | ||
rm -rf ./* | ||
# build_ubuntu: | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Get code | ||
# uses: actions/checkout@v2 | ||
|
||
# - name: Setup brew | ||
# shell: bash | ||
# run: | | ||
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | ||
# brew install make | ||
# brew install cmake | ||
# brew install x86_64-elf-binutils | ||
# brew install x86_64-elf-gcc | ||
|
||
# - name: Make build dir | ||
# shell: bash | ||
# run: | | ||
# mkdir ${{github.workspace}}/build | ||
|
||
# - name: cmake | ||
# shell: bash | ||
# working-directory: ${{github.workspace}}/build | ||
# run: cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_OBJCOPY=x86_64-elf-objcpy -DPLATFORM=bochs -DARCH=x86_64 .. | ||
|
||
# - name: make | ||
# shell: bash | ||
# working-directory: ${{github.workspace}}/build | ||
# run: make | ||
|
||
|
||
# build_win: | ||
# runs-on: windows-latest | ||
# build_win: | ||
# runs-on: windows-latest | ||
|
||
# auto_pr: | ||
# runs-on: ubuntu-latest | ||
# needs: [build_osx] | ||
|
||
# steps: | ||
# - name: get code | ||
# uses: actions/checkout@v2 | ||
|
||
# - name: Create Pull Request | ||
# uses: peter-evans/create-pull-request@v3 | ||
# with: | ||
# token: ${{ secrets.PAT }} | ||
# commit-message: "[Auto PR]" | ||
# committer: GitHub <[email protected]> | ||
# author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
# signoff: true | ||
# branch: test-patches | ||
# delete-branch: true | ||
# title: '[BOT] Auto PR' | ||
# body: | | ||
# Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request) | ||
# labels: | | ||
# Auto PR | ||
# assignees: MRNIU | ||
# reviewers: MRNIU | ||
# draft: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ iso | |
*.iso | ||
*.bin | ||
null.d | ||
tools/opensbi/ | ||
tools/aarch64-unknown-linux-gnu* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
# This file is a part of Simple-XX/SimpleKernel (https://github.com/Simple-XX/SimpleKernel). | ||
# | ||
# toolchain_linux_aarch64.cmake for Simple-XX/SimpleKernel. | ||
|
||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(CMAKE_SYSTEM_VERSION 1) | ||
set(CMAKE_SYSTEM_PROCESSOR AARCH64) | ||
|
||
# TODO | ||
# GCC | ||
find_program(GCC aarch64-none-eabi-gcc) | ||
if (NOT GCC) | ||
message(FATAL_ERROR "aarch64-none-eabi-gcc not found.\n" | ||
"Run `brew install aarch64-none-eabi-gcc` to install the toolchain") | ||
else () | ||
message(STATUS "Found aarch64-none-eabi-gcc ${GCC}") | ||
endif () | ||
|
||
set(TOOLCHAIN_PREFIX aarch64-none-eabi-) | ||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc) | ||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++) | ||
set(CMAKE_READELF ${TOOLCHAIN_PREFIX}readelf) | ||
set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) | ||
set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld) | ||
set(CMAKE_NM ${TOOLCHAIN_PREFIX}nm) | ||
set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) | ||
set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib) | ||
|
||
# qemu | ||
find_program(QEMU qemu-system-aarch64) | ||
if (NOT QEMU) | ||
message(FATAL_ERROR "qemu not found.\n" | ||
"Please install qemu first.") | ||
else () | ||
message(STATUS "Found qemu ${QEMU}") | ||
endif () |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
# This file is a part of Simple-XX/SimpleKernel (https://github.com/Simple-XX/SimpleKernel). | ||
# | ||
# toolchain_linux_riscv.cmake for Simple-XX/SimpleKernel. | ||
|
||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(CMAKE_SYSTEM_VERSION 1) | ||
set(CMAKE_SYSTEM_PROCESSOR RISCV) | ||
|
||
# GCC | ||
find_program(RISCV riscv64-linux-gnu-g++) | ||
if (NOT RISCV) | ||
message(FATAL_ERROR "riscv64-linux-gnu-gcc not found.\n" | ||
"Run `sudo apt-get install -y gcc-riscv64-linux-gnu g++-riscv64-linux-gnu` to install the toolchain. Then add the bin path to you PATH.") | ||
else () | ||
message(STATUS "Found riscv64-linux-gnu-gcc ${RISCV}.") | ||
endif () | ||
|
||
set(TOOLCHAIN_PREFIX riscv64-linux-gnu-) | ||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc) | ||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++) | ||
set(CMAKE_READELF ${TOOLCHAIN_PREFIX}readelf) | ||
set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) | ||
set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld) | ||
set(CMAKE_NM ${TOOLCHAIN_PREFIX}nm) | ||
set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) | ||
set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib) | ||
|
||
# qemu | ||
find_program(QEMU qemu-system-riscv64) | ||
if (NOT QEMU) | ||
message(FATAL_ERROR "qemu not found.\n" | ||
"Please install qemu-system-riscv64 first.") | ||
else () | ||
message(STATUS "Found qemu ${QEMU}") | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.