jdlcdl / krux-installer

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Krux Installer

Build main branch

Krux Installer (alpha versions) aims to be a GUI based tool to build, flash and debug Krux

As it now, the generated application execute, without typing any command in terminal.

For more information, see flash the firmware onto the device.

Tested machines

  • Linux:
    • Archlinux;
    • Ubuntu;
  • Windows:
    • Windows 10

Untested machines

  • MacOS

Help Wanted: we need mac users!

Install

Build from source

Download nodejs

First of all, you will need Node.js installed in you system. We recommend use the latest LTS version.

Download from Node.js binaries

You can install node.js in your system downloading it from official nodejs website and following provided instructions.

Download from NVM (Node Version Manager)

Alternatively, if you have a linux or macos system, you can have multiple versions of Node.js using nvm.

To install nvm, follow the instructions.

Once installed, we recomend to install the latest LTS node:

nvm install --lts

Download repository

Now you can download the source code:

git clone https://github.com/qlrd/krux-installer.git

Install dependencies

Install all dependencies:

yarn install

Additionaly, you can upgrade dependencies to its latest versions. Have some caution with this command, once that executing this command can broke some functionalities, mainly those related to the use of google-chrome and chromiumdriver in E2e tests.

TIP: Before execute this command, always check the latest supported chromium version at Electron Stable Releases page

yarn upgrade-interactive --latest

Live compile to development environment

When a change is made, we recommend to execute dev subcommand:

yarn run dev

if you want to show some debug messages:

DEBUG=krux:* yarn run dev

Test

Prepare tests

To test, you need to write specification tests under pageobjects definitions:

  • You can write your own E2E specification test files on test/e2e/specs folder;

  • You can define the [PageObjects] on test/e2e/pageobjects folder.

Before run tests, you will need to build the application.

Build

Before running build, verify builder config to setup the build target on specific os (Operational System).

The <target> depends depends on the running platform (i.e., linux, darwin -- MacOS, and win32 -- Windows).

For more information, see Electron Builder page.

Run all tests

The wdio.conf.mts is configured to check if your system have krux.zip.* resources.

  • If not, it will, run all tests, including download tests;
  • If yes, it will skip tests that download resources.
yarn run build

If you want to build a specific target to a specifi os, run

yarn run build --<os> <target>

If you want to debug some messages, add the DEBUG environment variable.

In linux/mac:

DEBUG=krux:* yarn run build --<os> <target>
Filter tests

Additionaly, you can filter some tests with --filter option and a based regular expression argument.

For example, if you want to exclude tests until 25th test, you can do this:

yarn run e2e --filter '0([0-1][0-9]|2[0-4]).*.spec.ts'

if you want to debug some messages:

DEBUG=krux:* yarn run e2e --filter '0([0-1][0-9]|2[0-4]).*.spec.ts'

WARNING: Builtin OpenSSL for windows in KruxInstaller

When downloading official krux firmware versions, it is necessary to verify the signature through the OpenSSL tool, as a way to verify the authenticity of the downloaded binaries.

On "Unix like" releases (Linux and MacOS), verification is easily done since such tool exists natively in operating system.

In windows release, we are faced with the peculiarity of the operating system in question do not have such a tool (see this issue).

So, we packaged a stable version of OpenSSL, and compiled it from the source. The compilation process is done entirely in a reproducible virtual environment and, therefore, not locally, with the github-action compile-openssl-windows-action.

Since it is compiled in a virtual environment on github:

  • it is expected to be fully verifiable and free of malicious code;
  • it is expected that, if you're developing in Windows machine, some difficulties will be appear.
  • You can check the build steps in actions.

TODOs

  • Kendryte K210 devices:
    • Flash to M5stickV;
    • Flash to Sipeed Amigo;
    • Flash to Sipeed Bit;
    • Flash to Sipeed Dock;
    • Flash to Yahboom Aimotion
    • Build from source to M5stickV;
    • Build from source to Sipeed Amigo;
    • Build from source to Sipeed Bit;
    • Build from source to Sipeed Dock;
    • Debug for M5stickV;
    • Debug for Sipeed Amigo;
    • Debug for Sipeed Bit;
    • Debug for Sipeed Dock;
  • odudex Android version:
    • Transfer to device;
    • Build for device;
    • Debug for device.
  • Windows:
    • Build NSIS installer;
    • Build Portable installer;
    • Build AppX installer;
  • Linux:
    • Build AppImage standalone;
    • Build deb package for apt-get;
    • Build snap package for snapcraft;
    • Build pacman package for pacman.
  • MacOS:
    • Build DMG installer;
    • Build PKG installer;
    • Build MAS installer;

About

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

License:MIT License


Languages

Language:TypeScript 87.3%Language:Vue 12.2%Language:CSS 0.4%Language:HTML 0.1%