diff --git a/README.md b/README.md index d20c548..34743a2 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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 来运行起来。 diff --git a/tools/scripts/tasks/smart-rootfs/on_run.lua b/tools/scripts/tasks/smart-rootfs/on_run.lua index b5f1018..c562396 100644 --- a/tools/scripts/tasks/smart-rootfs/on_run.lua +++ b/tools/scripts/tasks/smart-rootfs/on_run.lua @@ -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() diff --git a/tools/scripts/toolchains/aarch64-smart-musleabi.lua b/tools/scripts/toolchains/aarch64-smart-musleabi.lua index ec4f062..1fb0255 100644 --- a/tools/scripts/toolchains/aarch64-smart-musleabi.lua +++ b/tools/scripts/toolchains/aarch64-smart-musleabi.lua @@ -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" diff --git a/tools/scripts/toolchains/arm-smart-musleabi.lua b/tools/scripts/toolchains/arm-smart-musleabi.lua index c823875..20058ca 100644 --- a/tools/scripts/toolchains/arm-smart-musleabi.lua +++ b/tools/scripts/toolchains/arm-smart-musleabi.lua @@ -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" diff --git a/tools/scripts/toolchains/riscv64gc-unknown-smart-musl.lua b/tools/scripts/toolchains/riscv64gc-unknown-smart-musl.lua index 67e9454..5d72fae 100644 --- a/tools/scripts/toolchains/riscv64gc-unknown-smart-musl.lua +++ b/tools/scripts/toolchains/riscv64gc-unknown-smart-musl.lua @@ -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" diff --git a/tools/scripts/toolchains/x86_64-linux-musl.lua b/tools/scripts/toolchains/x86_64-linux-musl.lua index 2c0a93e..f0c415a 100644 --- a/tools/scripts/toolchains/x86_64-linux-musl.lua +++ b/tools/scripts/toolchains/x86_64-linux-musl.lua @@ -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})