mirror of
https://github.com/Ralim/IronOS-Meta.git
synced 2025-04-15 11:27:48 +00:00
Compare commits
6 Commits
97756fe21c
...
a7ac4df252
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7ac4df252 | ||
|
|
22ce26026d | ||
|
|
4193362fce | ||
|
|
4261a7e5a2 | ||
|
|
d4c6978bfe | ||
|
|
ee6c5e911a |
3
.github/workflows/push.yml
vendored
3
.github/workflows/push.yml
vendored
@@ -14,13 +14,12 @@ jobs:
|
|||||||
- model: "pinecilv1"
|
- model: "pinecilv1"
|
||||||
- model: "pinecilv2"
|
- model: "pinecilv2"
|
||||||
- model: "mhp30"
|
- model: "mhp30"
|
||||||
- model: "ts101"
|
|
||||||
- model: "s60"
|
- model: "s60"
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
run: apk add --no-cache git python3 py3-pip zlib py3-pillow
|
run: apk add --no-cache git python3 py3-pip zlib py3-pillow py3-intelhex
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
130
.github/workflows/release.yml
vendored
130
.github/workflows/release.yml
vendored
@@ -1,69 +1,63 @@
|
|||||||
---
|
---
|
||||||
name: "release"
|
name: "release"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: "Release"
|
name: "Release"
|
||||||
runs-on: "ubuntu-22.04"
|
runs-on: "ubuntu-22.04"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
run: sudo apt update && sudo apt-get install -y git python3 python3-pillow
|
run: sudo apt update && sudo apt-get install -y git python3 python3-pillow py3-intelhex
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: prep
|
- name: prep
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /tmp/pinecilv1 && \
|
mkdir -p /tmp/pinecilv1 && \
|
||||||
mkdir -p /tmp/pinecilv2 && \
|
mkdir -p /tmp/pinecilv2 && \
|
||||||
mkdir -p /tmp/miniware && \
|
mkdir -p /tmp/miniware && \
|
||||||
mkdir -p /tmp/ts101 && \
|
mkdir -p /tmp/mhp30 && \
|
||||||
mkdir -p /tmp/mhp30 && \
|
mkdir -p /tmp/s60
|
||||||
mkdir -p /tmp/s60
|
|
||||||
|
- name: build all files for the device
|
||||||
- name: build all files for the device
|
run: |
|
||||||
run: |
|
cd Bootup\ Logos && \
|
||||||
cd Bootup\ Logos && \
|
./run.sh /tmp/pinecilv1/ -m pinecilv1 && \
|
||||||
./run.sh /tmp/pinecilv1/ -m pinecilv1 && \
|
./run.sh /tmp/pinecilv2/ -m pinecilv2 && \
|
||||||
./run.sh /tmp/pinecilv2/ -m pinecilv2 && \
|
./run.sh /tmp/miniware/ -m miniware && \
|
||||||
./run.sh /tmp/miniware/ -m miniware && \
|
./run.sh /tmp/mhp30/ -m mhp30 && \
|
||||||
./run.sh /tmp/ts101/ -m ts101 && \
|
./run.sh /tmp/s60/ -m s60
|
||||||
./run.sh /tmp/mhp30/ -m mhp30 && \
|
|
||||||
./run.sh /tmp/s60/ -m s60
|
- name: build logo erase file
|
||||||
|
run: |
|
||||||
- name: build logo erase file
|
cd Bootup\ Logos && \
|
||||||
run: |
|
python3 img2logo.py -E erase_stored_image /tmp/pinecilv1/ -m pinecilv1 && \
|
||||||
cd Bootup\ Logos && \
|
python3 img2logo.py -E erase_stored_image /tmp/pinecilv2/ -m pinecilv2 && \
|
||||||
python3 img2logo.py -E erase_stored_image /tmp/pinecilv1/ -m pinecilv1 && \
|
python3 img2logo.py -E erase_stored_image /tmp/miniware/ -m miniware && \
|
||||||
python3 img2logo.py -E erase_stored_image /tmp/pinecilv2/ -m pinecilv2 && \
|
python3 img2logo.py -E erase_stored_image /tmp/mhp30/ -m mhp30 && \
|
||||||
python3 img2logo.py -E erase_stored_image /tmp/miniware/ -m miniware && \
|
python3 img2logo.py -E erase_stored_image /tmp/s60/ -m s60
|
||||||
python3 img2logo.py -E erase_stored_image /tmp/ts101/ -m ts101 && \
|
|
||||||
python3 img2logo.py -E erase_stored_image /tmp/mhp30/ -m mhp30 && \
|
- name: compress logo files
|
||||||
python3 img2logo.py -E erase_stored_image /tmp/s60/ -m s60
|
run: |
|
||||||
|
zip -rj pinecilv1.zip /tmp/pinecilv1/* && \
|
||||||
|
zip -rj miniware.zip /tmp/miniware/* && \
|
||||||
- name: compress logo files
|
zip -rj pinecilv2.zip /tmp/pinecilv2/* && \
|
||||||
run: |
|
zip -rj mhp30.zip /tmp/mhp30/* && \
|
||||||
zip -rj pinecilv1.zip /tmp/pinecilv1/* && \
|
zip -rj s60_s60p.zip /tmp/s60/*
|
||||||
zip -rj miniware.zip /tmp/miniware/* && \
|
|
||||||
zip -rj pinecilv2.zip /tmp/pinecilv2/* && \
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
zip -rj ts101.zip /tmp/ts101/* && \
|
with:
|
||||||
zip -rj mhp30.zip /tmp/mhp30/* && \
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
zip -rj s60_s60p.zip /tmp/s60/*
|
automatic_release_tag: "latest"
|
||||||
|
prerelease: false
|
||||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
title: "Release"
|
||||||
with:
|
files: |
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
*.zip
|
||||||
automatic_release_tag: "latest"
|
|
||||||
prerelease: false
|
|
||||||
title: "Release"
|
|
||||||
files: |
|
|
||||||
*.zip
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from __future__ import division
|
|||||||
import argparse
|
import argparse
|
||||||
import copy
|
import copy
|
||||||
import os, sys
|
import os, sys
|
||||||
|
from typing import Optional
|
||||||
from intelhex import IntelHex
|
from intelhex import IntelHex
|
||||||
from output_hex import HexOutput
|
from output_hex import HexOutput
|
||||||
from output_dfu import DFUOutput
|
from output_dfu import DFUOutput
|
||||||
@@ -50,7 +51,7 @@ class S60Settings:
|
|||||||
|
|
||||||
|
|
||||||
class TS101Settings:
|
class TS101Settings:
|
||||||
IMAGE_ADDRESS = 0x08000000 + (126 * 1024)
|
IMAGE_ADDRESS = 0x08000000 + (99 * 1024)
|
||||||
DFU_TARGET_NAME = b"IronOS-dfu"
|
DFU_TARGET_NAME = b"IronOS-dfu"
|
||||||
DFU_ALT = 0
|
DFU_ALT = 0
|
||||||
DFU_VENDOR = 0x1209
|
DFU_VENDOR = 0x1209
|
||||||
@@ -243,7 +244,7 @@ def animated_image_to_bytes(
|
|||||||
def img2hex(
|
def img2hex(
|
||||||
input_filename,
|
input_filename,
|
||||||
device_model_name: str,
|
device_model_name: str,
|
||||||
merge_hex_file: str | None,
|
merge_hex_file: Optional[str],
|
||||||
preview_filename=None,
|
preview_filename=None,
|
||||||
threshold=128,
|
threshold=128,
|
||||||
dither=False,
|
dither=False,
|
||||||
@@ -306,6 +307,11 @@ def img2hex(
|
|||||||
deviceSettings = Pinecilv2Settings
|
deviceSettings = Pinecilv2Settings
|
||||||
elif device_name == "ts101":
|
elif device_name == "ts101":
|
||||||
deviceSettings = TS101Settings
|
deviceSettings = TS101Settings
|
||||||
|
if merge_hex_file is None:
|
||||||
|
print(
|
||||||
|
"For the TS101 for compatibility with bugs in the Miniware Loader, you must merge the main firmware with the logo to flash it"
|
||||||
|
)
|
||||||
|
exit(1)
|
||||||
elif device_name == "s60":
|
elif device_name == "s60":
|
||||||
deviceSettings = S60Settings
|
deviceSettings = S60Settings
|
||||||
elif device_name == "mhp30":
|
elif device_name == "mhp30":
|
||||||
@@ -359,7 +365,7 @@ def read_merge_write(
|
|||||||
# Merge in the image data, error if collision
|
# Merge in the image data, error if collision
|
||||||
base_hex_file.merge(logo_hex_file, overlap="error")
|
base_hex_file.merge(logo_hex_file, overlap="error")
|
||||||
binary_base = base_hex_file.minaddr()
|
binary_base = base_hex_file.minaddr()
|
||||||
base_hex_file.padding = 0xA5
|
base_hex_file.padding = 0xFF
|
||||||
binary_blob = base_hex_file.tobinarray(start=binary_base)
|
binary_blob = base_hex_file.tobinarray(start=binary_base)
|
||||||
print(
|
print(
|
||||||
f"Post-merge output image starts at 0x{binary_base:x}, len {len(binary_blob)}"
|
f"Post-merge output image starts at 0x{binary_base:x}, len {len(binary_blob)}"
|
||||||
@@ -373,13 +379,17 @@ def read_merge_write(
|
|||||||
deviceSettings.DFU_PRODUCT,
|
deviceSettings.DFU_PRODUCT,
|
||||||
deviceSettings.DFU_VENDOR,
|
deviceSettings.DFU_VENDOR,
|
||||||
)
|
)
|
||||||
|
# Gap fill any missing segments
|
||||||
|
# This is required for the TS101 bootloader
|
||||||
|
segments = base_hex_file.segments()
|
||||||
|
for seg_pair in zip(segments, segments[1:]):
|
||||||
|
start = seg_pair[0][1]
|
||||||
|
end = seg_pair[1][0]
|
||||||
|
filler = [0xFE] * (end - start)
|
||||||
|
base_hex_file.frombytes(filler, start)
|
||||||
|
|
||||||
HexOutput.writeFile(
|
with open(output_filename + ".hex", "w") as output:
|
||||||
output_filename + ".hex",
|
base_hex_file.write_hex_file(output, eolstyle="CRLF")
|
||||||
binary_blob,
|
|
||||||
binary_base,
|
|
||||||
deviceSettings.MINIMUM_HEX_SIZE,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def parse_commandline():
|
def parse_commandline():
|
||||||
|
|||||||
@@ -65,13 +65,6 @@ class HexOutput:
|
|||||||
def write(generator):
|
def write(generator):
|
||||||
output.write("".join(generator))
|
output.write("".join(generator))
|
||||||
|
|
||||||
if len(data) % cls.INTELHEX_BYTES_PER_LINE != 0:
|
|
||||||
raise ValueError(
|
|
||||||
"Program error: Size of LCD data is not evenly divisible by {}".format(
|
|
||||||
cls.INTELHEX_BYTES_PER_LINE
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
address_lo = data_address & 0xFFFF
|
address_lo = data_address & 0xFFFF
|
||||||
address_hi = (data_address >> 16) & 0xFFFF
|
address_hi = (data_address >> 16) & 0xFFFF
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -7,11 +7,10 @@ This includes photographs of hardware, datasheets, schematics, original propriet
|
|||||||
This repository uses github actions to automagically build the logos for each device.
|
This repository uses github actions to automagically build the logos for each device.
|
||||||
Periodically a "release" will be tagged and pre-compiled logo's will be put there as well to make it easy.
|
Periodically a "release" will be tagged and pre-compiled logo's will be put there as well to make it easy.
|
||||||
|
|
||||||
|
|
||||||
# Boot-Up Logos
|
# Boot-Up Logos
|
||||||
|
|
||||||
The IronOS firmware supports a user created bootup logo.
|
The IronOS firmware supports a user created bootup logo.
|
||||||
By default, there is _not_ one included in the firmware. This means that once flashed they generally stay. If you want no logo again, you would have to flash a blank image to the bootup logo.
|
By default, there is _not_ one included in the firmware. This means that once flashed they generally stay. If you want no logo again, you would have to flash a blank image to the bootup logo.
|
||||||
|
|
||||||
- Safe & Fun: will not over write your firmware
|
- Safe & Fun: will not over write your firmware
|
||||||
- Easy install: use dfu tool just like updating firmware (or Pine64 Updater if you have a Pinecil).
|
- Easy install: use dfu tool just like updating firmware (or Pine64 Updater if you have a Pinecil).
|
||||||
@@ -22,4 +21,3 @@ There are community logo's already converted and ready to use in [IronOS-Meta/re
|
|||||||
Download the zip for Pinecil or Miniware and then install using the instructions on the [main IronOS documentation](https://ralim.github.io/IronOS/Logo/).
|
Download the zip for Pinecil or Miniware and then install using the instructions on the [main IronOS documentation](https://ralim.github.io/IronOS/Logo/).
|
||||||
|
|
||||||
Alternatively if you want to make your own logo files, there is also documentation on how best to do this in the [main IronOS documentation](https://ralim.github.io/IronOS/Logo/).
|
Alternatively if you want to make your own logo files, there is also documentation on how best to do this in the [main IronOS documentation](https://ralim.github.io/IronOS/Logo/).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user