From 2fe60f1ffac3fa280d957d5ef592941c370a6f7e Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sun, 19 Jun 2022 09:48:17 +0200 Subject: [PATCH 1/2] Remove custom ipq40xx if platform is not rutx --- build.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 6555b9e0..44f3fad4 100755 --- a/build.sh +++ b/build.sh @@ -136,7 +136,15 @@ rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/mediatek/patches-5.4" rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/package/boot/uboot-mediatek" rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/package/boot/arm-trusted-firmware-mediatek" rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/tools/firmware-utils" -cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source" +if [ "$OMR_TARGET" != "rutx" ]; then + # There is many customization to support rutx and this seems to break other ipq40xx, so dirty workaround for now + mv "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old" + cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source" + rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" + mv "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" +else + cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source" +fi cat >> "$OMR_TARGET/${OMR_KERNEL}/source/package/base-files/files/etc/banner" < Date: Sun, 19 Jun 2022 09:48:42 +0200 Subject: [PATCH 2/2] Add some missing kernel config --- root/target/linux/generic/config-5.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/root/target/linux/generic/config-5.4 b/root/target/linux/generic/config-5.4 index c9b968d2..0c7f48dd 100644 --- a/root/target/linux/generic/config-5.4 +++ b/root/target/linux/generic/config-5.4 @@ -1888,6 +1888,7 @@ CONFIG_GPIO_SYSFS=y CONFIG_HARDENED_USERCOPY=y # CONFIG_HARDENED_USERCOPY_FALLBACK is not set # CONFIG_HARDENED_USERCOPY_PAGESPAN is not set +CONFIG_HARDEN_BRANCH_HISTORY=y CONFIG_HARDEN_EL2_VECTORS=y # CONFIG_HARDLOCKUP_DETECTOR is not set # CONFIG_HAVE_AOUT is not set @@ -3082,6 +3083,7 @@ CONFIG_MISC_FILESYSTEMS=y # CONFIG_MISDN_NETJET is not set # CONFIG_MISDN_SPEEDFAX is not set # CONFIG_MISDN_W6692 is not set +CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y # CONFIG_MKISS is not set # CONFIG_MLX4_CORE is not set # CONFIG_MLX4_EN is not set