mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Cleaned up genInitMem script to only generate necessary files and eliminate prompts
This commit is contained in:
parent
d509644fa6
commit
e66adcca9d
@ -10,17 +10,6 @@ rawUntrimmedBootmemFile="$tvDir/untrimmedBootmemFileGDB.bin"
|
|||||||
untrimmedBootmemFile="$tvDir/untrimmedBootmemFile.bin"
|
untrimmedBootmemFile="$tvDir/untrimmedBootmemFile.bin"
|
||||||
DEVICE_TREE=${imageDir}/wally-virt.dtb
|
DEVICE_TREE=${imageDir}/wally-virt.dtb
|
||||||
|
|
||||||
read -p "Warning: running this script will overwrite the contents of:
|
|
||||||
* $rawRamFile
|
|
||||||
* $ramFile
|
|
||||||
* $rawBootmemFile
|
|
||||||
* $bootmemFile
|
|
||||||
* $rawUntrimmedBootmemFile
|
|
||||||
* $untrimmedBootmemFile
|
|
||||||
Would you like to proceed? (y/n) " -n 1 -r
|
|
||||||
echo
|
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
|
||||||
then
|
|
||||||
if [ ! -d "$tvDir" ]; then
|
if [ ! -d "$tvDir" ]; then
|
||||||
echo "Error: linux testvector directory $tvDir not found!">&2
|
echo "Error: linux testvector directory $tvDir not found!">&2
|
||||||
echo "Please create it. For example:">&2
|
echo "Please create it. For example:">&2
|
||||||
@ -50,23 +39,25 @@ then
|
|||||||
-ex "maintenance packet Qqemu.PhyMemMode:1" \
|
-ex "maintenance packet Qqemu.PhyMemMode:1" \
|
||||||
-ex "printf \"Creating $rawBootmemFile\n\"" \
|
-ex "printf \"Creating $rawBootmemFile\n\"" \
|
||||||
-ex "dump binary memory $rawBootmemFile 0x1000 0x1fff" \
|
-ex "dump binary memory $rawBootmemFile 0x1000 0x1fff" \
|
||||||
-ex "printf \"Creating $rawUntrimmedBootmemFile\n\"" \
|
|
||||||
-ex "printf \"Warning - please verify that the second half of $rawUntrimmedBootmemFile is all 0s\n\"" \
|
|
||||||
-ex "dump binary memory $rawUntrimmedBootmemFile 0x1000 0x2fff" \
|
|
||||||
-ex "printf \"Creating $rawRamFile\n\"" \
|
-ex "printf \"Creating $rawRamFile\n\"" \
|
||||||
-ex "dump binary memory $rawRamFile 0x80000000 0x8fffffff" \
|
-ex "dump binary memory $rawRamFile 0x80000000 0x8fffffff" \
|
||||||
-ex "kill" \
|
-ex "kill" \
|
||||||
-ex "q"
|
-ex "q"
|
||||||
|
|
||||||
|
#-ex "printf \"Warning - please verify that the second half of $rawUntrimmedBootmemFile is all 0s\n\"" \
|
||||||
|
#-ex "printf \"Creating $rawUntrimmedBootmemFile\n\"" \
|
||||||
|
#-ex "dump binary memory $rawUntrimmedBootmemFile 0x1000 0x2fff" \
|
||||||
|
|
||||||
echo "Changing Endianness"
|
echo "Changing Endianness"
|
||||||
make fixBinMem
|
make fixBinMem
|
||||||
./fixBinMem "$rawRamFile" "$ramFile"
|
./fixBinMem "$rawRamFile" "$ramFile"
|
||||||
./fixBinMem "$rawBootmemFile" "$bootmemFile"
|
./fixBinMem "$rawBootmemFile" "$bootmemFile"
|
||||||
./fixBinMem "$rawUntrimmedBootmemFile" "$untrimmedBootmemFile"
|
#./fixBinMem "$rawUntrimmedBootmemFile" "$untrimmedBootmemFile" # doesn't seem to be used for anything
|
||||||
|
rm -f "$rawRamFile" "$rawBootmemFile" "$rawUntrimmedBootmemFile"
|
||||||
|
|
||||||
echo "genInitMem.sh completed!"
|
echo "genInitMem.sh completed!"
|
||||||
echo "You may want to restrict write access to $tvDir now and give cad ownership of it."
|
echo "You may want to restrict write access to $tvDir now and give cad ownership of it."
|
||||||
echo "Run the following:"
|
echo "Run the following:"
|
||||||
echo " sudo chown -R cad:cad $tvDir"
|
echo " sudo chown -R cad:cad $tvDir"
|
||||||
echo " sudo chmod -R go-w $tvDir"
|
echo " sudo chmod -R go-w $tvDir"
|
||||||
fi
|
|
||||||
|
Loading…
Reference in New Issue
Block a user