]> hackdaworld.org Git - hdw-linux/hdw-linux.git/blob - base/linux/linux
added devmapper, cryptsetup and libpopt
[hdw-linux/hdw-linux.git] / base / linux / linux
1 # hdw - linux linux package
2 #
3 # author: hackbard@hackdaworld.dyndns.org
4 #
5 # [V] 2.6.7
6 # [S] 2-2
7 # [D] linux-2.6.7.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/
8
9 custmain="1"
10 custmain()      {
11         # prepare src 
12         cd $root/usr/src
13         rm -rf linux*
14         tar --use-compress-program=$compress -xvf $archdir/$pkg
15         mv linux-${ver} linux-${ver}-hdw && ln -s linux-$ver-hdw linux
16         chown -R root.root linux-${ver}-hdw
17         mkdir -p kernel
18         cp -v $archdir/$pkg kernel/
19         cp -v $hdw_home_dir/misc/arch/$hdw_arch/linux.config \
20                 kernel/${package}-${ver}.config
21         cd linux
22
23         # modify Makefile
24         if [ "$hdw_crossbuild" != "0" ] ; then
25                 sed -e "s,^ARCH.*,ARCH = ${hdw_arch//ia32/i386}," \
26                 -e "s,^CROSS_COMPILE.*,CROSS_COMPILE = $hdw_arch_target-," \
27                         Makefile > M.tmp
28                 mv M.tmp Makefile
29         fi
30
31         # build
32         echo "mrproper, version, autoconf ..."
33         make mrproper
34         echo "copy .config ..."
35         cp -v $hdw_home_dir/misc/arch/$hdw_arch/linux.config .config
36         make include/linux/version.h &&
37         make include/asm &&
38         yes "" | make config
39         case "$hdw_arch" in
40                 ia32)
41                         make bzImage ; cp -v System.map $root/boot/
42                         cp -v arch/i386/boot/bzImage \
43                                         $root/boot/vmlinuz_hdw ;;
44                 sparc*)
45                         make vmlinux ; cp -v System.map $root/boot/
46                         cp vmlinux $root/boot/vmlinuz_hdw ;;
47                 *)
48                         echo -e "\n !! not supported yet !!"
49                         exit 1 ;;
50         esac
51         echo "modules, modules_install ..."
52         make modules &&
53         make modules_install INSTALL_MOD_PATH=$root DEPMOD="true"
54                 }