Added files

This commit is contained in:
Alexander 2024-02-03 07:20:00 +01:00
commit 0690d3fc76
417 changed files with 26092 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
update/*.swu
FW/*.bin
unpacked/*

View file

@ -0,0 +1 @@
Place .bin firmwares in the FW directory.

32
README.md Normal file
View file

@ -0,0 +1,32 @@
## Anycubic Kobra 2 Series Tools
This repository contains tools for the Anycubic Kobra 2 Series 3D printers.
### Usage
1. Clone the repository.
2. Place `.bin` firmware files in the `FW` directory.
3. Run `unpack.sh` to unpack the firmware files.
4. Run `pack.sh` to pack the firmware files.
### Notes
This repository is a work in progress and may contain bugs or may not work as expected any pull requests are welcome.
### Information
**FW** - Place `.bin` firmware files here.
**RESOURCES** - Contains resources for the firmware files.
**TOOLS** - Contains tools to decrypt and encrypt firmware files and more.
**unpacked** - Contains the unpacked firmware files.
**update** - Contains the packed firmware files.
### Credits
Original credits to [Assen](https://klipper.discourse.group/u/AGG2020) for the scripts.
[Alexander](https://github.com/ultimateshadsform) for minor modifications.

View file

@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC+QsvtUr2y8YoE
zhDf24Fk2STHLrOpB4Iic4Tc94iG9Fre16jDPswuJgmL4Ij/irqY/KwsKjeV9j5x
YUJz5TfaWGEclnLb6AShO3R5wRYojOd3UY1pQwkXMcgc8JzguyxkVD1qFk8+6hT/
Bi2C7ECo9Jawf5I17zGKHLlZEbjfrcV2/AFBz5DsNMTt+Ktp8LON9o+6hIKUNCzJ
NwYHLGzvyzbcNdu9DyMsuVV98swUPjL0o1u4R3KzB71ARRBqv5cTAWbsSRVNf5MA
fMefjSyFb6al9lmAzEnprzwDnbt7sN8GUCe3VlIiHjFdkyWeK/jSR1fKpJY7/Col
xuadROdxAgMBAAECggEAW3g6mVS7nbGRBMFbDHx351eb3mS9/Cf/cPevqxoYWaVV
oKf22zMwL4ma8lQXGSA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yG+Yr9i
9YoXWfXlxb5RP747s21ocT2JKP+VGcTNp0h7KggUWfTK0ioEpOFnhKfCy+6AjM3b
XCbBdxaVNkGOHR+xym0JkwH7
-----END PRIVATE KEY-----

View file

@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvkLL7VK9svGKBM4Q39uB
ZNkkxy6zqQeCInOE3PeIhvRa3teowz7MLiYJi+CI/4q6mPysLCo3lfY+cWFCc+U3
2lhhHJZy2+gEoTt0ecEWKIznd1GNaUMJFzHIHPCc4LssZFQ9ahZPPuoU/wYtguxA
qPSWsH+SNe8xihy5WRG4363FdvwBQc+Q7DTE7firafCzjfaPuoSClDQsyTcGByxs
78s23DXbvQ8jLLlVffLMFD4y9KNbuEdyswe9QEUQar+XEwFm7EkVTX+TAHzHn40s
hW+mpfZZgMxJ6a88A527e7DfBlAnt1ZSIh4xXZMlniv40kdXyqSWO/wqJcbmnUTn
cQIDAQAB
-----END PUBLIC KEY-----

View file

@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvkLL7VK9svGKBM4Q39uB
ZNkkxy6zqQeCInOE3PeIhvRa3teowz7MLiYJi+CI/4q6mPysLCo3lfY+cWFCc+U3
2lhhHJZy2+gEoTt0ecEWKIznd1GNaUMJFzHIHPCc4LssZFQ9ahZPPuoU/wYtguxA
qPSWsH+SNe8xihy5WRG4363FdvwBQc+Q7DTE7firafCzjfaPuoSClDQsyTcGByxs
78s23DXbvQ8jLLlVffLMFD4y9KNbuEdyswe9QEUQar+XEwFm7EkVTX+TAHzHn40s
hW+mpfZZgMxJ6a88A527e7DfBlAnt1ZSIh4xXZMlniv40kdXyqSWO/wqJcbmnUTn
cQIDAQAB
-----END PUBLIC KEY-----

View file

@ -0,0 +1,6 @@
root:$1$///xTLYF$krWXTe62/dm.crd6CH4HW0:1:0:99999:7:::
daemon:*:0:0:99999:7:::
ftp:*:0:0:99999:7:::
network:*:0:0:99999:7:::
nobody:*:0:0:99999:7:::
dnsmasq:x:0:0:99999:7:::

View file

@ -0,0 +1,29 @@
#!/bin/sh
[ -f /etc/banner ] && cat /etc/banner
[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
fgrep -sq '/ overlay ro,' /proc/mounts && {
echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
echo 'Please try to remove files from /overlay/upper/... and reboot!'
}
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
export HOME=${HOME:-/root}
export PS1='\u@\h:\w\$ '
[ -x /bin/more ] || alias more=less
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
[ -n "$FAILSAFE" ] || {
for FILE in /etc/profile.d/*.sh; do
[ -e "$FILE" ] && . "$FILE"
done
unset FILE
}
[ -x /bin/ll ] || alias ll='ls -al'
export PATH="$PATH:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

View file

@ -0,0 +1,10 @@
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
if [ -f /app/app ]; then
chmod 755 /app/app
/app/app&
fi
/opt/etc/init.d/rc.unslung start
exit 0

View file

@ -0,0 +1 @@
/bin/ash

View file

@ -0,0 +1 @@
../sbin/dropbear

View file

@ -0,0 +1 @@
../sbin/dropbear

View file

@ -0,0 +1 @@
/opt/libexec/egrep-gnu

View file

@ -0,0 +1 @@
/opt/libexec/fgrep-gnu

View file

@ -0,0 +1 @@
/opt/libexec/find-gnu

View file

@ -0,0 +1 @@
/opt/libexec/grep-gnu

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
/bin/netstat

Binary file not shown.

View file

@ -0,0 +1 @@
/opt/sbin/dropbear

View file

@ -0,0 +1 @@
/bin/sh

View file

@ -0,0 +1 @@
/opt/sbin/dropbear

View file

@ -0,0 +1 @@
/opt/libexec/xargs-gnu

View file

@ -0,0 +1 @@
PORT=22

View file

@ -0,0 +1,9 @@
release=entware
arch=arm
cpu=cortex-a9
cpu_subtype=unknown
float=soft
gcc=8.4.0
gcc_flags=-O2 -pipe -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft
libc=glibc
libc_version=2.27

View file

@ -0,0 +1 @@
/etc/group

View file

@ -0,0 +1,2 @@
root:x:0:root
nobody:x:99:

View file

@ -0,0 +1,58 @@
#!/bin/sh
PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin
PIDFILE="/opt/var/run/dropbear.pid"
DROPBEAR="/opt/sbin/dropbear"
. /opt/etc/config/dropbear.conf
dropbear_status ()
{
[ -f $PIDFILE ] && [ -d /proc/`cat $PIDFILE` ]
}
start()
{
$DROPBEAR -p $PORT -P $PIDFILE
}
stop()
{
kill `cat $PIDFILE`
}
case "$1" in
start)
if dropbear_status
then
echo dropbear already running
else
start
fi
;;
stop)
if dropbear_status
then
stop
else
echo dropbear is not running
fi
;;
status)
if dropbear_status
then
echo dropbear already running
else
echo dropbear is not running
fi
;;
restart)
stop
sleep 3
start
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
;;
esac

View file

@ -0,0 +1,117 @@
#!/bin/sh
ACTION=$1
CALLER=$2
ansi_red="\033[1;31m";
ansi_white="\033[1;37m";
ansi_green="\033[1;32m";
ansi_yellow="\033[1;33m";
ansi_blue="\033[1;34m";
ansi_bell="\007";
ansi_blink="\033[5m";
ansi_std="\033[m";
ansi_rev="\033[7m";
ansi_ul="\033[4m";
start() {
[ "$CRITICAL" != "yes" -a "$CALLER" = "cron" ] && return 7
[ "$ENABLED" != "yes" ] && return 8
echo -e -n "$ansi_white Starting $DESC... $ansi_std"
if [ -n "`pidof $PROC`" ]; then
echo -e " $ansi_yellow already running. $ansi_std"
return 0
fi
$PRECMD > /dev/null 2>&1
$PREARGS $PROC $ARGS > /dev/null 2>&1 &
#echo $PREARGS $PROC $ARGS
COUNTER=0
LIMIT=10
while [ -z "`pidof $PROC`" -a "$COUNTER" -le "$LIMIT" ]; do
sleep 1;
COUNTER=`expr $COUNTER + 1`
done
$POSTCMD > /dev/null 2>&1
if [ -z "`pidof $PROC`" ]; then
echo -e " $ansi_red failed. $ansi_std"
logger "Failed to start $DESC from $CALLER."
return 255
else
echo -e " $ansi_green done. $ansi_std"
logger "Started $DESC from $CALLER."
return 0
fi
}
stop() {
case "$ACTION" in
stop | restart)
echo -e -n "$ansi_white Shutting down $PROC... $ansi_std"
killall $PROC 2>/dev/null
COUNTER=0
LIMIT=10
while [ -n "`pidof $PROC`" -a "$COUNTER" -le "$LIMIT" ]; do
sleep 1;
COUNTER=`expr $COUNTER + 1`
done
;;
kill)
echo -e -n "$ansi_white Killing $PROC... $ansi_std"
killall -9 $PROC 2>/dev/null
;;
esac
if [ -n "`pidof $PROC`" ]; then
echo -e " $ansi_red failed. $ansi_std"
return 255
else
echo -e " $ansi_green done. $ansi_std"
return 0
fi
}
check() {
echo -e -n "$ansi_white Checking $DESC... "
if [ -n "`pidof $PROC`" ]; then
echo -e " $ansi_green alive. $ansi_std";
return 0
else
echo -e " $ansi_red dead. $ansi_std";
return 1
fi
}
reconfigure() {
SIGNAL=SIGHUP
echo -e "$ansi_white Sending $SIGNAL to $PROC... $ansi_std"
killall -$SIGNAL $PROC 2>/dev/null
}
for PROC in $PROCS; do
case $ACTION in
start)
start
;;
stop | kill )
check && stop
;;
restart)
check > /dev/null && stop
start
;;
check)
check
;;
reconfigure)
reconfigure
;;
*)
echo -e "$ansi_white Usage: $0 (start|stop|restart|check|kill|reconfigure)$ansi_std"
exit 1
;;
esac
done
#logger "Leaving ${0##*/}."

