kylemanna
7/13/2012 - 7:12 PM

Script to build compat-wireless and the kernel and copy it to a target

Script to build compat-wireless and the kernel and copy it to a target

#!/bin/sh
export CLIENT=client
export KLIB_BUILD=/ssd/sandbox/${CLIENT}/oe/arago-tmp/sysroots/ti814x-evm-angstrom-linux-gnueabi/kernel
export KLIB_BUILD={$HOME}/go/${CLIENT}/linux-omap3
export INSTALL_MOD_PATH=/nfsroots/${CLIENT}
export KLIB=${INSTALL_MOD_PATH}
export DESTDIR=${INSTALL_MOD_PATH}
export DEPMOD=echo
export LDFLAGS=""
export RSYNC_PASSWORD=""

TARGET=172.31.2.55

function error() {
    echo Error: $@
    exit 1
}

pushd $KLIB_BUILD
time make -j4 uImage modules && time make -j1 modules_install || error "building kernel"
popd

touch drivers/net/wireless/wl12xx/main.c

make -j4  && make -j4 install-modules || echo "failed to build compat-wireless"

#rsync ${KLIB_BUILD}/arch/arm/boot/uImage root@${TARGET}:/mnt/boot/uImage.ti8148 -vh || error "copying kernel"
#rsync ${INSTALL_MOD_PATH}/lib/ root@${TARGET}:/lib -avh || error "copying modules"
cp -a ${KLIB_BUILD}/arch/arm/boot/uImage /var/lib/tftpboot || error "copying kernel"

echo
echo "Everything seems ok.."
echo