# hdw - linux linux package # # author: hackbard@hackdaworld.dyndns.org # # [V] 2.6.12.2 # [S] 2-2 # [D] linux-2.6.12.2.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ custmain="1" custmain() { # prepare src cd $root/usr/src rm -rf linux* tar --use-compress-program=$compress -xvf $archdir/$pkg mv linux-${ver} linux-${ver}-hdw && ln -s linux-$ver-hdw linux chown -R root.root linux-${ver}-hdw mkdir -p kernel cp -v $archdir/$pkg kernel/ cp -v $hdw_home_dir/misc/arch/$hdw_arch/linux.config \ kernel/${package}-${ver}.config cd linux # modify Makefile if [ "$hdw_crossbuild" != "0" ] ; then sed -e "s,^ARCH.*,ARCH = ${hdw_arch//ia32/i386}," \ -e "s,^CROSS_COMPILE.*,CROSS_COMPILE = $hdw_arch_target-," \ Makefile > M.tmp mv M.tmp Makefile fi # build echo "mrproper, version, autoconf ..." make mrproper echo "copy .config ..." cp -v $hdw_home_dir/misc/arch/$hdw_arch/linux.config .config make include/linux/version.h && make include/asm && yes "" | make config case "$hdw_arch" in ia32) make bzImage ; cp -v System.map $root/boot/ cp -v arch/i386/boot/bzImage \ $root/boot/vmlinuz_hdw ;; sparc*) make vmlinux ; cp -v System.map $root/boot/ cp vmlinux $root/boot/vmlinuz_hdw ;; *) echo -e "\n !! not supported yet !!" exit 1 ;; esac echo "modules, modules_install ..." make modules && make modules_install INSTALL_MOD_PATH=$root DEPMOD="true" }