mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 19:36:47 +00:00
Merge branch 'master' into feat-network-rebuild
Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
commit
14c21430a5
2
.github/workflows/docs-multiversion.yml
vendored
2
.github/workflows/docs-multiversion.yml
vendored
@ -44,4 +44,4 @@ jobs:
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_S3_SECRET_KEY }}
|
||||
|
||||
run: |
|
||||
aws s3 sync ./_build/html s3://dragonos-docs --delete
|
||||
aws s3 sync ./_build/html s3://dragonos-docs --delete --exclude "p/*"
|
||||
|
89
.github/workflows/makefile.yml
vendored
89
.github/workflows/makefile.yml
vendored
@ -2,96 +2,97 @@ name: Build Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "feat-*", "fix-*"]
|
||||
branches: ["master", "feat-*", "fix-*"]
|
||||
pull_request:
|
||||
branches: [ "master", "feat-*", "fix-*"]
|
||||
branches: ["master", "feat-*", "fix-*"]
|
||||
|
||||
jobs:
|
||||
|
||||
format-check:
|
||||
name: Format check ${{ matrix.arch }}
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container: dragonos/dragonos-dev:v1.6
|
||||
container: dragonos/dragonos-dev:v1.7
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86_64, riscv64]
|
||||
|
||||
steps:
|
||||
- run: echo "Running in dragonos/dragonos-dev:v1.6"
|
||||
- uses: actions/checkout@v3
|
||||
- run: echo "Running in dragonos/dragonos-dev:v1.7"
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Format check
|
||||
env:
|
||||
- name: Format check
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}
|
||||
HOME: /root
|
||||
shell: bash -ileo pipefail {0}
|
||||
run: |
|
||||
printf "\n" >> kernel/src/include/bindings/bindings.rs
|
||||
FMT_CHECK=1 make fmt
|
||||
|
||||
shell: bash -ileo pipefail {0}
|
||||
run: |
|
||||
printf "\n" >> kernel/src/include/bindings/bindings.rs
|
||||
sed -i 's/arch = ".*"/arch = "${{ matrix.arch }}"/' dadk-manifest.toml
|
||||
FMT_CHECK=1 make fmt
|
||||
|
||||
kernel-static-test:
|
||||
name: Kernel static test ${{ matrix.arch }}
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container: dragonos/dragonos-dev:v1.6
|
||||
container: dragonos/dragonos-dev:v1.7
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86_64, riscv64]
|
||||
|
||||
steps:
|
||||
- run: echo "Running in dragonos/dragonos-dev:v1.6"
|
||||
- run: echo "Running in dragonos/dragonos-dev:v1.7"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Run kernel static test
|
||||
shell: bash -ileo pipefail {0}
|
||||
env:
|
||||
- name: Run kernel static test
|
||||
shell: bash -ileo pipefail {0}
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}
|
||||
HOME: /root
|
||||
run: bash -c "source /root/.cargo/env && cd kernel && make test && make test-rbpf"
|
||||
run: bash -c "source /root/.cargo/env && cd kernel && make test && make test-rbpf"
|
||||
|
||||
build-x86_64:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container: dragonos/dragonos-dev:v1.6
|
||||
container: dragonos/dragonos-dev:v1.7
|
||||
|
||||
steps:
|
||||
- run: echo "Running in dragonos/dragonos-dev:v1.6"
|
||||
- run: echo "Running in dragonos/dragonos-dev:v1.7"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: build the DragonOS
|
||||
env:
|
||||
- uses: actions/checkout@v3
|
||||
- name: build the DragonOS
|
||||
env:
|
||||
ARCH: x86_64
|
||||
HOME: /root
|
||||
shell: bash -ileo pipefail {0}
|
||||
shell: bash -ileo pipefail {0}
|
||||
|
||||
run: |
|
||||
source ~/.bashrc
|
||||
source ~/.cargo/env
|
||||
export DragonOS_GCC=$HOME/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin
|
||||
|
||||
make -j $(nproc)
|
||||
run: |
|
||||
source ~/.bashrc
|
||||
source ~/.cargo/env
|
||||
export DragonOS_GCC=$HOME/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin
|
||||
sed -i 's/arch = ".*"/arch = "${{ env.ARCH }}"/' dadk-manifest.toml
|
||||
|
||||
make all -j $(nproc)
|
||||
|
||||
build-riscv64:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container: dragonos/dragonos-dev:v1.6
|
||||
container: dragonos/dragonos-dev:v1.7
|
||||
|
||||
steps:
|
||||
- run: echo "Running in dragonos/dragonos-dev:v1.6"
|
||||
- run: echo "Running in dragonos/dragonos-dev:v1.7"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: "recursive"
|
||||
|
||||
- name: build the DragonOS
|
||||
shell: bash -ileo pipefail {0}
|
||||
env:
|
||||
- name: build the DragonOS
|
||||
shell: bash -ileo pipefail {0}
|
||||
env:
|
||||
ARCH: riscv64
|
||||
HOME: /root
|
||||
|
||||
run: source ~/.bashrc && source ~/.cargo/env && make kernel -j $(nproc)
|
||||
|
||||
run: |
|
||||
source ~/.bashrc && source ~/.cargo/env
|
||||
sed -i 's/arch = ".*"/arch = "${{ env.ARCH }}"/' dadk-manifest.toml
|
||||
make kernel -j $(nproc)
|
||||
|
46
Makefile
46
Makefile
@ -34,19 +34,22 @@ else
|
||||
FMT_CHECK=
|
||||
endif
|
||||
|
||||
# Check if ARCH matches the arch field in dadk-manifest.toml
|
||||
check_arch:
|
||||
@bash tools/check_arch.sh
|
||||
|
||||
.PHONY: all
|
||||
all: kernel user
|
||||
|
||||
|
||||
.PHONY: kernel
|
||||
kernel:
|
||||
kernel: check_arch
|
||||
mkdir -p bin/kernel/
|
||||
|
||||
$(MAKE) -C ./kernel all ARCH=$(ARCH) || (sh -c "echo 内核编译失败" && exit 1)
|
||||
|
||||
.PHONY: user
|
||||
user:
|
||||
user: check_arch
|
||||
$(MAKE) -C ./user all ARCH=$(ARCH) || (sh -c "echo 用户程序编译失败" && exit 1)
|
||||
|
||||
.PHONY: clean
|
||||
@ -61,11 +64,6 @@ clean:
|
||||
ECHO:
|
||||
@echo "$@"
|
||||
|
||||
cppcheck-xml:
|
||||
cppcheck kernel user --platform=unix64 --std=c11 -I user/libs/ -I=kernel/ --force -j $(NPROCS) --xml 2> cppcheck.xml
|
||||
|
||||
cppcheck:
|
||||
cppcheck kernel user --platform=unix64 --std=c11 -I user/libs/ -I=kernel/ --force -j $(NPROCS)
|
||||
|
||||
docs: ECHO
|
||||
bash -c "cd docs && make html && cd .."
|
||||
@ -81,74 +79,74 @@ else
|
||||
endif
|
||||
|
||||
# 写入磁盘镜像
|
||||
write_diskimage:
|
||||
write_diskimage: check_arch
|
||||
@echo "write_diskimage arch=$(ARCH)"
|
||||
bash -c "export ARCH=$(ARCH); cd tools && bash grub_auto_install.sh && sudo ARCH=$(ARCH) bash $(ROOT_PATH)/tools/write_disk_image.sh --bios=legacy && cd .."
|
||||
bash -c "export ARCH=$(ARCH); cd tools && bash grub_auto_install.sh && sudo DADK=$(DADK) ARCH=$(ARCH) bash $(ROOT_PATH)/tools/write_disk_image.sh --bios=legacy && cd .."
|
||||
|
||||
# 写入磁盘镜像(uefi)
|
||||
write_diskimage-uefi:
|
||||
bash -c "export ARCH=$(ARCH); cd tools && bash grub_auto_install.sh && sudo ARCH=$(ARCH) bash $(ROOT_PATH)/tools/write_disk_image.sh --bios=uefi && cd .."
|
||||
write_diskimage-uefi: check_arch
|
||||
bash -c "export ARCH=$(ARCH); cd tools && bash grub_auto_install.sh && sudo DADK=$(DADK) ARCH=$(ARCH) bash $(ROOT_PATH)/tools/write_disk_image.sh --bios=uefi && cd .."
|
||||
# 不编译,直接启动QEMU
|
||||
qemu:
|
||||
qemu: check_arch
|
||||
sh -c "cd tools && bash run-qemu.sh --bios=legacy --display=window && cd .."
|
||||
|
||||
# 不编译,直接启动QEMU,不显示图像
|
||||
qemu-nographic:
|
||||
qemu-nographic: check_arch
|
||||
sh -c "cd tools && bash run-qemu.sh --bios=legacy --display=nographic && cd .."
|
||||
|
||||
# 不编译,直接启动QEMU(UEFI)
|
||||
qemu-uefi:
|
||||
qemu-uefi: check_arch
|
||||
sh -c "cd tools && bash run-qemu.sh --bios=uefi --display=window && cd .."
|
||||
# 不编译,直接启动QEMU,使用VNC Display作为图像输出
|
||||
qemu-vnc:
|
||||
qemu-vnc: check_arch
|
||||
sh -c "cd tools && bash run-qemu.sh --bios=legacy --display=vnc && cd .."
|
||||
# 不编译,直接启动QEMU(UEFI),使用VNC Display作为图像输出
|
||||
qemu-uefi-vnc:
|
||||
qemu-uefi-vnc: check_arch
|
||||
sh -c "cd tools && bash run-qemu.sh --bios=uefi --display=vnc && cd .."
|
||||
|
||||
# 编译并写入磁盘镜像
|
||||
build:
|
||||
build: check_arch
|
||||
$(MAKE) all -j $(NPROCS)
|
||||
$(MAKE) write_diskimage || exit 1
|
||||
|
||||
# 在docker中编译,并写入磁盘镜像
|
||||
docker:
|
||||
docker: check_arch
|
||||
@echo "使用docker构建"
|
||||
sudo bash tools/build_in_docker.sh || exit 1
|
||||
$(MAKE) write_diskimage || exit 1
|
||||
|
||||
# uefi方式启动
|
||||
run-uefi:
|
||||
run-uefi: check_arch
|
||||
$(MAKE) all -j $(NPROCS)
|
||||
$(MAKE) write_diskimage-uefi || exit 1
|
||||
$(MAKE) qemu-uefi
|
||||
|
||||
# 编译并启动QEMU
|
||||
run:
|
||||
run: check_arch
|
||||
$(MAKE) all -j $(NPROCS)
|
||||
$(MAKE) write_diskimage || exit 1
|
||||
$(MAKE) qemu
|
||||
|
||||
# uefi方式启动,使用VNC Display作为图像输出
|
||||
run-uefi-vnc:
|
||||
run-uefi-vnc: check_arch
|
||||
$(MAKE) all -j $(NPROCS)
|
||||
$(MAKE) write_diskimage-uefi || exit 1
|
||||
$(MAKE) qemu-uefi-vnc
|
||||
|
||||
# 编译并启动QEMU,使用VNC Display作为图像输出
|
||||
run-vnc:
|
||||
run-vnc: check_arch
|
||||
$(MAKE) all -j $(NPROCS)
|
||||
$(MAKE) write_diskimage || exit 1
|
||||
$(MAKE) qemu-vnc
|
||||
|
||||
# 在docker中编译,并启动QEMU
|
||||
run-docker:
|
||||
run-docker: check_arch
|
||||
@echo "使用docker构建并运行"
|
||||
sudo bash tools/build_in_docker.sh || exit 1
|
||||
$(MAKE) write_diskimage || exit 1
|
||||
$(MAKE) qemu
|
||||
|
||||
fmt:
|
||||
fmt: check_arch
|
||||
@echo "格式化代码"
|
||||
FMT_CHECK=$(FMT_CHECK) $(MAKE) fmt -C kernel
|
||||
FMT_CHECK=$(FMT_CHECK) $(MAKE) fmt -C user
|
||||
|
14
config/rootfs.toml
Normal file
14
config/rootfs.toml
Normal file
@ -0,0 +1,14 @@
|
||||
[metadata]
|
||||
# Filesystem type (options: `fat32`)
|
||||
fs_type = "fat32"
|
||||
# Size of the rootfs disk image (eg, `1G`, `1024M`)
|
||||
size = "1G"
|
||||
|
||||
[partition]
|
||||
# Partition type (options: "none", "mbr", "gpt")
|
||||
#
|
||||
# If "none" is specified, no partition table will be created,
|
||||
# and the entire disk will be treated as a single partition.
|
||||
#
|
||||
# Note that the "none" option is incompatible with GRUB boot.
|
||||
type = "mbr"
|
24
dadk-manifest.toml
Normal file
24
dadk-manifest.toml
Normal file
@ -0,0 +1,24 @@
|
||||
# DADK 总控文件
|
||||
|
||||
[metadata]
|
||||
# Target architecture. Options: x86_64, riscv64
|
||||
arch = "x86_64"
|
||||
|
||||
# Hypervisor config path
|
||||
hypervisor-config = "config/hypervisor.toml"
|
||||
|
||||
# RootFS config path
|
||||
rootfs-config = "config/rootfs.toml"
|
||||
|
||||
# Boot config path
|
||||
boot-config = "config/boot.toml"
|
||||
|
||||
# System root directory folder (DADK will copy the files in this directory to the root directory of the disk image)
|
||||
sysroot-dir = "bin/sysroot"
|
||||
|
||||
# DADK Root Cache directory path
|
||||
cache-root-dir = "bin/dadk_cache"
|
||||
|
||||
# User configuration directory path
|
||||
# 这个字段只是临时用于兼容旧版本,v0.2版本重构完成后会删除
|
||||
user-config-dir = "user/dadk/config"
|
@ -10,4 +10,4 @@
|
||||
:maxdepth: 2
|
||||
|
||||
namespaces/index
|
||||
filesystem/unionfs/index
|
||||
../filesystem/unionfs/index
|
||||
|
@ -1,5 +1,5 @@
|
||||
====================================
|
||||
名称空间
|
||||
命名空间
|
||||
====================================
|
||||
|
||||
DragonOS的namespaces目前支持pid_namespace和mnt_namespace 预计之后会继续完善
|
||||
|
@ -1,10 +1,10 @@
|
||||
# 挂载名称空间
|
||||
# 挂载命名空间
|
||||
|
||||
## 底层架构
|
||||
|
||||
pcb -> nsproxy -> mnt_namespace
|
||||
|
||||
每一个挂载文件系统都有自立独立的挂载点,表现在数据结构上是一个挂载的红黑树,每一个名称空间中挂载是独立的,所以文件系统的挂载和卸载不会影响别的
|
||||
每一个挂载文件系统都有自立独立的挂载点,表现在数据结构上是一个挂载的红黑树,每一个命名空间中挂载是独立的,所以文件系统的挂载和卸载不会影响别的
|
||||
|
||||
## 系统调用接口
|
||||
|
||||
@ -14,6 +14,6 @@ pcb -> nsproxy -> mnt_namespace
|
||||
- unshare
|
||||
- 使用 CLONE_NEWPID 标志调用 unshare() 后,后续创建的所有子进程都将在新的命名空间中运行。
|
||||
- setns
|
||||
- 将进程加入到指定的名称空间
|
||||
- 将进程加入到指定的命名空间
|
||||
- chroot
|
||||
- 将当前进程的根目录更改为指定的路径,提供文件系统隔离。
|
@ -1,8 +1,10 @@
|
||||
# 进程名称空间
|
||||
# 进程命名空间
|
||||
:::{note} 本文作者:操丰毅 1553389239@qq.com
|
||||
|
||||
2024年10月30日 :::
|
||||
pid_namespace 是内核中的一种名称空间,用于实现进程隔离,允许在不同的名称空间中运行的进程有独立的pid试图
|
||||
2024年10月30日
|
||||
:::
|
||||
|
||||
pid_namespace 是内核中的一种命名空间,用于实现进程隔离,允许在不同的命名空间中运行的进程有独立的pid视图
|
||||
|
||||
## 底层架构
|
||||
|
||||
|
@ -9,3 +9,4 @@
|
||||
|
||||
traceback
|
||||
debug-kernel-with-gdb
|
||||
profiling-kernel-with-dadk
|
||||
|
95
docs/kernel/debug/profiling-kernel-with-dadk.md
Normal file
95
docs/kernel/debug/profiling-kernel-with-dadk.md
Normal file
@ -0,0 +1,95 @@
|
||||
# 使用DADK对内核进行性能分析
|
||||
|
||||
## 1. 概述
|
||||
|
||||
本文将教你使用DADK,对DragonOS内核进行性能分析,以识别和解决潜在的性能瓶颈。
|
||||
|
||||
### 1.1 准备工作
|
||||
|
||||
::: {note}
|
||||
在开始之前,请确保你已经安装了DADK,并且已经配置好了DragonOS内核的编译环境。
|
||||
:::
|
||||
|
||||
### 1.2 什么是火焰图?
|
||||
|
||||
如果你没有听说过火焰图,可以先阅读这篇文章:[《如何读懂火焰图?- 阮一峰》](https://www.ruanyifeng.com/blog/2017/09/flame-graph.html)
|
||||
|
||||
简单的说,火焰图是基于性能采样结果产生的 SVG 图片,用来展示 CPU 的调用栈。
|
||||
|
||||

|
||||
|
||||
x 轴表示抽样数,如果一个函数在 x 轴占据的宽度越宽,就表示它被抽到的次数多,即执行的时间长。注意,x 轴不代表时间,而是所有的调用栈合并后,按字母顺序排列的。
|
||||
|
||||
火焰图就是看顶层的哪个函数占据的宽度最大。只要有"平顶"(plateaus),就表示该函数可能存在性能问题。
|
||||
|
||||
颜色没有特殊含义,因为火焰图表示的是 CPU 的繁忙程度,所以一般选择暖色调。
|
||||
|
||||
## 2. 配置DragonOS内核
|
||||
|
||||
由于性能分析需要详尽的符号表数据,因此我们需要在编译内核时,需要进行以下配置:
|
||||
|
||||
在`kernel/Cargo.toml`中的`[profile.release]`部分,设置以下两项:
|
||||
|
||||
```toml
|
||||
[profile.release]
|
||||
debug = true
|
||||
opt-level = 1
|
||||
```
|
||||
|
||||
这样,编译出来的内核就会包含符号表数据,方便我们进行性能分析。
|
||||
|
||||
## 3. 使用DADK进行性能分析
|
||||
|
||||
### 3.1 启动内核
|
||||
|
||||
首先,我们需要启动DragonOS内核。
|
||||
|
||||
```shell
|
||||
# 使用你喜欢的方式启动内核,例如:
|
||||
make run
|
||||
# 或者
|
||||
make build && make qemu-nographic
|
||||
```
|
||||
|
||||
### 3.2 运行你的工作负载
|
||||
|
||||
在启动内核后,我们需要运行一些工作负载,以便进行性能分析。
|
||||
|
||||
这可以是一个应用程序,也可以是别的东西。甚至你可以什么都不运行,只是单纯看看DragonOS内核在空闲时的调用栈情况。
|
||||
|
||||
### 3.3 启动DADK进行性能分析
|
||||
|
||||
在DragonOS项目目录下,运行以下命令:
|
||||
|
||||
```shell
|
||||
dadk profile sample --format flamegraph --output flame.svg --interval 200ms --duration 20s --cpu-mask 0x1
|
||||
```
|
||||
|
||||
上面的命令,将会对DragonOS内核进行性能分析,并生成一个火焰图。
|
||||
|
||||
详细解释:
|
||||
|
||||
- `--format flamegraph`:指定输出格式为火焰图。
|
||||
- `--output flame.svg`:指定输出文件名为`flame.svg`。
|
||||
- `--interval 200ms`:指定采样间隔为200ms。
|
||||
- `--duration 20s`:指定采样时间为20s。
|
||||
- `--cpu-mask 0x1`:指定采样的CPU为0号CPU。(这是个按位掩码,也就是说,如果要采样0和1号CPU,那么cpu-mask为0x3)
|
||||
|
||||
*更多参数请参考`dadk profile sample --help`.*
|
||||
|
||||
::: {note}
|
||||
由于采样时会暂停vCPU,因此采样时间不宜过短,否则会影响系统的正常运行。
|
||||
:::
|
||||
|
||||
经过一段时间的等待,你将会得到一个`flame.svg`文件。
|
||||
|
||||
### 3.4 分析火焰图
|
||||
|
||||
使用浏览器打开`flame.svg`文件,你将会看到一个火焰图。
|
||||
|
||||
你可以通过点击火焰图中的某个函数,来查看它的调用栈。
|
||||
|
||||
**你可以右键下面的图片,在新的标签页打开,体验交互效果。**
|
||||
|
||||

|
||||
|
@ -13,3 +13,6 @@ musl-gcc -static -o hello hello.c
|
||||
|
||||
在移植现有程序时,可能需要配置`CFLAGS`和`LDFLAGS`,以及`CPPFLAGS`,以便正确地编译,具体请以实际为准。
|
||||
|
||||
## 配置dadk
|
||||
|
||||
请参考:[Quick Start | DADK](https://docs.dragonos.org.cn/p/dadk/user-manual/quickstart.html)
|
@ -8,3 +8,5 @@
|
||||
|
||||
rust-quick-start
|
||||
c-cpp-quick-start
|
||||
快速使用DADK打包一个应用到DragonOS <https://docs.dragonos.org.cn/p/dadk/user-manual/quickstart.html>
|
||||
DADK完整文档 <https://docs.dragonos.org.cn/p/dadk/>
|
||||
|
@ -2,19 +2,14 @@
|
||||
|
||||
## 编译环境
|
||||
|
||||
  DragonOS与Linux具有部分二进制兼容性,因此可以使用Linux的Rust编译器进行编译,但是需要进行一些配置:
|
||||
|
||||
您可以参考DragonOS的`tools/bootstrap.sh`中,`initialize_userland_musl_toolchain()`函数的实现,进行配置。
|
||||
或者,只要运行一下bootstrap.sh就可以了。
|
||||
|
||||
主要是因为DragonOS还不支持动态链接,但是默认的工具链里面,包含了动态链接解释器相关的代码,因此像脚本内那样,进行替换就能运行。
|
||||
  DragonOS与Linux具有部分二进制兼容性,因此可以使用Linux的Rust编译器进行编译。
|
||||
|
||||
## 配置项目
|
||||
|
||||
### 从模板创建
|
||||
|
||||
:::{note}
|
||||
该功能需要dadk 0.1.4及以上版本方能支持
|
||||
该功能需要dadk 0.2.0及以上版本方能支持。旧版的请参考历史版本的DragonOS文档。
|
||||
:::
|
||||
|
||||
1. 使用DragonOS的tools目录下的`bootstrap.sh`脚本初始化环境
|
||||
@ -30,7 +25,7 @@ cargo generate --git https://git.mirrors.dragonos.org/DragonOS-Community/Rust-Ap
|
||||
```
|
||||
|
||||
4. 使用`cargo run`来运行项目
|
||||
5. 在DragonOS的`user/dadk/config`目录下,使用`dadk new`命令,创建编译配置,安装到DragonOS的`/`目录下。
|
||||
5. 在DragonOS的`user/dadk/config`目录下,参考模版[userapp_config.toml](https://github.com/DragonOS-Community/DADK/blob/main/dadk-config/templates/config/userapp_config.toml),创建编译配置,安装到DragonOS的`/`目录下。
|
||||
(在dadk的编译命令选项处,请使用Makefile里面的`make install`配置进行编译、安装)
|
||||
6. 编译DragonOS即可安装
|
||||
|
||||
|
3
env.mk
3
env.mk
@ -8,3 +8,6 @@ endif
|
||||
ifeq ($(EMULATOR), )
|
||||
export EMULATOR=__NO_EMULATION__
|
||||
endif
|
||||
|
||||
|
||||
export DADK?=$(shell which dadk)
|
||||
|
@ -15,9 +15,9 @@ members = [
|
||||
]
|
||||
|
||||
[features]
|
||||
default = ["backtrace", "kvm", "fatfs", "fatfs-secure"]
|
||||
default = ["backtrace", "kvm", "fatfs", "fatfs-secure", "static_keys_test"]
|
||||
# 内核栈回溯
|
||||
backtrace = []
|
||||
backtrace = ["dep:unwinding"]
|
||||
# kvm
|
||||
kvm = []
|
||||
|
||||
@ -27,6 +27,7 @@ driver_ps2_mouse = []
|
||||
|
||||
# kprobe
|
||||
kprobe_test = []
|
||||
static_keys_test = []
|
||||
|
||||
# 运行时依赖项
|
||||
[dependencies]
|
||||
@ -67,9 +68,17 @@ lru = "0.12.3"
|
||||
|
||||
rbpf = { path = "crates/rbpf" }
|
||||
printf-compat = { version = "0.1.1", default-features = false }
|
||||
|
||||
static-keys = "=0.6.1"
|
||||
unwinding = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/unwinding", rev = "4eb845da62", default-features = false, optional = true, features = [
|
||||
"unwinder",
|
||||
"fde-gnu-eh-frame-hdr",
|
||||
"panic",
|
||||
"personality"
|
||||
]}
|
||||
|
||||
# target为x86_64时,使用下面的依赖
|
||||
[target.'cfg(target_arch = "x86_64")'.dependencies]
|
||||
mini-backtrace = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/mini-backtrace.git", rev = "e0b1d90940" }
|
||||
multiboot2 = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/multiboot2", rev = "05739aab40" }
|
||||
raw-cpuid = "11.0.1"
|
||||
x86 = "=0.52.0"
|
||||
|
@ -6,7 +6,7 @@ include ./env.mk
|
||||
ifeq ($(ARCH), x86_64)
|
||||
export TARGET_JSON=arch/x86_64/x86_64-unknown-none.json
|
||||
else ifeq ($(ARCH), riscv64)
|
||||
export TARGET_JSON=riscv64gc-unknown-none-elf
|
||||
export TARGET_JSON=arch/riscv64/riscv64gc-unknown-none-elf.json
|
||||
endif
|
||||
|
||||
export CARGO_ZBUILD=-Z build-std=core,alloc,compiler_builtins -Z build-std-features=compiler-builtins-mem
|
||||
@ -27,19 +27,13 @@ clean:
|
||||
fmt:
|
||||
RUSTFLAGS="$(RUSTFLAGS)" cargo fmt --all $(FMT_CHECK)
|
||||
ifeq ($(ARCH), x86_64)
|
||||
RUSTFLAGS="$(RUSTFLAGS)" cargo clippy --all-features
|
||||
RUSTFLAGS="$(RUSTFLAGS)" cargo +nightly-2024-11-05 clippy --all-features
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: check
|
||||
check: ECHO
|
||||
# @echo "Checking kernel... ARCH=$(ARCH)"
|
||||
# @exit 1
|
||||
ifeq ($(ARCH), x86_64)
|
||||
RUSTFLAGS="$(RUSTFLAGS)" cargo +nightly-2024-11-05 check --workspace $(CARGO_ZBUILD) --message-format=json --target ./src/$(TARGET_JSON)
|
||||
else ifeq ($(ARCH), riscv64)
|
||||
RUSTFLAGS="$(RUSTFLAGS)" cargo +nightly-2024-11-05 check --workspace $(CARGO_ZBUILD) --message-format=json --target $(TARGET_JSON)
|
||||
endif
|
||||
$(MAKE) -C src check ARCH=$(ARCH)
|
||||
|
||||
test:
|
||||
# 测试内核库
|
||||
|
@ -11,4 +11,4 @@ path = "src/main.rs"
|
||||
[dependencies]
|
||||
unified-init-macros = { path = "macros" }
|
||||
linkme = "=0.3.27"
|
||||
system_error = { path = "../system_error" }
|
||||
system_error = { path = "../system_error" }
|
||||
|
@ -2,6 +2,8 @@
|
||||
//! 然后在当前目录执行 `cargo expand --bin unified-init-expand`
|
||||
//! 就可以看到把proc macro展开后的代码了
|
||||
#![no_std]
|
||||
#![allow(internal_features)]
|
||||
#![feature(lang_items)]
|
||||
|
||||
fn main() {
|
||||
todo!()
|
||||
@ -14,6 +16,10 @@ pub fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "none")]
|
||||
#[lang = "eh_personality"]
|
||||
unsafe extern "C" fn eh_personality() {}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use system_error::SystemError;
|
||||
|
@ -14,11 +14,9 @@ CFLAGS_UNWIND =
|
||||
LDFLAGS_UNWIND =
|
||||
RUSTFLAGS_UNWIND =
|
||||
ifeq ($(UNWIND_ENABLE), yes)
|
||||
CFLAGS_UNWIND = -funwind-tables
|
||||
ifeq ($(ARCH), x86_64)
|
||||
LDFLAGS_UNWIND = --eh-frame-hdr
|
||||
RUSTFLAGS_UNWIND = -Cforce-unwind-tables -Clink-arg=-Wl,eh_frame.ld
|
||||
endif
|
||||
CFLAGS_UNWIND = -funwind-tables
|
||||
LDFLAGS_UNWIND = --eh-frame-hdr
|
||||
RUSTFLAGS_UNWIND = -Cforce-unwind-tables -Clink-arg=-Wl,eh_frame.ld -Cpanic=unwind
|
||||
endif
|
||||
|
||||
RUSTFLAGS += $(RUSTFLAGS_UNWIND)
|
||||
@ -58,7 +56,6 @@ ECHO:
|
||||
@echo "$@"
|
||||
|
||||
$(kernel_subdirs): ECHO
|
||||
|
||||
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" ASFLAGS="$(ASFLAGS)" kernel_root_path="$(shell pwd)"
|
||||
|
||||
kernel: $(kernel_subdirs) kernel_rust
|
||||
@ -66,7 +63,26 @@ kernel: $(kernel_subdirs) kernel_rust
|
||||
__link_riscv64_kernel:
|
||||
@echo "Linking kernel..."
|
||||
$(LD) -b elf64-littleriscv -z muldefs $(LDFLAGS_UNWIND) -o kernel $(shell find . -name "*.o") ../target/riscv64gc-unknown-none-elf/release/libdragonos_kernel.a -T arch/riscv64/link.ld --no-relax
|
||||
# 生成kallsyms
|
||||
current_dir=$(pwd)
|
||||
|
||||
@dbg='debug';for x in $$dbg; do \
|
||||
cd $$x;\
|
||||
$(MAKE) generate_kallsyms kernel_root_path="$(shell pwd)"||exit 1;\
|
||||
cd ..;\
|
||||
done
|
||||
|
||||
# 重新链接
|
||||
@echo "Re-Linking kernel..."
|
||||
@echo $(shell find . -name "*.o")
|
||||
$(LD) -b elf64-littleriscv -z muldefs $(LDFLAGS_UNWIND) -o kernel $(shell find . -name "*.o") ../target/riscv64gc-unknown-none-elf/release/libdragonos_kernel.a ./debug/kallsyms.o -T arch/riscv64/link.ld --no-relax
|
||||
@echo "Generating kernel ELF file..."
|
||||
|
||||
ifeq ($(UNWIND_ENABLE), yes)
|
||||
$(OBJCOPY) -I elf64-littleriscv -O elf64-littleriscv kernel ../../bin/kernel/kernel.elf
|
||||
else
|
||||
$(OBJCOPY) -I elf64-littleriscv -O elf64-littleriscv -R ".eh_frame" kernel ../../bin/kernel/kernel.elf
|
||||
endif
|
||||
@rm kernel
|
||||
$(MAKE) __dragon_stub PAYLOAD_ELF="$(shell pwd)/../../bin/kernel/kernel.elf"
|
||||
|
||||
@ -111,3 +127,7 @@ clean:
|
||||
cd $$subdir && $(MAKE) clean;\
|
||||
cd .. ;\
|
||||
done
|
||||
|
||||
.PHONY: check
|
||||
check:
|
||||
RUSTFLAGS="$(RUSTFLAGS)" cargo +nightly-2024-11-05 $(CARGO_ZBUILD) check --workspace --message-format=json --target $(TARGET_JSON)
|
@ -28,6 +28,7 @@ SECTIONS
|
||||
|
||||
. = ALIGN(4096);
|
||||
text_start_pa = .;
|
||||
__executable_start = .;
|
||||
.text (text_start_pa): AT(text_start_pa - KERNEL_VMA)
|
||||
{
|
||||
_text = .;
|
||||
@ -39,6 +40,7 @@ SECTIONS
|
||||
*(.text.*)
|
||||
|
||||
_etext = .;
|
||||
__etext = .;
|
||||
}
|
||||
. = ALIGN(32768);
|
||||
data_start_pa = .;
|
||||
@ -60,6 +62,7 @@ SECTIONS
|
||||
_rodata = .;
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.gcc_except_table .gcc_except_table.*)
|
||||
_erodata = .;
|
||||
}
|
||||
|
||||
|
28
kernel/src/arch/riscv64/riscv64gc-unknown-none-elf.json
Normal file
28
kernel/src/arch/riscv64/riscv64gc-unknown-none-elf.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"arch": "riscv64",
|
||||
"code-model": "medium",
|
||||
"cpu": "generic-rv64",
|
||||
"crt-objects-fallback": "false",
|
||||
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
|
||||
"eh-frame-header": false,
|
||||
"emit-debug-gdb-scripts": false,
|
||||
"features": "+m,+a,+f,+d,+c",
|
||||
"linker": "rust-lld",
|
||||
"linker-flavor": "gnu-lld",
|
||||
"llvm-abiname": "lp64d",
|
||||
"llvm-target": "riscv64",
|
||||
"max-atomic-width": 64,
|
||||
"metadata": {
|
||||
"description": "Bare RISC-V (RV64IMAFDC ISA)",
|
||||
"host_tools": false,
|
||||
"std": false,
|
||||
"tier": 2
|
||||
},
|
||||
"panic-strategy": "abort",
|
||||
"relocation-model": "static",
|
||||
"supported-sanitizers": [
|
||||
"shadow-call-stack",
|
||||
"kernel-address"
|
||||
],
|
||||
"target-pointer-width": "64"
|
||||
}
|
@ -35,9 +35,17 @@ pub(super) fn syscall_handler(syscall_num: usize, frame: &mut TrapFrame) -> () {
|
||||
}
|
||||
|
||||
let args = [frame.a0, frame.a1, frame.a2, frame.a3, frame.a4, frame.a5];
|
||||
syscall_return!(
|
||||
Syscall::handle(syscall_num, &args, frame).unwrap_or_else(|e| e.to_posix_errno() as usize),
|
||||
frame,
|
||||
false
|
||||
);
|
||||
let mut syscall_handle = || -> usize {
|
||||
#[cfg(feature = "backtrace")]
|
||||
{
|
||||
Syscall::catch_handle(syscall_num, &args, frame)
|
||||
.unwrap_or_else(|e| e.to_posix_errno() as usize)
|
||||
}
|
||||
#[cfg(not(feature = "backtrace"))]
|
||||
{
|
||||
Syscall::handle(syscall_num, &args, frame)
|
||||
.unwrap_or_else(|e| e.to_posix_errno() as usize)
|
||||
}
|
||||
};
|
||||
syscall_return!(syscall_handle(), frame, false);
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ SECTIONS
|
||||
. = ALIGN(32768);
|
||||
. += KERNEL_VMA;
|
||||
text_start_pa = .;
|
||||
__executable_start = .;
|
||||
.text (text_start_pa): AT(text_start_pa - KERNEL_VMA)
|
||||
{
|
||||
_text = .;
|
||||
@ -37,6 +38,7 @@ SECTIONS
|
||||
*(.text.*)
|
||||
|
||||
_etext = .;
|
||||
__etext = .;
|
||||
}
|
||||
. = ALIGN(32768);
|
||||
data_start_pa = .;
|
||||
@ -59,6 +61,7 @@ SECTIONS
|
||||
*(.rodata.*)
|
||||
*(.note.gnu.*)
|
||||
*(.fixup)
|
||||
*(.gcc_except_table .gcc_except_table.*)
|
||||
_erodata = .;
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,19 @@ pub extern "sysv64" fn syscall_handler(frame: &mut TrapFrame) {
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
normal_syscall_return!(Syscall::handle(syscall_num, &args, frame), frame, show);
|
||||
let mut syscall_handle = || -> u64 {
|
||||
#[cfg(feature = "backtrace")]
|
||||
{
|
||||
Syscall::catch_handle(syscall_num, &args, frame)
|
||||
.unwrap_or_else(|e| e.to_posix_errno() as usize) as u64
|
||||
}
|
||||
#[cfg(not(feature = "backtrace"))]
|
||||
{
|
||||
Syscall::handle(syscall_num, &args, frame)
|
||||
.unwrap_or_else(|e| e.to_posix_errno() as usize) as u64
|
||||
}
|
||||
};
|
||||
syscall_return!(syscall_handle(), frame, show);
|
||||
}
|
||||
|
||||
/// 系统调用初始化
|
||||
|
28
kernel/src/debug/jump_label.rs
Normal file
28
kernel/src/debug/jump_label.rs
Normal file
@ -0,0 +1,28 @@
|
||||
#[cfg(feature = "static_keys_test")]
|
||||
mod tests {
|
||||
use static_keys::{define_static_key_false, static_branch_unlikely};
|
||||
define_static_key_false!(MY_STATIC_KEY);
|
||||
#[inline(always)]
|
||||
fn foo() {
|
||||
println!("Entering foo function");
|
||||
if static_branch_unlikely!(MY_STATIC_KEY) {
|
||||
println!("A branch");
|
||||
} else {
|
||||
println!("B branch");
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn static_keys_test() {
|
||||
foo();
|
||||
unsafe {
|
||||
MY_STATIC_KEY.enable();
|
||||
}
|
||||
foo();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn static_keys_init() {
|
||||
static_keys::global_init();
|
||||
#[cfg(feature = "static_keys_test")]
|
||||
tests::static_keys_test();
|
||||
}
|
@ -1,2 +1,4 @@
|
||||
pub mod jump_label;
|
||||
pub mod klog;
|
||||
pub mod kprobe;
|
||||
pub mod panic;
|
||||
|
27
kernel/src/debug/panic/hook.rs
Normal file
27
kernel/src/debug/panic/hook.rs
Normal file
@ -0,0 +1,27 @@
|
||||
use unwinding::abi::{UnwindContext, UnwindReasonCode, _Unwind_GetIP};
|
||||
use unwinding::panic::UserUnwindTrace;
|
||||
|
||||
extern "C" {
|
||||
fn lookup_kallsyms(addr: u64, level: i32) -> i32;
|
||||
}
|
||||
|
||||
/// User hook for unwinding
|
||||
///
|
||||
/// During stack backtrace, the user can print the function location of the current stack frame.
|
||||
pub struct Tracer;
|
||||
pub struct CallbackData {
|
||||
pub counter: usize,
|
||||
}
|
||||
impl UserUnwindTrace for Tracer {
|
||||
type Arg = CallbackData;
|
||||
|
||||
fn trace(ctx: &UnwindContext<'_>, arg: *mut Self::Arg) -> UnwindReasonCode {
|
||||
let data = unsafe { &mut *(arg) };
|
||||
data.counter += 1;
|
||||
let pc = _Unwind_GetIP(ctx);
|
||||
unsafe {
|
||||
lookup_kallsyms(pc as u64, data.counter as i32);
|
||||
}
|
||||
UnwindReasonCode::NO_REASON
|
||||
}
|
||||
}
|
46
kernel/src/debug/panic/mod.rs
Normal file
46
kernel/src/debug/panic/mod.rs
Normal file
@ -0,0 +1,46 @@
|
||||
#[cfg(feature = "backtrace")]
|
||||
mod hook;
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
/// 全局的panic处理函数
|
||||
///
|
||||
#[cfg(target_os = "none")]
|
||||
#[panic_handler]
|
||||
#[no_mangle]
|
||||
pub fn panic(info: &PanicInfo) -> ! {
|
||||
use log::error;
|
||||
|
||||
use crate::process;
|
||||
|
||||
error!("Kernel Panic Occurred.");
|
||||
|
||||
match info.location() {
|
||||
Some(loc) => {
|
||||
println!(
|
||||
"Location:\n\tFile: {}\n\tLine: {}, Column: {}",
|
||||
loc.file(),
|
||||
loc.line(),
|
||||
loc.column()
|
||||
);
|
||||
}
|
||||
None => {
|
||||
println!("No location info");
|
||||
}
|
||||
}
|
||||
println!("Message:\n\t{}", info.message());
|
||||
#[cfg(feature = "backtrace")]
|
||||
{
|
||||
let mut data = hook::CallbackData { counter: 0 };
|
||||
println!("Rust Panic Backtrace:");
|
||||
let _res = unwinding::panic::begin_panic_with_hook::<hook::Tracer>(
|
||||
alloc::boxed::Box::new(()),
|
||||
&mut data,
|
||||
);
|
||||
// log::error!("panic unreachable: {:?}", res.0);
|
||||
}
|
||||
println!(
|
||||
"Current PCB:\n\t{:?}",
|
||||
process::ProcessManager::current_pcb()
|
||||
);
|
||||
process::ProcessManager::exit(usize::MAX);
|
||||
}
|
@ -57,6 +57,7 @@ fn do_start_kernel() {
|
||||
|
||||
unsafe { mm_init() };
|
||||
|
||||
// crate::debug::jump_label::static_keys_init();
|
||||
if scm_reinit().is_ok() {
|
||||
if let Err(e) = textui_init() {
|
||||
warn!("Failed to init textui: {:?}", e);
|
||||
@ -90,6 +91,7 @@ fn do_start_kernel() {
|
||||
clocksource_boot_finish();
|
||||
Futex::init();
|
||||
crate::bpf::init_bpf_system();
|
||||
crate::debug::jump_label::static_keys_init();
|
||||
#[cfg(all(target_arch = "x86_64", feature = "kvm"))]
|
||||
crate::virt::kvm::kvm_init();
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
#![feature(sync_unsafe_cell)]
|
||||
#![feature(vec_into_raw_parts)]
|
||||
#![feature(c_variadic)]
|
||||
#![feature(asm_goto)]
|
||||
#![cfg_attr(target_os = "none", no_std)]
|
||||
#![allow(static_mut_refs, non_local_definitions, internal_features)]
|
||||
// clippy的配置
|
||||
@ -36,8 +37,6 @@
|
||||
#[macro_use]
|
||||
extern crate std;
|
||||
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
/// 导出x86_64架构相关的代码,命名为arch模块
|
||||
#[macro_use]
|
||||
mod arch;
|
||||
@ -93,56 +92,6 @@ extern crate wait_queue_macros;
|
||||
|
||||
use crate::mm::allocator::kernel_allocator::KernelAllocator;
|
||||
|
||||
#[cfg(all(feature = "backtrace", target_arch = "x86_64"))]
|
||||
extern crate mini_backtrace;
|
||||
|
||||
extern "C" {
|
||||
fn lookup_kallsyms(addr: u64, level: i32) -> i32;
|
||||
}
|
||||
|
||||
// 声明全局的分配器
|
||||
#[cfg_attr(not(test), global_allocator)]
|
||||
pub static KERNEL_ALLOCATOR: KernelAllocator = KernelAllocator;
|
||||
|
||||
/// 全局的panic处理函数
|
||||
#[cfg(target_os = "none")]
|
||||
#[panic_handler]
|
||||
#[no_mangle]
|
||||
pub fn panic(info: &PanicInfo) -> ! {
|
||||
use log::error;
|
||||
use process::ProcessManager;
|
||||
|
||||
error!("Kernel Panic Occurred.");
|
||||
|
||||
match info.location() {
|
||||
Some(loc) => {
|
||||
println!(
|
||||
"Location:\n\tFile: {}\n\tLine: {}, Column: {}",
|
||||
loc.file(),
|
||||
loc.line(),
|
||||
loc.column()
|
||||
);
|
||||
}
|
||||
None => {
|
||||
println!("No location info");
|
||||
}
|
||||
}
|
||||
println!("Message:\n\t{}", info.message());
|
||||
|
||||
#[cfg(all(feature = "backtrace", target_arch = "x86_64"))]
|
||||
{
|
||||
unsafe {
|
||||
let bt = mini_backtrace::Backtrace::<16>::capture();
|
||||
println!("Rust Panic Backtrace:");
|
||||
let mut level = 0;
|
||||
for frame in bt.frames {
|
||||
lookup_kallsyms(frame as u64, level);
|
||||
level += 1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
println!("Current PCB:\n\t{:?}", (ProcessManager::current_pcb()));
|
||||
|
||||
ProcessManager::exit(usize::MAX);
|
||||
}
|
||||
|
@ -74,6 +74,20 @@ impl Syscall {
|
||||
|
||||
return r;
|
||||
}
|
||||
/// 系统调用分发器,用于分发系统调用。
|
||||
///
|
||||
/// 与[handle]不同,这个函数会捕获系统调用处理函数的panic,返回错误码。
|
||||
#[cfg(feature = "backtrace")]
|
||||
pub fn catch_handle(
|
||||
syscall_num: usize,
|
||||
args: &[usize],
|
||||
frame: &mut TrapFrame,
|
||||
) -> Result<usize, SystemError> {
|
||||
let res = unwinding::panic::catch_unwind(|| Self::handle(syscall_num, args, frame));
|
||||
res.unwrap_or_else(|_| loop {
|
||||
core::hint::spin_loop();
|
||||
})
|
||||
}
|
||||
/// @brief 系统调用分发器,用于分发系统调用。
|
||||
///
|
||||
/// 这个函数内,需要根据系统调用号,调用对应的系统调用处理函数。
|
||||
|
@ -1 +1 @@
|
||||
v1.6
|
||||
v1.7
|
40
tools/check_arch.sh
Normal file
40
tools/check_arch.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASE_PATH=$(pwd)
|
||||
# 定义错误信息
|
||||
ARCH_MISMATCH_ERROR="Error: ARCH in env.mk does not match arch in dadk-manifest.toml"
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
echo "Error: ARCH environment variable is not set." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Check if ROOT_PATH is set
|
||||
if [ -n "$ROOT_PATH" ]; then
|
||||
CHECK_PATH="$ROOT_PATH"
|
||||
else
|
||||
# Check if the current directory name is "tools"
|
||||
if [ "$(basename "$BASE_PATH")" = "tools" ]; then
|
||||
# Try the parent directory's dadk-manifest
|
||||
CHECK_PATH=$(dirname "$BASE_PATH")/
|
||||
else
|
||||
# Otherwise, check the current directory
|
||||
CHECK_PATH="$BASE_PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Checking $CHECK_PATH"
|
||||
|
||||
|
||||
# 读取dadk-manifest.toml文件中的arch字段
|
||||
DADK_ARCH=$(grep -oP '(?<=arch = ")[^"]+' $CHECK_PATH/dadk-manifest.toml)
|
||||
|
||||
# 检查arch字段是否为x86_64
|
||||
if [ "$ARCH" != $DADK_ARCH ]; then
|
||||
echo "$ARCH_MISMATCH_ERROR" >&2
|
||||
exit 1
|
||||
else
|
||||
echo "Arch check passed."
|
||||
exit 0
|
||||
fi
|
@ -1,27 +0,0 @@
|
||||
# ======检查是否以sudo运行=================
|
||||
uid=`id -u`
|
||||
if [ ! $uid == "0" ];then
|
||||
echo "请以sudo权限运行"
|
||||
exit
|
||||
fi
|
||||
|
||||
# 检查是否设置ARCH环境变量
|
||||
|
||||
if [ ! ${ARCH} ];then
|
||||
echo "请设置ARCH环境变量"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
DISK_NAME=disk-${ARCH}.img
|
||||
|
||||
echo "Mounting virtual disk image '${DISK_NAME}'..."
|
||||
|
||||
LOOP_DEVICE=$(losetup -f --show -P ../bin/${DISK_NAME}) \
|
||||
|| exit 1
|
||||
|
||||
echo ${LOOP_DEVICE}p1
|
||||
|
||||
mkdir -p ../bin/disk_mount/
|
||||
mount ${LOOP_DEVICE}p1 ../bin/disk_mount/
|
||||
lsblk
|
@ -65,7 +65,7 @@ UBOOT_VERSION="v2023.10"
|
||||
RISCV64_UBOOT_PATH="arch/riscv64/u-boot-${UBOOT_VERSION}-riscv64"
|
||||
|
||||
|
||||
DISK_NAME="disk-${ARCH}.img"
|
||||
DISK_NAME="disk-image-${ARCH}.img"
|
||||
|
||||
QEMU=qemu-system-${ARCH}
|
||||
QEMU_DISK_IMAGE="../bin/${DISK_NAME}"
|
||||
|
@ -1,19 +0,0 @@
|
||||
# ======检查是否以sudo运行=================
|
||||
uid=`id -u`
|
||||
if [ ! $uid == "0" ];then
|
||||
echo "请以sudo权限运行"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! ${ARCH} ];then
|
||||
echo "请设置ARCH环境变量"
|
||||
exit
|
||||
fi
|
||||
|
||||
DISK_NAME=disk-${ARCH}.img
|
||||
|
||||
LOOP_DEVICE=$(lsblk | grep disk_mount|sed 's/.*\(loop[0-9]*\)p1.*/\1/1g'|awk 'END{print $0}')
|
||||
|
||||
umount -f ../bin/disk_mount/
|
||||
losetup -d /dev/$LOOP_DEVICE
|
||||
echo $LOOP_DEVICE
|
@ -1,5 +1,5 @@
|
||||
###############################################
|
||||
# 该脚本用于将disk_mount目录下的文件写入到disk-${ARCH}.img的第一个分区中,
|
||||
# 该脚本用于将文件拷贝到磁盘镜像中,
|
||||
# 并在磁盘镜像中安装grub引导程序
|
||||
#
|
||||
# 用法:bash write_disk_image.sh --bios legacy/uefi
|
||||
@ -11,15 +11,16 @@
|
||||
echo "ARCH=${ARCH}"
|
||||
# 给ARCH变量赋默认值
|
||||
export ARCH=${ARCH:=x86_64}
|
||||
export DADK=${DADK:=dadk}
|
||||
|
||||
DISK_NAME=disk-${ARCH}.img
|
||||
|
||||
# 内核映像
|
||||
root_folder=$(dirname $(pwd))
|
||||
kernel="${root_folder}/bin/kernel/kernel.elf"
|
||||
boot_folder="${root_folder}/bin/disk_mount/boot"
|
||||
mount_folder=$($DADK -w $root_folder rootfs show-mountpoint || exit 1)
|
||||
boot_folder="${mount_folder}/boot"
|
||||
GRUB_INSTALL_PATH="${boot_folder}/grub"
|
||||
mount_folder="${root_folder}/bin/disk_mount"
|
||||
|
||||
ARGS=`getopt -o p -l bios: -- "$@"`
|
||||
eval set -- "${ARGS}"
|
||||
#echo formatted parameters=[$@]
|
||||
@ -67,34 +68,17 @@ if [ ${ARCH} == "i386" ] || [ ${ARCH} == "x86_64" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# 判断是否存在硬盘镜像文件,如果不存在,就创建一个(docker模式下,由于镜像中缺少qemu-img不会创建)
|
||||
if [ ! -f "${root_folder}/bin/${DISK_NAME}" ]; then
|
||||
echo "创建硬盘镜像文件..."
|
||||
case "$1" in
|
||||
--bios)
|
||||
case "$2" in
|
||||
uefi)
|
||||
sudo ARCH=${ARCH} bash ./create_hdd_image.sh -P MBR #GPT分区 用GPT分区uefi启动不了 内核没有针对gpt分区表来做处理
|
||||
;;
|
||||
legacy)
|
||||
sudo ARCH=${ARCH} bash ./create_hdd_image.sh -P MBR #MBR分区
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# 默认创建MBR分区
|
||||
sudo ARCH=${ARCH} bash ./create_hdd_image.sh -P MBR #MBR分区
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# 判断是否存在硬盘镜像文件,如果不存在,就创建一个
|
||||
echo "创建硬盘镜像文件..."
|
||||
$DADK -w $root_folder rootfs create --skip-if-exists || exit 1
|
||||
|
||||
# 拷贝程序到硬盘
|
||||
mkdir -p ${root_folder}/bin/disk_mount
|
||||
bash mount_virt_disk.sh || exit 1
|
||||
$DADK -w $root_folder rootfs mount || exit 1
|
||||
|
||||
LOOP_DEVICE=$(lsblk | grep disk_mount|sed 's/.*\(loop[0-9]*\)p1.*/\1/1g'|awk 'END{print $0}')
|
||||
|
||||
|
||||
LOOP_DEVICE=$($DADK -w $root_folder rootfs show-loop-device || exit 1)
|
||||
echo $LOOP_DEVICE
|
||||
|
||||
echo ${mount_folder}
|
||||
# mkdir -p ${GRUB_INSTALL_PATH}
|
||||
|
||||
# 检测grub文件夹是否存在
|
||||
@ -107,21 +91,20 @@ fi
|
||||
|
||||
|
||||
if [ ${ARCH} == "i386" ] || [ ${ARCH} == "x86_64" ]; then
|
||||
cp ${kernel} ${root_folder}/bin/disk_mount/boot/
|
||||
cp ${kernel} ${mount_folder}/boot/
|
||||
fi
|
||||
|
||||
# 拷贝用户程序到磁盘镜像
|
||||
mkdir -p ${root_folder}/bin/disk_mount/bin
|
||||
mkdir -p ${root_folder}/bin/disk_mount/dev
|
||||
mkdir -p ${root_folder}/bin/disk_mount/proc
|
||||
mkdir -p ${root_folder}/bin/disk_mount/usr
|
||||
touch ${root_folder}/bin/disk_mount/dev/keyboard.dev
|
||||
cp -r ${root_folder}/bin/sysroot/* ${root_folder}/bin/disk_mount/
|
||||
mkdir -p ${mount_folder}/bin
|
||||
mkdir -p ${mount_folder}/dev
|
||||
mkdir -p ${mount_folder}/proc
|
||||
mkdir -p ${mount_folder}/usr
|
||||
cp -r ${root_folder}/bin/sysroot/* ${mount_folder}/
|
||||
|
||||
# 设置 grub 相关数据
|
||||
if [ ${ARCH} == "i386" ] || [ ${ARCH} == "x86_64" ]; then
|
||||
|
||||
touch ${root_folder}/bin/disk_mount/boot/grub/grub.cfg
|
||||
touch ${mount_folder}/boot/grub/grub.cfg
|
||||
cfg_content='set timeout=15
|
||||
set default=0
|
||||
insmod efi_gop
|
||||
@ -154,7 +137,7 @@ if [ "${INSTALL_GRUB_TO_IMAGE}" = "1" ];then
|
||||
;;
|
||||
legacy) #传统bios
|
||||
if [ ${ARCH} == "x86_64" ];then
|
||||
${GRUB_PATH_I386_LEGACY_INSTALL} --target=i386-pc --boot-directory=${boot_folder} /dev/$LOOP_DEVICE
|
||||
${GRUB_PATH_I386_LEGACY_INSTALL} --target=i386-pc --boot-directory=${boot_folder} $LOOP_DEVICE
|
||||
elif [ ${ARCH} == "riscv64" ];then
|
||||
install_riscv64_efi
|
||||
else
|
||||
@ -165,11 +148,12 @@ if [ "${INSTALL_GRUB_TO_IMAGE}" = "1" ];then
|
||||
;;
|
||||
*)
|
||||
#传统bios
|
||||
${GRUB_PATH_I386_LEGACY_INSTALL} --target=i386-pc --boot-directory=${boot_folder} /dev/$LOOP_DEVICE
|
||||
${GRUB_PATH_I386_LEGACY_INSTALL} --target=i386-pc --boot-directory=${boot_folder} $LOOP_DEVICE
|
||||
;;
|
||||
|
||||
|
||||
esac
|
||||
fi
|
||||
|
||||
sync
|
||||
bash umount_virt_disk.sh
|
||||
|
||||
$DADK -w $root_folder rootfs umount || exit 1
|
||||
|
@ -1,13 +1,8 @@
|
||||
user_sub_dirs = apps
|
||||
|
||||
SUBDIR_ROOTS := .
|
||||
DIRS := . $(shell find $(SUBDIR_ROOTS) -type d)
|
||||
GARBAGE_PATTERNS := *.o *.a
|
||||
GARBAGE := $(foreach DIR,$(DIRS),$(addprefix $(DIR)/,$(GARBAGE_PATTERNS)))
|
||||
|
||||
DADK_VERSION=$(shell dadk -V | awk 'END {print $$2}')
|
||||
# 最小的DADK版本
|
||||
MIN_DADK_VERSION = 0.1.11
|
||||
MIN_DADK_VERSION = 0.2.0
|
||||
DADK_CACHE_DIR = $(ROOT_PATH)/bin/dadk_cache
|
||||
|
||||
ECHO:
|
||||
@ -41,15 +36,12 @@ endif
|
||||
.PHONY: dadk_run
|
||||
dadk_run: install_dadk
|
||||
mkdir -p $(DADK_CACHE_DIR)
|
||||
dadk --config-dir dadk/config --cache-dir $(DADK_CACHE_DIR) --dragonos-dir $(ROOT_PATH)/bin/sysroot build
|
||||
dadk --config-dir dadk/config --cache-dir $(DADK_CACHE_DIR) --dragonos-dir $(ROOT_PATH)/bin/sysroot install
|
||||
$(DADK) user build -w $(ROOT_PATH)
|
||||
$(DADK) user install -w $(ROOT_PATH)
|
||||
|
||||
.PHONY: dadk_clean
|
||||
dadk_clean: install_dadk
|
||||
@echo dadk_clean
|
||||
# 不运行dadk clean的原因是,把clean的工作交给应用程序自己去做,这样可以节省编译时间
|
||||
#dadk --config-dir dadk/config --cache-dir $(DADK_CACHE_DIR) --dragonos-dir $(ROOT_PATH)/bin/sysroot clean src
|
||||
#dadk --config-dir dadk/config --cache-dir $(DADK_CACHE_DIR) --dragonos-dir $(ROOT_PATH)/bin/sysroot clean target
|
||||
|
||||
all:
|
||||
mkdir -p $(ROOT_PATH)/bin/sysroot
|
||||
@ -59,13 +51,13 @@ all:
|
||||
|
||||
@echo 用户态程序编译完成
|
||||
|
||||
copy_sysconfig: dadk_run
|
||||
.PHONY: copy_sysconfig
|
||||
copy_sysconfig:
|
||||
cp -r sysconfig/* $(ROOT_PATH)/bin/sysroot/
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(GARBAGE)
|
||||
$(MAKE) dadk_clean
|
||||
@list='$(user_sub_dirs)'; for subdir in $$list; do \
|
||||
echo "Clean in dir: $$subdir";\
|
||||
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "about",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/about"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
36
user/dadk/config/about.toml
Normal file
36
user/dadk/config/about.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# 用户程序名称
|
||||
name = "about"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = ""
|
||||
# (可选)是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/about"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "clear",
|
||||
"version": "0.1.0",
|
||||
"description": "清屏",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/clear"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
44
user/dadk/config/clear-0.1.0.toml
Normal file
44
user/dadk/config/clear-0.1.0.toml
Normal file
@ -0,0 +1,44 @@
|
||||
# 用户程序名称
|
||||
name = "clear"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "清屏"
|
||||
# (可选)是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/clear"
|
||||
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# 由于原配置中没有依赖项,这里忽略[[depends]]部分
|
||||
# (可选)环境变量
|
||||
# 由于原配置中没有环境变量,这里忽略[[envs]]部分
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "Core utils",
|
||||
"version": "9.4.0",
|
||||
"description": "GNU Core utils",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Archive": {
|
||||
"url": "https://mirrors.dragonos.org.cn/pub/third_party/gnu/coreutils/coreutils-9.4.tar.xz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "./configure CC=x86_64-linux-musl-gcc CFLAGS=-static && make -j $(nproc) && DESTDIR=$DADK_CURRENT_BUILD_DIR make install"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
|
||||
"build_once": true,
|
||||
|
||||
"install_once": true,
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
39
user/dadk/config/core_utils-9.4.0.toml
Normal file
39
user/dadk/config/core_utils-9.4.0.toml
Normal file
@ -0,0 +1,39 @@
|
||||
# 用户程序名称
|
||||
name = "core utils"
|
||||
# 版本号
|
||||
version = "9.4.0"
|
||||
# 用户程序描述信息
|
||||
description = "GNU Core utils"
|
||||
# (可选)是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = true
|
||||
# (可选) 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = true
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "archive"
|
||||
# 路径或URL
|
||||
source-path = "https://mirrors.dragonos.org.cn/pub/third_party/gnu/coreutils/coreutils-9.4.tar.xz"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "./configure CC=x86_64-linux-musl-gcc CFLAGS=-static && make -j $(nproc) && DESTDIR=$DADK_CURRENT_BUILD_DIR make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# 此处无依赖项,故忽略
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "dmesg",
|
||||
"version": "0.1.0",
|
||||
"description": "查看日志",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/dmesg"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install -j $(nproc)"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
47
user/dadk/config/dmesg-0.1.0.toml
Normal file
47
user/dadk/config/dmesg-0.1.0.toml
Normal file
@ -0,0 +1,47 @@
|
||||
# 用户程序名称
|
||||
name = "dmesg"
|
||||
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
|
||||
# 用户程序描述信息
|
||||
description = "查看内核日志"
|
||||
|
||||
# 是否只构建一次
|
||||
build-once = false
|
||||
|
||||
# 是否只安装一次
|
||||
install-once = false
|
||||
|
||||
# 目标架构
|
||||
target-arch = ["x86_64"]
|
||||
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/dmesg"
|
||||
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# 构建命令
|
||||
build-command = "make install -j $(nproc)"
|
||||
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# 安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# 清除命令
|
||||
clean-command = "make clean"
|
||||
|
||||
# 依赖项
|
||||
# 注意:因为没有依赖项,所以这里不包含[[depends]]部分
|
||||
|
||||
# 环境变量
|
||||
# 注意:因为没有环境变量,所以这里不包含[[envs]]部分
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
"name": "dog",
|
||||
"version": "0.1.0",
|
||||
"description": "dns client",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Git": {
|
||||
"url": "https://git.mirrors.dragonos.org.cn/DragonOS-Community/dog.git",
|
||||
"branch": null,
|
||||
"revision": "6f2c0c8f12"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [
|
||||
{
|
||||
"key": "CC",
|
||||
"value": "x86_64-linux-musl-gcc"
|
||||
}
|
||||
],
|
||||
"build_once": false,
|
||||
"install_once": false,
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
51
user/dadk/config/dog_0_1_0.toml
Normal file
51
user/dadk/config/dog_0_1_0.toml
Normal file
@ -0,0 +1,51 @@
|
||||
# 用户程序名称
|
||||
name = "dog"
|
||||
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
|
||||
# 用户程序描述信息
|
||||
description = "dns client"
|
||||
|
||||
# 目标架构
|
||||
target-arch = ["x86_64"]
|
||||
|
||||
# 是否只构建一次
|
||||
build-once = false
|
||||
|
||||
# 是否只安装一次
|
||||
install-once = false
|
||||
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
source = "git"
|
||||
# 路径或URL
|
||||
source-path = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/dog.git"
|
||||
# git标签或分支
|
||||
revision = "6f2c0c8f12"
|
||||
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# 构建命令
|
||||
build-command = "make install"
|
||||
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# 安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# 清除命令
|
||||
clean-command = "make clean"
|
||||
|
||||
# 依赖项
|
||||
# 注意:因为没有依赖项,所以这里不包含[[depends]]部分
|
||||
|
||||
# 环境变量
|
||||
[[envs]]
|
||||
key = "CC"
|
||||
value = "x86_64-linux-musl-gcc"
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "DragonReach",
|
||||
"version": "0.1.0",
|
||||
"description": "init程序",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Git": {
|
||||
"url" : "https://git.mirrors.dragonos.org.cn/DragonOS-Community/DragonReach.git",
|
||||
"revision": "e945c217b3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
49
user/dadk/config/dragon_reach-0.1.0.toml
Normal file
49
user/dadk/config/dragon_reach-0.1.0.toml
Normal file
@ -0,0 +1,49 @@
|
||||
# 用户程序名称
|
||||
name = "DragonReach"
|
||||
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
|
||||
# 用户程序描述信息
|
||||
description = "init程序"
|
||||
|
||||
# 目标架构
|
||||
target-arch = ["x86_64"]
|
||||
|
||||
# 是否只构建一次
|
||||
build-once = false
|
||||
|
||||
# 是否只安装一次
|
||||
install-once = false
|
||||
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
source = "git"
|
||||
# 路径或URL
|
||||
source-path = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/DragonReach.git"
|
||||
# git标签或分支
|
||||
revision = "e945c217b3"
|
||||
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# 构建命令
|
||||
build-command = "make install"
|
||||
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# 安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# 清除命令
|
||||
clean-command = "make clean"
|
||||
|
||||
# 依赖项
|
||||
# 注意:因为没有依赖项,所以这里不包含[[depends]]部分
|
||||
|
||||
# 环境变量
|
||||
# 注意:因为没有环境变量,所以这里不包含[[envs]]部分
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "Held",
|
||||
"version": "0.1.0",
|
||||
"description": "中断文本编辑器",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Git": {
|
||||
"url" : "https://git.mirrors.dragonos.org.cn/DragonOS-Community/Held.git",
|
||||
"revision": "f192df4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install-dragonos"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
49
user/dadk/config/held-0.1.0.toml
Normal file
49
user/dadk/config/held-0.1.0.toml
Normal file
@ -0,0 +1,49 @@
|
||||
# 用户程序名称
|
||||
name = "Held"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "终端文本编辑器"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "git"
|
||||
# 路径或URL
|
||||
source-path = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/Held.git"
|
||||
# git标签或分支
|
||||
# 注意: branch和revision只能二选一,且source要设置为"git"
|
||||
revision = "f192df4"
|
||||
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install-dragonos"
|
||||
# 安装相关信息
|
||||
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# 此处没有依赖项,因此省略[[depends]]部分
|
||||
# (可选)环境变量
|
||||
# 此处没有环境变量,因此省略[[envs]]部分
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "Http_Server",
|
||||
"version": "0.1.0",
|
||||
"description": "一个简单的http server",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/http_server"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
40
user/dadk/config/http_server-0.1.0.toml
Normal file
40
user/dadk/config/http_server-0.1.0.toml
Normal file
@ -0,0 +1,40 @@
|
||||
# 用户程序名称
|
||||
name = "Http_Server"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "一个简单的http server"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/http_server"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# 环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
"name": "musl",
|
||||
"version": "1.2.4",
|
||||
"description": "musl libc",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Archive": {
|
||||
"url": "https://mirrors.dragonos.org.cn/pub/third_party/musl/musl-1.2.4.tar.gz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "touch config.mak && DESTDIR=$DADK_CURRENT_BUILD_DIR make install -j $(nproc)"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"build_once": true,
|
||||
|
||||
"install_once": true,
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
40
user/dadk/config/musl_1_2_4.toml
Normal file
40
user/dadk/config/musl_1_2_4.toml
Normal file
@ -0,0 +1,40 @@
|
||||
# 用户程序名称
|
||||
name = "musl"
|
||||
# 版本号
|
||||
version = "1.2.4"
|
||||
# 用户程序描述信息
|
||||
description = "musl libc"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = true
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = true
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "archive"
|
||||
# 路径或URL
|
||||
source-path = "https://mirrors.dragonos.org.cn/pub/third_party/musl/musl-1.2.4.tar.gz"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "touch config.mak && DESTDIR=$DADK_CURRENT_BUILD_DIR make install -j $(nproc)"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# (可选)环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "NovaShell",
|
||||
"version": "0.1.0",
|
||||
"description": "NovaShell程序",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Git": {
|
||||
"url": "https://git.mirrors.dragonos.org.cn/DragonOS-Community/NovaShell.git",
|
||||
"revision": "cb835e03e4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
44
user/dadk/config/nova_shell-0.1.0.toml
Normal file
44
user/dadk/config/nova_shell-0.1.0.toml
Normal file
@ -0,0 +1,44 @@
|
||||
# 用户程序名称
|
||||
name = "NovaShell"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "NovaShell程序"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "git"
|
||||
# 路径或URL
|
||||
source-path = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/NovaShell.git"
|
||||
# git标签或分支
|
||||
# 注意: branch和revision只能二选一,且source要设置为"git"
|
||||
revision = "cb835e03e4"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# 由于原配置中没有依赖项,此处省略[[depends]]部分
|
||||
# (可选)环境变量
|
||||
# 由于原配置中没有环境变量,此处省略[[envs]]部分
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "ping",
|
||||
"version": "0.1.0",
|
||||
"description": "ping用户程序",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/ping"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/usr"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
41
user/dadk/config/ping_0_1_0.toml
Normal file
41
user/dadk/config/ping_0_1_0.toml
Normal file
@ -0,0 +1,41 @@
|
||||
# 用户程序名称
|
||||
name = "ping"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "ping用户程序"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/ping"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/usr"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# 由于原配置中没有依赖项,此处省略[[depends]]部分
|
||||
# (可选)环境变量
|
||||
# 由于原配置中没有环境变量,此处省略[[envs]]部分
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "riscv_init",
|
||||
"version": "0.1.0",
|
||||
"description": "临时的riscv下的初始化程序",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/riscv_init"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"build_once": false,
|
||||
"install_once": false,
|
||||
"target_arch": ["riscv64"]
|
||||
}
|
40
user/dadk/config/riscv_init-0.1.0.toml
Normal file
40
user/dadk/config/riscv_init-0.1.0.toml
Normal file
@ -0,0 +1,40 @@
|
||||
# 用户程序名称
|
||||
name = "riscv_init"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "临时的riscv下的初始化程序"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["riscv64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/riscv_init"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# (可选)环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "tar",
|
||||
"version": "1.35",
|
||||
"description": "gnu tar",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"InstallFromPrebuilt": {
|
||||
"Archive": {
|
||||
"url": "https://mirrors.dragonos.org.cn/pub/third_party/gnu/tar/tar-1.35-x86_64-linux-gnu.tar.xz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/usr"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": null
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
39
user/dadk/config/tar_1_35.toml
Normal file
39
user/dadk/config/tar_1_35.toml
Normal file
@ -0,0 +1,39 @@
|
||||
# 用户程序名称
|
||||
name = "tar"
|
||||
# 版本号
|
||||
version = "1.35"
|
||||
# 用户程序描述信息
|
||||
description = "gnu tar"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "install-from-prebuilt"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "archive"
|
||||
# 路径或URL
|
||||
source-path = "https://mirrors.dragonos.org.cn/pub/third_party/gnu/tar/tar-1.35-x86_64-linux-gnu.tar.xz"
|
||||
|
||||
[build]
|
||||
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/usr"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = ""
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# (可选)环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "test_alarm",
|
||||
"version": "0.1.0",
|
||||
"description": "test for alarm",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_alarm"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"build_once": false,
|
||||
"install_once": false,
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
41
user/dadk/config/test_alarm_0_1_0.toml
Normal file
41
user/dadk/config/test_alarm_0_1_0.toml
Normal file
@ -0,0 +1,41 @@
|
||||
# 用户程序名称
|
||||
name = "test_alarm"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "test for alarm"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_alarm"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# 由于原配置中没有依赖项,这里忽略[[depends]]
|
||||
# (可选)环境变量
|
||||
# 由于原配置中没有环境变量,这里忽略[[envs]]
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "test-backlog",
|
||||
"version": "0.1.0",
|
||||
"description": "test the tcp backlog",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test-backlog"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"build_once": false,
|
||||
"install_once": false,
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
40
user/dadk/config/test_backlog_0_1_0.toml
Normal file
40
user/dadk/config/test_backlog_0_1_0.toml
Normal file
@ -0,0 +1,40 @@
|
||||
# 用户程序名称
|
||||
name = "test-backlog"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "test the tcp backlog"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test-backlog"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# (可选)环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "test_bind",
|
||||
"version": "0.1.0",
|
||||
"description": "一个简单的test bind",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_bind"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
40
user/dadk/config/test_bind-0.1.0.toml
Normal file
40
user/dadk/config/test_bind-0.1.0.toml
Normal file
@ -0,0 +1,40 @@
|
||||
# 用户程序名称
|
||||
name = "test_bind"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "一个简单的test bind"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_bind"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# (可选)环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "test-blockcache",
|
||||
"version": "0.1.0",
|
||||
"description": "用于测试blockcach小程序",
|
||||
"rust_target": "x86_64-unknown-dragonos",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test-blockcache"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
42
user/dadk/config/test_blockcache_0_1_0.toml
Normal file
42
user/dadk/config/test_blockcache_0_1_0.toml
Normal file
@ -0,0 +1,42 @@
|
||||
# 用户程序名称
|
||||
name = "test-blockcache"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "用于测试blockcach小程序"
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test-blockcache"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# [[depends]]
|
||||
# name = "depend1"
|
||||
# version = "0.1.1"
|
||||
# (可选)环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
||||
# [[envs]]
|
||||
# key = "PATH"
|
||||
# value = "/usr/bin"
|
@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "test-chown",
|
||||
"version": "0.1.0",
|
||||
"description": "chown系列系统调用",
|
||||
"rust_target": "x86_64-unknown-dragonos",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test-chown"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"build_once": false,
|
||||
"install_once": false,
|
||||
"target_arch": [
|
||||
"x86_64"
|
||||
]
|
||||
}
|
46
user/dadk/config/test_chown_0_1_0.toml
Normal file
46
user/dadk/config/test_chown_0_1_0.toml
Normal file
@ -0,0 +1,46 @@
|
||||
# 用户程序名称
|
||||
name = "test-chown"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "chown系列系统调用"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from-source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test-chown"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# [[depends]]
|
||||
# name = "depend1"
|
||||
# version = "0.1.1"
|
||||
# (可选)环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
||||
# [[envs]]
|
||||
# key = "PATH"
|
||||
# value = "/usr/bin"
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "test_cred",
|
||||
"version": "0.1.0",
|
||||
"description": "测试cred",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_cred"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
51
user/dadk/config/test_cred-0.1.0.toml
Normal file
51
user/dadk/config/test_cred-0.1.0.toml
Normal file
@ -0,0 +1,51 @@
|
||||
# 用户程序名称
|
||||
name = "test_cred"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "测试cred"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_cred"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# [[depends]]
|
||||
# name = "depend1"
|
||||
# version = "0.1.1"
|
||||
# [[depends]]
|
||||
# name = "depend2"
|
||||
# version = "0.1.2"
|
||||
# (可选)环境变量
|
||||
# [[envs]]
|
||||
# key = "PATH"
|
||||
# value = "/usr/bin"
|
||||
# [[envs]]
|
||||
# key = "LD_LIBRARY_PATH"
|
||||
# value = "/usr/lib"
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "test_dup3",
|
||||
"version": "0.1.0",
|
||||
"description": "测试dup3",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_dup3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
51
user/dadk/config/test_dup3_0_1_0.toml
Normal file
51
user/dadk/config/test_dup3_0_1_0.toml
Normal file
@ -0,0 +1,51 @@
|
||||
# 用户程序名称
|
||||
name = "test_dup3"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "测试dup3"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_dup3"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# [[depends]]
|
||||
# name = "depend1"
|
||||
# version = "0.1.1"
|
||||
# [[depends]]
|
||||
# name = "depend2"
|
||||
# version = "0.1.2"
|
||||
# (可选)环境变量
|
||||
# [[envs]]
|
||||
# key = "PATH"
|
||||
# value = "/usr/bin"
|
||||
# [[envs]]
|
||||
# key = "LD_LIBRARY_PATH"
|
||||
# value = "/usr/lib"
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "test_ebpf",
|
||||
"version": "0.1.0",
|
||||
"description": "to test eBPF",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_ebpf"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
37
user/dadk/config/test_ebpf_0_1_0.toml
Normal file
37
user/dadk/config/test_ebpf_0_1_0.toml
Normal file
@ -0,0 +1,37 @@
|
||||
# 用户程序名称
|
||||
name = "test_ebpf"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "to test eBPF"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_ebpf"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "test_eventfd",
|
||||
"version": "0.1.0",
|
||||
"description": "test_eventfd",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_eventfd"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
32
user/dadk/config/test_eventfd_0_1_0.toml
Normal file
32
user/dadk/config/test_eventfd_0_1_0.toml
Normal file
@ -0,0 +1,32 @@
|
||||
# 用户程序名称
|
||||
name = "test_eventfd"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "test_eventfd"
|
||||
# 目标架构
|
||||
target-arch = ["x86_64"]
|
||||
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_eventfd"
|
||||
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "test_filemap",
|
||||
"version": "0.1.0",
|
||||
"description": "测试filemap",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_filemap"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
36
user/dadk/config/test_filemap-0.1.0.toml
Normal file
36
user/dadk/config/test_filemap-0.1.0.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# 用户程序名称
|
||||
name = "test_filemap"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "测试filemap"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_filemap"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "test-for-robustfutex",
|
||||
"version": "0.1.0",
|
||||
"description": "some tests for robust futex",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test-for-robustfutex"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
36
user/dadk/config/test_for_robustfutex_0_1_0.toml
Normal file
36
user/dadk/config/test_for_robustfutex_0_1_0.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# 用户程序名称
|
||||
name = "test-for-robustfutex"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "some tests for robust futex"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test-for-robustfutex"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "test_fstat",
|
||||
"version": "0.1.0",
|
||||
"description": "一个用来测试fstat能够正常运行的app",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_fstat"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
36
user/dadk/config/test_fstat-0.1.0.toml
Normal file
36
user/dadk/config/test_fstat-0.1.0.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# 用户程序名称
|
||||
name = "test_fstat"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "一个用来测试fstat能够正常运行的app"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_fstat"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "test_fstatfs",
|
||||
"version": "0.1.0",
|
||||
"description": "测试fstatfs",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_fstatfs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"build_once": false,
|
||||
"install_once": false,
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
41
user/dadk/config/test_fstatfs_0_1_0.toml
Normal file
41
user/dadk/config/test_fstatfs_0_1_0.toml
Normal file
@ -0,0 +1,41 @@
|
||||
# 用户程序名称
|
||||
name = "test_fstatfs"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "测试fstatfs"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_fstatfs"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# 由于原文件中依赖项为空,此处省略[[depends]]部分
|
||||
# (可选)环境变量
|
||||
# 由于原文件中环境变量为空,此处省略[[envs]]部分
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "test_gettimeofday",
|
||||
"version": "0.1.0",
|
||||
"description": "一个用来测试gettimeofday能够正常运行的app",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_gettimeofday"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
37
user/dadk/config/test_gettimeofday-0.1.0.toml
Normal file
37
user/dadk/config/test_gettimeofday-0.1.0.toml
Normal file
@ -0,0 +1,37 @@
|
||||
# 用户程序名称
|
||||
name = "test_gettimeofday"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "一个用来测试gettimeofday能够正常运行的app"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_gettimeofday"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "test_kvm",
|
||||
"version": "0.1.0",
|
||||
"description": "测试kvm的程序",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_kvm"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
46
user/dadk/config/test_kvm_0_1_0.toml
Normal file
46
user/dadk/config/test_kvm_0_1_0.toml
Normal file
@ -0,0 +1,46 @@
|
||||
# 用户程序名称
|
||||
name = "test_kvm"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "测试kvm的程序"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_kvm"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
||||
# (可选)依赖项
|
||||
# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]]
|
||||
# [[depends]]
|
||||
# name = "depend1"
|
||||
# version = "0.1.1"
|
||||
# (可选)环境变量
|
||||
# 注意:如果没有环境变量,忽略此项,不允许只留一个[[envs]]
|
||||
# [[envs]]
|
||||
# key = "PATH"
|
||||
# value = "/usr/bin"
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "test_lo",
|
||||
"version": "0.1.0",
|
||||
"description": "test for lo interface",
|
||||
"rust_target": null,
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_lo"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"envs": [],
|
||||
"build_once": false,
|
||||
"install_once": false,
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
36
user/dadk/config/test_lo_0_1_0.toml
Normal file
36
user/dadk/config/test_lo_0_1_0.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# 用户程序名称
|
||||
name = "test_lo"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "test for lo interface"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_lo"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "test_mkfifo",
|
||||
"version": "0.1.0",
|
||||
"description": "一个用来测试mkfifo能够正常运行的app",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test_mkfifo"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/bin"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
36
user/dadk/config/test_mkfifo-0.1.0.toml
Normal file
36
user/dadk/config/test_mkfifo-0.1.0.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# 用户程序名称
|
||||
name = "test_mkfifo"
|
||||
# 版本号
|
||||
version = "0.1.0"
|
||||
# 用户程序描述信息
|
||||
description = "一个用来测试mkfifo能够正常运行的app"
|
||||
# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果
|
||||
build-once = false
|
||||
# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装
|
||||
install-once = false
|
||||
# 目标架构
|
||||
# 可选值:"x86_64", "aarch64", "riscv64"
|
||||
target-arch = ["x86_64"]
|
||||
# 任务源
|
||||
[task-source]
|
||||
# 构建类型
|
||||
# 可选值:"build-from_source", "install-from-prebuilt"
|
||||
type = "build-from-source"
|
||||
# 构建来源
|
||||
# "build_from_source" 可选值:"git", "local", "archive"
|
||||
# "install_from_prebuilt" 可选值:"local", "archive"
|
||||
source = "local"
|
||||
# 路径或URL
|
||||
source-path = "user/apps/test_mkfifo"
|
||||
# 构建相关信息
|
||||
[build]
|
||||
# (可选)构建命令
|
||||
build-command = "make install"
|
||||
# 安装相关信息
|
||||
[install]
|
||||
# (可选)安装到DragonOS的路径
|
||||
in-dragonos-path = "/bin"
|
||||
# 清除相关信息
|
||||
[clean]
|
||||
# (可选)清除命令
|
||||
clean-command = "make clean"
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "test_mount",
|
||||
"version": "1.0.0",
|
||||
"description": "to test user mode mount",
|
||||
"task_type": {
|
||||
"BuildFromSource": {
|
||||
"Local": {
|
||||
"path": "apps/test-mount"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": [],
|
||||
"build": {
|
||||
"build_command": "make install"
|
||||
},
|
||||
"install": {
|
||||
"in_dragonos_path": "/"
|
||||
},
|
||||
"clean": {
|
||||
"clean_command": "make clean"
|
||||
},
|
||||
"target_arch": ["x86_64"]
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user