Skip to content

Commit

Permalink
Merge pull request #60 from rcitach/lib
Browse files Browse the repository at this point in the history
Fix the situation where busybox cannot start normally
  • Loading branch information
BernardXiong authored Nov 15, 2024
2 parents 9dcc7a2 + bba55dc commit 874153c
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 7 deletions.
4 changes: 2 additions & 2 deletions repo/packages/a/aarch64-smart-musleabi/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ do
if (version and sha256) then
add_versions(version, sha256)
else
add_versions("203958-15706d647d", "49571ae1228a50b1836e5580448e5fe597af6a3346bd6d7b3d21459c29f4c0b8")
add_versions("236309-e8ed057a81", "5052119f31187202be7b5f377ef779671052e6d0f6db3009d51f46cbba1ada9a")
end
elseif is_host("linux") then
add_urls(
Expand All @@ -45,7 +45,7 @@ do
if (version and sha256) then
add_versions(version, sha256)
else
add_versions("203958-15706d647d", "f76ea0fabe245b20585f3bf86003a76183a2cad6d07c939877f211439c94dc9f")
add_versions("236309-e8ed057a81", "3ac533662fbe412102d99546ac53776b117247cb54717c5bbdbb403b54fe1326")
end
end

Expand Down
4 changes: 2 additions & 2 deletions repo/packages/a/arm-smart-musleabi/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ do
if (version and sha256) then
add_versions(version, sha256)
else
add_versions("203958-15706d647d", "79b0e2afef8475b689ba7477d25fb67eda123d4aa135aa2d50dbac4744bc1d05")
add_versions("236309-e8ed057a81", "9547fd4df1f7da5d24a42798154a743adf6305b77cb8c113f48b2d4134db3fc7")
end
elseif is_host("linux") then
add_urls(
Expand All @@ -45,7 +45,7 @@ do
if (version and sha256) then
add_versions(version, sha256)
else
add_versions("203958-15706d647d", "69d0b888297ac8236c59d90c3affcd71f831f8dc9ac058dcdfb024006f955ce3")
add_versions("236309-e8ed057a81", "08822163eecf4bd8cd0ae8c2d19bc9546ca749d7a862f5a7c881c4f5e1c17262")
end
end

Expand Down
9 changes: 9 additions & 0 deletions repo/packages/b/busybox/port/1.35.0/inittab
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2006-2024, RT-Thread Development Team
#
# SPDX-License-Identifier: Apache-2.0

# Run getty & login
# console::respawn:/sbin/getty 115200 /dev/console

# or without login, a direct access to shell
console::respawn:-/bin/ash
9 changes: 8 additions & 1 deletion repo/packages/b/busybox/scripts/deploy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
--
import("rt.rt_utils")

function main(rootfs, installdir)
function main(rootfs, installdir, version)
for _, filepath in ipairs(os.files(path.join(installdir, "bin") .. "/*")) do
local filename = path.filename(filepath)
rt_utils.cp_with_symlink(filepath, path.join(rootfs, "bin", filename))
Expand All @@ -42,4 +42,11 @@ function main(rootfs, installdir)
local filename = path.filename(filepath)
rt_utils.cp_with_symlink(filepath, path.join(rootfs, "sbin", filename))
end

for _, filepath in ipairs(os.files(path.join(os.scriptdir():match(".*/"), "port", version) .. "/*")) do
if not filepath:match("%.config$") then
local filename = path.filename(filepath)
rt_utils.cp_with_symlink(filepath, path.join(rootfs, "etc", filename))
end
end
end
Binary file modified sdk/lib/aarch64/cortex-a/libcxx.a
Binary file not shown.
Binary file modified sdk/lib/aarch64/cortex-a/libcxx.so
Binary file not shown.
Binary file modified sdk/lib/arm/cortex-a/libcxx.a
Binary file not shown.
Binary file modified sdk/lib/arm/cortex-a/libcxx.so
Binary file not shown.
Binary file modified sdk/lib/risc-v/rv64gc/libcxx.a
Binary file not shown.
Binary file modified sdk/lib/risc-v/rv64gc/libcxx.so
Binary file not shown.
Binary file modified sdk/rt-thread/lib/aarch64/cortex-a/librtthread.a
Binary file not shown.
Binary file modified sdk/rt-thread/lib/aarch64/cortex-a/librtthread.so
Binary file not shown.
Binary file modified sdk/rt-thread/lib/arm/cortex-a/librtthread.a
Binary file not shown.
Binary file modified sdk/rt-thread/lib/arm/cortex-a/librtthread.so
Binary file not shown.
Binary file modified sdk/rt-thread/lib/risc-v/rv64gc/librtthread.a
Binary file not shown.
Binary file modified sdk/rt-thread/lib/risc-v/rv64gc/librtthread.so
Binary file not shown.
6 changes: 4 additions & 2 deletions tools/scripts/tasks/smart-rootfs/on_run.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
-- Date Author Notes
-- ------------ ---------- -----------------------------------------------
-- 2023-05-09 xqyjlj initial version
--
-- 2024-11-11 rcitach add version get

import("core.project.config")
import("core.project.project")
import("core.base.option")
Expand Down Expand Up @@ -69,6 +70,7 @@ function deploy_package(rootfs)
local repo = instance:repo()
local packagename = requireinfo.originstr
local installdir = instance:installdir()
local version = instance:version_str()
local repodir = repo:url()
local reponame = repo:name()
if string.find(packagename, "%s") then
Expand All @@ -78,7 +80,7 @@ function deploy_package(rootfs)
path.join(repodir, "packages", packagename:sub(1, 1), packagename, "scripts", "deploy.lua")
if os.isfile(deploy_script) then
vprint("run script => '%s'", deploy_script)
import("deploy", {rootdir = path.directory(deploy_script)}).main(rootfs, installdir)
import("deploy", {rootdir = path.directory(deploy_script)}).main(rootfs, installdir, version)
end
local package_rootfs = path.join(repodir, "packages", packagename:sub(1, 1), packagename, "rootfs")
if os.isdir(package_rootfs) then
Expand Down

0 comments on commit 874153c

Please sign in to comment.