mirror of
https://gitee.com/open-loongarch/buildroot.git
synced 2026-10-25 12:57:11 +08:00
Add a script for quick set defconfig(9648024ea)
This commit is contained in:
Executable
+54
@@ -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 $@
|
||||||
@@ -18,10 +18,11 @@ endef
|
|||||||
|
|
||||||
define LOONGSON_RESIZE_INSTALL_TARGET_CMDS
|
define LOONGSON_RESIZE_INSTALL_TARGET_CMDS
|
||||||
echo "install loongson resize init.d/profile.d"
|
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)/root/
|
||||||
cd $(@D) && chmod a+x ./resizerootfs.sh && cp resizerootfs.sh $(TARGET_DIR)/etc/profile.d
|
|
||||||
mkdir -p $(TARGET_DIR)/etc/init.d
|
mkdir -p $(TARGET_DIR)/etc/init.d
|
||||||
cd $(@D) && chmod a+x ./S01resizerootfs && cp S01resizerootfs $(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
|
endef
|
||||||
|
|
||||||
$(eval $(generic-package))
|
$(eval $(generic-package))
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user