Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 21-Aug-2025 | - | ||||
applications/ | 21-Aug-2025 | - | ||||
drivers/ | 21-Aug-2025 | - | ||||
root/boot/grub/ | 21-Aug-2025 | - | ||||
.config | A D | 21-Aug-2025 | 46.1 KiB | 1,407 | 1,299 | |
Kconfig | A D | 21-Aug-2025 | 286 | 18 | 12 | |
README.md | A D | 21-Aug-2025 | 2.4 KiB | 74 | 51 | |
SConscript | A D | 21-Aug-2025 | 287 | 14 | 10 | |
SConstruct | A D | 21-Aug-2025 | 775 | 31 | 23 | |
dbg.sh | A D | 21-Aug-2025 | 123 | 5 | 3 | |
rtconfig.h | A D | 21-Aug-2025 | 8.5 KiB | 419 | 93 | |
rtconfig.py | A D | 21-Aug-2025 | 1.2 KiB | 47 | 33 | |
run.sh | A D | 21-Aug-2025 | 117 | 5 | 3 | |
x86_ram.lds | A D | 21-Aug-2025 | 1.5 KiB | 63 | 53 |
README.md
1# RT-Thread for x86 2 3这是一份基础的RT-Thread针对x86的版本、移植,主要是能够在qemu中执行。以下说明主要针对Linux的环境,如果是Windows环境,请使用Env工具,同时请自行处理生成iso的方法。 4 5## 编译 6 7编译RT-Thread for x86版本,还需要一份支持newlib的工具链,可以通过以下地址获得: 8 9*[i386-unknown-elf_for_x86_64-pc-linux-gnu_latest.tar.bz2](http://117.143.63.254:9012/www/rt-smart/i386-unknown-elf_for_x86_64-pc-linux-gnu_latest.tar.bz2) 10 11下载后解压,然后在rtconfig.py中配置其中的EXEC_PATH变量 12 13```python 14if CROSS_TOOL == 'gcc': 15 PLATFORM = 'gcc' 16 EXEC_PATH = os.getenv('RTT_EXEC_PATH') or 'E:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_IA32_ELF/bin' 17 18``` 19 20然后在x86 bsp目录下执行scons命令来编译: 21 22```bash 23scons 24``` 25 26### 配置 27 28RT-Thread for x86的版本也支持menuconfig的配置方式,在Linux下可以使用`scons --menuconfig`的方式进行配置。 29 30因为menuconfig是一份字符界面的配置(Kconfig),在ubuntu下需要安装ncurses5的库 31 32```bash 33sudo apt install libncurses5-dev 34``` 35 36## 运行 37 38在ubuntu下运行,请确保你安装了`qemu-system-i386`,`grub` 以及 `xorriso`软件包: 39 40```bash 41sudo apt install qemu-system-x86 grub-common xorriso 42``` 43 44然后执行`./run.sh`命令可以使用qemu来模拟执行(它也会生成可启动的iso文件) 45 46```bash 47~/workspace/rt-thread/bsp/x86$ ./run.sh 48xorriso 1.4.8 : RockRidge filesystem manipulator, libburnia project. 49 50Drive current: -outdev 'stdio:bootable.iso' 51Media current: stdio file, overwriteable 52Media status : is blank 53Media summary: 0 sessions, 0 data blocks, 0 data, 135g free 54Added to ISO image: directory '/'='/tmp/grub.uLz91i' 55xorriso : UPDATE : 578 files added in 1 seconds 56Added to ISO image: directory '/'='/home/bernard/workspace/rt-thread/bsp/x86/root' 57xorriso : UPDATE : 582 files added in 1 seconds 58xorriso : NOTE : Copying to System Area: 512 bytes from file '/usr/lib/grub/i386-pc/boot_hybrid.img' 59ISO image produced: 6007 sectors 60Written to medium : 6007 sectors at LBA 0 61Writing to 'stdio:bootable.iso' completed successfully. 62 63 64 \ | / 65- RT - Thread Operating System 66 / | \ 4.0.4 build Aug 22 2021 67 2006 - 2021 Copyright by rt-thread team 68Floppy Inc : NEC765B controller Floppy Type : 2.88MB 69hello! 70msh /> 71``` 72 73在qemu下可以按Ctrl-A + X退出qemu。 74