Add X86 i686 gcc 15.2.0 (#11388)
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9-smp :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9-smp :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / A9-smp :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/mem.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :kernel/mem.cfg (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled

* add i686 x86 newlib toolchain

* add missing x86 gcc option to manual_dist.yml

* fix typo
This commit is contained in:
atxhua
2026-05-12 02:00:32 -05:00
committed by GitHub
parent ebd3dae490
commit 8c5e36f525
4 changed files with 34 additions and 21 deletions
+8
View File
@@ -35,6 +35,7 @@ on:
- "sourcery-riscv64-unknown-elf"
- "gcc"
- "sourcery-riscv32-esp32"
- "i686-x86-newlib"
bsp_config:
description: 'Type a config you want mannual test in .config, like: CONFIG_RT_USING_DEBUG=y,CONFIG_RT_DEBUGING_COLOR=y,CONFIG_RT_DEBUGING_CONTEXT=y'
required: false
@@ -127,6 +128,13 @@ jobs:
run: |
sudo apt-get -qq install libsdl2-dev
- name: Install i686 X86 Newlib ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'i686-x86-newlib' && success() }}
run: |
source tools/ci/toolchain.sh i686-atxhua-newlib-elf-gcc
echo "RTT_EXEC_PATH=/opt/i686-atxhua-newlib-elf-gcc/bin" >> $GITHUB_ENV
echo "RTT_CC_PREFIX=i686-atxhua-newlib-elf-" >> $GITHUB_ENV
- name: Bsp Scons Compile
if: ${{ success() }}
shell: bash
+24 -19
View File
@@ -6,15 +6,25 @@
编译RT-Thread for x86版本,还需要一份支持newlib的工具链,可以通过以下地址获得:
*[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)
* [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)
* [ GCC 15.2.0 w/ Newlib 4.6.0.20260123: https://github.com/atxhua/i686-atxhua-newlib-elf/releases/download/15.2.0/i686-atxhua-newlib-elf-linux.tar.gz ](https://github.com/atxhua/i686-atxhua-newlib-elf/releases/download/15.2.0/i686-atxhua-newlib-elf-linux.tar.gz)
下载后解压,然后在rtconfig.py中配置其中的EXEC_PATH变量
下载后解压,然后配置RTT_EXEC_PATH & RTT_CC_PREFIX 变量
```bash
export RTT_EXEC_PATH='/path/to/i686-atxhua-newlib-elf-linux/bin'
export RTT_CC_PREFIX='i686-atxhua-newlib-elf-'
```
rtconfig.py
```python
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = os.getenv('RTT_EXEC_PATH') or 'E:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_IA32_ELF/bin'
if PLATFORM == 'gcc':
# toolchains
PREFIX = os.getenv('RTT_CC_PREFIX') or 'i386-unknown-elf-'
```
然后在x86 bsp目录下执行scons命令来编译:
@@ -41,33 +51,28 @@ sudo apt install libncurses5-dev
sudo apt install qemu-system-x86 grub-common xorriso
```
然后执行`./run.sh`命令可以使用qemu来模拟执行(它也会生成可启动的iso文件)
然后使用qemu来模拟执行
```bash
~/workspace/rt-thread/bsp/x86$ ./run.sh
xorriso 1.4.8 : RockRidge filesystem manipulator, libburnia project.
$ qemu-system-i386 -M pc -kernel rtthread.elf -nographic
Drive current: -outdev 'stdio:bootable.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 135g free
Added to ISO image: directory '/'='/tmp/grub.uLz91i'
xorriso : UPDATE : 578 files added in 1 seconds
Added to ISO image: directory '/'='/home/bernard/workspace/rt-thread/bsp/x86/root'
xorriso : UPDATE : 582 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 512 bytes from file '/usr/lib/grub/i386-pc/boot_hybrid.img'
ISO image produced: 6007 sectors
Written to medium : 6007 sectors at LBA 0
Writing to 'stdio:bootable.iso' completed successfully.
SeaBIOS (version 1.16.3-debian-1.16.3-2)
iPXE (https://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+06FCAE00+06F0AE00 CA00
Booting from ROM..
\ | /
- RT - Thread Operating System
/ | \ 4.0.4 build Aug 22 2021
2006 - 2021 Copyright by rt-thread team
/ | \ 5.3.0 build May 10 2026 21:25:36
2006 - 2024 Copyright by RT-Thread team
Floppy Inc : NEC765B controller Floppy Type : 2.88MB
[I/DBG] root filesystem mounted.
hello!
msh />
```
在qemu下可以按Ctrl-A + X退出qemu。
+1 -1
View File
@@ -19,7 +19,7 @@ BUILD = 'debug'
if PLATFORM == 'gcc':
# toolchains
PREFIX = 'i386-unknown-elf-'
PREFIX = os.getenv('RTT_CC_PREFIX') or 'i386-unknown-elf-'
CC = PREFIX + 'gcc'
AS = PREFIX + 'gcc'
AR = PREFIX + 'ar'
+1 -1
View File
@@ -9,7 +9,7 @@ declare -A download_urls=(
["riscv-none-embed-gcc"]="https://github.com/RT-Thread/toolchains-ci/releases/download/v1.5/xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x64.tar.gz"
["riscv32-esp-elf-gcc"]="https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz"
["clang"]="https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-16.0.0/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz"
["i686-atxhua-newlib-elf-gcc"]="https://github.com/atxhua/i686-atxhua-newlib-elf/releases/download/15.2.0/i686-atxhua-newlib-elf-linux.tar.gz"
)
show_help() {