spinix-hive/build_spinix

87 lines
1.7 KiB
Plaintext
Raw Normal View History

# Path defititions
2014-05-05 12:18:45 +02:00
##bin="/home/ftp/hive/spinix"
bin="../Bin/spinix"
sd="${bin}/sdcard"
flash="${bin}/flash"
# Clean directories and remake them
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
# Build the boot program
./build_boot
# Copy license and startup script to root
cp license.txt ${sd}
cp src/_shellrc ${sd}/bin
# Generate _sysparm and copy to root
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
# Build the bin apps
./build_src
# Copy the devel files
cp devel/* ${sd}/devel
# Copy the man pages
cp manpages/* ${sd}/manpages
# Build lerner
cd lerner
cp ../src/sysdefs.spin .
cp ../src/exit.spin .
bstc -b -O cgru lerner.spin
cp lerner.binary ${sd}/demos/lerner
rm *.binary
cd ..
# Build vga512
cd vga512
cp ../src/sysdefs.spin .
cp ../src/exit.spin .
bstc -b VGA_512x384_Bitmap_Demo.spin
cp VGA_512x384_Bitmap_Demo.binary ${sd}/demos/vga512
rm *.binary
cd ..
# Move vgatdemo from bin to demos
mv ${sd}/bin/vgatdemo ${sd}/demos
# 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
# Move C filetest program
mv filetest/filetest.binary ${sd}/demos/filetest
# Move C chess program
mv chess/chess.binary ${sd}/demos/chess
# Build pfth and copy the Forth files
cd pfth
bstc -b ospfth.spin
mv ospfth.binary ${sd}/bin/pfth
cp *.fth ${sd}/forth
cp *.txt ${sd}/forth
mv ${sd}/forth/_startup.fth ${sd}
cd ..
# Copy the script files
cp scripts/* ${sd}/scripts