diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2014-08-22 22:14:51 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2014-08-22 22:14:51 -0300 |
commit | f9c8adc1f16c2d9e018cacc688101c30b9dd8adb (patch) | |
tree | dfab475a9b35946c3637ad3677349a7c1a9b7137 | |
parent | c1879f6ed8abf3ae9acdcf48b45d6ddafffd4674 (diff) | |
download | abslibre-f9c8adc1f16c2d9e018cacc688101c30b9dd8adb.tar.gz abslibre-f9c8adc1f16c2d9e018cacc688101c30b9dd8adb.tar.bz2 abslibre-f9c8adc1f16c2d9e018cacc688101c30b9dd8adb.zip |
linux-libre*: Remove mips64el hacks
-rw-r--r-- | kernels/linux-libre-lts-knock/Kbuild | 19 | ||||
-rw-r--r-- | kernels/linux-libre-lts-knock/Kbuild.platforms | 6 | ||||
-rw-r--r-- | kernels/linux-libre-lts-knock/PKGBUILD | 104 | ||||
-rw-r--r-- | kernels/linux-libre-lts-knock/gnewsense-binutils-flag.patch | 28 | ||||
-rw-r--r-- | kernels/linux-libre-lts-knock/linux.install | 12 | ||||
-rw-r--r-- | kernels/linux-libre-pae/PKGBUILD | 2 | ||||
-rw-r--r-- | kernels/linux-libre-rt/Kbuild | 19 | ||||
-rw-r--r-- | kernels/linux-libre-rt/Kbuild.platforms | 6 | ||||
-rw-r--r-- | kernels/linux-libre-rt/PKGBUILD | 91 | ||||
-rw-r--r-- | kernels/linux-libre-rt/gnewsense-binutils-flag.patch | 28 | ||||
-rw-r--r-- | kernels/linux-libre-rt/linux.install | 12 | ||||
-rw-r--r-- | kernels/linux-libre-xen/PKGBUILD | 2 | ||||
-rw-r--r-- | libre/linux-libre-grsec/PKGBUILD | 12 | ||||
-rw-r--r-- | libre/linux-libre-grsec/gnewsense-binutils-flag.patch | 28 | ||||
-rw-r--r-- | libre/linux-libre-lts/PKGBUILD | 12 | ||||
-rw-r--r-- | libre/linux-libre-lts/gnewsense-binutils-flag.patch | 28 | ||||
-rw-r--r-- | libre/linux-libre/PKGBUILD | 14 | ||||
-rw-r--r-- | libre/linux-libre/gnewsense-binutils-flag.patch | 28 |
18 files changed, 77 insertions, 374 deletions
diff --git a/kernels/linux-libre-lts-knock/Kbuild b/kernels/linux-libre-lts-knock/Kbuild deleted file mode 100644 index 8a9d7dceb..000000000 --- a/kernels/linux-libre-lts-knock/Kbuild +++ /dev/null @@ -1,19 +0,0 @@ -# Fail on warnings - also for files referenced in subdirs -# -Werror can be disabled for specific files using: -# CFLAGS_<file.o> := -Wno-error -subdir-ccflags-y := -Wno-error - -# platform specific definitions -include arch/mips/Kbuild.platforms -obj-y := $(platform-y) - -# make clean traverses $(obj-) without having included .config, so -# everything ends up here -obj- := $(platform-) - -# mips object files -# The object files are linked as core-y files would be linked - -obj-y += kernel/ -obj-y += mm/ -obj-y += math-emu/ diff --git a/kernels/linux-libre-lts-knock/Kbuild.platforms b/kernels/linux-libre-lts-knock/Kbuild.platforms deleted file mode 100644 index 90a226888..000000000 --- a/kernels/linux-libre-lts-knock/Kbuild.platforms +++ /dev/null @@ -1,6 +0,0 @@ -# All platforms listed in alphabetic order - -platforms += loongson - -# include the platform specific files -include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platforms)) diff --git a/kernels/linux-libre-lts-knock/PKGBUILD b/kernels/linux-libre-lts-knock/PKGBUILD index 4868b72b0..20d9dbfbe 100644 --- a/kernels/linux-libre-lts-knock/PKGBUILD +++ b/kernels/linux-libre-lts-knock/PKGBUILD @@ -11,7 +11,6 @@ pkgbase=linux-libre-lts-knock # Build stock -lts-knock kernel _pkgbasever=3.10-gnu _pkgver=3.10.53-gnu -_lxopkgver=3.10.53-gnu # nearly always the same as _pkgver _knockpatchver=3.10 _replaces=('kernel26%' 'kernel26-libre%' 'linux%' 'linux-libre%-kmod-alx') # '%' gets replaced with _kernelname @@ -28,38 +27,36 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz" "http://gnunet.org/sites/default/files/tcp_stealth_${_knockpatchver}.diff" # the main kernel config files - 'config.i686' 'config.x86_64' + 'config.i686' 'config.x86_64' 'config.mips64el' # standard config files for mkinitcpio ramdisk 'linux.preset' - 'Kbuild' - 'Kbuild.platforms' 'logo_linux_'{clut224.ppm,vga16.ppm,mono.pbm} 'change-default-console-loglevel.patch' 'criu-no-expert.patch' - "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}_0loongsonlibre_mipsel.tar.xz") + # loongson-community patch: http://linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/ + '3.10.50-33c9ab76eb-loongson-community.patch') md5sums=('d562fd52580a3b6b18b6eeb5921d1d5c' '4840f0db6af66cbce923b1043971c256' '26380d6f05471ef8e065a77d87588009' '25ad0606de251a5734f4535c61452a56' '158cb922d9b43028f6c45c696e773915' + '' 'eb14dcfd80c00852ef81ded6e826826a' - '2967cecc3af9f954ccc822fd63dca6ff' - '8267264d9a8966e57fdacd1fa1fc65c4' '071d4939e9ef4256e4c027ef3c864903' '2ae9ef17f45b39ff9e6e172c0c97d263' '96c2ae40e3b1cdd90fe7e6dba8078922' 'f3def2cefdcbb954c21d8505d23cc83c' 'd50c1ac47394e9aec637002ef3392bd1' - '200668954d1cee93fb649196e3df8bde') -if [ "$CARCH" != "mips64el" ]; then - # don't use the Loongson-specific patches on non-mips64el arches. - unset source[${#source[@]}-1] - unset md5sums[${#md5sums[@]}-1] -fi + '') _kernelname=${pkgbase#linux-libre} _replaces=("${_replaces[@]/\%/${_kernelname}}") +case "$CARCH" in + i686|x86_64) KARCH=x86;; + mips64el) KARCH=mips;; +esac + prepare() { cd "${srcdir}/${_srcname}" @@ -87,27 +84,10 @@ prepare() { # patch from fedora patch -Np1 -i "${srcdir}/criu-no-expert.patch" - if [ "$CARCH" == "mips64el" ]; then - sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre-lts-knock|" Makefile - sed -r "s|^( SUBLEVEL = ).*|\1$_sublevel|" \ - < "${srcdir}/lxo-config.patch" > lxo-config.patch - msg2 "Adding loongson-community patches" - patch -Np1 -i ${srcdir}/${_basekernel}*-*-loongson-community.patch - patch -Np0 -i lxo-config.patch - - # ensure N32, add localversion, remove uevent helper as per - # https://git.kernel.org/?p=linux/hotplug/udev.git;a=blob_plain;f=README - # and make USB storage support builtin (e.g. for booting from USB - # disks without slowly loading an initramfs) - sed -ri \ - -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \ - -e "s|CONFIG_UEVENT_HELPER_PATH=.*|CONFIG_UEVENT_HELPER_PATH=\"\"|g" \ - -e "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_localversionname}\"|g" \ - -e "s;(CONFIG_USB(_COMMON|_EHCI_HCD|_OHCI_HCD|_STORAGE.*|_UAS)?)=.*;\1=y;g" \ - ./.config - else - cat "${srcdir}/config.${CARCH}" > ./.config # simpler - fi + # Adding loongson-community patch + patch -p1 -i ${srcdir}/3.10.50-33c9ab76eb-loongson-community.patch + + cat "${srcdir}/config.${CARCH}" > ./.config if [ "${_kernelname}" != "" ]; then sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config @@ -139,10 +119,12 @@ build() { yes "" | make config >/dev/null # save configuration for later reuse - if [ "${CARCH}" = "x86_64" ]; then - cat .config > "${startdir}/config.x86_64.last" - else + if [ "${CARCH}" = "i686" ]; then cat .config > "${startdir}/config.i686.last" + elif [ "${CARCH}" = "x86_64" ]; then + cat .config > "${startdir}/config.x86_64.last" + elif [ "${CARCH}" = "mips64el" ]; then + cat .config > "${startdir}/config.mips64el.last" fi #################### @@ -152,16 +134,7 @@ build() { #################### # build! - if [ "$CARCH" == "mips64el" ]; then - # The build system passes it directly to linker, disable to avoid - # having unknown -Wl,... options. - export LDFLAGS="" - # bzImage is arch-specific and not supported on mips; vmlinux is - # useful for oprofile. - make ${MAKEFLAGS} LOCALVERSION= vmlinux vmlinuz modules - else - make ${MAKEFLAGS} LOCALVERSION= bzImage modules - fi + make ${MAKEFLAGS} LOCALVERSION= bzImage modules } _package() { @@ -174,16 +147,8 @@ _package() { replaces=( "${_replaces[@]}") backup=("etc/mkinitcpio.d/${pkgbase}.preset") install=linux.install - if [ "$CARCH" = "mips64el" ]; then - optdepends+=('mkinitcpio: to make the initramfs (needs reinstall of this package)') - conflicts+=('mkinitcpio<0.7') - else - depends+=('mkinitcpio>=0.7') - fi cd "${srcdir}/${_srcname} - KARCH=x86 - [ $CARCH = "mips64el" ] && KARCH=mips # get kernel version _kernver="$(make LOCALVERSION= kernelrelease)" @@ -193,12 +158,7 @@ _package() { mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install - if [ "$CARCH" == "mips64el" ]; then - cp vmlinuz "${pkgdir}/boot/vmlinuz-${pkgbase}" - cp vmlinux "${pkgdir}/boot/vmlinux-${pkgbase}" - else - cp arch/${KARCH}/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" - fi + cp arch/${KARCH}/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" # add vmlinux install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux" @@ -220,12 +180,6 @@ _package() { -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - # mkinitcpio 0.7 relies on bzImage to find the kernel version - if [ "$CARCH" == "mips64el" ]; then - sed -e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - fi - # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} # remove the firmware @@ -251,9 +205,6 @@ _package-headers() { conflicts=("${_replaces[@]/%/-headers}") replaces=( "${_replaces[@]/%/-headers}") - KARCH=x86 - [ $CARCH = "mips64el" ] && KARCH=mips - # in case of repackaging this is empty if [ -z "${_kernver}" ]; then cd "${srcdir}/linux-${_basekernel}" @@ -288,12 +239,6 @@ _package-headers() { cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}" cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}" - if [ "$CARCH" = "mips64el" ]; then - cp arch/${KARCH}/Kbuild "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/" - cp -a arch/${KARCH}/loongson "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/" - cp ${srcdir}/Kbuild.platforms "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/" - fi - # fix permissions on scripts dir chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts" mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions" @@ -397,12 +342,7 @@ _package-headers() { done # remove unneeded architectures - rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} - if [ "$CARCH" = "mips64el" ]; then - rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/x86 - else - rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/mips - fi + find "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch -mindepth 1 -maxdepth 1 -type d -not -name "$KARCH" -exec rm -rf {} + } _package-docs() { diff --git a/kernels/linux-libre-lts-knock/gnewsense-binutils-flag.patch b/kernels/linux-libre-lts-knock/gnewsense-binutils-flag.patch deleted file mode 100644 index 5f2d44f99..000000000 --- a/kernels/linux-libre-lts-knock/gnewsense-binutils-flag.patch +++ /dev/null @@ -1,28 +0,0 @@ -Our binutils somehow ended up with a -mfix-gs2f-kernel, rather than --mfix-ls2f-kernel. Cope with it. - -Index: arch/mips/loongson/Platform -=================================================================== ---- arch/mips/loongson/Platform.orig 2010-10-25 19:09:49.000000000 +0000 -+++ arch/mips/loongson/Platform 2010-10-25 19:10:44.000000000 +0000 -@@ -10,6 +10,12 @@ - $(call cc-option,-march=loongson2f,-march=r4600) - # Enable the workarounds for Loongson2f - ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS -+ ifneq ($(call as-option,-Wa$(comma)-mfix-gs2f-kernel,),) -+ cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ ifneq ($(CONFIG_CPU_NOP_WORKAROUNDS),$(CONFIG_CPU_JUMP_WORKAROUNDS)) -+ cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ endif -+ else - ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),) - $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop) - else -@@ -20,6 +26,7 @@ - else - cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump - endif -+ endif - endif - - # diff --git a/kernels/linux-libre-lts-knock/linux.install b/kernels/linux-libre-lts-knock/linux.install index 8d5658aab..c0ee63a83 100644 --- a/kernels/linux-libre-lts-knock/linux.install +++ b/kernels/linux-libre-lts-knock/linux.install @@ -8,10 +8,8 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if command -v mkinitcpio 2>&1 > /dev/null; then - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} - fi + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} } post_upgrade() { @@ -22,10 +20,8 @@ post_upgrade() { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if command -v mkinitcpio 2>&1 > /dev/null; then - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} - fi + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} } post_remove() { diff --git a/kernels/linux-libre-pae/PKGBUILD b/kernels/linux-libre-pae/PKGBUILD index e742971db..2fd037ac3 100644 --- a/kernels/linux-libre-pae/PKGBUILD +++ b/kernels/linux-libre-pae/PKGBUILD @@ -281,7 +281,7 @@ _package-headers() { done # remove unneeded architectures - rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} + find "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch -mindepth 1 -maxdepth 1 -type d -not -name "x86" -exec rm -rf {} + } _package-docs() { diff --git a/kernels/linux-libre-rt/Kbuild b/kernels/linux-libre-rt/Kbuild deleted file mode 100644 index 8a9d7dceb..000000000 --- a/kernels/linux-libre-rt/Kbuild +++ /dev/null @@ -1,19 +0,0 @@ -# Fail on warnings - also for files referenced in subdirs -# -Werror can be disabled for specific files using: -# CFLAGS_<file.o> := -Wno-error -subdir-ccflags-y := -Wno-error - -# platform specific definitions -include arch/mips/Kbuild.platforms -obj-y := $(platform-y) - -# make clean traverses $(obj-) without having included .config, so -# everything ends up here -obj- := $(platform-) - -# mips object files -# The object files are linked as core-y files would be linked - -obj-y += kernel/ -obj-y += mm/ -obj-y += math-emu/ diff --git a/kernels/linux-libre-rt/Kbuild.platforms b/kernels/linux-libre-rt/Kbuild.platforms deleted file mode 100644 index 90a226888..000000000 --- a/kernels/linux-libre-rt/Kbuild.platforms +++ /dev/null @@ -1,6 +0,0 @@ -# All platforms listed in alphabetic order - -platforms += loongson - -# include the platform specific files -include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platforms)) diff --git a/kernels/linux-libre-rt/PKGBUILD b/kernels/linux-libre-rt/PKGBUILD index 3148d0048..f0c6c4b31 100644 --- a/kernels/linux-libre-rt/PKGBUILD +++ b/kernels/linux-libre-rt/PKGBUILD @@ -14,7 +14,6 @@ pkgbase=linux-libre-rt # Build stock -rt kernel _pkgbasever=3.14-gnu _pkgver=3.14.12-gnu -_lxopkgver=3.14.14-gnu # nearly always the same as _pkgver _rtbasever=3.14 _rtver=3.14.12 _rtpatchver=rt9 @@ -33,11 +32,9 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasekernel} "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasekernel}-${_pkgver}.xz" "http://www.kernel.org/pub/linux/kernel/projects/rt/${_rtbasever}/patch-${_rtver}-${_rtpatchver}.patch.xz" # the main kernel config files - 'config.i686' 'config.x86_64' + 'config.i686' 'config.x86_64' 'config.mips64el' # standard config files for mkinitcpio ramdisk 'linux.preset' - 'Kbuild' - 'Kbuild.platforms' 'logo_linux_'{clut224.ppm,vga16.ppm,mono.pbm} 'change-default-console-loglevel.patch' '0001-Bluetooth-allocate-static-minor-for-vhci.patch' @@ -45,15 +42,15 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasekernel} '0003-module-remove-MODULE_GENERIC_TABLE.patch' '0006-genksyms-fix-typeof-handling.patch' 'revert_timers-dont_raise_softirq_unconditionally_and_fixes.patch' - "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}_0loongsonlibre_mipsel.tar.xz") + # loongson-community patch: http://linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/ + '3.14.14-a410a5e2b7-loongson-community.patch') sha256sums=('477555c709b9407fe37dbd70d3331ff9dde1f9d874aba2741f138d07ae6f281b' 'bdb59c597c883cc0f78cebccca5652e79b63f30e1d497e0560737ba66a48ae27' 'aedc16bf897b0a1b0789158afad9ffed92be30eaedf8fe2f27cad659673dc93e' '84a7e8d8ffb308f74e3e0bdfec81ac918ae90a6cad579ed5452481b5f5ceb003' '23e14dbfc4f4f2991ed532ce07a856fa168ff74404d0c4e7f736147c8ebf41a3' + '' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' - 'c5451d5e1eafc4f8d28b1a2958ec3102c124433a414a86450fc32058e004156b' - '55bf07738a3286168a7929ae16dbca29defd14e77b9d24c487ae4c3d12bb9eb9' '074b67818582874146c389c029bc43648d145891a27e47aa2c5c42d3571f0264' '2e87a8ec1cc0c91938cac24992d8a3d4362b3e9d939767e4c9d2ec8e6d969d53' 'f67f60a30bcf2e9a2ba88ad97cace308da7a7f94919bb95c3dc030f5885a8015' @@ -63,16 +60,16 @@ sha256sums=('477555c709b9407fe37dbd70d3331ff9dde1f9d874aba2741f138d07ae6f281b' '65d58f63215ee3c5f9c4fc6bce36fc5311a6c7dbdbe1ad29de40647b47ff9c0d' 'cf2e7a2d00787f754028e7459688c2755a406e632ce48b60952fa4ff7ed6f4b7' 'b0107c64c582f7c6fa2e0c7c32a5f944c644f53b5df04667d487731b3c3b4060' - '727c9328414e0b18478144b700ddb9507269aff1af0130e04f091189efd4ccb8') -if [ "$CARCH" != "mips64el" ]; then - # don't use the Loongson-specific patches on non-mips64el arches. - unset source[${#source[@]}-1] - unset sha256sums[${#sha256sums[@]}-1] -fi + '') _kernelname=${pkgbase#linux-libre} _replaces=("${_replaces[@]/\%/${_kernelname}}") +case "$CARCH" in + i686|x86_64) KARCH=x86;; + mips64el) KARCH=mips;; +esac + prepare() { cd "${srcdir}/${_srcname}" @@ -110,27 +107,10 @@ prepare() { # http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dc53324060f324e8af6867f57bf4891c13c6ef18 patch -p1 -i "${srcdir}/0006-genksyms-fix-typeof-handling.patch" - if [ "$CARCH" == "mips64el" ]; then - sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre-rt|" Makefile - sed -r "s|^( SUBLEVEL = ).*|\1$_sublevel|" \ - < "${srcdir}/lxo-config.patch" > lxo-config.patch - msg2 "Adding loongson-community patches" - patch -p1 -i ${srcdir}/${_basekernel}*-*-loongson-community.patch - patch -p0 -i lxo-config.patch - - # ensure N32, add localversion, remove uevent helper as per - # https://git.kernel.org/?p=linux/hotplug/udev.git;a=blob_plain;f=README - # and make USB storage support builtin (e.g. for booting from USB - # disks without slowly loading an initramfs) - sed -ri \ - -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \ - -e "s|CONFIG_UEVENT_HELPER_PATH=.*|CONFIG_UEVENT_HELPER_PATH=\"\"|g" \ - -e "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_localversionname}\"|g" \ - -e "s;(CONFIG_USB(_COMMON|_EHCI_HCD|_OHCI_HCD|_STORAGE.*|_UAS)?)=.*;\1=y;g" \ - ./.config - else - cat "${srcdir}/config.${CARCH}" > ./.config # simpler - fi + # Adding loongson-community patch + patch -p1 -i ${srcdir}/3.14.14-a410a5e2b7-loongson-community.patch + + cat "${srcdir}/config.${CARCH}" > ./.config if [ "${_kernelname}" != "" ]; then sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config @@ -161,16 +141,7 @@ prepare() { build() { cd "${srcdir}/${_srcname}" - if [ "$CARCH" == "mips64el" ]; then - # The build system passes it directly to linker, disable to avoid - # having unknown -Wl,... options. - export LDFLAGS="" - # bzImage is arch-specific and not supported on mips; vmlinux is - # useful for oprofile. - make ${MAKEFLAGS} LOCALVERSION= vmlinux vmlinuz modules - else - make ${MAKEFLAGS} LOCALVERSION= bzImage modules - fi + make ${MAKEFLAGS} LOCALVERSION= bzImage modules } _package() { @@ -183,18 +154,9 @@ _package() { replaces=( "${_replaces[@]}") backup=("etc/mkinitcpio.d/${pkgbase}.preset") install=linux.install - if [ "$CARCH" = "mips64el" ]; then - optdepends+=('mkinitcpio: to make the initramfs (needs reinstall of this package)') - conflicts+=('mkinitcpio<0.7') - else - depends+=('mkinitcpio>=0.7') - fi cd "${srcdir}/${_srcname}" - KARCH=x86 - [ $CARCH = "mips64el" ] && KARCH=mips - # get kernel version _kernver="$(make LOCALVERSION= kernelrelease)" _basekernel=${_kernver%%-*} @@ -203,12 +165,7 @@ _package() { mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install - if [ "$CARCH" == "mips64el" ]; then - cp vmlinuz "${pkgdir}/boot/vmlinuz-${pkgbase}" - cp vmlinux "${pkgdir}/boot/vmlinux-${pkgbase}" - else - cp arch/${KARCH}/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" - fi + cp arch/${KARCH}/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" # set correct depmod command for install cp -f "${startdir}/${install}" "${startdir}/${install}.pkg" @@ -227,12 +184,6 @@ _package() { -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - # mkinitcpio 0.7 relies on bzImage to find the kernel version - if [ "$CARCH" == "mips64el" ]; then - sed -e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - fi - # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} # remove the firmware @@ -262,9 +213,6 @@ _package-headers() { conflicts=("${_replaces[@]/%/-headers}") replaces=( "${_replaces[@]/%/-headers}") - KARCH=x86 - [ $CARCH = "mips64el" ] && KARCH=mips - # in case of repackaging this is empty if [ -z "${_kernver}" ]; then cd "${srcdir}/linux-${_basekernel}" @@ -387,12 +335,7 @@ _package-headers() { done # remove unneeded architectures - rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} - if [ "$CARCH" = "mips64el" ]; then - rm -rf ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/x86 - else - rm -rf ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/mips - fi + find "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch -mindepth 1 -maxdepth 1 -type d -not -name "$KARCH" -exec rm -rf {} + } _package-docs() { diff --git a/kernels/linux-libre-rt/gnewsense-binutils-flag.patch b/kernels/linux-libre-rt/gnewsense-binutils-flag.patch deleted file mode 100644 index 5f2d44f99..000000000 --- a/kernels/linux-libre-rt/gnewsense-binutils-flag.patch +++ /dev/null @@ -1,28 +0,0 @@ -Our binutils somehow ended up with a -mfix-gs2f-kernel, rather than --mfix-ls2f-kernel. Cope with it. - -Index: arch/mips/loongson/Platform -=================================================================== ---- arch/mips/loongson/Platform.orig 2010-10-25 19:09:49.000000000 +0000 -+++ arch/mips/loongson/Platform 2010-10-25 19:10:44.000000000 +0000 -@@ -10,6 +10,12 @@ - $(call cc-option,-march=loongson2f,-march=r4600) - # Enable the workarounds for Loongson2f - ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS -+ ifneq ($(call as-option,-Wa$(comma)-mfix-gs2f-kernel,),) -+ cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ ifneq ($(CONFIG_CPU_NOP_WORKAROUNDS),$(CONFIG_CPU_JUMP_WORKAROUNDS)) -+ cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ endif -+ else - ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),) - $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop) - else -@@ -20,6 +26,7 @@ - else - cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump - endif -+ endif - endif - - # diff --git a/kernels/linux-libre-rt/linux.install b/kernels/linux-libre-rt/linux.install index 34be5215e..32514d892 100644 --- a/kernels/linux-libre-rt/linux.install +++ b/kernels/linux-libre-rt/linux.install @@ -8,10 +8,8 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if command -v mkinitcpio 2>&1 > /dev/null; then - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} - fi + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} } post_upgrade() { @@ -22,10 +20,8 @@ post_upgrade() { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if command -v mkinitcpio 2>&1 > /dev/null; then - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} - fi + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} if [ $(vercmp $2 3.13) -lt 0 ]; then echo ">>> WARNING: AT keyboard support is no longer built into the kernel." diff --git a/kernels/linux-libre-xen/PKGBUILD b/kernels/linux-libre-xen/PKGBUILD index 710e431cd..b1b9e26ff 100644 --- a/kernels/linux-libre-xen/PKGBUILD +++ b/kernels/linux-libre-xen/PKGBUILD @@ -281,7 +281,7 @@ _package-headers() { done # remove unneeded architectures - rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} + find "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch -mindepth 1 -maxdepth 1 -type d -not -name "x86" -exec rm -rf {} + } _package-docs() { diff --git a/libre/linux-libre-grsec/PKGBUILD b/libre/linux-libre-grsec/PKGBUILD index 91e6d6e24..a6ab2b46b 100644 --- a/libre/linux-libre-grsec/PKGBUILD +++ b/libre/linux-libre-grsec/PKGBUILD @@ -32,23 +32,26 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li "https://grsecurity.net/test/grsecurity-${_grsecver}-${_pkgver%-*}-${_timestamp}.patch" "https://grsecurity.net/test/grsecurity-${_grsecver}-${_pkgver%-*}-${_timestamp}.patch.sig" # the main kernel config files - 'config.i686' 'config.x86_64' + 'config.i686' 'config.x86_64' 'config.mips64el' # standard config files for mkinitcpio ramdisk 'linux.preset' 'logo_linux_'{clut224.ppm,vga16.ppm,mono.pbm} 'change-default-console-loglevel.patch' - ) + # loongson-community patch: http://linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/ + '3.15.7-2704e67ebc-loongson-community.patch') sha256sums=('93450dc189131b6a4de862f35c5087a58cc7bae1c24caa535d2357cc3301b688' 'c58b09c71666a79f5dcf83d05aaa5d64ab3fb83782a7dadabdc1a4e29c5b09ab' '13f4ca6702a9985c68e045b510552f5f122938e1ed3264990aaae82a4f64d67a' 'SKIP' 'd47cc4487a687782d4010c81002a48ee0171981863ab38b9f656d6e780d4a297' 'b4e55b41c014df808daad8105e4cbbf684df94641c213d2d9e6fc87e2a4ea59f' + '' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' '074b67818582874146c389c029bc43648d145891a27e47aa2c5c42d3571f0264' '2e87a8ec1cc0c91938cac24992d8a3d4362b3e9d939767e4c9d2ec8e6d969d53' 'f67f60a30bcf2e9a2ba88ad97cace308da7a7f94919bb95c3dc030f5885a8015' - 'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182') + 'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182' + '') _kernelname=${pkgbase#linux-libre} _replaces=("${_replaces[@]/\%/${_kernelname}}") @@ -82,6 +85,9 @@ prepare() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -p1 -i "${srcdir}/change-default-console-loglevel.patch" + # Adding loongson-community patch + patch -p1 -i ${srcdir}/3.15.7-2704e67ebc-loongson-community.patch + cat "${srcdir}/config.${CARCH}" > ./.config if [ "${_kernelname}" != "" ]; then diff --git a/libre/linux-libre-grsec/gnewsense-binutils-flag.patch b/libre/linux-libre-grsec/gnewsense-binutils-flag.patch deleted file mode 100644 index 5f2d44f99..000000000 --- a/libre/linux-libre-grsec/gnewsense-binutils-flag.patch +++ /dev/null @@ -1,28 +0,0 @@ -Our binutils somehow ended up with a -mfix-gs2f-kernel, rather than --mfix-ls2f-kernel. Cope with it. - -Index: arch/mips/loongson/Platform -=================================================================== ---- arch/mips/loongson/Platform.orig 2010-10-25 19:09:49.000000000 +0000 -+++ arch/mips/loongson/Platform 2010-10-25 19:10:44.000000000 +0000 -@@ -10,6 +10,12 @@ - $(call cc-option,-march=loongson2f,-march=r4600) - # Enable the workarounds for Loongson2f - ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS -+ ifneq ($(call as-option,-Wa$(comma)-mfix-gs2f-kernel,),) -+ cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ ifneq ($(CONFIG_CPU_NOP_WORKAROUNDS),$(CONFIG_CPU_JUMP_WORKAROUNDS)) -+ cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ endif -+ else - ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),) - $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop) - else -@@ -20,6 +26,7 @@ - else - cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump - endif -+ endif - endif - - # diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD index c92fc46f1..8858fce8e 100644 --- a/libre/linux-libre-lts/PKGBUILD +++ b/libre/linux-libre-lts/PKGBUILD @@ -25,7 +25,7 @@ options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz" "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz" # the main kernel config files - 'config.i686' 'config.x86_64' + 'config.i686' 'config.x86_64' 'config.mips64el' # standard config files for mkinitcpio ramdisk 'linux.preset' 'logo_linux_'{clut224.ppm,vga16.ppm,mono.pbm} @@ -34,12 +34,14 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li '0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch' '0003-module-remove-MODULE_GENERIC_TABLE.patch' '0006-genksyms-fix-typeof-handling.patch' - ) + # loongson-community patch: http://linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/ + '3.14.14-a410a5e2b7-loongson-community.patch') sha256sums=('477555c709b9407fe37dbd70d3331ff9dde1f9d874aba2741f138d07ae6f281b' 'f747eeb343d5105bcd1a1b02ce391c746bccbce62e58394b674fc553be844ccc' '9e7dcc90121995024632476d50286b62dbb73da20a7970653a2d72a0a98406c0' '35f283689c4f8b346bc05ac57c3cce50a61a1d0c11a665fc1abf519bb3f1beea' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' + '' '074b67818582874146c389c029bc43648d145891a27e47aa2c5c42d3571f0264' '2e87a8ec1cc0c91938cac24992d8a3d4362b3e9d939767e4c9d2ec8e6d969d53' 'f67f60a30bcf2e9a2ba88ad97cace308da7a7f94919bb95c3dc030f5885a8015' @@ -47,7 +49,8 @@ sha256sums=('477555c709b9407fe37dbd70d3331ff9dde1f9d874aba2741f138d07ae6f281b' '6d72e14552df59e6310f16c176806c408355951724cd5b48a47bf01591b8be02' '52dec83a8805a8642d74d764494acda863e0aa23e3d249e80d4b457e20a3fd29' '65d58f63215ee3c5f9c4fc6bce36fc5311a6c7dbdbe1ad29de40647b47ff9c0d' - 'cf2e7a2d00787f754028e7459688c2755a406e632ce48b60952fa4ff7ed6f4b7') + 'cf2e7a2d00787f754028e7459688c2755a406e632ce48b60952fa4ff7ed6f4b7' + '') _kernelname=${pkgbase#linux-libre} _replaces=("${_replaces[@]/\%/${_kernelname}}") @@ -88,6 +91,9 @@ prepare() { # http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dc53324060f324e8af6867f57bf4891c13c6ef18 patch -p1 -i "${srcdir}/0006-genksyms-fix-typeof-handling.patch" + # Adding loongson-community patch + patch -p1 -i ${srcdir}/3.14.14-a410a5e2b7-loongson-community.patch + cat "${srcdir}/config.${CARCH}" > ./.config if [ "${_kernelname}" != "" ]; then diff --git a/libre/linux-libre-lts/gnewsense-binutils-flag.patch b/libre/linux-libre-lts/gnewsense-binutils-flag.patch deleted file mode 100644 index 5f2d44f99..000000000 --- a/libre/linux-libre-lts/gnewsense-binutils-flag.patch +++ /dev/null @@ -1,28 +0,0 @@ -Our binutils somehow ended up with a -mfix-gs2f-kernel, rather than --mfix-ls2f-kernel. Cope with it. - -Index: arch/mips/loongson/Platform -=================================================================== ---- arch/mips/loongson/Platform.orig 2010-10-25 19:09:49.000000000 +0000 -+++ arch/mips/loongson/Platform 2010-10-25 19:10:44.000000000 +0000 -@@ -10,6 +10,12 @@ - $(call cc-option,-march=loongson2f,-march=r4600) - # Enable the workarounds for Loongson2f - ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS -+ ifneq ($(call as-option,-Wa$(comma)-mfix-gs2f-kernel,),) -+ cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ ifneq ($(CONFIG_CPU_NOP_WORKAROUNDS),$(CONFIG_CPU_JUMP_WORKAROUNDS)) -+ cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ endif -+ else - ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),) - $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop) - else -@@ -20,6 +26,7 @@ - else - cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump - endif -+ endif - endif - - # diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index a2477e7d2..486038263 100644 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -25,23 +25,26 @@ options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz" "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz" # the main kernel config files - 'config.i686' 'config.x86_64' + 'config.i686' 'config.x86_64' 'config.mips64el' # standard config files for mkinitcpio ramdisk 'linux.preset' 'logo_linux_'{clut224.ppm,vga16.ppm,mono.pbm} 'change-default-console-loglevel.patch' 'compal-laptop-hwmon-fix.patch' - ) + # loongson-community patch: http://linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/ + '3.16-7981337ad0-loongson-community.patch') sha256sums=('9c2a524c901febe0f0138f702bfdeb52d6f79f22c1fdbabaa37580bc70f16218' '3bbc78694d76b12b6229799d7c4daf5215b9dd731908d96b03603aceb54ad5c7' '65739ffbc01d1ecea8328130b14e0258aa036e37ede2f0b1aa9b8efa2ad68a66' '0d827a89f8955e1f39b6a6d10887d1ca7a46b42cc4417bf823eb9f260c26f660' + '' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' '074b67818582874146c389c029bc43648d145891a27e47aa2c5c42d3571f0264' '2e87a8ec1cc0c91938cac24992d8a3d4362b3e9d939767e4c9d2ec8e6d969d53' 'f67f60a30bcf2e9a2ba88ad97cace308da7a7f94919bb95c3dc030f5885a8015' '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' - 'f36f61a0a72bcb0a9c04264343503bfbf927c9ea0db819e66734a3933b060588') + 'f36f61a0a72bcb0a9c04264343503bfbf927c9ea0db819e66734a3933b060588' + '') _kernelname=${pkgbase#linux-libre} _replaces=("${_replaces[@]/\%/${_kernelname}}") @@ -74,9 +77,12 @@ prepare() { # #41458 fix hwmon for compal-laptop module patch -p1 -i "${srcdir}/compal-laptop-hwmon-fix.patch" + # Adding loongson-community patch + patch -p1 -i ${srcdir}/3.16-7981337ad0-loongson-community.patch + cat "${srcdir}/config.${CARCH}" > ./.config - if [ "${_kernelname}" != "" ]; then + if [ "${_kernelname}" == "" ]; then sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config fi diff --git a/libre/linux-libre/gnewsense-binutils-flag.patch b/libre/linux-libre/gnewsense-binutils-flag.patch deleted file mode 100644 index 5f2d44f99..000000000 --- a/libre/linux-libre/gnewsense-binutils-flag.patch +++ /dev/null @@ -1,28 +0,0 @@ -Our binutils somehow ended up with a -mfix-gs2f-kernel, rather than --mfix-ls2f-kernel. Cope with it. - -Index: arch/mips/loongson/Platform -=================================================================== ---- arch/mips/loongson/Platform.orig 2010-10-25 19:09:49.000000000 +0000 -+++ arch/mips/loongson/Platform 2010-10-25 19:10:44.000000000 +0000 -@@ -10,6 +10,12 @@ - $(call cc-option,-march=loongson2f,-march=r4600) - # Enable the workarounds for Loongson2f - ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS -+ ifneq ($(call as-option,-Wa$(comma)-mfix-gs2f-kernel,),) -+ cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ ifneq ($(CONFIG_CPU_NOP_WORKAROUNDS),$(CONFIG_CPU_JUMP_WORKAROUNDS)) -+ cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel -+ endif -+ else - ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),) - $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop) - else -@@ -20,6 +26,7 @@ - else - cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump - endif -+ endif - endif - - # |