OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / tools / autobuild.sh
1 #! /bin/sh
2 #############################################################################
3
4 #
5 # update-configs -- update all new-wave vendor configs
6 #
7 # (C) Copyright 2003, Greg Ungerer <gerg@snapgear.com>
8 #
9 # 2005/08/11 -  Added ability to specify a specific VENDOR, BOARD, and KERNEL
10 # -- Zachary P. Landau <kapheine@divineinvasion.net>
11 #
12
13 #############################################################################
14
15 #
16 # Figure out the vendor/products dynamically, allows people to add their
17 # own without messing with the config.in file.
18 #
19 # Usage: $0 [VENDOR] [BOARD] [KERNEL]
20
21 if [ $1 ]; then
22     VENDORLIST=$1
23 else
24     VENDORLIST=`find vendors/*/*/config.arch -print | sed -e 's?/? ?g' | sort |
25         while read t1 v p t2
26         do
27             echo "${v}"
28         done | uniq`
29 fi
30
31
32 for VENDOR in $VENDORLIST
33 do
34     if [ $2 ]; then
35         BOARDLIST=$2
36     else
37         BOARDLIST=`find vendors/${VENDOR}/*/config.arch -print |
38         sed -e 's?/? ?g' | sort |
39         while read t1 v p t2
40         do
41             echo "${p}"
42         done`
43     fi
44
45     for BOARD in $BOARDLIST
46     do
47
48         if [ $3 ]; then
49             KERNELLIST=$3
50         else
51             KERNELLIST="linux-2.0.x linux-2.4.x linux-2.6.x"
52         fi
53
54         for KERNEL in $KERNELLIST
55         do
56             rm -f .config .config.old .oldconfig
57             rm -f ${KERNEL}/.config ${KERNEL}/.config.old
58             rm -f config/.config config/.config.old
59             rm -f uClibc/.config uClibc/.config.old
60             rm -f config.arch
61
62             if [ -f vendors/${VENDOR}/${BOARD}/config.uClibc ]
63             then
64                 LIBC=uClibc
65             else
66                 LIBC=uC-libc
67             fi
68
69             if [ -f vendors/${VENDOR}/${BOARD}/config.${KERNEL} ]
70             then
71                 ( echo $VENDOR ;
72                 sleep 1 ;
73                 echo $BOARD ;
74                 sleep 1 ;
75                 echo $KERNEL ;
76                 sleep 1 ;
77                 echo $LIBC ;
78                 sleep 1 ;
79                 echo ;
80                 sleep 1 ;
81                 echo ;
82                 sleep 1 ;
83                 echo ;
84                 echo y ;
85                 while : ; do echo ; done
86                 ) | make config
87             fi
88         done
89     done
90 done
91
92 exit 0
93