mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
use BUILDROOT&CFW_HASH & real GMENU2X COMMIT_HASH in package CFLAGS (#31)
update workflow to accomodate CFW_HASH
This commit is contained in:
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@@ -26,13 +26,19 @@ jobs:
|
|||||||
key: ${{ inputs.submodule }}-uclibc-ccache-${{ github.sha }}
|
key: ${{ inputs.submodule }}-uclibc-ccache-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ inputs.submodule }}-uclibc-ccache-
|
${{ inputs.submodule }}-uclibc-ccache-
|
||||||
|
|
||||||
|
- name: generate cfw hash
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory /__w/buildroot/buildroot
|
||||||
|
echo "cfwsha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
id: cfwsha
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
cd ${{ inputs.submodule || '.' }}
|
cd ${{ inputs.submodule || '.' }}
|
||||||
#apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion
|
#apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion
|
||||||
make miyoo_uclibc_defconfig
|
make miyoo_uclibc_defconfig
|
||||||
make sdk
|
make sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}"
|
||||||
|
|
||||||
- name: generate-graphs
|
- name: generate-graphs
|
||||||
run: |
|
run: |
|
||||||
@@ -81,12 +87,18 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ inputs.submodule }}-musl-ccache-
|
${{ inputs.submodule }}-musl-ccache-
|
||||||
|
|
||||||
|
- name: generate cfw hash
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory /__w/buildroot/buildroot
|
||||||
|
echo "cfwsha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
id: cfwsha
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
cd ${{ inputs.submodule || '.' }}
|
cd ${{ inputs.submodule || '.' }}
|
||||||
#apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion
|
#apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion
|
||||||
make miyoo_musl_defconfig
|
make miyoo_musl_defconfig
|
||||||
make sdk
|
make sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}"
|
||||||
|
|
||||||
- name: generate-graphs
|
- name: generate-graphs
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ GMENU2X_DEPENDENCIES = sdl sdl_image sdl_mixer sdl_sound sdl_ttf
|
|||||||
|
|
||||||
PLATFORM = miyoo
|
PLATFORM = miyoo
|
||||||
BUILDTIME := $(shell date +%s)
|
BUILDTIME := $(shell date +%s)
|
||||||
COMMIT_HASH := $(shell git rev-parse --short HEAD)
|
BUILDROOT_HASH := $(shell git rev-parse --short HEAD)
|
||||||
SDL_CFLAGS = $(shell $(STAGING_DIR)/usr/bin/sdl-config --cflags)
|
SDL_CFLAGS = $(shell $(STAGING_DIR)/usr/bin/sdl-config --cflags)
|
||||||
CFLAGS = -DPLATFORM=\"$(PLATFORM)\" -D__BUILDTIME__=$(BUILDTIME) -D__COMMIT_HASH__=$(COMMIT_HASH) -DLOG_LEVEL=3
|
CFLAGS = -DPLATFORM=\"$(PLATFORM)\" -D__BUILDTIME__=$(BUILDTIME) -D__CFW_HASH__=$(CFW_HASH) -D__BUILDROOT_HASH__=$(BUILDROOT_HASH) -DLOG_LEVEL=3
|
||||||
CFLAGS += -Isrc
|
CFLAGS += -Isrc
|
||||||
CFLAGS += -O0 -ggdb -g3 $(SDL_CFLAGS)
|
CFLAGS += -O0 -ggdb -g3 $(SDL_CFLAGS)
|
||||||
CFLAGS += -DTARGET_MIYOO
|
CFLAGS += -DTARGET_MIYOO
|
||||||
|
|
||||||
define GMENU2X_BUILD_CMDS
|
define GMENU2X_BUILD_CMDS
|
||||||
$(MAKE) CFLAGS="$(CFLAGS)" CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" STRIP="$(TARGET_STRIP)" LD="$(TARGET_LD)" -C $(@D) -f Makefile.miyoo dist
|
$(MAKE) CFLAGS="$(CFLAGS) -D__COMMIT_HASH__=$(shell git -C $(GMENU2X_DL_DIR)/git rev-parse --short HEAD)" CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" STRIP="$(TARGET_STRIP)" LD="$(TARGET_LD)" -C $(@D) -f Makefile.miyoo dist
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define GMENU2X_INSTALL_TARGET_CMDS
|
define GMENU2X_INSTALL_TARGET_CMDS
|
||||||
|
|||||||
Reference in New Issue
Block a user