#!/bin/sh

# make modules_install INSTALL_MOD_PATH=/srv/ftp/upload/mood-300/mood-nylon-modules DEPMOD=echo 

export PATH=/usr/src/cross/nylon-build-stable-1.0/tmp/cross/bin:$PATH
make zImage

/usr/src/cross/u-boot-1.3.1/tools/mkimage \
  -A mips -O linux -T kernel -C gzip -a 0x80100000 \
  -e $(objdump -f vmlinux|sed -ne"s/^start address //p") \
  -d arch/mips/zboot/images/vmlinux.gz \
  /var/lib/tftpboot/mood300_recover_MH02.img.tmp

./fillup.pl /var/lib/tftpboot/mood300_recover_MH02.img.tmp /var/lib/tftpboot/mood300_recover_MH02.img
rm /var/lib/tftpboot/mood300_recover_MH02.img.tmp
