File: make-autoconfs.sh

package info (click to toggle)
linux-kernel-headers 2.5.999-test7-bk-17
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 28,268 kB
  • ctags: 214,024
  • sloc: ansic: 324,929; cpp: 783; makefile: 79; asm: 61; sh: 61
file content (41 lines) | stat: -rw-r--r-- 967 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

ARCHES="alpha arm i386 ia64 m68k mips mipsel hppa powerpc s390 sh sparc sparc64 x86_64"

for arch in $ARCHES
do
  if test $arch = mipsel; then
    karch=mips
  elif test $arch = hppa; then
    karch=parisc
  elif test $arch = powerpc; then
    karch=ppc
  else
    karch=$arch
  fi

  if test $arch = mipsel; then
    cp arch/mips/defconfig-ddb5477 .config
  else
    make ARCH=$karch defconfig
  fi

  # If you had cross compilers available, you could do this to generate
  # all necessary files (and use CROSS_COMPILE=$arch-).
#  old_headers=`find include/asm-$karch -type f | sort`
  yes n | make ARCH=$karch oldconfig
#  make ARCH=$karch prepare
#  new_headers=`find include/asm-$karch -type f | sort`
  cp include/linux/autoconf.h ../autoconf-$arch.h

#  set -- $old_headers
#  for i in $new_headers; do
#    if test "$1" = "$i"; then
#      shift
#      continue
#    fi
#    cp $i ../asm-$karch-$(basename $i)
#  done

  make ARCH=$karch clean
done