# This script should be located in the I2Cboot_DDR2 directory, with
# input, interm, and output directories below it.
# Linux version

# preparation for build
rm -f interm/*.*
cd input

# generate boot table in CCS format
../../Utilities/hex6x simple.rmd
../../Utilities/bconvert64x -le simple.btbl simple.btbl.be
../../Utilities/b2i2c simple.btbl.be simple.btbl.i2c
../../Utilities/b2ccs simple.btbl.i2c simple.i2c.ccs

# generate the complete I2C image(I2C parameter + boot table)
../../Utilities/myparser simple.i2c.ccs i2cconfig.txt i2cromfara.ccs

# output file
mv i2cromfara.ccs ../output

# intermediate files
mv *.btbl ../interm
mv *.btbl.be ../interm
mv *.btbl.i2c ../interm
mv *.i2c.ccs ../interm


# display the output files
cd ..
ls -al output
