Refactoring options, removed obsolete options
|
|
@ -1,37 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# check the parameters
|
||||
if [ $# != 2 ]; then
|
||||
echo "usage : $0 <project_root> <image_set>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
project_root="$1"
|
||||
image_set="$2"
|
||||
|
||||
# check the project root folder
|
||||
if [ ! -d "$project_root" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$project_root' ${NC}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# check the image_set folder
|
||||
image_set_folder="$OPTIONS_DIR/app_images/$image_set"
|
||||
if [ ! -d "$image_set_folder" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$image_set_folder' ${NC}"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# check the target folder
|
||||
target_folder="$ROOTFS_DIR/app/resources/images"
|
||||
if [ ! -d "$target_folder" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the target folder '$target_folder' ${NC}"
|
||||
exit 4
|
||||
fi
|
||||
|
||||
# copy the selected image set to the target
|
||||
/bin/cp -rf "$image_set_folder" "$target_folder"
|
||||
|
||||
echo -e "${GREEN}SUCCESS: The '$image_set' image set has been copied to the target folder ${NC}"
|
||||
|
||||
exit 0
|
||||
|
Before Width: | Height: | Size: 6 KiB |
|
Before Width: | Height: | Size: 6 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 6 KiB |
|
Before Width: | Height: | Size: 6 KiB |
|
Before Width: | Height: | Size: 6 KiB |
|
|
@ -1,44 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# check the parameters
|
||||
if [ $# != 2 ]; then
|
||||
echo "usage : $0 <project_root> <boot_resource>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
project_root="$1"
|
||||
boot_resource="$2"
|
||||
|
||||
# check the project root folder
|
||||
if [ ! -d "$project_root" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$project_root' ${NC}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# check the selected boot resource folder
|
||||
boot_resource_folder="$OPTIONS_DIR/boot_resource/$boot_resource"
|
||||
if [ ! -d "$boot_resource_folder" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$boot_resource_folder' ${NC}"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# check the selected boot resource file
|
||||
boot_resource_file="$boot_resource_folder/boot-resource"
|
||||
if [ ! -f "$boot_resource_file" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$boot_resource_file'\nPlease use 'sudo ./process.sh' to create the 'boot_resource' file from the source folder ${NC}"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# check the target folder
|
||||
target_folder="$ROOTFS_DIR"
|
||||
if [ ! -d "$target_folder" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the target folder '$target_folder' ${NC}"
|
||||
exit 4
|
||||
fi
|
||||
|
||||
# copy the selected boot resource to the target
|
||||
/bin/cp -f "$boot_resource_file" "$target_folder"
|
||||
|
||||
echo -e "${GREEN}SUCCESS: The '$boot_resource' boot resource has been copied to the target folder ${NC}"
|
||||
|
||||
exit 0
|
||||
|
Before Width: | Height: | Size: 510 KiB |
|
Before Width: | Height: | Size: 510 KiB |
|
|
@ -1,44 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# global definitions:
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
# check for root user
|
||||
if [[ "$EUID" -ne 0 ]]; then
|
||||
echo -e "${RED}ERROR: This script needs to be run with superuser privileges (use sudo)${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check the source file
|
||||
if [ ! -f "boot-resource-src" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the file 'boot-resource-src' ${NC}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# create a temp folder
|
||||
rm -rf temp
|
||||
mkdir temp
|
||||
|
||||
# create a copy of the source
|
||||
rm -f boot-resource
|
||||
cp boot-resource-src boot-resource
|
||||
chmod 664 boot-resource
|
||||
|
||||
# replace all images in the copy of the source
|
||||
mount -t vfat boot-resource "$PWD/temp" -o rw
|
||||
/bin/cp -f *.bmp "$PWD/temp"
|
||||
sync
|
||||
sync
|
||||
sync
|
||||
umount "$PWD/temp"
|
||||
rm -rf "$PWD/temp"
|
||||
|
||||
# setup the result boot-resource
|
||||
rm -f ../boot-resource
|
||||
mv boot-resource ../boot-resource
|
||||
|
||||
echo -e "${GREEN}DONE!${NC}"
|
||||
|
||||
exit 0
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# check the parameters
|
||||
if [ $# != 2 ]; then
|
||||
echo "usage : $0 <project_root> <webcam_package>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
project_root="$1"
|
||||
webcam_package="$2"
|
||||
|
||||
package_name="${webcam_package%.*}"
|
||||
package_action="${webcam_package##*.}"
|
||||
|
||||
auto_start="N"
|
||||
if [ "$package_action" == "run" ]; then
|
||||
auto_start="Y"
|
||||
fi
|
||||
|
||||
check_tools "unzip app_version.sh app_model.sh dd printf"
|
||||
|
||||
# check the project root folder
|
||||
if [ ! -d "$project_root" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$project_root' ${NC}"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# check the webcam package folder
|
||||
webcam_package_folder="$OPTIONS_DIR/camera/$package_name"
|
||||
if [ ! -d "$webcam_package_folder" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$webcam_package_folder' ${NC}"
|
||||
exit 4
|
||||
fi
|
||||
|
||||
# check the webcam package file
|
||||
webcam_package_file="${webcam_package_folder}/camera.zip"
|
||||
if [ ! -f "$webcam_package_file" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the file '$webcam_package_file' ${NC}"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# check the target folder
|
||||
target_folder="$ROOTFS_DIR"
|
||||
if [ ! -d "$target_folder" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the target folder '$target_folder' ${NC}"
|
||||
exit 6
|
||||
fi
|
||||
|
||||
# enable the selected webcam package
|
||||
current_folder="$PWD"
|
||||
cd "$target_folder" || exit 7
|
||||
unzip -oqq "$webcam_package_file"
|
||||
cd "$current_folder" || exit 8
|
||||
|
||||
if [ "$auto_start" == "N" ]; then
|
||||
# auto start not requested, remove the auto start
|
||||
rm -f "$ROOTFS_DIR/opt/etc/init.d/S55camera"
|
||||
fi
|
||||
|
||||
# try to find out the app version (like app_ver="309")
|
||||
def_target="$ROOTFS_DIR/app/app"
|
||||
app_ver=$("$app_version_tool" "$def_target")
|
||||
if [ $? != 0 ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the app version ${NC}"
|
||||
exit 9
|
||||
fi
|
||||
|
||||
# try to find out the model
|
||||
app_model=$("$app_model_tool" "$def_target")
|
||||
if [ $? != 0 ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the app model ${NC}"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
# patch the app based on the model and the version
|
||||
|
||||
if [ "$app_ver" == "3.0.9" ]; then
|
||||
|
||||
# stop the app for looking for inserted webcam
|
||||
sed -i 's/video4linux/videoXlinux/g' "$def_target"
|
||||
if [ "$app_model" == "K2Pro" ]; then
|
||||
# stop the app to log the message 'cannot open video'
|
||||
printf "\x00\xf0\x20\xe3" | dd of="$def_target" bs=1 seek=2339112 conv=notrunc
|
||||
echo -e "${GREEN}SUCCESS: The 'app' has been patched to support the webcam package (K2Pro) ${NC}"
|
||||
exit 0
|
||||
fi
|
||||
if [ "$app_model" == "K2Plus" ]; then
|
||||
# stop the app to log the message 'cannot open video'
|
||||
printf "\x00\xf0\x20\xe3" | dd of="$def_target" bs=1 seek=2339152 conv=notrunc
|
||||
echo -e "${GREEN}SUCCESS: The 'app' has been patched to support the webcam package (K2Plus) ${NC}"
|
||||
exit 0
|
||||
fi
|
||||
if [ "$app_model" == "K2Max" ]; then
|
||||
# stop the app to log the message 'cannot open video'
|
||||
printf "\x00\xf0\x20\xe3" | dd of="$def_target" bs=1 seek=2339152 conv=notrunc
|
||||
echo -e "${GREEN}SUCCESS: The 'app' has been patched to support the webcam package (K2Max) ${NC}"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "${RED}ERROR: Unsupported model and version! It requires K2Pro/K2Plus/K2Max with version 3.0.9+ ${NC}"
|
||||
|
||||
exit 11
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# check the parameters
|
||||
if [ $# != 2 ]; then
|
||||
echo "usage : $0 <project_root> <fswebcam_package>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
project_root="$1"
|
||||
fswebcam_package="$2"
|
||||
|
||||
check_tools "unzip sed"
|
||||
|
||||
# check the project root folder
|
||||
if [ ! -d "$project_root" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$project_root' ${NC}"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# check the fswebcam package folder
|
||||
fswebcam_package_folder="${OPTIONS_DIR}/fswebcam/${fswebcam_package}"
|
||||
if [ ! -d "$fswebcam_package_folder" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the folder '$fswebcam_package_folder' ${NC}"
|
||||
exit 4
|
||||
fi
|
||||
|
||||
# check the fswebcam package file
|
||||
fswebcam_package_file="${fswebcam_package_folder}/fswebcam.zip"
|
||||
if [ ! -f "$fswebcam_package_file" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the file '$fswebcam_package_file' ${NC}"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# check the target folder
|
||||
target_folder="$ROOTFS_DIR"
|
||||
if [ ! -d "$target_folder" ]; then
|
||||
echo -e "${RED}ERROR: Cannot find the target folder '$target_folder' ${NC}"
|
||||
exit 6
|
||||
fi
|
||||
|
||||
# enable the selected fswebcam package
|
||||
current_folder="$PWD"
|
||||
cd "$target_folder" || exit 7
|
||||
unzip -oqq "$fswebcam_package_file"
|
||||
# extend the PATH to $project_root/unpacked/squashfs-root/etc/profile
|
||||
sed -i 's#export PATH="/usr/sbin:/usr/bin:/sbin:/bin"#export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"#' "$project_root/unpacked/squashfs-root/etc/profile"
|
||||
cd "$current_folder" || exit 8
|
||||
|
||||
echo -e "${GREEN}SUCCESS: The '$fswebcam_package' fswebcam package has been enabled ${NC}"
|
||||
|
||||
exit 0
|
||||
67
options.cfg
|
|
@ -16,13 +16,13 @@
|
|||
# Use 'openssl genrsa -out swupdate_private.pem' to generate a private key
|
||||
# Use 'openssl rsa -in swupdate_private.pem -out swupdate_public.pem -outform PEM -pubout' to export the public key
|
||||
# Place both keys (swupdate_private.pem and swupdate_public.pem) in the folder RESOURCES/KEYS
|
||||
# Available for all firmware versions
|
||||
# Available for all firmware versions (recommended)
|
||||
custom_update="@/RESOURCES/KEYS/swupdate_public.pem"
|
||||
|
||||
# Enable root access by providing a custom root password hash (default password 'toor')
|
||||
# Providing an empty string will allow root access without a password (not recommended)
|
||||
# If disabled, you will have no root access until you find out what is the AC original root password
|
||||
# Available for all firmware versions
|
||||
# Available for all firmware versions (recommended)
|
||||
root_access="$1$///xTLYF$krWXTe62/dm.crd6CH4HW0"
|
||||
|
||||
# Enable the UART at boot for access the uboot shell and for root login
|
||||
|
|
@ -37,13 +37,13 @@ uart="2.3.9"
|
|||
# Available for all firmware versions
|
||||
opkg="default"
|
||||
|
||||
# Enable the SSH server, use 'dropbear' type ssh (recommended)
|
||||
# Available for all firmware versions
|
||||
# Enable the SSH server, use 'dropbear' type ssh
|
||||
# Available for all firmware versions (recommended)
|
||||
ssh="dropbear"
|
||||
|
||||
# Set the authorized keys file for the ssh remote access with keys (instead of a password)
|
||||
# Provide the file with your public key(s). You must have the private key set in your ssh client
|
||||
# Available for all firmware versions
|
||||
# Available for all firmware versions (recommended)
|
||||
# authorized_keys="@/RESOURCES/KEYS/authorized_keys" [ssh]
|
||||
|
||||
# Enable custom web server
|
||||
|
|
@ -53,7 +53,7 @@ ssh="dropbear"
|
|||
# More web pages will be added soon
|
||||
# Depends on the option "app_nocamera" only for versions 3.0.5+
|
||||
# No dependency for versions below 3.0.5
|
||||
# Available for versions 2.3.9 ... 3.0.9
|
||||
# Available for versions 2.3.9 ... 3.1.0 (recommended)
|
||||
# webserver="webfs-v5:8000" [app_nocamera]
|
||||
|
||||
# Enable Python 3 (+14MB to the update, +25MB to the rootfs)
|
||||
|
|
@ -61,47 +61,27 @@ ssh="dropbear"
|
|||
# Available for all firmware versions
|
||||
# python="3.11"
|
||||
|
||||
# Webcam cli tool for taking pictures from a connected USB web camera
|
||||
# Available for all firmware versions (not recommended)
|
||||
# fswebcam="default"
|
||||
|
||||
# Enable custom web camera support (not recommended)
|
||||
# You can use the (1) 'default' or (2) 'default.run' package.
|
||||
# You can also use '3d-visualizer' or '3d-visualizer.run' package.
|
||||
# '3d-visualizer' in addition to the 'default' package has a
|
||||
# 3D auto bed leveling mesh visualizer web page available at
|
||||
# http://your_printer_address:8000/mesh
|
||||
#
|
||||
# Support for firmware ver 3.0.9+ only
|
||||
#
|
||||
# 1. Use "default" to just install the package but not to run the process
|
||||
# When you need remote video monitoring from the ssh shell execute
|
||||
# 'camera.py' to start the webserver and use CTRL-C to stop the webserver
|
||||
#
|
||||
# 2. Use "default.run" for install the package and auto run the process at startup
|
||||
#
|
||||
# From your browser navigate to: http://your_printer_address:8000
|
||||
# It requires a compatible USB camera to be inserted in any of the USB slots
|
||||
# It requires the options: [python], [fswebcam] and [ssh]
|
||||
#camera="3d-visualizer.run" [python] [fswebcam] [ssh]
|
||||
|
||||
# Change the banner to a custom one. (Recommended when using custom firmware)
|
||||
# Available for all firmware versions
|
||||
banner="banner"
|
||||
|
||||
# Enable the web interface Kobra Unleashed
|
||||
# Redirect the MQTT communication
|
||||
# This option will disable the use of the original AC cloud service
|
||||
# and the mobile app will stop working
|
||||
# Can be used when a custom cloud service is needed.
|
||||
# Example of a custom cloud service with web interface is Kobra Unleashed
|
||||
# More information: https://github.com/anjomro/kobra-unleashed
|
||||
# Replace the URL below with the URL of your MQTT server
|
||||
# You also need to transfer to the printer your keys in
|
||||
# the /user folder by ssh as explained in the project page
|
||||
# Always keep a copy of the original keys in case you want to go back to AC cloud
|
||||
# Available for all firmware versions (recommended)
|
||||
# Available for all firmware versions
|
||||
modify_mqtt="localhost.mr-a.de"
|
||||
# localhost.mr-a.de will just redirect the MQTT to the localhost 127.0.0.1 to be used with a local MQTT server
|
||||
|
||||
# Delete the Bluetooth support because it's not used by Kobra Unleashed
|
||||
# and can't be used since we replace mqtt anyways
|
||||
# Available for versions 3.0.5+ (recommended)
|
||||
# Available for versions 3.0.5+
|
||||
bluetooth="default"
|
||||
|
||||
# Patch the app to check the captive portal URLs less often (originally every 2s)
|
||||
|
|
@ -120,28 +100,9 @@ app_net_ready="30s"
|
|||
app_dns="208.67.222.222|1.1.1.1"
|
||||
|
||||
# Patch the app to stop supporting webcams. This allows a custom camera support
|
||||
# Available for versions 3.0.5+ (recommended)
|
||||
# Available for versions 3.0.5+ (recommended if webcam is used)
|
||||
# app_nocamera="default"
|
||||
|
||||
# Replace some of the app images
|
||||
# Use it for one or more sets: app_images="set1" "set2" "set3"
|
||||
# Available for all firmware versions
|
||||
# DO NOT USE!!!!!!!!
|
||||
#app_images="set1"
|
||||
# DO NOT USE!!!!!!!!
|
||||
|
||||
# Replace the boot logo
|
||||
# Please do not use it until further investigation of the purpose of
|
||||
# the file 'magic.bin' to the UART availability during booting
|
||||
# DO NOT USE!!!!!!!!
|
||||
# Because changing the boot logo will break many things and uart.
|
||||
# We need to investigate it further.
|
||||
# DO NOT USE!!!!!!!!
|
||||
#boot_resource="kangaroo"
|
||||
# DO NOT USE!!!!!!!!
|
||||
# If you enable this you only have yourself to blame. You have been warned.
|
||||
# Don't enable this until we know how to fix this issue.
|
||||
|
||||
# Add a script for custom initializations at startup
|
||||
# like starting a custom MQTT server, webcam steaming, etc.
|
||||
# Place startup scripts inside this script.
|
||||
|
|
|
|||