Parcourir la source

fix:修改busybox编译选项,启用busybox作为初始引导程序以及shell程序 (#1161)

火花 il y a 1 jour
Parent
commit
0bc74e16e0
3 fichiers modifiés avec 5 ajouts et 10 suppressions
  1. 2 2
      tools/run-qemu.sh
  2. 2 6
      user/apps/busybox/Makefile
  3. 1 2
      user/sysconfig/etc/init.d/rcS

+ 2 - 2
tools/run-qemu.sh

@@ -171,8 +171,8 @@ while true;do
 
 setup_kernel_init_program() {
     if [ ${ARCH} == "x86_64" ]; then
-        # KERNEL_CMDLINE+=" init=/bin/busybox init "
-        KERNEL_CMDLINE+=" init=/bin/dragonreach "
+        KERNEL_CMDLINE+=" init=/bin/busybox init "
+        # KERNEL_CMDLINE+=" init=/bin/dragonreach "
     elif [ ${ARCH} == "riscv64" ]; then
         KERNEL_CMDLINE+=" init=/bin/riscv_rust_init "
     fi

+ 2 - 6
user/apps/busybox/Makefile

@@ -38,16 +38,12 @@ $(bin): $(busybox_dir)
 	make defconfig && \
 	sed -i '/CONFIG_STATIC/s/.*/CONFIG_STATIC=y/' .config && \
 	sed -i '/CONFIG_PIE/d' .config && \
-	sed -i '/CONFIG_FEATURE_EDITING/s/=y/=n/' .config && \
-	sed -i '/CONFIG_HUSH/s/=y/=n/' .config  && \
-	sed -i '/CONFIG_NOMMU/s/=y/=n/' .config && \
 	echo "CONFIG_CROSS_COMPILER_PREFIX=\"$(prefix)\"" >> .config && \
 	echo "CONFIG_FEATURE_STATIC=y" >> .config && \
 	echo "CONFIG_STATIC_LIBGCC=y" >> .config && \
 	echo "CONFIG_ASH=y" >> .config && \
-	echo "CONFIG_ASH_READ_PROFILE=y" >> .config && \
-	echo "CONFIG_FEATURE_EDITING=y" >> .config && \
-	echo "CONFIG_HUSH=y" >> .config
+	echo "CONFIG_ASH_READ_PROFILE=y" >> .config
+
 
 	@# 执行编译
 	cd $(busybox_dir) && \

+ 1 - 2
user/sysconfig/etc/init.d/rcS

@@ -1,4 +1,3 @@
 #!/bin/sh
 echo "[rcS] Running system init script..."
-/bin/about.elf
-/bin/busybox stty erase 127
+/bin/about.elf