Difference between revisions of "Build script for EA distribution"

From Klaus' wiki
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is a small script that helps you build the distribution. Place it in the '''uClinux-dist''' directory (that's the point where you build the distribution)
+
This is a small script that helps you build the distribution. Please analyse and understand what the script does.
 +
 
 +
Place it in the '''uClinux-dist''' directory (that's the point where you build the distribution)
  
 
<source lang="bash">
 
<source lang="bash">
Line 5: Line 7:
 
#
 
#
 
# A smal helper script that copies the final result to the tftpboot directory
 
# A smal helper script that copies the final result to the tftpboot directory
 +
# and captures the output from the make process in the file  "make-out.txt"
 
#
 
#
 
# Klaus Kolle 2010 11 13
 
# Klaus Kolle 2010 11 13
 +
#
 +
 +
#
 +
# Source settings.sh
 
#
 
#
 
. settings.sh
 
. settings.sh
 +
 +
#
 +
# Put down a time stamp
 +
#
 
touch images/maketimestamp
 
touch images/maketimestamp
echo "PLease wait.... might take several minutes"
+
echo "Please wait.... might take several minutes"
make >make-out.txt 2>&1
+
 
 +
#
 +
# make the kernel
 +
#
 +
make>make-out.txt 2>&1
 
if [ images/uLinux.bin -nt images/maketimestamp ] ; then
 
if [ images/uLinux.bin -nt images/maketimestamp ] ; then
 
         cp images/uLinux.bin images/romfs.img /tftpboot
 
         cp images/uLinux.bin images/romfs.img /tftpboot
 
         echo "Copied new images to tftpboot"
 
         echo "Copied new images to tftpboot"
 +
else
 +
        echo "Did not copy anything........."
 +
        echo "Inspect the make-out.txt file for compilation errors."
 
fi
 
fi
 +
 +
#
 +
# remove time stamp
 +
#
 
rm images/maketimestamp
 
rm images/maketimestamp
 
</source>
 
</source>

Latest revision as of 10:51, 27 February 2013

This is a small script that helps you build the distribution. Please analyse and understand what the script does.

Place it in the uClinux-dist directory (that's the point where you build the distribution)

#!/bin/bash
#
# A smal helper script that copies the final result to the tftpboot directory
# and captures the output from the make process in the file  "make-out.txt"
#
# Klaus Kolle 2010 11 13
#
 
#
# Source settings.sh
#
. settings.sh
 
#
# Put down a time stamp
#
touch images/maketimestamp
echo "Please wait.... might take several minutes"
 
#
# make the kernel
#
make>make-out.txt 2>&1
if [ images/uLinux.bin -nt images/maketimestamp ] ; then
        cp images/uLinux.bin images/romfs.img /tftpboot
        echo "Copied new images to tftpboot"
else
        echo "Did not copy anything........."
        echo "Inspect the make-out.txt file for compilation errors."
fi
 
#
# remove time stamp
#
rm images/maketimestamp