diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90d56f0..6b7110a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,13 +20,17 @@ jobs: name: Build with Docker using devkitARM steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Install tools run: | sudo apt-get update sudo apt-get install p7zip-full python -y + - name: Silence all git safe directory warnings + run: | + git config --system --add safe.directory '*' + git fetch --prune --unshallow --tags - name: Build id: build run: | @@ -45,7 +49,7 @@ jobs: 7z a template.7z "for SDNAND SD card" mv template.7z hiyaCFW.7z - name: Publish build to GH Actions - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@main with: path: hiyaCFW.7z name: build @@ -53,12 +57,12 @@ jobs: # Only run this for non-PR jobs. publish_build: runs-on: ubuntu-latest - name: Publish build to TWLBot/Builds + name: Publish build to release if: ${{ success() && !startsWith(github.ref, 'refs/pull') }} needs: build steps: - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@main with: name: build path: build diff --git a/arm9/Makefile b/arm9/Makefile index 035f4c6..8d5ba7d 100644 --- a/arm9/Makefile +++ b/arm9/Makefile @@ -15,7 +15,7 @@ include $(DEVKITARM)/ds_rules ifneq ($(shell echo $(shell git tag -l --points-at HEAD) | head -c 1),) GIT_VER := $(shell git tag -l --points-at HEAD) else -GIT_VER := $(shell git describe --abbrev=0 --tags)-$(shell git rev-parse --short HEAD) +GIT_VER := $(shell git describe --tags --match v[0-9]* --abbrev=7 | sed 's/-[0-9]*-g/-/') endif # Ensure version.h exists diff --git a/bootloader/source/fat.c b/bootloader/source/fat.c index 1ce103c..7681f69 100644 --- a/bootloader/source/fat.c +++ b/bootloader/source/fat.c @@ -106,7 +106,7 @@ typedef struct u8 fileSysType[8]; // Bootcode u8 bootCode[448]; - } fat16; + } __PACKED fat16; struct { // FAT32 extended block @@ -126,7 +126,7 @@ typedef struct u8 fileSysType[8]; // Bootcode u8 bootCode[420]; - } fat32; + } __PACKED fat32; } extBlock; __PACKED u16 bootSig; @@ -345,7 +345,7 @@ bool FAT_InitFiles (bool initCard) // Read in boot sector bootSec = (BOOT_SEC*) globalBuffer; CARD_ReadSector (bootSector, bootSec); - + // Store required information about the file system if (bootSec->sectorsPerFAT != 0) {