diff --git a/README.md b/README.md index 34743a2..7f713d2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # 介绍与快速入门 > 本文档环境为 `ubuntu 20.04` -> -> 更多文档请前往 https://club.rt-thread.org/ask/article/1c95a3e1c58c0c25.html ## 介绍 @@ -38,19 +36,7 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua sudo apt install xmake ``` -3. **安装 qemu** - - userapps 已提供 qemu 7.1.0 的安装包,请自行下载 https://download-redirect.rt-thread.org/download/rt-smart/native/tools/qemu/qemu_7.1.0-2022111713_amd64.deb - - ```shell - sudo apt-get install -y libglib2.0-dev libpixman-1-dev - curl -L https://download-redirect.rt-thread.org/download/rt-smart/native/tools/qemu/qemu_7.1.0-2022111713_amd64.deb -o ./qemu.deb - sudo dpkg -i ./qemu.deb - ``` - - 如若想安装最新版本,请自行下载 qemu 源码进行编译安装 - -4. **编译** +3. **编译** 由于 smart 采用 xmake 编译用户态环境,因此 smart 的编译方式非常简单。 @@ -70,30 +56,17 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua ![image-20230531173059551](./assets/image-20230531173059551.png) -5. **镜像制作** +4. **镜像制作** 运行 `xmake smart-rootfs` 制作 rootfs ,运行 `xmake smart-image` 制作镜像 ```shell xmake smart-rootfs - xmake smart-image -o ../prebuilt/qemu-virt64-aarch64/ext4.img # 将镜像输出至 qemu-virt64-aarch64 目录 + xmake smart-image -f ext4 #制作 ext4 镜像 ``` ![image-20230531173829621](./assets/image-20230531173829621.png) -6. **运行 qemu** - - 进入 `userapp/prebuilt/qemu-virt64-aarch64`,运行 qemu.sh 脚本启动 qemu - - ```shell - cd prebuilt/qemu-virt64-aarch64/ - ./run.sh - ``` - - ![image-20230531174321326](./assets/image-20230531174321326.png) - - 在 qemu 中 输入 `ctrl+a` 抬起后,再输入 `x` 即可退出 qemu - ## prebuilt 的版本 会在每天凌晨生成 aarch64/riscv64 for qemu 的 prebuilt 版本,包括内核和 rootfs 文件系统: diff --git a/assets/image-20230531174321326.png b/assets/image-20230531174321326.png deleted file mode 100644 index a44438b..0000000 Binary files a/assets/image-20230531174321326.png and /dev/null differ diff --git a/prebuilt/qemu-virt64-aarch64/ext4.img b/prebuilt/qemu-virt64-aarch64/ext4.img deleted file mode 100644 index 03e168d..0000000 Binary files a/prebuilt/qemu-virt64-aarch64/ext4.img and /dev/null differ diff --git a/prebuilt/qemu-virt64-aarch64/rtthread.bin b/prebuilt/qemu-virt64-aarch64/rtthread.bin deleted file mode 100755 index 9466317..0000000 Binary files a/prebuilt/qemu-virt64-aarch64/rtthread.bin and /dev/null differ diff --git a/prebuilt/qemu-virt64-aarch64/run.sh b/prebuilt/qemu-virt64-aarch64/run.sh deleted file mode 100755 index 980a451..0000000 --- a/prebuilt/qemu-virt64-aarch64/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# @author xqyjlj -# @file run.sh -# -# Change Logs: -# Date Author Notes -# ------------ ---------- ----------------------------------------------- -# 2023-01-12 xqyjlj initial version -# - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -qemu-system-aarch64 \ - -M virt,gic-version=2 \ - -cpu cortex-a53 \ - -m 128M \ - -kernel ${script_dir}/rtthread.bin \ - -nographic \ - -drive if=none,file=${script_dir}/ext4.img,format=raw,id=blk0 \ - -device virtio-blk-device,drive=blk0,bus=virtio-mmio-bus.0 \ - -netdev user,id=net0,hostfwd=tcp::8080-:80 \ - -device virtio-net-device,netdev=net0,bus=virtio-mmio-bus.1 \ - -device virtio-serial-device \ - -chardev socket,host=127.0.0.1,port=43211,server=on,wait=off,telnet=on,id=console0 \ - -device virtserialport,chardev=console0 diff --git a/prebuilt/qemu-virt64-aarch64/run_debug.sh b/prebuilt/qemu-virt64-aarch64/run_debug.sh deleted file mode 100755 index 432e70e..0000000 --- a/prebuilt/qemu-virt64-aarch64/run_debug.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# @author xqyjlj -# @file run.sh -# -# Change Logs: -# Date Author Notes -# ------------ ---------- ----------------------------------------------- -# 2023-01-12 xqyjlj initial version -# - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -qemu-system-aarch64 \ - -M virt,gic-version=2 \ - -cpu cortex-a53 \ - -m 128M \ - -kernel ${script_dir}/rtthread.bin \ - -nographic \ - -drive if=none,file=${script_dir}/ext4.img,format=raw,id=blk0 \ - -device virtio-blk-device,drive=blk0,bus=virtio-mmio-bus.0 \ - -netdev user,id=net0,hostfwd=tcp::8080-:80 \ - -device virtio-net-device,netdev=net0,bus=virtio-mmio-bus.1 \ - -device virtio-serial-device \ - -chardev socket,host=127.0.0.1,port=43211,server=on,wait=off,telnet=on,id=console0 \ - -device virtserialport,chardev=console0 \ - -S \ - -gdb tcp::1234 diff --git a/prebuilt/qemu-virt64-riscv/ext4.img b/prebuilt/qemu-virt64-riscv/ext4.img deleted file mode 100644 index f7356d1..0000000 Binary files a/prebuilt/qemu-virt64-riscv/ext4.img and /dev/null differ diff --git a/prebuilt/qemu-virt64-riscv/rtthread.bin b/prebuilt/qemu-virt64-riscv/rtthread.bin deleted file mode 100755 index c512f90..0000000 Binary files a/prebuilt/qemu-virt64-riscv/rtthread.bin and /dev/null differ diff --git a/prebuilt/qemu-virt64-riscv/run.sh b/prebuilt/qemu-virt64-riscv/run.sh deleted file mode 100755 index 1de4a9b..0000000 --- a/prebuilt/qemu-virt64-riscv/run.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# @author xqyjlj -# @file run.sh -# -# Change Logs: -# Date Author Notes -# ------------ ---------- ----------------------------------------------- -# 2023-01-12 xqyjlj initial version -# - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -qemu-system-riscv64 \ - -nographic \ - -machine virt \ - -m 256M \ - -kernel ${script_dir}/rtthread.bin \ - -drive if=none,file=${script_dir}/ext4.img,format=raw,id=blk0 \ - -device virtio-blk-device,drive=blk0,bus=virtio-mmio-bus.0 \ - -netdev user,id=tap0,hostfwd=tcp::8080-:80 \ - -device virtio-net-device,netdev=tap0,bus=virtio-mmio-bus.1 \ - -device virtio-serial-device \ - -chardev socket,host=127.0.0.1,port=43212,server=on,wait=off,telnet=on,id=console0 \ - -device virtserialport,chardev=console0 diff --git a/prebuilt/qemu-virt64-riscv/run_debug.sh b/prebuilt/qemu-virt64-riscv/run_debug.sh deleted file mode 100755 index 4dfcd0f..0000000 --- a/prebuilt/qemu-virt64-riscv/run_debug.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# @author xqyjlj -# @file run.sh -# -# Change Logs: -# Date Author Notes -# ------------ ---------- ----------------------------------------------- -# 2023-01-12 xqyjlj initial version -# - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -qemu-system-riscv64 \ - -nographic \ - -machine virt \ - -m 256M \ - -kernel ${script_dir}/rtthread.bin \ - -drive if=none,file=${script_dir}/ext4.img,format=raw,id=blk0 \ - -device virtio-blk-device,drive=blk0,bus=virtio-mmio-bus.0 \ - -netdev user,id=tap0,hostfwd=tcp::8080-:80 \ - -device virtio-net-device,netdev=tap0,bus=virtio-mmio-bus.1 \ - -device virtio-serial-device \ - -chardev socket,host=127.0.0.1,port=43212,server=on,wait=off,telnet=on,id=console0 \ - -device virtserialport,chardev=console0 \ - -S \ - -gdb tcp::1234 diff --git a/prebuilt/sha1sum.txt b/prebuilt/sha1sum.txt deleted file mode 100644 index 6e3b0e3..0000000 --- a/prebuilt/sha1sum.txt +++ /dev/null @@ -1 +0,0 @@ -https://github.com/RT-Thread/rt-thread: 3e4797c63c43384825d63166966289bb60b6be78