View file

@ -0,0 +1,38 @@
#!/bin/sh
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Start/stop all init scripts in /opt/etc/init.d including symlinks
# starting them in numerical order and
# stopping them in reverse numerical order
#logger "Started $0${*:+ $*}."
unset LD_LIBRARY_PATH
unset LD_PRELOAD
ACTION=$1
CALLER=$2
if [ $# -lt 1 ]; then
printf "Usage: $0 {start|stop|restart|reconfigure|check|kill}\n" >&2
exit 1
fi
[ $ACTION = stop -o $ACTION = restart -o $ACTION = kill ] && ORDER="-r"
for i in $(/opt/bin/find /opt/etc/init.d/ -perm '-u+x' -name 'S*' | sort $ORDER ) ;
do
case "$i" in
S* | *.sh )
# Source shell script for speed.
trap "" INT QUIT TSTP EXIT
#set $1
#echo "trying $i" >> /tmp/rc.log
. $i $ACTION $CALLER
;;
*)
# No sh extension, so fork subprocess.
$i $ACTION $CALLER
;;
esac
done

View file

View file

@ -0,0 +1 @@
/etc/localtime

View file

@ -0,0 +1,21 @@
passwd: files
shadow: files
group: files
hosts: files dns
bootparams: files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
netgroup: files
publickey: nisplus
automount: files
aliases: files

