⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mkconfig.svn-base

📁 realtek的8186芯片ADSL路由AP源代码
💻 SVN-BASE
字号:
#! /bin/sh###############################################################################	Generate the vendor/product menu entries for the top level config##############################################################################fix_name(){	echo $1 | tr '[\-\.\/\+a-z]' '[____A-Z]'}############################################################################### the header of the config#cat <<!EOFmainmenu_name 'uClinux Configuration'mainmenu_option next_commentcomment 'Target Platform Selection'comment 'Choose a Vendor/Product combination.'!EOF############################################################################### Figure out the vendor/products dynamically, allows people to add there# own without messin with the config.in file#echo -n "choice 'Vendor/Product' \""find vendors/*/*/config.arch -print | sed -e 's?/? ?g' | \		sort | while read t1 v p t2do	[ "$v" = "config" ] && continue	if [ -f "vendors/$v/$p/config.languages" ]	then		for i in `cat "vendors/$v/$p/config.languages"`		do			echo "${v}/${p}($i) CONFIG_DEFAULTS_`fix_name ${v}`_`fix_name ${p}`_`fix_name ${i}` \\"		done	else		echo "${v}/${p} CONFIG_DEFAULTS_`fix_name ${v}`_`fix_name ${p}` \\"	fidoneecho "\" SecureEdge/SecureEdgeVPN"############################################################################### Which kernel do they want,  if only one then just set it,  I don't# expect an explosion of kernels just yet ;-)#KERNELS="`ls -d linux-* 2>/dev/null`"NKERNELS="`echo ${KERNELS} | wc -w`"if [ ${NKERNELS} -gt 1 ]; then	echo -n "choice 'Kernel Version' \""	for i in ${KERNELS}; do		VER=${i##linux-}		CFG="CONFIG_DEFAULTS_KERNEL_`echo ${VER%%.x}|sed -e 's/\./_/'`"		DEF="linux-${VER}"		echo "${DEF} ${CFG} \\"	done	echo "\" $DEF"elif [ ${NKERNELS} -eq 1 ]; then	VER=${KERNELS##linux-}	CFG="CONFIG_DEFAULTS_KERNEL_`echo ${VER%%.x}|sed -e 's/\./_/'`"	echo "comment 'Kernel is linux-${VER}'"	echo "define_bool ${CFG} y"else	echo "ERROR: you have no kernels available in this directory." >&2	exit 1fi############################################################################### Which libc do they want,  if only one then just set it,  I don't# expect an explosion of libc's just yet ;-)#LIBCS="`ls -d lib/libc uClibc uClibc-* glibc glibc-* 2>/dev/null`"NLIBCS="`echo ${LIBCS} | wc -w`"if [ ${NLIBCS} -gt 1 ]; then	echo -n "choice 'Libc Version' \""	for i in ${LIBCS}; do		[ "$i" = "lib/libc" ] && i=uC-libc		CFG="CONFIG_DEFAULTS_LIBC_`fix_name ${i}`"		DEF="${i}"		echo "${DEF} ${CFG} \\"	done	echo "\" $DEF"elif [ ${NLIBCS} -eq 1 ]; then	[ "$LIBCS" = "lib/libc" ] && LIBCS=uC-libc	CFG="CONFIG_DEFAULTS_LIBC_`fix_name ${LIBCS}`"	echo "comment 'Libc is ${LIBCS}'"	echo "define_bool ${CFG} y"else	echo "ERROR: you have no libc available in this directory." >&2	exit 1fi############################################################################### the rest of the config#cat <<!EOFbool 'Default all settings (lose changes)'	CONFIG_DEFAULTS_OVERRIDEbool 'Customize Kernel Settings'			CONFIG_DEFAULTS_KERNEL!EOF[ -d modules ] &&	echo "bool 'Customize Module Settings'			CONFIG_DEFAULTS_MODULES"cat <<!EOFbool 'Customize Vendor/User Settings'		CONFIG_DEFAULTS_VENDORbool 'Update Default Vendor Settings'		CONFIG_DEFAULTS_VENDOR_UPDATEendmenu!EOF############################################################################

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -