From 6cc29a224b5722fe89154cbcc3ab44e61f58c6f1 Mon Sep 17 00:00:00 2001 From: longjin Date: Sat, 5 Aug 2023 07:02:59 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E3=80=81relibc=E7=9A=84=E8=BF=9C=E7=A8=8B=E4=B8=BAdragonos?= =?UTF-8?q?=E7=9A=84git=E9=95=9C=E5=83=8F=E7=AB=99=EF=BC=8C=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=9B=BD=E5=86=85=E7=BD=91=E7=BB=9C=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=BC=96=E8=AF=91=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/Cargo.toml | 6 +++--- user/dadk/config/relibc-0.1.0.dadk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 99ea9e0a0..a1202da38 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -13,13 +13,13 @@ crate-type = ["staticlib"] x86 = "0.52.0" x86_64 = "0.14.10" bitflags = "1.3.2" -virtio-drivers = { git = "https://github.com/DragonOS-Community/virtio-drivers.git", rev = "f1d1cbb" } +virtio-drivers = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/virtio-drivers.git", rev = "f1d1cbb" } # 一个无锁MPSC队列 thingbuf = { version = "0.1.3", default-features = false, features = ["alloc"] } # smoltcp 0.9.1 -smoltcp = { git = "https://github.com/DragonOS-Community/smoltcp.git", rev = "9027825", default-features = false, features = ["log", "alloc", "socket-raw", "socket-udp", "socket-tcp", "socket-icmp", "socket-dhcpv4", "socket-dns", "proto-ipv4", "proto-ipv6"]} +smoltcp = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/smoltcp.git", rev = "9027825", default-features = false, features = ["log", "alloc", "socket-raw", "socket-udp", "socket-tcp", "socket-icmp", "socket-dhcpv4", "socket-dns", "proto-ipv4", "proto-ipv6"]} # num-traits 0.2.15 -num-traits = { git = "https://github.com/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false } +num-traits = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false } num = { version = "0.4.0", default-features = false } num-derive = "0.3" # 一个no_std的hashmap、hashset diff --git a/user/dadk/config/relibc-0.1.0.dadk b/user/dadk/config/relibc-0.1.0.dadk index ab64c0d75..38bd6684f 100644 --- a/user/dadk/config/relibc-0.1.0.dadk +++ b/user/dadk/config/relibc-0.1.0.dadk @@ -5,7 +5,7 @@ "task_type": { "BuildFromSource": { "Git": { - "url": "https://github.com/DragonOS-Community/relibc.git", + "url": "https://git.mirrors.dragonos.org/DragonOS-Community/relibc.git", "branch": "dragonos-relibc", "revision": null } From 3d3201a2c64fd2e88b732b5c6e0d29ad4df5249c Mon Sep 17 00:00:00 2001 From: longjin Date: Sat, 5 Aug 2023 07:28:47 +0000 Subject: [PATCH 2/2] auto install/auto update dadk --- user/Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/user/Makefile b/user/Makefile index 583321a3d..9155ffe43 100644 --- a/user/Makefile +++ b/user/Makefile @@ -14,7 +14,7 @@ current_CFLAGS := $(CFLAGS) DADK_VERSION = $(shell dadk -V | awk 'END {print $2}') # 最小的DADK版本 -MIN_DADK_VERSION = 0.1.1 +MIN_DADK_VERSION = 0.1.2 DADK_CACHE_DIR = $(ROOT_PATH)/bin/dadk_cache # 旧版的libc安装路径 @@ -34,9 +34,17 @@ ifeq ("$(DADK_VERSION)", "") @echo "\nOr you can install dadk from source by running the following command:" @echo "\n\tcargo install --git https://github.com/DragonOS-Community/DADK.git" @echo "\n" - @exit 1 + @echo "Auto installing dadk..." + CC=gcc AS=as AR=ar LD=ld OBJCOPY=objcopy NM=nm cargo install dadk else @echo "dadk version $(DADK_VERSION) installed" +# 如果DADK版本过低,则自动更新 +ifeq ($(shell printf '%s\n' "$(DADK_VERSION)" "$(MIN_DADK_VERSION)" | sort -V | head -n1), $(MIN_DADK_VERSION)) + @echo "dadk version is too low, please update to $(MIN_DADK_VERSION) or higher version" + @echo "Updating dadk..." + CC=gcc AS=as AR=ar LD=ld OBJCOPY=objcopy NM=nm cargo install dadk || (echo "dadk update failed" && exit 1) + @echo "dadk updated" +endif endif dadk_run: install_dadk