5 echo -e "==== modify u-boot custom configs ===="
6 for line in `cat "$FN"`
8 head=`expr substr "$line" 1 1`
9 if [ "$head" = "#" ]; then
13 config_head=`expr substr "$line" 1 6`
14 if [ "$config_head" = "U-BOOT" ]; then
15 echo "config u-boot" >/dev/null
17 #not u-boot config,by pass it
25 value_l=`tr '[A-Z]' '[a-z]' <<<"$value"` #value little
27 if [ "$value_l" = "y" ]; then
29 echo "#define $config" >> $1
32 if [ "$value_l" = "yes" ]; then
34 echo "#define $config" >> $1
38 if [ "$value_l" = "n" ]; then
40 echo "#undef $config" >> $1
43 if [ "$value_l" = "no" ]; then
45 echo "#undef $config" >> $1
51 value_f=`expr substr "$value" 1 1` #value first
53 value_l=`expr substr "$value" $len 1` #value last
54 if [ "$value_f" = "\"" ]; then
55 if [ "$value_l" = "\"" ]; then
57 echo "#define $config $value" >> $1
60 #str may be error,bybass it,config next
65 echo "#define $config $value" >> $1