View file

@ -0,0 +1,7 @@
src/gz entware http://bin.entware.net/armv7sf-k3.2
dest root /
dest ram /opt/tmp
lists_dir ext /opt/var/opkg-lists
option tmp_dir /opt/tmp
arch all 100
arch armv7-3.2 160

View file

@ -0,0 +1 @@
/etc/passwd

View file

@ -0,0 +1,2 @@
root:$1$chUKvN9o$BmKP1BtdSaTDSxNByBJo8.:0:0:Root:/opt/root:/opt/bin/sh
nobody:x:99:99::/opt/home:/opt/bin/false

View file

@ -0,0 +1,36 @@
#!/bin/sh
# Please note it's not a system-wide settings, it's only for a current
# terminal session. Point your f\w (if necessery) to execute /opt/etc/profile
# at console logon.
is_substring(){
case "$2" in
*$1*) return 0;;
*) return 1;;
esac
}
# Set CHECK_OPT_PATH to 1 to check /opt/bin and /opt/sbin in PATH
CHECK_OPT_PATH=0
if [ $CHECK_OPT_PATH = 1 ]; then
is_substring "/opt/bin" $PATH
[ $? == 1 ] && export PATH=/opt/bin:$PATH
is_substring "/opt/sbin" $PATH
[ $? == 1 ] && export PATH=/opt/sbin:$PATH
else
export PATH=/opt/bin:/opt/sbin:$PATH
fi
export TERMINFO=/opt/share/terminfo
export TERM=xterm
export TMP=/opt/tmp
export TEMP=/opt/tmp
unset LD_PRELOAD
unset LD_LIBRARY_PATH
alias mc="mc -c"
# You may define localization
#export LANG='ru_RU.UTF-8'
#export LC_ALL='ru_RU.UTF-8'
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'

