summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-10-16 17:46:15 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-10-16 17:46:15 +0100
commit56a0eb357c749015a2eb73bb28d6afce7d112776 (patch)
tree06b86cdc72ddc97a3b96ce19cbbe3f7c62d7e792
parent866869f4db7456cd8b6ae428e736d32c87ac38e2 (diff)
sys-kernel/linux-image-redcore-lts : more fixes to make the kernel build via exheres
-rw-r--r--packages/sys-kernel/linux-image-redcore-lts/files/linux-objtool-dont-hardcore-ar.patch12
-rw-r--r--packages/sys-kernel/linux-image-redcore-lts/files/redcore-lts-amd64.config2
-rw-r--r--packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-028
3 files changed, 33 insertions, 9 deletions
diff --git a/packages/sys-kernel/linux-image-redcore-lts/files/linux-objtool-dont-hardcore-ar.patch b/packages/sys-kernel/linux-image-redcore-lts/files/linux-objtool-dont-hardcore-ar.patch
new file mode 100644
index 0000000..120af65
--- /dev/null
+++ b/packages/sys-kernel/linux-image-redcore-lts/files/linux-objtool-dont-hardcore-ar.patch
@@ -0,0 +1,12 @@
+diff -Nur a/tools/objtool/Makefile b/tools/objtool/Makefile
+--- a/tools/objtool/Makefile 2018-08-18 09:48:00.000000000 +0100
++++ b/tools/objtool/Makefile 2018-10-16 17:35:49.186328088 +0100
+@@ -11,7 +11,7 @@
+ HOSTLD ?= ld
+ CC = $(HOSTCC)
+ LD = $(HOSTLD)
+-AR = ar
++AR ?= ar
+
+ ifeq ($(srctree),)
+ srctree := $(patsubst %/,%,$(dir $(CURDIR)))
diff --git a/packages/sys-kernel/linux-image-redcore-lts/files/redcore-lts-amd64.config b/packages/sys-kernel/linux-image-redcore-lts/files/redcore-lts-amd64.config
index 73c7d19..f70955f 100644
--- a/packages/sys-kernel/linux-image-redcore-lts/files/redcore-lts-amd64.config
+++ b/packages/sys-kernel/linux-image-redcore-lts/files/redcore-lts-amd64.config
@@ -925,7 +925,7 @@ CONFIG_BINFMT_MISC=y
CONFIG_COREDUMP=y
CONFIG_IA32_EMULATION=y
CONFIG_IA32_AOUT=y
-CONFIG_X86_X32=y
+# CONFIG_X86_X32 is not set
CONFIG_COMPAT_32=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
diff --git a/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0 b/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0
index 810c3ed..2b1d1a1 100644
--- a/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0
+++ b/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0
@@ -43,7 +43,9 @@ DEFAULT_SRC_PREPARE_PATCHES=(
"${FILES}"/linux-hardened.patch
"${FILES}"/uksm-for-linux-hardened.patch
"${FILES}"/0015-Enable-BFQ-io-scheduler-by-default.patch
+ # allow kernel to be built via exheres
"${FILES}"/linux-pkg-config.patch
+ "${FILES}"/linux-objtool-dont-hardcore-ar.patch
)
WORK="${WORKBASE}"/linux-"${PV}"
@@ -58,22 +60,32 @@ pkg_setup() {
src_prepare() {
default
- edo emake CC="${CC}" HOSTCC="${CC}" mrproper
+
+ src_prepare_params={
+ CC="${CC}"
+ HOSTCC="${CC}"
+ )
+
+ edo emake \
+ "${src_prepare_params[@]}" \
+ mrproper
+
edo sed -ri "s|^(EXTRAVERSION =).*|\1 -${EXTRAVERSION}|" Makefile
edo cp "${FILES}"/"${EXTRAVERSION}"-amd64.config .config
}
src_compile() {
- params=(
+ src_compile_params=(
CC="${CC}"
HOSTCC="${CC}"
LD="${LD}"
HOSTLD="${LD}"
AR="${AR}"
+ OBJCOPY="${OBJCOPY}"
)
edo emake \
- "${params[@]}" \
+ "${src_compile_params[@]}" \
prepare modules_prepare bzImage modules
}
@@ -103,31 +115,31 @@ src_install() {
_grub2_update_grubcfg() {
if [ -x $(which grub-mkconfig) ]; then
- grub-mkconfig -o "${ROOT}"boot/grub/grub.cfg
+ edo grub-mkconfig -o "${ROOT}"boot/grub/grub.cfg
fi
}
_dracut_initrd_create() {
if [ -x $(which dracut) ]; then
- dracut -N -f --kver="${KV_FULL}" "${ROOT}"boot/initrd-"${KV_FULL}"
+ edo dracut -N -f --kver="${KV_FULL}" "${ROOT}"boot/initrd-"${KV_FULL}"
fi
}
_dracut_initrd_delete() {
- rm -rf "${ROOT}"boot/initrd-"${KV_FULL}"
+ edo rm -rf "${ROOT}"boot/initrd-"${KV_FULL}"
}
_dkms_modules_delete() {
if [ -x $(which dkms) ] ; then
export local DKMSMOD
for DKMSMOD in $(dkms status | cut -d " " -f1,2 | sed -e 's/,//g' | sed -e 's/ /\//g' | sed -e 's/://g') ; do
- dkms remove "${DKMSMOD}" -k "${KV_FULL}"
+ edo dkms remove "${DKMSMOD}" -k "${KV_FULL}"
done
fi
}
_kernel_modules_delete() {
- rm -rf "${ROOT}"lib/modules/"${KV_FULL}"
+ edo rm -rf "${ROOT}"lib/modules/"${KV_FULL}"
}
pkg_postinst() {