Browse Source

添加core utils到系统 (#624)

LoGin 11 months ago
parent
commit
1cd9bb43f0
3 changed files with 32 additions and 4 deletions
  1. 2 3
      user/Makefile
  2. 26 0
      user/dadk/config/core_utils-9.4.0.dadk
  3. 4 1
      user/dadk/config/musl_1_2_4.dadk

+ 2 - 3
user/Makefile

@@ -7,7 +7,7 @@ GARBAGE := $(foreach DIR,$(DIRS),$(addprefix $(DIR)/,$(GARBAGE_PATTERNS)))
 
 DADK_VERSION=$(shell dadk -V | awk 'END {print $$2}')
 # 最小的DADK版本
-MIN_DADK_VERSION = 0.1.8
+MIN_DADK_VERSION = 0.1.10
 DADK_CACHE_DIR = $(ROOT_PATH)/bin/dadk_cache
 
 ECHO:
@@ -60,11 +60,10 @@ all:
 	@echo 用户态程序编译完成
 
 copy_services: dadk_run
+	@mkdir -p $(ROOT_PATH)/bin/sysroot/etc/reach/system
 	cp -r services/* $(ROOT_PATH)/bin/sysroot/etc/reach/system/
 
 
-	
-
 .PHONY: clean
 clean:
 	rm -rf $(GARBAGE)

+ 26 - 0
user/dadk/config/core_utils-9.4.0.dadk

@@ -0,0 +1,26 @@
+{
+  "name": "Core utils",
+  "version": "9.4.0",
+  "description": "GNU Core utils",
+  "task_type": {
+    "BuildFromSource": {
+      "Archive": {
+        "url": "https://mirrors.dragonos.org.cn/pub/third_party/gnu/coreutils/coreutils-9.4.tar.xz"
+      }
+    }
+  },
+  "depends": [],
+  "build": {
+    "build_command": "./configure CC=x86_64-linux-musl-gcc CFLAGS=-static && make -j $(nproc) && DESTDIR=$DADK_CURRENT_BUILD_DIR make install"
+  },
+  "clean": {
+    "clean_command": "make clean"
+  },
+  "install": {
+    "in_dragonos_path": "/"
+  },
+
+  "build_once": true,
+
+  "install_once": true
+}

+ 4 - 1
user/dadk/config/musl_1_2_4.dadk

@@ -20,5 +20,8 @@
   "clean": {
     "clean_command": "make clean"
   },
-  "envs": []
+  "envs": [],
+  "build_once": true,
+
+  "install_once": true
 }