summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrey Chirstoforo2016-03-08 22:01:31 +0000
committerGrey Chirstoforo2016-03-08 22:01:31 +0000
commit07c92c8fd112557cc3822f448712a4d3692eefd6 (patch)
tree7cbb4624909a4e08552886b7941ac2c0eaafc1ed
downloadaur-07c92c8fd112557cc3822f448712a4d3692eefd6.tar.gz
initial commit
-rw-r--r--.SRCINFO46
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD231
-rw-r--r--cmdline.txt1
-rw-r--r--config.txt140
-rw-r--r--linux-rpi2-latest-git.install25
6 files changed, 450 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9c7caf0db58c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,46 @@
+# Generated by mksrcinfo v8
+# Tue Mar 8 21:57:03 UTC 2016
+pkgbase = linux-rpi2-latest-git
+ pkgver = 4.5.0_rc7_1_v7+
+ pkgrel = 1
+ url = http://www.kernel.org/
+ arch = armv7h
+ license = GPL2
+ makedepends = xmlto
+ makedepends = docbook-xsl
+ makedepends = kmod
+ makedepends = inetutils
+ makedepends = bc
+ makedepends = git
+ options = !strip
+ source = linux::git://github.com/raspberrypi/linux#branch=rpi-4.5.y
+ source = config.txt
+ source = cmdline.txt
+ md5sums = SKIP
+ md5sums = e44f530b3d333b98ad376872cdbbf823
+ md5sums = 0244ab7cb2e385a8efe9a7fba9bfcb48
+
+pkgname = linux-rpi2-latest-git
+ pkgdesc = The Linux Kernel and modules - Raspberry Pi 2 from the newest git branch
+ install = linux-rpi2-latest-git.install
+ depends = coreutils
+ depends = linux-firmware
+ depends = raspberrypi-firmware
+ depends = module-init-tools>=3.16
+ optdepends = crda: to set the correct wireless channels of your country
+ provides = kernel26
+ provides = linux=4.5.0_rc7_1_v7+
+ conflicts = kernel26
+ conflicts = linux
+ conflicts = linux-raspberrypi
+ replaces = linux-raspberrypi-latest
+ backup = boot/config.txt
+ backup = boot/cmdline.txt
+
+pkgname = linux-rpi2-latest-git-headers
+ pkgdesc = Header files and scripts for building modules for linux kernel - Raspberry Pi 2 from the newest git branch
+ provides = linux-headers=4.5.0_rc7_1_v7+
+ conflicts = linux-headers
+ conflicts = linux-raspberrypi-headers
+ replaces = linux-raspberrypi-latest-headers
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b17f796848b3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*.pkg.tar
+pkg/
+src/
+*.tar.gz
+*.tar.xz
+linux/
+linux
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a680947bc48b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,231 @@
+# Maintainer: Grey Christoforo <first name [at] last name [dot] net>
+
+pkgbase=linux-rpi2-latest-git
+pkgname=("${pkgbase}" "${pkgbase}-headers")
+_branch=4.5
+_desc="Raspberry Pi 2 from the newest git branch"
+pkgrel=1
+arch=('armv7h')
+url="http://www.kernel.org/"
+license=('GPL2')
+makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
+options=('!strip')
+source=("linux::git://github.com/raspberrypi/linux#branch=rpi-${_branch}.y"
+ 'config.txt'
+ 'cmdline.txt')
+md5sums=('SKIP'
+ 'e44f530b3d333b98ad376872cdbbf823'
+ '0244ab7cb2e385a8efe9a7fba9bfcb48')
+_dirname=linux-${_branch}
+_kernelname=${pkgbase#linux}
+pkgver=4.5.0_rc7_1_v7+
+
+prepare() {
+ cd linux
+
+ #make mrproper
+
+ msg "Prepare to build"
+ KERNEL=kernel7
+ make bcm2709_defconfig
+
+ # add pkgrel to extraversion
+ sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
+
+ # don't run depmod on 'make install'. We'll do this ourselves in packaging
+ sed -i '2iexit 0' scripts/depmod.sh
+
+ make prepare
+}
+
+pkgver() {
+ cd linux
+ RELEASE=$(make kernelrelease)
+ echo ${RELEASE//[-]/_}
+}
+
+build() {
+ cd linux
+ make ${MAKEFLAGS} zImage modules dtbs
+ msg2 "Build complete!"
+}
+
+_package() {
+ msg2 "Packaging kernel"
+ pkgdesc="The Linux Kernel and modules - ${_desc}"
+ depends=('coreutils' 'linux-firmware' 'raspberrypi-firmware' 'module-init-tools>=3.16')
+ optdepends=('crda: to set the correct wireless channels of your country')
+ provides=('kernel26' "linux=${pkgver}" )
+ conflicts=('kernel26' 'linux' 'linux-raspberrypi')
+ install=${pkgname}.install
+ backup=('boot/config.txt' 'boot/cmdline.txt')
+ replaces=('linux-raspberrypi-latest')
+
+ cd linux
+
+ KARCH=arm
+
+ # get kernel version
+ _kernver="$(make kernelrelease)"
+
+ mkdir -p "${pkgdir}"/{lib/modules,lib/firmware}
+ make INSTALL_MOD_PATH="${pkgdir}" modules_install
+ make INSTALL_DTBS_PATH="${pkgdir}/boot" dtbs_install
+
+ perl scripts/mkknlimg --dtok arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel7.img"
+ cp arch/$KARCH/boot/dts/overlays/README "${pkgdir}/boot/overlays"
+
+ # set correct depmod command for install
+ sed \
+ -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
+ -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
+ -i "${startdir}/${pkgname}.install"
+
+ # remove build and source links
+ rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
+ # remove the firmware
+ rm -rf "${pkgdir}/lib/firmware"
+ # gzip -9 all modules to save 100MB of space
+ find "${pkgdir}" -name '*.ko' |xargs -P 2 -n 1 gzip -9
+ # make room for external modules
+ ln -s "../extramodules-${pkgver}-${_kernelname:-ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
+ # add real version for building modules and running depmod from post_install/upgrade
+ mkdir -p "${pkgdir}/lib/modules/extramodules-${pkgver}-${_kernelname:-ARCH}"
+ echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${pkgver}-${_kernelname:-ARCH}/version"
+
+ # Now we call depmod...
+ depmod -b "$pkgdir" -F System.map "$_kernver"
+
+ # 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}")
+ conflicts=('linux-headers' 'linux-raspberrypi-headers')
+ replaces=('linux-raspberrypi-latest-headers')
+
+ install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
+
+ cd linux
+ install -D -m644 Makefile \
+ "${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
+ install -D -m644 kernel/Makefile \
+ "${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
+ install -D -m644 .config \
+ "${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
+
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
+
+ for i in acpi asm-generic config crypto drm generated keys linux math-emu \
+ media net pcmcia scsi sound trace uapi video xen; do
+ cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
+ done
+
+ MACH="mach-bcm2709"
+
+ # copy arch includes for external modules
+ mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH
+ cp -a arch/$KARCH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/
+ mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/$MACH
+ cp -a arch/$KARCH/$MACH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/$MACH/
+
+ # copy files necessary for later builds, like nvidia and vmware
+ cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
+ cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
+
+ # fix permissions on scripts dir
+ chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
+
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
+
+ cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
+
+ cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
+
+ # add docbook makefile
+ install -D -m644 Documentation/DocBook/Makefile \
+ "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
+
+ # add dm headers
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
+ cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
+
+ # add inotify.h
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
+ cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
+
+ # add wireless headers
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
+ cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
+
+ # add dvb headers for external modules
+ # in reference to:
+ # http://bugs.archlinux.org/task/9912
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core"
+ cp drivers/media/dvb-core/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core/"
+ # and...
+ # http://bugs.archlinux.org/task/11194
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
+ cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
+
+ # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
+ # in reference to:
+ # http://bugs.archlinux.org/task/13146
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
+ cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
+ cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
+
+ # add dvb headers
+ # in reference to:
+ # http://bugs.archlinux.org/task/20402
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb"
+ cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
+ cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
+ cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
+
+ # 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"
+
+ # copy in Kconfig files
+ for i in $(find . -name "Kconfig*"); do
+ mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
+ cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
+ done
+
+ chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
+ find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
+
+ # strip scripts directory
+ find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
+ case "$(file -bi "${binary}")" in
+ *application/x-sharedlib*) # Libraries (.so)
+ /usr/bin/strip ${STRIP_SHARED} "${binary}";;
+ *application/x-archive*) # Libraries (.a)
+ /usr/bin/strip ${STRIP_STATIC} "${binary}";;
+ *application/x-executable*) # Binaries
+ /usr/bin/strip ${STRIP_BINARIES} "${binary}";;
+ esac
+ done
+
+ # remove unneeded architectures
+ rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,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,x86,xtensa}
+}
+
+for _p in ${pkgname[@]}; do
+ eval "package_${_p}() {
+ $(declare -f "_package${_p#${pkgbase}}")
+ _package${_p#${pkgbase}}
+ }"
+done
+
diff --git a/cmdline.txt b/cmdline.txt
new file mode 100644
index 000000000000..05de54ac0eb1
--- /dev/null
+++ b/cmdline.txt
@@ -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 cma=256M@512M
diff --git a/config.txt b/config.txt
new file mode 100644
index 000000000000..47b982b7c70a
--- /dev/null
+++ b/config.txt
@@ -0,0 +1,140 @@
+# Uncomment some or all of these to enable the optional hardware interfaces
+# Params:
+# i2c_arm Set to "on" to enable the ARM's i2c interface
+# (default "off")
+# i2c_vc Set to "on" to enable the i2c interface
+# usually reserved for the VideoCore processor
+# (default "off")
+# i2c_arm_baudrate Set the baudrate of the ARM's i2c interface
+# (default "100000")
+# i2c_vc_baudrate Set the baudrate of the VideoCore i2c interface
+# (default "100000")
+# i2c_baudrate An alias for i2c_arm_baudrate
+# i2s Set to "on" to enable the i2s interface
+# (default "off")
+# spi Set to "on" to enable the spi interfaces
+# (default "off")
+# act_led_trigger Choose which activity the LED tracks.
+# Use "heartbeat" for a nice load indicator.
+# (default "mmc")
+# act_led_activelow Set to "on" to invert the sense of the LED
+# (default "off")
+# act_led_gpio Set which GPIO to use for the activity LED
+# (in case you want to connect it to an external
+# device)
+# (default "16" on a non-Plus board, "47" on a
+# Plus or Pi 2)
+# pwr_led_trigger
+# pwr_led_activelow
+# pwr_led_gpio
+# As for act_led_*, but using the PWR LED.
+# Not available on Model A/B boards.
+# N.B. It is recommended to only enable those interfaces that are needed.
+# Leaving all interfaces enabled can lead to unwanted behaviour (i2c_vc
+# interfering with Pi Camera, I2S and SPI hogging GPIO pins, etc.)
+# Note also that i2c, i2c_arm and i2c_vc are aliases for the physical
+# interfaces i2c0 and i2c1. Use of the numeric variants is still possible
+# but deprecated because the ARM/VC assignments differ between board
+# revisions. The same board-specific mapping applies to i2c_baudrate,
+# and the other i2c baudrate parameters.
+
+#device_tree_param=i2c_arm=on
+#device_tree_param=i2c_vc=on
+#device_tree_param=i2s=on
+#device_tree_param=spi=on
+#device_tree_param=act_led_trigger=mmc
+
+#
+# See /boot/overlays/README for a detailed list and description of additional
+# overlays and their configuration options.
+#
+
+# 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=64
+lcd_rotate=2
+
+mask_gpu_interrupt0=0x400 # VPU shouldn't handle V3D interrupts
+avoid_warnings=2 # VPU shouldn't smash our display setup.
+
+#dtoverlay=vc4-kms-v3d
+#dtoverlay=rpi-ft5406
+
+avoid_warnings=2
+#disable_overscan=1
+#dtoverlay=rpi-backlight
diff --git a/linux-rpi2-latest-git.install b/linux-rpi2-latest-git.install
new file mode 100644
index 000000000000..0971b351d191
--- /dev/null
+++ b/linux-rpi2-latest-git.install
@@ -0,0 +1,25 @@
+# arg 1: the new package version
+# arg 2: the old package version
+
+KERNEL_NAME=-rpi2-latest-git
+KERNEL_VERSION=4.5.0_rc7_1_v7+
+
+post_install () {
+ # updating module dependencies
+ echo ">>> Updating module dependencies. Please wait ..."
+ depmod ${KERNEL_VERSION}
+}
+
+post_upgrade() {
+ if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
+ if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
+ echo "WARNING: /boot appears to be a seperate partition but is not mounted."
+ echo " You probably just broke your system. Congratulations."
+ fi
+ fi
+
+ # updating module dependencies
+ echo ">>> Updating module dependencies. Please wait ..."
+ depmod ${KERNEL_VERSION}
+
+}