-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
111 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Get unix name for determining OS | ||
UNAME=$(uname) | ||
|
||
# Create an empty 1 MiB file | ||
dd if=/dev/zero of=fat.fs bs=1024 count=1024 | ||
|
||
if [ "$UNAME" == "Linux" ] ; then | ||
MKFS_VFAT_PATH=/sbin | ||
sudo umount -q fat_mnt | ||
elif [ "$UNAME" == "Darwin" ] ; then | ||
MKFS_VFAT_PATH=/usr/local/sbin | ||
hdiutil detach fat_mnt | ||
fi | ||
|
||
# Create an empty FAT filesystem in it | ||
$MKFS_VFAT_PATH/mkfs.vfat -v -F12 -s1 -S4096 -n xcore_fs fat.fs | ||
|
||
mkdir -p fat_mnt | ||
|
||
# Mount the filesystem | ||
if [ "$UNAME" == "Linux" ] ; then | ||
sudo mount -o loop fat.fs fat_mnt | ||
elif [ "$UNAME" == "Darwin" ] ; then | ||
hdiutil attach -imagekey diskimage-class=CRawDiskImage -mountpoint fat_mnt fat.fs | ||
fi | ||
|
||
# Copy files into filesystem | ||
sudo mkdir fat_mnt/ww | ||
sudo cp "$WW_PATH/models/common/WR_250k.en-US.alexa.bin" fat_mnt/ww/model.bin | ||
|
||
# Unmount the filesystem | ||
if [ "$UNAME" == "Linux" ] ; then | ||
sudo umount fat_mnt | ||
elif [ "$UNAME" == "Darwin" ] ; then | ||
hdiutil detach fat_mnt | ||
fi | ||
|
||
# Cleanup | ||
sudo rm -rf fat_mnt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
./create_fs.sh | ||
xflash --quad-spi-clock 50MHz --factory ../bin/sw_xvf3652.xe --boot-partition-size 0x100000 --data ./fat.fs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters