Add a script for quick set defconfig(9648024ea)

This commit is contained in:
loongson
2024-07-05 14:42:03 +08:00
parent db36a30f90
commit 5f661a2da2
3 changed files with 57 additions and 2 deletions
Executable
+54
View File
@@ -0,0 +1,54 @@
#!/bin/bash
#set -ex
conf=""
PS3="Please enter your choice:"
function get_conf()
{
plat=loongson${1}
options=(`cd configs && ls ${plat}*`)
select opt in "${options[@]}"
do
conf=$opt
# echo $opt
break
done
echo
echo "Your select is :$conf"
echo
}
function get_all_conf()
{
get_conf 2k1000la
get_conf 2k500
get_conf 2k300
get_conf 2p500
}
function usage()
{
echo "./buildenv.sh <2k300/2k500/2k1000la/2p500/all>"
}
function main()
{
if [ $# -eq 1 ] ;then
param=${1}
if [ $param = "all" ]; then
get_conf
else
plat=${1}_
get_conf $plat
fi
make $conf
else
usage
fi
}
main $@
+3 -2
View File
@@ -18,10 +18,11 @@ endef
define LOONGSON_RESIZE_INSTALL_TARGET_CMDS
echo "install loongson resize init.d/profile.d"
mkdir -p $(TARGET_DIR)/etc/profile.d
cd $(@D) && chmod a+x ./resizerootfs.sh && cp resizerootfs.sh $(TARGET_DIR)/etc/profile.d
cd $(@D) && chmod a+x ./resizerootfs.sh && cp resizerootfs.sh $(TARGET_DIR)/root/
mkdir -p $(TARGET_DIR)/etc/init.d
cd $(@D) && chmod a+x ./S01resizerootfs && cp S01resizerootfs $(TARGET_DIR)/etc/init.d
cd $(@D) && cp loongson-resize.service $(TARGET_DIR)/usr/lib/systemd/system/
cd $(TARGET_DIR)/usr/lib/systemd/system/sysinit.target.wants && ln -sf ../loongson-resize.service loongson-resize.service
endef
$(eval $(generic-package))
Binary file not shown.