Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Samsung Grand Prime (SM-G530M) STABLE 🗡️ #308

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ddea3ac
Update msm8916-samsung-r11.dts
pachof Aug 30, 2023
bf4caf7
Update build.yml
pachof Aug 30, 2023
a22c420
Update build.yml
pachof Aug 30, 2023
d4ad9ec
Update build.yml
pachof Aug 30, 2023
91f57d2
Update build.yml
pachof Aug 30, 2023
66b19e8
Update build.yml
pachof Aug 30, 2023
aee30f9
Update build.yml
pachof Aug 30, 2023
24266bc
Update build.yml
pachof Aug 30, 2023
478e91d
Update build.yml
pachof Aug 30, 2023
df77a77
Update lk2nd.yml
pachof Aug 30, 2023
fbb16a4
Update build.yml
pachof Aug 30, 2023
6383c0a
Update build.yml
pachof Aug 30, 2023
92859bc
Update build.yml
pachof Aug 30, 2023
a516338
Update build.yml
pachof Aug 30, 2023
4fd5b02
Update build.yml
pachof Aug 30, 2023
6877746
Merge branch 'msm8916-mainline:master' into master
pachof Oct 3, 2023
6adf4c5
Update build.yml
pachof Oct 3, 2023
5e6df3a
Update lk2nd.yml
pachof Oct 3, 2023
b6f5972
Update dts/msm8916/msm8916-samsung-r11.dts
pachof Oct 19, 2023
f4998d9
Delete .github/workflows/lk2nd.yml
pachof Oct 25, 2023
ae48540
Merge branch 'msm8916-mainline:master' into master
pachof Dec 2, 2023
876d542
Create lk2nd.yml
pachof Dec 2, 2023
fc22fda
Update lk2nd.yml
pachof Dec 2, 2023
48ce0ad
Update lk2nd.yml
pachof Dec 2, 2023
00c20ae
Update lk2nd.yml
pachof Dec 2, 2023
55b76a3
Update lk2nd.yml
pachof Dec 2, 2023
3db86e8
Update lk2nd.yml
pachof Dec 2, 2023
8b77346
Update lk2nd.yml
pachof Dec 2, 2023
780b293
Update lk2nd.yml
pachof Dec 2, 2023
d6d4063
Update lk2nd.yml
pachof Dec 2, 2023
d9aa8de
Update lk2nd.yml
pachof Dec 2, 2023
4c7c9a2
Update lk2nd.yml
pachof Dec 2, 2023
345ffd5
Update lk2nd.yml
pachof Dec 2, 2023
3f81da5
Update lk2nd.yml
pachof Dec 2, 2023
cf499ce
Update lk2nd.yml
pachof Dec 2, 2023
18386ae
Update build.yml
pachof Dec 2, 2023
86acf35
Update lk2nd.yml
pachof Dec 2, 2023
b0ccb5f
Create lk2nd-matrix.yml
pachof Dec 2, 2023
e6a38a5
Create stock.yml
pachof Dec 2, 2023
85a6faf
Create stock-matrix.yml
pachof Dec 2, 2023
db1bca4
Update build.yml
pachof Dec 2, 2023
73bf1bf
Update lk2nd.yml
pachof Dec 2, 2023
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
55 changes: 36 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
name: build
on:
workflow_call:
inputs:
project:
required: true
type: string
vars:
type: string
name: Building
on: [push, pull_request]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these changes have anything to do with Add Samsung Grand Prime (SM-G530M)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I wanted to modify my repository so that the artifacts can be downloaded, I didn't know that it would be reflected, how do I prevent these changes from occurring?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For online helps, please feel free to come back to #msm8916:postmarketos.org .

Maybe you can push it to another branch, with git switch -c <new_branch> and git push <your_repo> [new_branch]. Uppercase -C to overwrite, if necessary.

For this PR, you can also try to create another branch fortunalteub with:

  1. git checkout origin/master to checkout to origin/master
  2. git switch -c fortunalteub to switch and create branch fortunalteub
  3. git cherry-pick ddea3ace6cf69768627ea19506398254d52ab9d6 b6f59726c60a9bca5365d26ac1b309d0b39b1d28 to cherry-pick 2 relevant commits
  4. git rebase -i origin/master to rebase
  5. In the editor:
