Added file necessary to split boot.mem into boot.mem and data.mem.

This commit is contained in:
Jacob Pease 2024-08-02 15:36:06 -05:00
parent 83b0a83d5c
commit ad9c98c19c

18
fpga/zsbl/splitfile.sh Executable file
View File

@ -0,0 +1,18 @@
# Acquired from here.
# https://stackoverflow.com/questions/3066948/how-to-file-split-at-a-line-number
file_name=$1
# set first K lines:
K=512
# line count (N):
N=$(wc -l < $file_name)
# length of the bottom file:
L=$(( $N - $K ))
# create the top of file:
head -n $K $file_name > boot.mem
# create bottom of file:
tail -n $L $file_name > data.mem