Browse Source

dubhe: setup.sh: Update sh script

Update custom variable for nfs build support.

Signed-off-by: yang.lee <yang.lee@starfivetech.com>
yang.lee 1 year ago
parent
commit
d7a85fe1b5
1 changed files with 11 additions and 12 deletions
  1. 11 12
      setup.sh

+ 11 - 12
setup.sh

@@ -142,10 +142,12 @@ echo "This build script consists of two types image.";
 echo "";
 echo "1) QSPI-Image";
 echo "   - Initramfs has been bundled into qspi-image.";
-echo "   - The image generated support both single and multicore vector.";
 echo "   - Generated output : "; 
-echo "     QSPI-Image.bin for single core vector."; 
-echo -e "     QSPI-Image-Dual.bin for multicore vector.${NC}";
+echo "     QSPI-Image.bin"; 
+echo "2) QSPI-NFS-Image";
+echo "   - NFS config has been enabled.";
+echo "   - Generated output : ";
+echo -e "     QSPI-NFS-Image.bin${NC}";
 echo "";
 
 PS3="Select your action : "
@@ -156,10 +158,9 @@ do
     case $opt in 
         "Build qspi-image")
 #            cd ../build || { echo "Run setup.sh before building images."; cd meta-starfive; break; };
-            if ! grep -q "ENABLE_EXT4" ./conf/local.conf; then
-                echo 'ENABLE_EXT4="0"' >> ./conf/local.conf;
-            else sed -i 's/ENABLE_EXT4="1"/ENABLE_EXT4="0"/g'  ./conf/local.conf;
-		 sed -i 's/ENABLE_UBI="1"/ENABLE_UBI="0"/g'  ./conf/local.conf;
+            if ! grep -q "ENABLE_NFS" ./conf/local.conf; then
+                echo 'ENABLE_NFS="0"' >> ./conf/local.conf;
+            else sed -i 's/ENABLE_NFS="1"/ENABLE_NFS="0"/g'  ./conf/local.conf;
             fi;
             cur_ter=$(tty);
             output=$(MACHINE=starfive-dubhe bitbake qspi-image | tee $cur_ter);
@@ -170,16 +171,14 @@ do
             fi;;
         "Build qspi-nfs-image")
  #           cd ../build || { echo "Run setup.sh before building images."; cd meta-starfive; break; };
-            if ! grep -q "ENABLE_EXT4" ./conf/local.conf; then
-                echo 'ENABLE_EXT4="1"' >> ./conf/local.conf;
-            else sed -i 's/ENABLE_EXT4="0"/ENABLE_EXT4="1"/g'  ./conf/local.conf
-		 sed -i 's/ENABLE_UBI="1"/ENABLE_UBI="0"/g'  ./conf/local.conf;
+            if ! grep -q "ENABLE_NFS" ./conf/local.conf; then
+                echo 'ENABLE_NFS="1"' >> ./conf/local.conf;
+            else sed -i 's/ENABLE_NFS="0"/ENABLE_NFS="1"/g'  ./conf/local.conf
             fi;
             cur_ter=$(tty);
             output_min=$(MACHINE=starfive-dubhe bitbake qspi-nfs-image | tee $cur_ter);
             if [[ $output_min != *"ERROR"* ]]; then
                 echo -e "\U0002705 ${GREEN}Build Complete${NC}"
-                runprog console-image-minimal;
             else echo -e "\U000274C ${RED}Build Failed${NC}"
             fi;;
 	"Quit")