diff options
-rw-r--r-- | core/pam/PKGBUILD | 2 | ||||
-rw-r--r-- | libre/linux-libre/PKGBUILD | 90 | ||||
-rw-r--r-- | libre/linux-libre/change-default-console-loglevel.patch | 1 | ||||
-rw-r--r-- | libre/linux-libre/linux-libre.install | 15 |
4 files changed, 83 insertions, 25 deletions
diff --git a/core/pam/PKGBUILD b/core/pam/PKGBUILD index 6b9a7f5b9..f8bbaf00c 100644 --- a/core/pam/PKGBUILD +++ b/core/pam/PKGBUILD @@ -11,6 +11,8 @@ license=('GPL2') url="http://www.kernel.org/pub/linux/libs/pam/" depends=('glibc' 'db' 'cracklib' 'libtirpc') makedepends=('flex' 'w3m' 'docbook-xml>=4.4' 'docbook-xsl') +[ "$CARCH" = "mips64el" ] && \ +makedepends=('flex' 'docbook-xml>=4.4' 'docbook-xsl') backup=(etc/security/{access.conf,group.conf,limits.conf,namespace.conf,namespace.init,pam_env.conf,time.conf} etc/pam.d/other etc/default/passwd etc/environment) source=(http://www.kernel.org/pub/linux/libs/pam/library/Linux-PAM-$pkgver.tar.bz2 ftp://ftp.suse.com/pub/people/kukuk/pam/pam_unix2/pam_unix2-2.6.tar.bz2 diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index b76294ad4..651cb40e9 100644 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -9,32 +9,31 @@ pkgname=('linux-libre' 'linux-libre-headers' 'linux-libre-docs') # Build stock - # pkgname=linux-custom # Build kernel with a different name _kernelname=${pkgname#linux-libre} _basekernel=3.0 -pkgver=${_basekernel} +pkgver=${_basekernel}.1 pkgrel=4 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org" license=('GPL2') makedepends=('xmlto' 'docbook-xsl') options=('!strip') -source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/linux-${pkgver}-libre.tar.xz" +source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-libre/linux-${_basekernel}-libre.tar.xz" + "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz" + "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/linux-patches-${pkgver}-libre-lemote_0lxo_mipsel.tar.bz2" # the main kernel config files 'config.i686' 'config.x86_64' # standard config files for mkinitcpio ramdisk "${pkgname}.preset" + 'Kbuild' + 'Kbuild.platforms' 'boot-logo.patch' 'fix-i915.patch' 'change-default-console-loglevel.patch') -md5sums=('44e7bc20c235a193f9b6123a8d5e9509' - '66dff8af6b00eb8d054b2af85aaa5ef7' - '1a98b8b8f2140ac8f95c3814cba8cc95' - '7af24ad1789055e991b1e1f090ff276d' - '04b21c79df0a952c22d681dd4f4562df' - '263725f20c0b9eb9c353040792d644e5' - '7396b811db06dec0250a1a098f527b83') build() { cd "${srcdir}/linux-${_basekernel}" + patch -Np1 -i "${srcdir}/patch-${_basekernel}-libre-${pkgver}-libre" + # Add freedo as boot logo patch -Np1 -i "${srcdir}/boot-logo.patch" @@ -46,7 +45,18 @@ build() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" - cat "$srcdir/config.$CARCH" > ./.config # simpler + if [ "$CARCH" == "mips64el" ]; then + sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre|" Makefile + msg2 "Adding loongson-community patches" + patch -Np1 -i "${srcdir}/${_basekernel}-*-loongson-community.patch" + patch -Np0 -i "${srcdir}/lxo-config.patch" + +# ensure N32 + sed -i "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" ./.config + else + cat "${srcdir}/config.${CARCH}" > ./.config # simpler + fi + if [ "${_kernelname}" != "" ]; then sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config @@ -54,6 +64,7 @@ build() { # remove the "-libre" extraversion from Makefile sed -i 's|^EXTRAVERSION =.*$|EXTRAVERSION =|g' Makefile + sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|# CONFIG_LOCALVERSION_AUTO is not set|g" ./.config # remove the sublevel from Makefile # this ensures our kernel version is always 3.X-LIBRE @@ -82,7 +93,11 @@ build() { yes "" | make config # build! - make ${MAKEFLAGS} bzImage modules + if [ "$CARCH" == "mips64el" ]; then + make ${MAKEFLAGS} vmlinuz modules + else + make ${MAKEFLAGS} bzImage modules + fi } package_linux-libre() { @@ -99,13 +114,19 @@ package_linux-libre() { cd "${srcdir}/linux-${_basekernel}" KARCH=x86 + [[ $CARCH = "mips64el" ]] && KARCH=mips # get kernel version _kernver="$(make kernelrelease)" mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} make INSTALL_MOD_PATH="${pkgdir}" modules_install - cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgname}" + + if [ "$CARCH" == "mips64el" ]; then + cp vmlinuz ${pkgdir}/boot/vmlinuz-${pkgname} + else + cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgname}" + fi # add vmlinux install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux" @@ -125,8 +146,6 @@ package_linux-libre() { # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} - # add compat symlink for the kernel image - ln -sf vmlinuz-${pkgname} "${pkgdir}/boot/vmlinuz26${_kernelname}" # remove the firmware rm -rf "${pkgdir}/lib/firmware" # gzip -9 all modules to safe 100MB of space @@ -139,6 +158,15 @@ package_linux-libre-headers() { conflicts=('kernel26-headers' 'linux-headers') replaces=('kernel26-headers' 'linux-headers') + KARCH=x86 + [[ $CARCH = "mips64el" ]] && KARCH=mips + +# In case of repackaging this is empty + if [ -z "${_kernver}" ]; then + cd ${srcdir}/linux-$pkgver + _kernver="$(make kernelrelease)" + fi + mkdir -p "${pkgdir}/lib/modules/${_kernver}" cd "${pkgdir}/lib/modules/${_kernver}" @@ -160,13 +188,19 @@ package_linux-libre-headers() { done # copy arch includes for external modules - mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/x86" - cp -a arch/x86/include "${pkgdir}/usr/src/linux-${_kernver}/arch/x86/" + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}" + cp -a "arch/${KARCH}/include" "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/" # copy files necessary for later builds cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}" cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}" + if [ "$CARCH" = "mips64el" ]; then + cp -a "arch/${KARCH}/Kbuild" "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/" + cp -a "arch/${KARCH}/loongson" "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/" + cp -a "${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" @@ -261,7 +295,12 @@ package_linux-libre-headers() { done # remove unneeded architectures - rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa} + rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,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 } package_linux-libre-docs() { @@ -272,8 +311,8 @@ package_linux-libre-docs() { cd "${srcdir}/linux-${_basekernel}" - mkdir -p "$pkgdir/usr/src/linux-$_kernver" - cp -r Documentation "$pkgdir/usr/src/linux-$_kernver" + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}" + cp -r Documentation "${pkgdir}/usr/src/linux-${_kernver}" find "${pkgdir}" -type f -exec chmod 444 {} \; find "${pkgdir}" -type d -exec chmod 755 {} \; @@ -282,3 +321,14 @@ package_linux-libre-docs() { } # vim:set ts=2 sw=2 et: +md5sums=('44e7bc20c235a193f9b6123a8d5e9509' + 'af8d721036d89ed5500675c3289e3b48' + '9a5db9c3dfb190b91dfe7c3bdcfe67a8' + '66dff8af6b00eb8d054b2af85aaa5ef7' + '1a98b8b8f2140ac8f95c3814cba8cc95' + 'a8a3843046926eb7ab81312cd438c5c5' + '2967cecc3af9f954ccc822fd63dca6ff' + '8267264d9a8966e57fdacd1fa1fc65c4' + '04b21c79df0a952c22d681dd4f4562df' + '263725f20c0b9eb9c353040792d644e5' + '9d3c56a4b999c8bfbd4018089a62f662') diff --git a/libre/linux-libre/change-default-console-loglevel.patch b/libre/linux-libre/change-default-console-loglevel.patch index cec208ee8..63435d84f 100644 --- a/libre/linux-libre/change-default-console-loglevel.patch +++ b/libre/linux-libre/change-default-console-loglevel.patch @@ -10,4 +10,3 @@ diff -upr linux-3.0.orig/kernel/printk.c linux-3.0/kernel/printk.c DECLARE_WAIT_QUEUE_HEAD(log_wait); - diff --git a/libre/linux-libre/linux-libre.install b/libre/linux-libre/linux-libre.install index 51e78dc60..6f7ae815a 100644 --- a/libre/linux-libre/linux-libre.install +++ b/libre/linux-libre/linux-libre.install @@ -11,10 +11,17 @@ post_install () { echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} - # add compat symlinks for the initramfs images - ln -sf initramfs-linux-libre${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img - ln -sf initramfs-linux-libre${KERNEL_NAME}-fallback.img \ - boot/kernel26${KERNEL_NAME}-fallback.img + # compat symlinks for the official kernels only + if [ -z "${KERNEL_NAME}" -o "${KERNEL_NAME}" = "-lts" ]; then + loaders="$(find /boot -name syslinux.cfg -or -name extlinux.conf -or -name grub.cfg -or -name menu.lst)" + [ -f /etc/lilo.conf ] && loaders="$loaders /etc/lilo.conf" + if [ -n "${loaders}" ] && grep -q -e vmlinuz26 -e kernel26.img -e kernel26-fallback.img $loaders; then + # add compat symlinks for the initramfs images + ln -sf initramfs-linux-libre${KERNEL_NAME}.img /boot/kernel26${KERNEL_NAME}.img + ln -sf initramfs-linux-libre${KERNEL_NAME}-fallback.img /boot/kernel26${KERNEL_NAME}-fallback.img + ln -sf vmlinuz-linux-libre${KERNEL_NAME} /boot/vmlinuz26${KERNEL_NAME} + fi + fi } post_upgrade() { |