Skip to content

Commit

Permalink
Merge pull request #45 from xqyjlj/xq/update-dev
Browse files Browse the repository at this point in the history
✨ feat: update
  • Loading branch information
BernardXiong authored Nov 6, 2023
2 parents b98ab6e + a2ae886 commit 2f18abd
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua

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
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
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
```

Expand Down Expand Up @@ -98,7 +98,7 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua

会在每天凌晨生成 aarch64/riscv64 for qemu 的 prebuilt 版本,包括内核和 rootfs 文件系统:

- [aarch64](http://117.143.63.254:9012/www/rt-smart/prebuilt/qemu-virt64-aarch64_latest.tar.gz)
- [riscv64](http://117.143.63.254:9012/www/rt-smart/prebuilt/qemu-virt64-riscv_latest.tar.gz)
- [aarch64](https://download-redirect.rt-thread.org/download/rt-smart/prebuilt/qemu-virt64-aarch64_latest.tar.gz)
- [riscv64](https://download-redirect.rt-thread.org/download/rt-smart/prebuilt/qemu-virt64-riscv_latest.tar.gz)

可以使用 qemu 来运行起来。
5 changes: 5 additions & 0 deletions tools/scripts/tasks/smart-rootfs/on_run.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ function deploy_syslib(toolchains, rootfs)
rt_utils.cp_with_symlink(filepath, path.join(rootfs, "lib", filename))
end
end

for _, filepath in ipairs(os.files(path.join(pkg:installdir(), toolchains) .. "/*/ld-musl-*.so.*")) do
local filename = path.filename(filepath)
rt_utils.cp_with_symlink(filepath, path.join(rootfs, "lib", filename))
end
end

function copy_packages()
Expand Down
2 changes: 2 additions & 0 deletions tools/scripts/toolchains/aarch64-smart-musleabi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ do
import("rt.private.build.rtflags")
toolchain:load_cross_toolchain()

toolchain:set("toolset", "cxx", "aarch64-linux-musleabi-g++")

toolchain:add("cxflags", "-march=armv8-a", {force = true})

local link_type = os.getenv("RT_XMAKE_LINK_TYPE") or "shared"
Expand Down
2 changes: 2 additions & 0 deletions tools/scripts/toolchains/arm-smart-musleabi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ do
import("rt.private.build.rtflags")
toolchain:load_cross_toolchain()

toolchain:set("toolset", "cxx", "arm-linux-musleabi-g++")

toolchain:add("cxflags", "-march=armv7-a", "-marm", "-msoft-float", {force = true})

local link_type = os.getenv("RT_XMAKE_LINK_TYPE") or "shared"
Expand Down
2 changes: 2 additions & 0 deletions tools/scripts/toolchains/riscv64gc-unknown-smart-musl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ do
import("rt.private.build.rtflags")
toolchain:load_cross_toolchain()

toolchain:set("toolset", "cxx", "riscv64-unknown-linux-musl-g++")

toolchain:add("cxflags", "-mcmodel=medany", "-march=rv64imafdc", "-mabi=lp64", {force = true})

local link_type = os.getenv("RT_XMAKE_LINK_TYPE") or "shared"
Expand Down
2 changes: 2 additions & 0 deletions tools/scripts/toolchains/x86_64-linux-musl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ do
on_load(function(toolchain)
toolchain:load_cross_toolchain()

toolchain:set("toolset", "cxx", "x86_64-linux-musl-g++")

local link_type = os.getenv("RT_XMAKE_LINK_TYPE") or "shared"
if link_type == "static" then
toolchain:add("ldflags", "--static", {force = true})
Expand Down

0 comments on commit 2f18abd

Please sign in to comment.