mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
core/linux-raspberrypi to 3.18.3-1
This commit is contained in:
parent
aec02ee0e7
commit
f4290fd8a8
9 changed files with 873 additions and 345 deletions
|
@ -1,51 +1,64 @@
|
|||
# Maintainer: Dave Higham <pepedog@archlinuxarm.org>
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
|
||||
|
||||
# NOTE: Packages replace linux-raspberrypi-latest, remove if that package comes back
|
||||
|
||||
buildarch=18
|
||||
|
||||
pkgbase=linux-raspberrypi
|
||||
_commit=9301f9aff699bc90c194e41c3fa6117a36c4954a
|
||||
_commit=8d2aebc8b609bacec10faea27eb4348a43297c04
|
||||
_srcname=linux-${_commit}
|
||||
_kernelname=${pkgbase#linux}
|
||||
_desc="Raspberry Pi"
|
||||
pkgver=3.12.36
|
||||
pkgver=3.18.3
|
||||
pkgrel=1
|
||||
bfqver=v7r7
|
||||
arch=('arm' 'armv6h')
|
||||
url="http://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'uboot-mkimage' 'git' 'python2' 'bc')
|
||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
|
||||
options=('!strip')
|
||||
source=("https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz"
|
||||
'config'
|
||||
'args-uncompressed.txt'
|
||||
'boot-uncompressed.txt'
|
||||
'imagetool-uncompressed.py'
|
||||
"git://git.code.sf.net/p/aufs/aufs3-standalone#branch=aufs${pkgver:0:4}.31+")
|
||||
md5sums=('eba15f7a9eaa9d3fafb51a0c4c62f62b'
|
||||
'a06c670c77c317340933103bbcb997da'
|
||||
'9335d1263fd426215db69841a380ea26'
|
||||
'a00e424e2fbb8c5a5f77ba2c4871bed4'
|
||||
'2f82dbe5752af65ff409d737caf11954'
|
||||
'SKIP')
|
||||
#"git://git.code.sf.net/p/aufs/aufs3-standalone#branch=aufs3.x-rcN"
|
||||
"git://git.code.sf.net/p/aufs/aufs3-standalone#branch=aufs${pkgver%.*}.1+" # 3.18.1+
|
||||
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${pkgver:0:4}.0-${bfqver}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${pkgver:0:4}.patch"
|
||||
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${pkgver:0:4}.0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${pkgver:0:4}.patch"
|
||||
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${pkgver:0:4}.0-${bfqver}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${bfqver}-for-${pkgver:0:4}.0.patch"
|
||||
'https://github.com/raspberrypi/tools/raw/master/mkimage/mkknlimg'
|
||||
'config.txt'
|
||||
'cmdline.txt'
|
||||
'config')
|
||||
md5sums=('4f09effc361b4f60e1321a306d4719bf'
|
||||
'SKIP'
|
||||
'1c7c2d0338939a9e6953a64d80861471'
|
||||
'a81346cce95baeac2c56cf60d3c7e5b6'
|
||||
'8f2743651280f5a022e541f4e95e5546'
|
||||
'405015cdeb544575c25018b3487a2e76'
|
||||
'4db81bb73c5eb33d145da4dfacaf439e'
|
||||
'60bc3624123c183305677097bcd56212'
|
||||
'46b4b57d60bd346f8a9ff7a5f20c6f39')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
cp ${srcdir}/args-uncompressed.txt arch/arm/boot/
|
||||
cp ${srcdir}/boot-uncompressed.txt arch/arm/boot/
|
||||
cp ${srcdir}/imagetool-uncompressed.py arch/arm/boot/
|
||||
|
||||
# AUFS patches
|
||||
msg2 "AUFS patches"
|
||||
cp -ru "${srcdir}/aufs3-standalone/Documentation" .
|
||||
cp -ru "${srcdir}/aufs3-standalone/fs" .
|
||||
cp -ru "${srcdir}/aufs3-standalone/include/uapi/linux/aufs_type.h" ./include/linux
|
||||
cp -ru "${srcdir}/aufs3-standalone/include/uapi/linux/aufs_type.h" ./include/uapi/linux
|
||||
|
||||
git apply ../aufs3-standalone/aufs3-kbuild.patch
|
||||
git apply ../aufs3-standalone/aufs3-base.patch
|
||||
git apply ../aufs3-standalone/aufs3-mmap.patch
|
||||
git apply ../aufs3-standalone/aufs3-standalone.patch
|
||||
patch -Np1 -i ../aufs3-standalone/aufs3-kbuild.patch
|
||||
patch -Np1 -i ../aufs3-standalone/aufs3-base.patch
|
||||
patch -Np1 -i ../aufs3-standalone/aufs3-mmap.patch
|
||||
patch -Np1 -i ../aufs3-standalone/aufs3-standalone.patch
|
||||
|
||||
msg2 "Add BFQ patches"
|
||||
patch -Np1 -i "${srcdir}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${pkgver:0:4}.patch"
|
||||
patch -Np1 -i "${srcdir}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${pkgver:0:4}.patch"
|
||||
patch -Np1 -i "${srcdir}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${bfqver}-for-${pkgver:0:4}.0.patch"
|
||||
|
||||
msg "Prepare to build"
|
||||
cat "${srcdir}/config" > ./.config
|
||||
|
||||
# add pkgrel to extraversion
|
||||
|
@ -82,8 +95,8 @@ build() {
|
|||
|
||||
#yes "" | make config
|
||||
|
||||
# build!
|
||||
make ${MAKEFLAGS} modules uImage
|
||||
msg "Building!"
|
||||
make ${MAKEFLAGS} zImage modules dtbs
|
||||
}
|
||||
|
||||
_package() {
|
||||
|
@ -93,6 +106,8 @@ _package() {
|
|||
provides=('kernel26' "linux=${pkgver}" 'aufs_friendly')
|
||||
conflicts=('kernel26' 'linux')
|
||||
install=${pkgname}.install
|
||||
backup=('boot/config.txt' 'boot/cmdline.txt')
|
||||
replaces=('linux-raspberrypi-latest')
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
|
@ -101,13 +116,12 @@ _package() {
|
|||
# get kernel version
|
||||
_kernver="$(make kernelrelease)"
|
||||
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot/overlays}
|
||||
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
pushd arch/$KARCH/boot/
|
||||
/usr/bin/python2 imagetool-uncompressed.py
|
||||
popd
|
||||
cp arch/$KARCH/boot/kernel.img ${pkgdir}/boot/kernel.img
|
||||
#cp arch/$KARCH/boot/uImage "${pkgdir}/boot/uImage"
|
||||
|
||||
perl ../mkknlimg --dtok arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel.img"
|
||||
mv arch/$KARCH/boot/dts/*-overlay.dtb "${pkgdir}/boot/overlays"
|
||||
mv arch/$KARCH/boot/dts/*.dtb "${pkgdir}/boot"
|
||||
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
|
@ -133,13 +147,16 @@ _package() {
|
|||
# move module tree /lib -> /usr/lib
|
||||
mkdir -p "${pkgdir}/usr"
|
||||
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||
|
||||
# install boot files
|
||||
install -m644 ../config.txt ../cmdline.txt "${pkgdir}/boot"
|
||||
}
|
||||
|
||||
_package-headers() {
|
||||
pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}"
|
||||
provides=('linux-headers=${pkgver}')
|
||||
replaces=('linux-headers-raspberrypi')
|
||||
provides=("linux-headers=${pkgver}")
|
||||
conflicts=('linux-headers')
|
||||
replaces=('linux-raspberrypi-latest-headers')
|
||||
|
||||
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
|
||||
|
||||
|
@ -225,7 +242,6 @@ _package-headers() {
|
|||
# add xfs and shmem for aufs building
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
|
||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
|
||||
cp fs/xfs/xfs_sb.h "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs/xfs_sb.h"
|
||||
|
||||
# copy in Kconfig files
|
||||
for i in $(find . -name "Kconfig*"); do
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
; kernel args (place at 0x00000100)
|
||||
0x00000005
|
||||
0x54410001
|
||||
0x00000001
|
||||
0x00001000
|
||||
0x00000000
|
||||
0x00000004
|
||||
0x54410002
|
||||
0x08000000
|
||||
0x00000000
|
||||
0x00000000
|
||||
0x00000000
|
|
@ -1,12 +0,0 @@
|
|||
diff -ruN aufs3-standalone/aufs3-mmap.patch aufs3-standalone.new/aufs3-mmap.patch
|
||||
--- aufs3-standalone/aufs3-mmap.patch 2014-11-01 20:58:11.954319566 +0000
|
||||
+++ aufs3-standalone.new/aufs3-mmap.patch 2014-11-01 21:18:09.303852784 +0000
|
||||
@@ -155,7 +155,7 @@
|
||||
@@ -17,7 +17,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
|
||||
util.o mmzone.o vmstat.o backing-dev.o \
|
||||
mm_init.o mmu_context.o percpu.o slab_common.o \
|
||||
- compaction.o balloon_compaction.o \
|
||||
+ compaction.o balloon_compaction.o vmacache.o \
|
||||
- interval_tree.o list_lru.o $(mmu-y)
|
||||
+ interval_tree.o list_lru.o prfile.o $(mmu-y)
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
; bootloader (place at 0x00000000)
|
||||
0xea000006
|
||||
0xe1a00000
|
||||
0xe1a00000
|
||||
0xe1a00000
|
||||
0xe1a00000
|
||||
0xe1a00000
|
||||
0xe1a00000
|
||||
0xe1a00000
|
||||
|
||||
0xe3a00000
|
||||
0xe3a01042
|
||||
0xe3811c0c
|
||||
0xe59f2000
|
||||
0xe59ff000
|
||||
0x00000100
|
||||
0x00008000
|
1
core/linux-raspberrypi/cmdline.txt
Normal file
1
core/linux-raspberrypi/cmdline.txt
Normal file
|
@ -0,0 +1 @@
|
|||
root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
|
File diff suppressed because it is too large
Load diff
142
core/linux-raspberrypi/config.txt
Normal file
142
core/linux-raspberrypi/config.txt
Normal file
|
@ -0,0 +1,142 @@
|
|||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
# Params:
|
||||
# i2c0 (default "off") Set to "on" to enable the i2c0 interface
|
||||
# i2c1 (default "off") Set to "on" to enable the i2c1 interface
|
||||
# i2s (default "off") Set to "on" to enable the i2s interface
|
||||
# spi (default "off") Set to "on" to enable the spi interfaces
|
||||
# act_led_trigger (default "mmc")
|
||||
# Choose which activity the LED tracks.
|
||||
# Use "heartbeat" for a nice load indicator.
|
||||
# act_led_activelow (default "off")
|
||||
# Set to "on" to invert the sense of the LED
|
||||
# act_led_gpio (default "16" on a non-Plus board, "47" on a Plus)
|
||||
# Set which GPIO pin to use for the activity LED
|
||||
# (in case you want to connect it to an external
|
||||
# device).
|
||||
#
|
||||
# N.B. It is recommended to only enable those interfaces that are needed.
|
||||
# Leaving all interfaces enabled can lead to unwanted behaviour (I2C
|
||||
# interfering with Pi Camera, I2S and SPI hogging GPIO pins, etc.)
|
||||
#device_tree_param=i2c0=on
|
||||
#device_tree_param=i2c1=on
|
||||
#device_tree_param=i2s=on
|
||||
#device_tree_param=spi=on
|
||||
#device_tree_param=act_led_trigger=mmc
|
||||
|
||||
# Uncomment one of these lines to enable an audio interface
|
||||
#device_tree_overlay=hifiberry-dac
|
||||
#device_tree_overlay=hifiberry-dacplus
|
||||
#device_tree_overlay=hifiberry-digi
|
||||
#device_tree_overlay=iqaudio-dac
|
||||
#device_tree_overlay=iqaudio-dacplus
|
||||
|
||||
# Uncomment to enable the lirc-rpi module
|
||||
# Params: gpio_out_pin (default "17") GPIO pin for output
|
||||
# gpio_in_pin (default "18") GPIO pin for input
|
||||
# gpio_in_pull (default "down") Pull up/down/off on the input pin
|
||||
# sense (defaults to "-1") Override the IR receive auto-detection
|
||||
# logic:
|
||||
# "1" = force active high
|
||||
# "0" = force active low
|
||||
# "-1" = use auto-detection
|
||||
# softcarrier (default "on") Turn the software carrier "on" or "off".
|
||||
# invert (default "off") "on" = invert the output pin.
|
||||
# debug (default "off") "on" = enable additional debug messages.
|
||||
#device_tree_overlay=lirc-rpi
|
||||
#device_tree_param=gpio_out_pin=17
|
||||
#device_tree_param=gpio_in_pin=18
|
||||
#device_tree_param=gpio_in_pull=down
|
||||
|
||||
# Uncomment to enable the w1-gpio Onewire interface module
|
||||
# Use this overlay if you *don't* need a pin to drive an external pullup
|
||||
# Params: gpiopin (default "4") GPIO pin for I/O
|
||||
#device_tree_overlay=w1-gpio
|
||||
#device_tree_param=gpiopin=4
|
||||
|
||||
# Uncomment to enable the w1-gpio Onewire interface module
|
||||
# Use this overlay if you *do* need a pin to drive an external pullup
|
||||
# Params: gpiopin (default "4") GPIO pin for I/O
|
||||
# pullup (default "5") GPIO pin for external pullup
|
||||
#device_tree_overlay=w1-gpio
|
||||
#device_tree_param=gpiopin=4
|
||||
#device_tree_param=pullup=5
|
||||
|
||||
# Uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# Uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# Uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# Uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# Uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# Uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# Uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# Uncomment to set monitor mode to DMT
|
||||
#hdmi_group=2
|
||||
|
||||
# Uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# Uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
# Uncomment to overclock the ARM core. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# for more options see http://elinux.org/RPi_config.txt
|
||||
|
||||
## Some over clocking settings, governor already set to ondemand
|
||||
|
||||
##None
|
||||
#arm_freq=700
|
||||
#core_freq=250
|
||||
#sdram_freq=400
|
||||
#over_voltage=0
|
||||
|
||||
##Modest
|
||||
#arm_freq=800
|
||||
#core_freq=300
|
||||
#sdram_freq=400
|
||||
#over_voltage=0
|
||||
|
||||
##Medium
|
||||
#arm_freq=900
|
||||
#core_freq=333
|
||||
#sdram_freq=450
|
||||
#over_voltage=2
|
||||
|
||||
##High
|
||||
#arm_freq=950
|
||||
#core_freq=450
|
||||
#sdram_freq=450
|
||||
#over_voltage=6
|
||||
|
||||
##Turbo
|
||||
#arm_freq=1000
|
||||
#core_freq=500
|
||||
#sdram_freq=500
|
||||
#over_voltage=6
|
||||
|
||||
gpu_mem_512=64
|
||||
gpu_mem_256=64
|
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/python2
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
try:
|
||||
linuxdir = sys.argv[1]
|
||||
except:
|
||||
linuxdir = "linux"
|
||||
|
||||
re_line = re.compile(r"0x(?P<value>[0-9a-f]{8})")
|
||||
|
||||
mem = [0 for i in range(32768)]
|
||||
|
||||
def load_to_mem(name, addr):
|
||||
f = open(name)
|
||||
|
||||
for l in f.readlines():
|
||||
m = re_line.match(l)
|
||||
|
||||
if m:
|
||||
value = int(m.group("value"), 16)
|
||||
|
||||
for i in range(4):
|
||||
mem[addr] = int(value >> i * 8 & 0xff)
|
||||
addr += 1
|
||||
|
||||
f.close()
|
||||
|
||||
load_to_mem("boot-uncompressed.txt", 0x00000000)
|
||||
load_to_mem("args-uncompressed.txt", 0x00000100)
|
||||
|
||||
f = open("first32k.bin", "wb")
|
||||
|
||||
for m in mem:
|
||||
f.write(chr(m))
|
||||
|
||||
f.close()
|
||||
|
||||
os.system("cat first32k.bin Image > kernel.img")
|
|
@ -2,7 +2,7 @@
|
|||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=-raspberrypi
|
||||
KERNEL_VERSION=3.12.20-1-ARCH
|
||||
KERNEL_VERSION=3.18.3-1-ARCH
|
||||
|
||||
disable_cma() {
|
||||
if [[ -f /boot/config.txt && $(grep '^cma' /boot/config.txt) != '' ]]; then
|
||||
|
@ -31,5 +31,16 @@ post_upgrade() {
|
|||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
|
||||
disable_cma
|
||||
|
||||
if [ "$(vercmp $2 3.18.3)" -lt 0 ]; then
|
||||
echo "________________________________________________________________________________"
|
||||
echo ""
|
||||
echo "WARNING: This kernel provides updated config.txt and cmdline.txt files."
|
||||
echo " Check for pacnew files in /boot and merge or replace the existing files"
|
||||
echo " with the new versions."
|
||||
echo "________________________________________________________________________________"
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue