Skip to content

Commit

Permalink
Merge pull request #29 from ghazzor/test1
Browse files Browse the repository at this point in the history
Fix erofs and enable vdso32
  • Loading branch information
ravindu644 authored Mar 25, 2024
2 parents 90c923c + 5480175 commit 50992fa
Show file tree
Hide file tree
Showing 87 changed files with 410,956 additions and 1,205 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: build and release
name: build

on:
push:
workflow_dispatch:
inputs:
tag:
description: 'Release Tag'
required: true

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
fail-fast: true
matrix:
device: [S10_5G, S10, S10+, S10e, N10, N10+]

steps:
- name: Checkout source
Expand All @@ -25,18 +23,14 @@ jobs:
sudo apt update -y
sudo apt install libssl-dev libncurses5-dev python2 libtinfo5 -y
git clone --depth=1 https://github.com/kdrag0n/proton-clang -b master toolchain
- name: Set environment variable
run: |
echo "LPOS_KERNEL_VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
- name: Building LPoS
- name: Building LPOS ${{ matrix.device }}
run: |
bash build_kernel.sh
DEVICE=${{ matrix.device }} ./build.sh
- name: Upload kernel
uses: actions/upload-artifact@v4
with:
name: "LPoS-${{ env.LPOS_KERNEL_VERSION }}-[S10 5G]"
name: "LPOS_${{ matrix.device }}"
path: |
AIK/lpos*.zip
AIK/lpos*.zip
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,9 @@ KBUILD_CFLAGS += $(call cc-option,-fmerge-constants)
KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,)

# conserve stack if available
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
endif

# disallow errors like 'EXPORT_GPL(foo);' with missing header
KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int)
Expand Down
24 changes: 24 additions & 0 deletions arch/arm/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
* A simple function epilogue looks like this:
* ldm sp, {fp, sp, pc}
*
* When compiled with clang, pc and sp are not pushed. A simple function
* prologue looks like this when built with clang:
*
* stmdb {..., fp, lr}
* add fp, sp, #x
* sub sp, sp, #y
*
* A simple function epilogue looks like this when built with clang:
*
* sub sp, fp, #x
* ldm {..., fp, pc}
*
*
* Note that with framepointer enabled, even the leaf functions have the same
* prologue and epilogue, therefore we can ignore the LR value in this case.
*/
Expand All @@ -32,6 +45,16 @@ int notrace unwind_frame(struct stackframe *frame)
low = frame->sp;
high = ALIGN(low, THREAD_SIZE);

#ifdef CONFIG_CC_IS_CLANG
/* check current frame pointer is within bounds */
if (fp < low + 4 || fp > high - 4)
return -EINVAL;

frame->sp = frame->fp;
frame->fp = *(unsigned long *)(fp);
frame->pc = frame->lr;
frame->lr = *(unsigned long *)(fp + 4);
#else
/* check current frame pointer is within bounds */
if (fp < low + 12 || fp > high - 4)
return -EINVAL;
Expand All @@ -40,6 +63,7 @@ int notrace unwind_frame(struct stackframe *frame)
frame->fp = *(unsigned long *)(fp - 12);
frame->sp = *(unsigned long *)(fp - 8);
frame->pc = *(unsigned long *)(fp - 4);
#endif

return 0;
}
Expand Down
28 changes: 28 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,34 @@ config ARM64
select SPARSE_IRQ
select SYSCTL_EXCEPTION_TRACE
select THREAD_INFO_IN_TASK
select ARCH_INLINE_SPIN_TRYLOCK
select ARCH_INLINE_SPIN_TRYLOCK_BH
select ARCH_INLINE_SPIN_LOCK
select ARCH_INLINE_SPIN_LOCK_BH
select ARCH_INLINE_SPIN_LOCK_IRQ
select ARCH_INLINE_SPIN_LOCK_IRQSAVE
select ARCH_INLINE_SPIN_UNLOCK
select ARCH_INLINE_SPIN_UNLOCK_BH
select ARCH_INLINE_SPIN_UNLOCK_IRQ
select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE
select ARCH_INLINE_READ_TRYLOCK
select ARCH_INLINE_READ_LOCK
select ARCH_INLINE_READ_LOCK_BH
select ARCH_INLINE_READ_LOCK_IRQ
select ARCH_INLINE_READ_LOCK_IRQSAVE
select ARCH_INLINE_READ_UNLOCK
select ARCH_INLINE_READ_UNLOCK_BH
select ARCH_INLINE_READ_UNLOCK_IRQ
select ARCH_INLINE_READ_UNLOCK_IRQRESTORE
select ARCH_INLINE_WRITE_TRYLOCK
select ARCH_INLINE_WRITE_LOCK
select ARCH_INLINE_WRITE_LOCK_BH
select ARCH_INLINE_WRITE_LOCK_IRQ
select ARCH_INLINE_WRITE_LOCK_IRQSAVE
select ARCH_INLINE_WRITE_UNLOCK
select ARCH_INLINE_WRITE_UNLOCK_BH
select ARCH_INLINE_WRITE_UNLOCK_IRQ
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
help
ARM 64-bit (AArch64) Linux support.

Expand Down
26 changes: 26 additions & 0 deletions arch/arm64/Kconfig.platforms
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,32 @@ config SOC_EXYNOS9820
select PINCTRL
select SAMSUNG_DMADEV

if SOC_EXYNOS9820

choice
prompt "EXYNOS 9820 DTBO TARGET"

