summaryrefslogtreecommitdiff
path: root/kernels/linux-libre-rt
diff options
context:
space:
mode:
Diffstat (limited to 'kernels/linux-libre-rt')
-rw-r--r--kernels/linux-libre-rt/Kbuild19
-rw-r--r--kernels/linux-libre-rt/Kbuild.platforms6
-rw-r--r--kernels/linux-libre-rt/PKGBUILD91
-rw-r--r--kernels/linux-libre-rt/gnewsense-binutils-flag.patch28
-rw-r--r--kernels/linux-libre-rt/linux.install12
5 files changed, 21 insertions, 135 deletions
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."