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}
|
|
|
|
mkdir ${bin}
|
|
|
|
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
|
|
|
|
cd lerner
|
|
|
|
cp ../src/sysdefs.spin .
|
|
|
|
cp ../src/exit.spin .
|
|
|
|
bstc -b -O cgru lerner.spin
|
2014-03-25 14:38:35 +01:00
|
|
|
cp lerner.binary ${sd}/demos/lerner
|
2014-03-25 10:40:35 +01:00
|
|
|
rm *.binary
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Build vga512
|
|
|
|
cd vga512
|
|
|
|
cp ../src/sysdefs.spin .
|
|
|
|
cp ../src/exit.spin .
|
|
|
|
bstc -b VGA_512x384_Bitmap_Demo.spin
|
2014-03-25 14:38:35 +01:00
|
|
|
cp VGA_512x384_Bitmap_Demo.binary ${sd}/demos/vga512
|
2014-03-25 10:40:35 +01:00
|
|
|
rm *.binary
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# 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
|
|
|
|
cd pfth
|
|
|
|
bstc -b ospfth.spin
|
2014-03-25 14:38:35 +01:00
|
|
|
mv ospfth.binary ${sd}/bin/pfth
|
|
|
|
cp *.fth ${sd}/forth
|
|
|
|
cp *.txt ${sd}/forth
|
|
|
|
mv ${sd}/forth/_startup.fth ${sd}
|
2014-03-25 10:40:35 +01:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Copy the script files
|
2014-03-25 14:38:35 +01:00
|
|
|
cp scripts/* ${sd}/scripts
|