config DTBO_beyondx
bool "S10 5G"

config DTBO_beyond1lte
bool "S10"

config DTBO_beyond2lte
bool "S10+"

config DTBO_beyond0lte
bool "S10e"

config DTBO_d1
bool "N10"

config DTBO_d2
bool "N10+"
endchoice

endif

config SOC_EXYNOS9820_EVT0
default n
bool "Samsung EXYNOS9820 EVT0"
Expand Down
73 changes: 64 additions & 9 deletions arch/arm64/boot/dts/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,69 @@
# SPDX-License-Identifier: GPL-2.0
dtb-y += exynos/exynos9820.dtb
dtbo-y += samsung/exynos9820-beyondx_kor_08.dtbo
dtbo-y += samsung/exynos9820-beyondx_kor_06.dtbo
dtbo-y += samsung/exynos9820-beyondx_kor_00.dtbo
dtbo-y += samsung/exynos9820-beyondx_kor_03.dtbo
dtbo-y += samsung/exynos9820-beyondx_kor_04.dtbo
dtbo-y += samsung/exynos9820-beyondx_kor_07.dtbo
dtbo-y += samsung/exynos9820-beyondx_kor_01.dtbo
dtbo-y += samsung/exynos9820-beyondx_kor_02.dtbo
dtbo-y += samsung/exynos9820-beyondx_kor_05.dtbo

dtbo-$(CONFIG_DTBO_beyondx) += \
samsung/exynos9820-beyondx_kor_08.dtbo \
samsung/exynos9820-beyondx_kor_06.dtbo \
samsung/exynos9820-beyondx_kor_00.dtbo \
samsung/exynos9820-beyondx_kor_03.dtbo \
samsung/exynos9820-beyondx_kor_04.dtbo \
samsung/exynos9820-beyondx_kor_07.dtbo \
samsung/exynos9820-beyondx_kor_01.dtbo \
samsung/exynos9820-beyondx_kor_02.dtbo \
samsung/exynos9820-beyondx_kor_05.dtbo

dtbo-$(CONFIG_DTBO_beyond1lte) += \
samsung/exynos9820-beyond1lte_eur_open_21.dtbo \
samsung/exynos9820-beyond1lte_eur_open_17.dtbo \
samsung/exynos9820-beyond1lte_eur_open_18.dtbo \
samsung/exynos9820-beyond1lte_eur_open_26.dtbo \
samsung/exynos9820-beyond1lte_eur_open_23.dtbo \
samsung/exynos9820-beyond1lte_eur_open_22.dtbo \
samsung/exynos9820-beyond1lte_eur_open_24.dtbo \
samsung/exynos9820-beyond1lte_eur_open_20.dtbo \
samsung/exynos9820-beyond1lte_eur_open_19.dtbo

dtbo-$(CONFIG_DTBO_beyond2lte) += \
samsung/exynos9820-beyond2lte_eur_open_25.dtbo \
samsung/exynos9820-beyond2lte_eur_open_16.dtbo \
samsung/exynos9820-beyond2lte_eur_open_04.dtbo \
samsung/exynos9820-beyond2lte_eur_open_18.dtbo \
samsung/exynos9820-beyond2lte_eur_open_17.dtbo \
samsung/exynos9820-beyond2lte_eur_open_26.dtbo \
samsung/exynos9820-beyond2lte_eur_open_20.dtbo \
samsung/exynos9820-beyond2lte_eur_open_23.dtbo \
samsung/exynos9820-beyond2lte_eur_open_19.dtbo \
samsung/exynos9820-beyond2lte_eur_open_24.dtbo

dtbo-$(CONFIG_DTBO_beyond0lte) += \
samsung/exynos9820-beyond0lte_eur_open_25.dtbo \
samsung/exynos9820-beyond0lte_eur_open_18.dtbo \
samsung/exynos9820-beyond0lte_eur_open_24.dtbo \
samsung/exynos9820-beyond0lte_eur_open_17.dtbo \
samsung/exynos9820-beyond0lte_eur_open_19.dtbo \
samsung/exynos9820-beyond0lte_eur_open_20.dtbo \
samsung/exynos9820-beyond0lte_eur_open_22.dtbo

dtbo-$(CONFIG_DTBO_d1) += \
samsung/exynos9820-d1_eur_open_18.dtbo \
samsung/exynos9820-d1_eur_open_23.dtbo \
samsung/exynos9820-d1_eur_open_19.dtbo \
samsung/exynos9820-d1_eur_open_21.dtbo \
samsung/exynos9820-d1_eur_open_22.dtbo

dtbo-$(CONFIG_DTBO_d2) += \
samsung/exynos9820-d2_eur_open_02.dtbo \
samsung/exynos9820-d2_eur_open_18.dtbo \
samsung/exynos9820-d2_eur_open_22.dtbo \
samsung/exynos9820-d2_eur_open_24.dtbo \
samsung/exynos9820-d2_eur_open_23.dtbo \
samsung/exynos9820-d2_eur_open_19.dtbo \
samsung/exynos9820-d2_eur_open_21.dtbo \
samsung/exynos9820-d2_eur_open_17.dtbo \
samsung/exynos9820-d2_eur_open_16.dtbo \
samsung/exynos9820-d2_eur_open_20.dtbo



targets += dtbs
DTB_LIST := $(dtb-y) $(dtbo-y)
Expand Down
Loading

0 comments on commit 50992fa

Please sign in to comment.