View file

@ -0,0 +1 @@
/etc/shadow

View file

@ -0,0 +1 @@
/etc/shells

View file

@ -0,0 +1,4 @@
/bin/sh
/bin/ash
/opt/bin/sh
/opt/bin/ash

View file

@ -0,0 +1,3 @@
set meta-flag on
set convert-meta off
set output-meta on

View file

@ -0,0 +1,3 @@
#!/bin/sh
. /opt/etc/profile

Binary file not shown.

View file

@ -0,0 +1 @@
ld-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libanl-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libc-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libcidn-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libcrypt-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libdl-2.27.so

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
libm-2.27.so

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
libnsl-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libnss_dns-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libnss_files-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libpcre2-8.so.0

View file

@ -0,0 +1 @@
libpcre2-8.so.0.11.2

Binary file not shown.

View file

@ -0,0 +1 @@
libpcre2-posix.so.3

View file

@ -0,0 +1 @@
libpcre2-posix.so.3.0.4

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
libpthread-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
libresolv-2.27.so

Binary file not shown.

View file

@ -0,0 +1 @@
librt-2.27.so

View file

@ -0,0 +1 @@
libssp.so.0.0.0

Binary file not shown.

View file

@ -0,0 +1 @@
libstdc++.so.6.0.25

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
libutil-2.27.so

View file

@ -0,0 +1 @@
/opt/etc/config/dropbear.conf

View file

@ -0,0 +1,14 @@
Package: dropbear
Version: 2022.82-5
Depends: libc, libssp, librt, libpthread
Alternatives: 100:/opt/bin/scp:/opt/sbin/dropbear, 100:/opt/bin/ssh:/opt/sbin/dropbear
Source: package/network/services/dropbear
SourceName: dropbear
License: MIT
LicenseFiles: LICENSE libtomcrypt/LICENSE libtommath/LICENSE
Section: net
SourceDateEpoch: 1685141073
CPE-ID: cpe:/a:matt_johnston:dropbear_ssh_server
Architecture: armv7-3.2
Installed-Size: 106376
Description: A small SSH2 server/client designed for small memory environments.

