Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 86 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:

env:
TOOLCHAIN_URL: https://github.com/openlgtv/buildroot-nc4/releases/download/webos-c592d84/arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
TOOLCHAIN_REVISION: a38c582ea397fec612811f8e933ae982d41fc5a3
TOOLCHAIN_DIR: /opt/arm-webos-linux-gnueabi_sdk-buildroot
TOOLCHAIN_ENV_FILE: /opt/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup
TOOLCHAIN_FILE: /opt/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake
Expand All @@ -17,7 +17,61 @@ env:
CCACHE_MAXSIZE: 600M

jobs:

build_sdk:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}/buildroot-nc4

steps:
- name: Restore toolchain cache
id: cache-toolchain-restore
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/buildroot-nc4/output/images/*_sdk-buildroot*.tar.gz
key: toolchain-${{ runner.os }}-${{ env.TOOLCHAIN_REVISION }}

- uses: actions/checkout@v3
if: steps.cache-toolchain-restore.outputs.cache-hit != 'true'
with:
repository: openlgtv/buildroot-nc4
ref: ${{ env.TOOLCHAIN_REVISION }}
path: ${{ github.workspace }}/buildroot-nc4
fetch-depth: 0

- name: Prepare Environment
if: steps.cache-toolchain-restore.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/buildroot-nc4
run: |
sudo apt-get update -qq
sudo apt-get install -y cpio rsync bc
make webos_tv_defconfig
echo "BR2_PACKAGE_QT5=n" >> .config
echo "BR2_PACKAGE_QT6=y" >> .config
echo "BR2_PACKAGE_QT6BASE_NETWORK=y" >> .config
echo "BR2_PACKAGE_QT6SERIALPORT=y" >> .config
echo "BR2_PACKAGE_ICU=n" >> .config
wget https://gist.githubusercontent.com/sundermann/eec535ef79adb87367a6030f713d5e27/raw/20b9add1b41e0c0c55dd11aaeff41160eebe9693/em_aarch64.patch -O package/qt6/qt6base/em_aarch64.patch
wget https://gist.githubusercontent.com/sundermann/eec535ef79adb87367a6030f713d5e27/raw/20b9add1b41e0c0c55dd11aaeff41160eebe9693/statvfs.patch -O package/qt6/qt6base/statvfs.patch
make olddefconfig

- name: Build SDK
if: steps.cache-toolchain-restore.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/buildroot-nc4
run: |
make sdk

- name: Cache toolchain
if: steps.cache-toolchain-restore.outputs.cache-hit != 'true'
id: cache-toolchain
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/buildroot-nc4/output/images/*_sdk-buildroot*.tar.gz
key: toolchain-${{ runner.os }}-${{ env.TOOLCHAIN_REVISION }}

build_hyperhdr:
needs: build_sdk
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -27,7 +81,7 @@ jobs:
- uses: actions/checkout@v3
with:
repository: awawa-dev/HyperHDR
ref: v21.0.0.0
ref: v22.0.0.0beta1
path: hyperhdr-repo
submodules: recursive
fetch-depth: 0
Expand All @@ -45,18 +99,18 @@ jobs:
- name: Create build directories
run: |
mkdir -p ./${{ env.BUILD_DIR }}
- name: Cache toolchain dir
id: cache-toolchain

- name: Restore toolchain cache
id: cache-toolchain-restore
uses: actions/cache@v3
with:
path: ${{ env.TOOLCHAIN_DIR }}
key: ${{ runner.os }}-${{ env.TOOLCHAIN_URL }}
path: ${{ github.workspace }}/buildroot-nc4/output/images/*_sdk-buildroot*.tar.gz
key: toolchain-${{ runner.os }}-${{ env.TOOLCHAIN_REVISION }}

- name: Download and unpack toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
- name: Unpack toolchain
working-directory: /opt
run: |
wget -q -O toolchain.tar.gz ${TOOLCHAIN_URL}
cp ${{ github.workspace }}/buildroot-nc4/output/images/*_sdk-buildroot*.tar.gz toolchain.tar.gz
tar xf toolchain.tar.gz
pushd ${TOOLCHAIN_DIR}
./relocate-sdk.sh
Expand All @@ -81,14 +135,16 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
-DCMAKE_BUILD_TYPE=Release \
-DPLATFORM=linux \
-DENABLE_SPIDEV=OFF \
-DENABLE_SPIDEV=ON \
-DENABLE_FTDIDEV=ON \
-DENABLE_V4L2=OFF \
-DENABLE_X11=OFF \
-DENABLE_PIPEWIRE=OFF \
-DENABLE_SOUNDCAPLINUX=ON \
-DENABLE_SOUNDCAPLINUX=OFF \
-DENABLE_CEC=OFF \
-DENABLE_PROTOBUF=OFF \
-DENABLE_FRAMEBUFFER=OFF
-DENABLE_FRAMEBUFFER=OFF \
-DENABLE_POWER_MANAGEMENT=OFF
make
popd

Expand All @@ -100,14 +156,11 @@ jobs:

- name: Copy dependencies to release/
env:
dependency_libs: libpng16.so.16 libjpeg.so.8 libcrypto.so.1.1 libz.so.1 libssl.so.1.1 libQt5Sql.so.5.15.2 libpcre2-16.so.0 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libk5crypto.so.3 libatomic.so.1 libQt5Core.so.5 libkrb5support.so.0 libcom_err.so.3 libstdc++.so.6 libkrb5.so.3 libQt5Sql.so.5 libgssapi_krb5.so.2 libQt5SerialPort.so.5 libQt5Sql.so.5.15 libusb-1.0.so.0 libturbojpeg.so.0
dependency_libs: libQt6Core.so.6 libQt6Network.so.6 libQt6SerialPort.so.6 libatomic.so.1 libcrypto.so.3 libftdi1.so.2 libjpeg.so.8 libpng16.so.16 libpcre2-16.so.0 libssl.so.1.1 libssl.so.3 libstdc++.so.6 libturbojpeg.so.0 libudev.so.1 libusb-1.0.so.0 libz.so.1 libdouble-conversion.so.3 libb2.so.1
run: |
for i in ${{ env.dependency_libs }}; do find ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/ -name $i -exec cp {} ./release/ \;; done
mkdir -p ./release/sqldrivers
mkdir -p ./release/imageformats
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/sqldrivers/libqsqlite.so ./release/sqldrivers/
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqico.so ./release/imageformats/
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqjpeg.so ./release/imageformats/
mkdir -p ./release/tls
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt6/plugins/tls/libqopensslbackend.so ./release/tls/
find ./release

- name: Upload artifacts
Expand Down Expand Up @@ -138,13 +191,23 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Restore toolchain cache
id: cache-toolchain
id: cache-toolchain-restore
uses: actions/cache@v3
with:
path: ${{ env.TOOLCHAIN_DIR }}
key: ${{ runner.os }}-${{ env.TOOLCHAIN_URL }}
path: ${{ github.workspace }}/buildroot-nc4/output/images/*_sdk-buildroot*.tar.gz
key: toolchain-${{ runner.os }}-${{ env.TOOLCHAIN_REVISION }}

- name: Unpack toolchain
working-directory: /opt
run: |
cp ${{ github.workspace }}/buildroot-nc4/output/images/*_sdk-buildroot*.tar.gz toolchain.tar.gz
tar xf toolchain.tar.gz
pushd ${TOOLCHAIN_DIR}
./relocate-sdk.sh
popd
find ${TOOLCHAIN_DIR}/bin -type f -iname "perl*" -delete

- name: Install native dependencies
env:
Expand All @@ -170,7 +233,7 @@ jobs:
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}
make
make -j4
popd
cp -r ./service/build/dist/* ./dist/service/

Expand Down
2 changes: 1 addition & 1 deletion appinfo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "org.webosbrew.hyperhdr.loader",
"version": "0.1.12",
"version": "0.1.13",
"vendor": "webosbrew.org",
"title": "HyperHDR",
"icon": "assets/logo_small.png",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "org.webosbrew.hyperhdr.loader",
"version": "0.1.12",
"version": "0.1.13",
"description": "HyperHDR loader",
"main": "frontend/index.js",
"moduledir": "frontend",
Expand Down