#!/bin/bash # # "2_cmp" : compilation du kernel et des modules # pas de confirmation # prérequis : # outils installés, kernel decompacté et patché RTAI+Tiny # core.gz décompacté dans /mnt/sda3/RT/core_gz/xtract # .config choisi, make menuconfig effectué # TODO : A TESTER # recup repertoire de base base=${PWD:0:10} echo 'root of dev. tree: '$base ver=$(uname -r) p=`expr index "$ver" -tincore` let p-- sfix=${ver:0:$p} linux=$base'SRC/KERNEL/linux-'$sfix echo echo echo 'compiling ' $ver ' branch"' echo '.config is supposed to be ready' echo '(otherwise exit and make menuconfig)' echo linux=$base'SRC/KERNEL/linux-'$sfix echo "kernel sources directory will be : "$linux # compiling kernel bzImage echo echo "let us make kernel bzImage" cd $linux make bzImage echo echo "new kernel built. going to make modules" # TODO : test success cp -f $linux/arch/x86/boot/bzImage $base'tce/boot/bzImage' make modules echo echo "compil. of modules completed. Going to install modules" mdl=$base'SRC/SCRIPTS/mdl_tiny'$sfix'.sh' echo "script for modules to maintain will be : "$mdl # install modules in /mnt/sda#/RT make INSTALL_MOD_PATH=$base'RT' modules_install firmware_install # copy usefull modules in /mnt/sda#/RT/core_gz/xtract $mdl if [ $? ]; then echo 'error(s) : some nodules not copied in /core_gz/xtract' echo 'nevertheless, you can use 3_cmp to compact modules' echo 'if any trouble in further execution of this script' echo 'now atempting to rebuild core.gz to core2.gz. please wait.' fi # construction de core2.gz $base'SRC/SCRIPTS/3_cmp'