Skip to content

A GUI based application to flash Krux firmware on K210 based devices (WIP)

License

Notifications You must be signed in to change notification settings

BitCoisas/krux-installer

 
 

Repository files navigation

Krux Installer

Build codecov created at downloads downloads (latest release) commits (since latest release)

Krux Installer is a GUI based tool to flash Krux without typing any command in terminal for flash the firmware onto the device.

Installing

There are pre-built releases for:

  • Linux:
    • Debian-like;
    • Fedora-like;
  • Windows;
  • MacOS:
    • intel processors;
    • arm64 processors (M1/M2/M3).

To build it from the source, please follow the steps below:

System setup

Make sure you have python:

python --version

Linux

Generally, all Linux come with python.

Windows

Follow the instructions at python.org

MacOS

Before installing krux-installer source code, you will need prepare the system:

Install brew package manager

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install latest python

brew install python

and add this line to your ~/.zshrc:

alias python=python3

Ensure openssl have a correct link

Python's ssl module relies on OpenSSL for cryptographic operations. Ensure that OpenSSL is installed on your system and is compatible with the Python version you're using.

Since we expect that you're using the Python installed with Homebrew, it's recommended to install OpenSSL through Homebrew if it's not already installed:

brew install openssl

After installing OpenSSL, make sure it's linked correctly:

brew link --force openssl

This ensures that the OpenSSL libraries are available in the expected locations that Python can find and use.

Patch your zshrc

Library paths on MacOS involves verifying that the environment variables and system configurationsare correctyly set to find the necessary libraries, such as OpenSSL, which is crucial for the ssl module in Python.

On MacOS, the dynamic linker tool dyld uses environment variabes to locate shared libraries. The primary environment variable for specifying library paths is DYLD_LIBRARY_PATH.

Adding the lines below to your ~/.zshrc (or similar) the DYLD_LIBRARY_PATH will be set each time you open a new terminal session (and therefore the OpenSSL libraries libcrypto.dylib and libssl.dylib will can be found):

OPENSSL_MAJOR_VERSION=`openssl --version | awk '{ print $2}' | cut -d . -f1`
OPENSSL_FULL_VERSION=`openssl --version | awk ' { print $2}'`
export DYLD_LIBRARY_PATH="/opt/homebrew/Cellar/openssl@$OPENSSL_MAJOR_VERSION/$OPENSSL_FULL_VERSION/lib:$DYLD_LIBRARY_PATH"

Install poetry

Make sure you have poetry installed:

python -m pipx install poetry

If you have problems with installation, make sure to properly configure its options.

Download sources

Clone the repository:

git clone --recurse-submodules https://github.com/krux-installer.git

Install python dependencies:

poetry install

Update code

If already cloned the repo without using --recurse-submodules, use the command below to clone the needed submodules:

git submodule update --init

Developing

Krux-Installer uses poe task manager for formatting, linting, tests, coverage and build.

See all available tasks

poetry run poe

Format code

poetry run poe format

Lint

poetry run poe lint

Test and coverage

poetry run poe test

For systems without a window manager:

# Linux only
poetry run poe test --no-xvfb

You can see all coverage results opening you browser and type file:///<folder>/krux-installer/htmlcov/index.html (assuming folder is where you placed the krux-installer project).

Build for any Linux distribution

poetry run poe build-linux

Build for MacOS

poetry run poe build-macos

Build for Windows

poetry run poe build-win

It will export all project in a one-file binary:

  • linux: ./dist/krux-installer
  • macOS: ./dist/krux-installer.app/Contents/MacOS/krux-installer
  • windows: ./dist/krux-installer.exe

To more options see .ci/create-spec.py against the PyInstaller options.

About

A GUI based application to flash Krux firmware on K210 based devices (WIP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.3%
  • Shell 2.3%
  • PowerShell 0.4%