pick ddea3ace6cf69768627ea19506398254d52ab9d6  ...
# fixup with previous commit
fixup b6f59726c60a9bca5365d26ac1b309d0b39b1d28 ...
# execute git commit --amend -m <commit_message>
exec git commit --amend -m "dts: Add Samsung Galaxy Grand Prime (SM-G530Y)"
  1. git push <your_repo>, and open another clean PR.
    • or git push <your_repo> fortunalteub:master to replace your current branch master in this PR


jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install the build dependencies
run: |
sudo apt-get install -yqq gcc gcc-arm-none-eabi device-tree-compiler libfdt-dev make python3
- name: Build ${{ inputs.project }}
run: make -j$(nproc) TOOLCHAIN_PREFIX=arm-none-eabi- ${{ inputs.vars }} ${{ inputs.project }}
# Build lk2nd-msm8916 separately first to avoid booting lots of runners
# for obvious build errors that affect all platforms
lk2nd-msm8916:
name: lk2nd
uses: ./.github/workflows/lk2nd.yml
with:
project: lk2nd
platform: msm8916
artifacts: |
build-*/lk.bin
build-*/lk2nd.img
lk2nd:
needs: lk2nd-msm8916
uses: ./.github/workflows/lk2nd-matrix.yml
with:
project: lk2nd
exclude: msm8916 # Already built separately above
artifacts: |
build-*/lk.bin
build-*/lk2nd.img

lk1st:
needs: lk2nd
uses: ./.github/workflows/lk2nd-matrix.yml
with:
project: lk1st
artifacts: |
build-*/*.mbn
build-*/lk.bin

stock:
needs: lk1st
uses: ./.github/workflows/stock-matrix.yml
41 changes: 41 additions & 0 deletions .github/workflows/lk2nd-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build lk2nd matrix
on:
workflow_call:
inputs:
project:
type: string
required: true
artifacts:
type: string
required: true
exclude:
type: string

jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- apq8084
- mdm9607
- mdm9640
- msm8226
- msm8610
- msm8660
- msm8909
- msm8916
- msm8952
- msm8953
- msm8960
- msm8974
- msm8994
- msm8996
exclude:
- platform: ${{ inputs.exclude }}

uses: ./.github/workflows/lk2nd.yml
with:
project: ${{ inputs.project }}
platform: ${{ matrix.platform }}
artifacts: ${{ inputs.artifacts }}
79 changes: 38 additions & 41 deletions .github/workflows/lk2nd.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
name: lk2nd
on: [push, pull_request]
jobs:
lk2nd-msm8916:
uses: ./.github/workflows/build.yml
with:
project: lk2nd-msm8916

lk2nd:
needs: lk2nd-msm8916
strategy:
matrix:
project: [lk2nd-msm8226, lk2nd-msm8974]
uses: ./.github/workflows/build.yml
with:
project: ${{ matrix.project }}

lk1st:
needs: lk2nd-msm8916
strategy:
matrix:
project: [lk1st-msm8916]
uses: ./.github/workflows/build.yml
with:
project: ${{ matrix.project }}

lk1st-msm8916-db410c:
needs: lk2nd-msm8916
uses: ./.github/workflows/build.yml
with:
project: lk1st-msm8916
vars: FORCE_SDCARD=1 LK1ST_DTB=apq8016-sbc LK1ST_PANEL=adv7533_1080p_video

caf:
needs: lk2nd-msm8916
strategy:
matrix:
project: [msm8916, msm8974, msm8226]
uses: ./.github/workflows/build.yml
with:
project: ${{ matrix.project }}
name: Build lk2nd
on:
workflow_call:
inputs:
project:
type: string
required: true
platform:
type: string
required: true
options:
type: string
artifacts:
type: string
required: true

jobs:
build:
name: ${{ inputs.platform }}
runs-on: ubuntu-latest
steps:
# Install dtc for lk2nd (not needed for lk1st without device tree)
- name: Install additional build dependencies
run: sudo apt-get install -yqq device-tree-compiler libfdt-dev
if: inputs.project == 'lk2nd'
- name: Install cross compiler
uses: carlosperate/arm-none-eabi-gcc-action@v1
- run: arm-none-eabi-gcc --version
- uses: actions/checkout@v3
- name: Build
run: git clean -dxf && make -j$(nproc) TOOLCHAIN_PREFIX=arm-none-eabi-
${{ inputs.options }} ${{ inputs.project }}-${{ inputs.platform }}
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.platform }}
path: ${{ inputs.artifacts }}
env:
LKLE_CFLAGS: -Werror
35 changes: 35 additions & 0 deletions .github/workflows/stock-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build stock matrix
on:
workflow_call:

jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- apq8084
- mdm9607
- mdm9640
- msm8226
- msm8610
- msm8660
- msm8909
- msm8916
- msm8952
- msm8953
- msm8960
- msm8974
- msm8994
- msm8996
include:
# No display support on msm8660/msm8960 (with mdp4)
- platform: msm8660
options: EMMC_BOOT=1 ENABLE_DISPLAY=0
- platform: msm8960
options: EMMC_BOOT=1 ENABLE_DISPLAY=0

uses: ./.github/workflows/stock.yml
with:
platform: ${{ matrix.platform }}
options: ${{ matrix.options }}
52 changes: 52 additions & 0 deletions .github/workflows/stock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build stock
on:
workflow_call:
inputs:
platform:
type: string
required: true
options:
type: string

jobs:
build:
name: ${{ inputs.platform }}
runs-on: ubuntu-latest
steps:
- name: Install cross compiler
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
# Qualcomm recommends building with really old GCC versions :/
release: 4.8-2014-q3
- run: arm-none-eabi-gcc --version
- uses: actions/checkout@v3
- name: Build (default)
run: git clean -dxf && make -j$(nproc) TOOLCHAIN_PREFIX=arm-none-eabi-
${{ inputs.options }} ${{ inputs.platform }}
- name: Build (signed kernel)
run: git clean -dxf && make -j$(nproc) TOOLCHAIN_PREFIX=arm-none-eabi-
${{ inputs.options }} ${{ inputs.platform }}
USER_BUILD_VARIANT=true SIGNED_KERNEL=1
- name: Build (verified boot v1)
run: git clean -dxf && make -j$(nproc) TOOLCHAIN_PREFIX=arm-none-eabi-
${{ inputs.options }} ${{ inputs.platform }}
USER_BUILD_VARIANT=true VERIFIED_BOOT=1
# Only some platforms support verified boot v1
if: contains(fromJSON('["msm8909", "msm8952", "msm8953", "msm8994", "msm8996"]'), inputs.platform)
- name: Build (verified boot v2)
run: git clean -dxf && make -j$(nproc) TOOLCHAIN_PREFIX=arm-none-eabi-
${{ inputs.options }} ${{ inputs.platform }}
USER_BUILD_VARIANT=true
VERIFIED_BOOT_2=1 OSVERSION_IN_BOOTIMAGE=1 ENABLE_VB_ATTEST=1 VB1_KEY_USED=1
TARGET_USE_SYSTEM_AS_ROOT_IMAGE=1 ENABLE_KASLRSEED=1 ENABLE_BOOTDEVICE_MOUNT=1
# ... and even less support verified boot v2
if: contains(fromJSON('["msm8909", "msm8952", "msm8953", "msm8996"]'), inputs.platform)
- name: Build (dynamic partitions)
run: git clean -dxf && make -j$(nproc) TOOLCHAIN_PREFIX=arm-none-eabi-
${{ inputs.options }} ${{ inputs.platform }}
USER_BUILD_VARIANT=true DYNAMIC_PARTITION_SUPPORT=1 VIRTUAL_AB_OTA=1
VERIFIED_BOOT_2=1 OSVERSION_IN_BOOTIMAGE=1 ENABLE_VB_ATTEST=1 VB1_KEY_USED=1
TARGET_USE_SYSTEM_AS_ROOT_IMAGE=1 ENABLE_KASLRSEED=1 ENABLE_BOOTDEVICE_MOUNT=1
if: contains(fromJSON('["msm8909", "msm8952", "msm8953", "msm8996"]'), inputs.platform)
env:
LKLE_CFLAGS: -Werror
7 changes: 7 additions & 0 deletions dts/msm8916/msm8916-samsung-r11.dts
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@
lk2nd,match-bootloader = "G530Y*";
#include "msm8916-samsung-gprime.dtsi"
};

fortunalteub {
model = "Samsung Galaxy Grand Prime (SM-G530M)";
compatible = "samsung,fortunalteub", "qcom,msm8916", "lk2nd,device";
lk2nd,match-bootloader = "G530M*";
#include "msm8916-samsung-gprime.dtsi"
};
};
Loading