spinix-hive/build_spinix

79 lines
1.7 KiB
Plaintext
Raw Permalink 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}
2014-05-05 13:43:38 +02:00
mkdir -p ${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
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
# 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
# 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
2014-05-05 13:43:38 +02:00
bstc -b pfth/ospfth.spin
mv ospfth.binary ${sd}/bin/pfth
2014-05-05 13:43:38 +02:00
cp pfth/*.fth ${sd}/forth
cp pfth/*.txt ${sd}/forth
mv ${sd}/forth/_startup.fth ${sd}
# Copy the script files
cp scripts/* ${sd}/scripts