Add copy of MK3 and MK3S lang.bin
files to MK404 *_xflash.bin
Minor changes: - Indentations - Documentation
This commit is contained in:
parent
be9f8e5157
commit
bf33198866
@ -10,11 +10,12 @@
|
|||||||
# 3. Install latest updates with 'sudo apt-get upgrade'
|
# 3. Install latest updates with 'sudo apt-get upgrade'
|
||||||
# 4.
|
# 4.
|
||||||
#
|
#
|
||||||
# Version: 0.1-Build_1
|
# Version: 0.1-Build_3
|
||||||
# Change log:
|
# Change log:
|
||||||
# 11 Feb 2021, 3d-gussner, Inital
|
# 11 Feb 2021, 3d-gussner, Inital
|
||||||
# 11 Feb 2021, 3d-gussner, Optional flags to check for updates
|
# 11 Feb 2021, 3d-gussner, Optional flags to check for updates
|
||||||
|
# 12 Feb 2021, 3d-gussner, Update cmake
|
||||||
|
# 13 Feb 2021, 3d-gussner, Auto build SD cards
|
||||||
|
|
||||||
while getopts c:u:f:?h flag
|
while getopts c:u:f:?h flag
|
||||||
do
|
do
|
||||||
@ -113,6 +114,7 @@ echo "OS type :" $TARGET_OS
|
|||||||
echo ""
|
echo ""
|
||||||
echo "MK404 path :" $MK404_PATH
|
echo "MK404 path :" $MK404_PATH
|
||||||
|
|
||||||
|
# Clone MK404 if needed
|
||||||
if [ ! -d $MK404_PATH ]; then
|
if [ ! -d $MK404_PATH ]; then
|
||||||
#release_url=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/$MK404_owner/$MK404_project/releases/latest)
|
#release_url=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/$MK404_owner/$MK404_project/releases/latest)
|
||||||
#release_tag=$(basename $release_url)
|
#release_tag=$(basename $release_url)
|
||||||
@ -120,21 +122,24 @@ if [ ! -d $MK404_PATH ]; then
|
|||||||
git clone $MK404_URL $MK404_PATH
|
git clone $MK404_URL $MK404_PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $MK404_PATH
|
# Init and update submodules
|
||||||
git submodule init
|
cd $MK404_PATH
|
||||||
git submodule update
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
# Prepare MK404
|
||||||
mkdir -p $MK404_BUILD_PATH
|
mkdir -p $MK404_BUILD_PATH
|
||||||
if [[ ! -f "$MK404_BUILD_PATH/Makefile" || "$force_flag" == "1" ]]; then
|
if [[ ! -f "$MK404_BUILD_PATH/Makefile" || "$force_flag" == "1" ]]; then
|
||||||
cmake -B$MK404_BUILD_PATH -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
|
cmake -B$MK404_BUILD_PATH -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Make MK404
|
||||||
cd $MK404_BUILD_PATH
|
cd $MK404_BUILD_PATH
|
||||||
if [[ ! -f "$MK404_BUILD_PATH/MK404" || "$force_flag" == "1" ]]; then
|
if [[ ! -f "$MK404_BUILD_PATH/MK404" || "$force_flag" == "1" ]]; then
|
||||||
make
|
make
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Make SDcards
|
||||||
if [[ ! -f "$MK404_BUILD_PATH/Prusa_MK3S_SDcard.bin" || "$force_flag" == "1" ]]; then
|
if [[ ! -f "$MK404_BUILD_PATH/Prusa_MK3S_SDcard.bin" || "$force_flag" == "1" ]]; then
|
||||||
cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK3S_SDcard.bin
|
cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK3S_SDcard.bin
|
||||||
cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK3_SDcard.bin
|
cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK3_SDcard.bin
|
||||||
@ -142,6 +147,7 @@ if [[ ! -f "$MK404_BUILD_PATH/Prusa_MK3S_SDcard.bin" || "$force_flag" == "1" ]];
|
|||||||
cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK25S_13_SDcard.bin
|
cmake --build $MK404_BUILD_PATH --config Release --target Prusa_MK25S_13_SDcard.bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check for updates ... WIP
|
||||||
if [ "$check_flag" == "1" ]; then
|
if [ "$check_flag" == "1" ]; then
|
||||||
current_version=$( command ./MK404 --version | grep "MK404" | cut -f 4 -d " ")
|
current_version=$( command ./MK404 --version | grep "MK404" | cut -f 4 -d " ")
|
||||||
echo "Current version: $current_version"
|
echo "Current version: $current_version"
|
||||||
|
48
PF-build.sh
48
PF-build.sh
@ -56,7 +56,7 @@
|
|||||||
# Some may argue that this is only used by a script, BUT as soon someone accidentally or on purpose starts Arduino IDE
|
# Some may argue that this is only used by a script, BUT as soon someone accidentally or on purpose starts Arduino IDE
|
||||||
# it will use the default Arduino IDE folders and so can corrupt the build environment.
|
# it will use the default Arduino IDE folders and so can corrupt the build environment.
|
||||||
#
|
#
|
||||||
# Version: 1.0.6-Build_36
|
# Version: 1.1.0-Build_39
|
||||||
# Change log:
|
# Change log:
|
||||||
# 12 Jan 2019, 3d-gussner, Fixed "compiler.c.elf.flags=-w -Os -Wl,-u,vfprintf -lprintf_flt -lm -Wl,--gc-sections" in 'platform.txt'
|
# 12 Jan 2019, 3d-gussner, Fixed "compiler.c.elf.flags=-w -Os -Wl,-u,vfprintf -lprintf_flt -lm -Wl,--gc-sections" in 'platform.txt'
|
||||||
# 16 Jan 2019, 3d-gussner, Build_2, Added development check to modify 'Configuration.h' to prevent unwanted LCD messages that Firmware is unknown
|
# 16 Jan 2019, 3d-gussner, Build_2, Added development check to modify 'Configuration.h' to prevent unwanted LCD messages that Firmware is unknown
|
||||||
@ -138,6 +138,7 @@
|
|||||||
# 27 Jan 2021, 3d-gussner, Add `-c`, `-p` and `-n` options
|
# 27 Jan 2021, 3d-gussner, Add `-c`, `-p` and `-n` options
|
||||||
# 12 Feb 2021, 3d-gussner, Add MK404-build.sh
|
# 12 Feb 2021, 3d-gussner, Add MK404-build.sh
|
||||||
# 13 Feb 2021, 3d-gussner, Indentations
|
# 13 Feb 2021, 3d-gussner, Indentations
|
||||||
|
# 13 Feb 2021, 3d-gussner, MK404 improvements like "flash" MK3, MK3S languages files to MK404 xflash.
|
||||||
|
|
||||||
#### Start check if OSTYPE is supported
|
#### Start check if OSTYPE is supported
|
||||||
OS_FOUND=$( command -v uname)
|
OS_FOUND=$( command -v uname)
|
||||||
@ -882,6 +883,11 @@ do
|
|||||||
# If the motherboard is an EINSY just copy one hexfile
|
# If the motherboard is an EINSY just copy one hexfile
|
||||||
if [ "$MOTHERBOARD" = "BOARD_EINSY_1_0a" ]; then
|
if [ "$MOTHERBOARD" = "BOARD_EINSY_1_0a" ]; then
|
||||||
echo "$(tput setaf 2)Copying multi language firmware for MK3/Einsy board to PF-build-hex folder$(tput sgr 0)"
|
echo "$(tput setaf 2)Copying multi language firmware for MK3/Einsy board to PF-build-hex folder$(tput sgr 0)"
|
||||||
|
# Make a copy of "lang.bin" for MK404 MK3 and MK3S
|
||||||
|
if [ ! -z "$mk404_flag" ]; then
|
||||||
|
cp -f lang.bin $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-lang.bin
|
||||||
|
fi
|
||||||
|
# End of "lang.bin" for MK3 and MK3S copy
|
||||||
cp -f firmware.hex $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.hex
|
cp -f firmware.hex $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.hex
|
||||||
else
|
else
|
||||||
echo "$(tput setaf 2)Zip multi language firmware for MK2.5/miniRAMbo board to PF-build-hex folder$(tput sgr 0)"
|
echo "$(tput setaf 2)Zip multi language firmware for MK2.5/miniRAMbo board to PF-build-hex folder$(tput sgr 0)"
|
||||||
@ -895,9 +901,11 @@ do
|
|||||||
zip a $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.zip $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-??.hex
|
zip a $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.zip $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-??.hex
|
||||||
rm $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-??.hex
|
rm $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-??.hex
|
||||||
elif [ $TARGET_OS == "linux" ]; then
|
elif [ $TARGET_OS == "linux" ]; then
|
||||||
|
# Make a copy for MK404 sim of MK2, MK2.5, MK2.5S firmware
|
||||||
if [ ! -z "$mk404_flag" ]; then
|
if [ ! -z "$mk404_flag" ]; then
|
||||||
cp -f firmware_de.hex $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.hex
|
cp -f firmware_de.hex $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.hex
|
||||||
fi
|
fi
|
||||||
|
# End of MK2, MK2.5, MK2.5S firmware copy
|
||||||
zip -m -j ../../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.zip ../../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-??.hex
|
zip -m -j ../../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.zip ../../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-??.hex
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -961,31 +969,51 @@ echo " "
|
|||||||
echo "Build done, please use Slic3rPE > 1.41.0 to upload the firmware"
|
echo "Build done, please use Slic3rPE > 1.41.0 to upload the firmware"
|
||||||
echo "more information how to flash firmware https://www.prusa3d.com/drivers/ $(tput sgr 0)"
|
echo "more information how to flash firmware https://www.prusa3d.com/drivers/ $(tput sgr 0)"
|
||||||
#### End building
|
#### End building
|
||||||
ls
|
|
||||||
#### Run MK404 sim
|
|
||||||
|
#### MK404 Simulator
|
||||||
|
|
||||||
|
# Check/compile MK404 sim
|
||||||
if [ ! -z "$mk404_flag" ]; then
|
if [ ! -z "$mk404_flag" ]; then
|
||||||
./MK404-build.sh
|
./MK404-build.sh
|
||||||
|
|
||||||
|
# Check if MMU2 is selected
|
||||||
if [ "$mk404_flag" == "2" ]; then
|
if [ "$mk404_flag" == "2" ]; then
|
||||||
PRINTER="${PRINTER}MMU2"
|
PRINTER="${PRINTER}MMU2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# For Prusa MK2, MK2.5 and MK2.5S
|
||||||
if [ "$MOTHERBOARD" == "BOARD_RAMBO_MINI_1_3" ]; then
|
if [ "$MOTHERBOARD" == "BOARD_RAMBO_MINI_1_3" ]; then
|
||||||
PRINTER="${PRINTER}_mR13"
|
PRINTER="${PRINTER}_mR13"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Run MK404 with grafics
|
||||||
if [ ! -z "$grafics_flag" ]; then
|
if [ ! -z "$grafics_flag" ]; then
|
||||||
options="--colour-extrusion --extrusion Quad_HR -g "
|
MK404_options="--colour-extrusion --extrusion Quad_HR -g "
|
||||||
if [ "$grafics_flag" == "1" ]; then
|
if [ "$grafics_flag" == "1" ]; then
|
||||||
options="${options}lite"
|
options="${MK404_options}lite"
|
||||||
else
|
else
|
||||||
options="${options}fancy"
|
options="${MK404_options}fancy"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
echo "Printer: $PRINTER"
|
|
||||||
echo "Options: $options"
|
|
||||||
cd ../MK404/build
|
|
||||||
|
|
||||||
./MK404 Prusa_$PRINTER -s --terminal $options -f $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.hex
|
# Output some useful data
|
||||||
|
echo "Printer: $PRINTER"
|
||||||
|
echo "Options: $MK404_options"
|
||||||
|
|
||||||
|
# Change to MK404 build folder
|
||||||
|
cd ../MK404/master/build
|
||||||
|
|
||||||
|
# Copy language bin file for MK3 and MK3S to xflash
|
||||||
|
if [ -f $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-lang.bin ]; then
|
||||||
|
echo "Copy 'FW$FW-Build$BUILD-$VARIANT-lang.bin' to 'Prusa_${PRINTER}_xflash.bin'"
|
||||||
|
dd if=/dev/zero bs=1 count=262145 | tr "\000" "\377" >Prusa_${PRINTER}_xflash.bin
|
||||||
|
dd if=$SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-lang.bin of=Prusa_${PRINTER}_xflash.bin conv=notrunc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Start MK404
|
||||||
|
# default with serial output and terminal to manipulate it via terminal
|
||||||
|
./MK404 Prusa_$PRINTER -s --terminal $MK404_options -f $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.hex
|
||||||
|
fi
|
||||||
|
#### End of MK404 Simulator
|
Loading…
Reference in New Issue
Block a user