2014-03-25 14:38:35 +01:00
|
|
|
# Path defititions
|
2014-05-05 12:18:45 +02:00
|
|
|
##bin="/home/ftp/hive/spinix"
|
|
|
|
bin="../Bin/spinix"
|
2014-03-25 14:38:35 +01:00
|
|
|
sd="${bin}/sdcard"
|
|
|
|
flash="${bin}/flash"
|
|
|
|
|
2014-03-25 10:40:35 +01:00
|
|
|
# Clean directories and remake them
|
2014-03-25 14:38:35 +01:00
|
|
|
rm -rf ${bin}
|
2014-05-05 13:43:38 +02:00
|
|
|
mkdir -p ${bin}
|
2014-03-25 14:38:35 +01:00
|
|
|
mkdir ${sd}
|
|
|
|
mkdir ${flash}
|
|
|
|
mkdir ${sd}/bin
|
|
|
|
mkdir ${sd}/tmp
|
|
|
|
mkdir ${sd}/manpages
|
|
|
|
mkdir ${sd}/devel
|
|
|
|
mkdir ${sd}/demos
|
|
|
|
mkdir ${sd}/forth
|
|
|
|
mkdir ${sd}/scripts
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Build the boot program
|
|
|
|
./build_boot
|
|
|
|
|
|
|
|
# Copy license and startup script to root
|
2014-03-25 14:38:35 +01:00
|
|
|
cp license.txt ${sd}
|
|
|
|
cp src/_shellrc ${sd}/bin
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Generate _sysparm and copy to root
|
2014-03-25 14:38:35 +01:00
|
|
|
date +%s >${sd}/_sysparm
|
|
|
|
echo -6 3 0 >>${sd}/_sysparm
|
|
|
|
echo 0 0 0 >>${sd}/_sysparm
|
|
|
|
echo "GPWD /" >>${sd}/_sysparm
|
|
|
|
echo "LSCRIPT_FILE /bin/_shellrc" >>${sd}/_sysparm
|
|
|
|
echo "P# 0" >>${sd}/_sysparm
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Build the bin apps
|
|
|
|
./build_src
|
|
|
|
|
|
|
|
# Copy the devel files
|
2014-03-25 14:38:35 +01:00
|
|
|
cp devel/* ${sd}/devel
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Copy the man pages
|
2014-03-25 14:38:35 +01:00
|
|
|
cp manpages/* ${sd}/manpages
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Build lerner
|
2014-05-05 13:43:38 +02:00
|
|
|
cp src/sysdefs.spin lerner/
|
|
|
|
cp src/exit.spin lerner/
|
|
|
|
bstc -b -O cgru lerner/lerner.spin
|
|
|
|
mv lerner.binary ${sd}/demos/lerner
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Build vga512
|
2014-05-05 13:43:38 +02:00
|
|
|
cp src/sysdefs.spin vga512/
|
|
|
|
cp src/exit.spin vga512/
|
|
|
|
bstc -b vga512/VGA_512x384_Bitmap_Demo.spin
|
|
|
|
mv VGA_512x384_Bitmap_Demo.binary ${sd}/demos/vga512
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Move vgatdemo from bin to demos
|
2014-03-25 14:38:35 +01:00
|
|
|
mv ${sd}/bin/vgatdemo ${sd}/demos
|
2014-03-25 10:40:35 +01:00
|
|
|
|
2014-03-25 14:38:35 +01:00
|
|
|
# Move the C demos
|
|
|
|
mv cdemos/dry/dry.binary ${sd}/demos/dry
|
|
|
|
mv cdemos/fibo/fibo.binary ${sd}/demos/fibo
|
|
|
|
mv cdemos/hello/hello.binary ${sd}/demos/hello
|
2014-03-25 10:40:35 +01:00
|
|
|
|
2014-03-25 14:38:35 +01:00
|
|
|
# Move C filetest program
|
|
|
|
mv filetest/filetest.binary ${sd}/demos/filetest
|
2014-03-25 10:40:35 +01:00
|
|
|
|
2014-03-25 14:38:35 +01:00
|
|
|
# Move C chess program
|
|
|
|
mv chess/chess.binary ${sd}/demos/chess
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Build pfth and copy the Forth files
|
2014-05-05 13:43:38 +02:00
|
|
|
bstc -b pfth/ospfth.spin
|
2014-03-25 14:38:35 +01:00
|
|
|
mv ospfth.binary ${sd}/bin/pfth
|
2014-05-05 13:43:38 +02:00
|
|
|
cp pfth/*.fth ${sd}/forth
|
|
|
|
cp pfth/*.txt ${sd}/forth
|
2014-03-25 14:38:35 +01:00
|
|
|
mv ${sd}/forth/_startup.fth ${sd}
|
2014-03-25 10:40:35 +01:00
|
|
|
|
|
|
|
# Copy the script files
|
2014-03-25 14:38:35 +01:00
|
|
|
cp scripts/* ${sd}/scripts
|