View file

@ -0,0 +1,5 @@
/opt/sbin/dropbear
/opt/bin/dropbearkey
/opt/etc/config/dropbear.conf
/opt/etc/init.d/S51dropbear
/opt/bin/dbclient

View file

@ -0,0 +1,13 @@
#!/bin/sh
if [ ! -f /opt/etc/dropbear/dropbear_rsa_host_key ]; then
/opt/bin/dropbearkey -t rsa -f /opt/etc/dropbear/dropbear_rsa_host_key
fi
if [ ! -f /opt/etc/dropbear/dropbear_ecdsa_host_key ]; then
/opt/bin/dropbearkey -t ecdsa -f /opt/etc/dropbear/dropbear_ecdsa_host_key
fi
if [ ! -f /opt/etc/dropbear/dropbear_ed25519_host_key ]; then
/opt/bin/dropbearkey -t ed25519 -f /opt/etc/dropbear/dropbear_ed25519_host_key
fi

View file

@ -0,0 +1,4 @@
/opt/etc/group.1
/opt/etc/passwd.1
/opt/etc/profile
/opt/etc/shells.1

View file

@ -0,0 +1,12 @@
Package: entware-opt
Version: 227000-3
Depends: libc, libssp, librt, libpthread, libgcc, libstdcpp, libpthread, librt, entware-release, zoneinfo-asia, zoneinfo-europe, findutils, terminfo, locales, opkg, entware-upgrade
Conflicts: opt-ndmsv2
Source: feeds/rtndev/entware-opt
SourceName: entware-opt
Section: base
SourceDateEpoch: 1693852117
Maintainer: Entware team, https://entware.net
Architecture: all
Installed-Size: 2402
Description: entware-opt is a metapackage to install Entware basic libraries and scripts.

View file

@ -0,0 +1,11 @@
/opt/etc/init.d/rc.unslung
/opt/etc/passwd.1
/opt/etc/skel/.inputrc
/opt/etc/ld.so.conf
/opt/root/.inputrc
/opt/etc/init.d/rc.func
/opt/etc/profile
/opt/etc/group.1
/opt/etc/skel/.profile
/opt/root/.profile
/opt/etc/shells.1

View file

@ -0,0 +1,9 @@
#!/bin/sh
[ -e /opt/bin/busybox ] && exit 0
for fw_cmd in sbin/ifconfig sbin/route sbin/ip bin/netstat bin/sh bin/ash; do
if [ -f /$fw_cmd ] && [ ! -f /opt/$fw_cmd ]; then
ln -s /$fw_cmd /opt/$fw_cmd
fi
done

View file

@ -0,0 +1,11 @@
Package: entware-release
Version: 1.0-2
Depends: libc, libssp, librt, libpthread
Source: feeds/rtndev/entware-release
SourceName: entware-release
Section: base
SourceDateEpoch: 1693852117
Maintainer: Entware team, https://entware.net
Architecture: all
Installed-Size: 304
Description: entware_release is a file in /opt/etc with entware info.

View file

@ -0,0 +1 @@
/opt/etc/entware_release

View file

@ -0,0 +1,12 @@
Package: entware-upgrade
Version: 1.0-1
Depends: libc, libssp, librt, libpthread
Source: feeds/rtndev/entware-upgrade
SourceName: entware-upgrade
Section: base
SourceDateEpoch: 1693852117
Maintainer: Entware team, https://entware.net
Architecture: all
Installed-Size: 96
Description: Helper package to upgrade Entware for future usage. Currently used to upgrade
armv7soft (2.3.36) to the new codebase.

View file

@ -0,0 +1,2 @@
#!/bin/sh
echo 'Upgrade operations are not required.'

Some files were not shown because too many files have changed in this diff Show more