added core/linux-olinuxino 3.7.2-1

This commit is contained in:
Kevin Mihelich 2013-01-16 23:28:16 +00:00
parent 88cbbfba84
commit dbabb046da
7 changed files with 188800 additions and 0 deletions

View file

@ -0,0 +1,61 @@
From 3ff60233d6f7f8fc192e986633f0616d5e67860c Mon Sep 17 00:00:00 2001
From: Fadil Berisha <f.koliqi@gmail.com>
Date: Fri, 26 Oct 2012 20:53:11 -0400
Subject: [PATCH] [SIGNED-OFF] ARM: imx23-olinuxino: Add spi support
imx23-olinuxino board has spi pins exposed on UEXT connector. This
patch add spi support
Signed-off-by: Fadil Berisha <f.koliqi@gmail.com>
---
arch/arm/boot/dts/imx23-olinuxino.dts | 9 +++++++++
arch/arm/boot/dts/imx23.dtsi | 13 +++++++++++++
2 files changed, 22 insertions(+)
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
index 384d8b6..6a92fdf0 100644
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
@@ -47,6 +47,15 @@
fsl,pull-up = <0>;
};
};
+
+ ssp1: ssp@80034000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,imx23-spi";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2_pins_a>;
+ status = "okay";
+ };
};
apbx@80040000 {
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
index 6d31aa3..65415c5 100644
--- a/arch/arm/boot/dts/imx23.dtsi
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -279,6 +279,19 @@
fsl,voltage = <1>;
fsl,pull-up = <0>;
};
+
+ spi2_pins_a: spi2@0 {
+ reg = <0>;
+ fsl,pinmux-ids = <
+ 0x0182 /* MX23_PAD_GPMI_WRN__SSP2_SCK */
+ 0x0142 /* MX23_PAD_GPMI_RDY1__SSP2_CMD */
+ 0x0002 /* MX23_PAD_GPMI_D00__SSP2_DATA0 */
+ 0x0032 /* MX23_PAD_GPMI_D03__SSP2_DATA3 */
+ >;
+ fsl,drive-strength = <1>;
+ fsl,voltage = <1>;
+ fsl,pull-up = <1>;
+ };
};
digctl@8001c000 {
--
1.7.10

View file

@ -0,0 +1,103 @@
From 42c43ff981b6de8017354f4a8efd1d8716cf5e4a Mon Sep 17 00:00:00 2001
From: Fadil Berisha <f.koliqi@gmail.com>
Date: Tue, 6 Nov 2012 22:39:46 -0500
Subject: [PATCH] MXS: imx23-olinuxino: Add i2c support
imx23-olinuxino board has i2c interface exposed on UEXT connector. This patch add i2c
support. Test is done with module MOD-IO2 attached on UEXT connector.
Signed-off-by: Fadil Berisha <f.koliqi@gmail.com>
---
arch/arm/boot/dts/imx23-olinuxino.dts | 6 +++++
arch/arm/boot/dts/imx23.dtsi | 43 +++++++++++++++++++++++++++++++--
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
index 384d8b6..764d994 100644
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
@@ -50,6 +50,12 @@
};
apbx@80040000 {
+ i2c0: i2c@80058000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins_a>;
+ status = "okay";
+ };
+
duart: serial@80070000 {
pinctrl-names = "default";
pinctrl-0 = <&duart_pins_a>;
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
index 6d31aa3..04f8bd1 100644
--- a/arch/arm/boot/dts/imx23.dtsi
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -279,6 +279,39 @@
fsl,voltage = <1>;
fsl,pull-up = <0>;
};
+
+ i2c0_pins_a: i2c0@0 {
+ reg = <0>;
+ fsl,pinmux-ids = <
+ 0x01e0 /* MX23_PAD_I2C_SCL__I2C_SCL */
+ 0x01f0 /* MX23_PAD_I2C_SDA__I2C_SDA */
+ >;
+ fsl,drive-strength = <1>;
+ fsl,voltage = <1>;
+ fsl,pull-up = <1>;
+ };
+
+ i2c1_pins_a: i2c1@0 {
+ reg = <0>;
+ fsl,pinmux-ids = <
+ 0x1171 /* MX23_PAD_LCD_ENABLE__I2C_SCL */
+ 0x1181 /* MX23_PAD_LCD_HSYNC__I2C_SDA */
+ >;
+ fsl,drive-strength = <1>;
+ fsl,voltage = <1>;
+ fsl,pull-up = <1>;
+ };
+
+ i2c2_pins_a: i2c2@0 {
+ reg = <0>;
+ fsl,pinmux-ids = <
+ 0x2031 /* MX23_PAD_SSP1_DATA1__I2C_SCL */
+ 0x2041 /* MX23_PAD_SSP1_DATA2__I2C_SDA */
+ >;
+ fsl,drive-strength = <1>;
+ fsl,voltage = <1>;
+ fsl,pull-up = <1>;
+ };
};
digctl@8001c000 {
@@ -337,7 +370,7 @@
reg = <0x80038000 0x2000>;
status = "disabled";
};
- };
+ };
apbx@80040000 {
compatible = "simple-bus";
@@ -387,8 +420,14 @@
status = "disabled";
};
- i2c@80058000 {
+ i2c0: i2c@80058000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,imx28-i2c";
reg = <0x80058000 0x2000>;
+ interrupts = <27 26>;
+ clock-frequency = <100000>;
+ fsl,i2c-dma-channel = <3>;
status = "disabled";
};
--
1.7.10

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,285 @@
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# i.MX233 OLinuXino kernel and headers
buildarch=2
pkgbase=linux-olinuxino
pkgname=('linux-olinuxino' 'linux-headers-olinuxino')
_kernelname=${pkgname#linux}
_basekernel=3.7
pkgver=${_basekernel}.2
pkgrel=1
arch=('arm')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage' 'elftosb' 'imx-bootlets-olinuxino' 'imx-bootlets-olinuxino-ntsc')
options=('!strip')
source=("http://www.kernel.org/pub/linux/kernel/v3.0/linux-${_basekernel}.tar.xz"
"ftp://ftp.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.bz2"
'config'
'change-default-console-loglevel.patch'
'0001-ARM-imx23-olinuxino-Add-spi-support.patch'
'0001-MXS-imx23-olinuxino-Add-i2c-support.patch'
'0001-rtl8192cu.patch')
md5sums=('21223369d682bcf44bcdfe1521095983'
'b88977838a2a52ff4fb4e82b30726496'
'f1dceecd88bd7404bf7004b88eaac0a3'
'9d3c56a4b999c8bfbd4018089a62f662'
'13fc27b36015d5a4bd82ce3e6d9d016e'
'acc5de524247ec1aff5c9af6a486652f'
'3073241240a0536d53408bd94dd5644a')
build() {
cd "${srcdir}/linux-${_basekernel}"
patch -p1 -i "${srcdir}/patch-${pkgver}"
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
# ALARM patches
patch -Np1 -i "${srcdir}/0001-ARM-imx23-olinuxino-Add-spi-support.patch"
patch -Np1 -i "${srcdir}/0001-MXS-imx23-olinuxino-Add-i2c-support.patch"
patch -Np1 -i "${srcdir}/0001-rtl8192cu.patch"
cat "${srcdir}/config" > ./.config
# set extraversion to pkgrel
sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
# don't run depmod on 'make install'. We'll do this ourselves in packaging
sed -i '2iexit 0' scripts/depmod.sh
# get kernel version
make prepare
# load configuration
# Configure the kernel. Replace the line below with one of your choice.
#make menuconfig # CLI menu for configuration
#make nconfig # new CLI menu for configuration
#make xconfig # X-based configuration
#make oldconfig # using old config from previous kernel version
# ... or manually edit .config
# Copy back our configuration (use with new kernel version)
#cp ./.config ../${_basekernel}.config
####################
# stop here
# this is useful to configure the kernel
#msg "Stopping build"
#return 1
####################
#yes "" | make config
# build!
make ${MAKEFLAGS} zImage modules imx23-olinuxino.dtb
}
package_linux-olinuxino() {
pkgdesc="The Linux Kernel and modules - i.MX233 OLinuXino"
groups=('base')
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.16' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country')
provides=('kernel26' 'linux=${pkgver}')
conflicts=('kernel26-olinuxino')
install=${pkgname}.install
cd "${srcdir}/linux-${_basekernel}"
KARCH=arm
# get kernel version
_kernver="$(make kernelrelease)"
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
make INSTALL_MOD_PATH="${pkgdir}" modules_install
# Append olinuxino DT to zImage
cat arch/$KARCH/boot/zImage arch/arm/boot/imx23-olinuxino.dtb > "${pkgdir}/boot/zImage"
ln -sf "${pkgdir}/boot/zImage" .
# 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"
# Generate an imx233 boot image
msg "Generating PAL sdcard image ..."
ln -sf /opt/imx-bootlets-olinuxino
elftosb -z -c ./imx-bootlets-olinuxino/linux.bd -o ${pkgdir}/boot/oli-${_kernver}-pal.sb
msg "Generating NTSC sdcard image ..."
ln -sf /opt/imx-bootlets-olinuxino-ntsc
elftosb -z -c ./imx-bootlets-olinuxino-ntsc/linux.bd -o ${pkgdir}/boot/oli-${_kernver}-ntsc.sb
# 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' -exec gzip -9 {} \;
# make room for external modules
ln -s "../extramodules-${_basekernel}-${_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-${_basekernel}-${_kernelname:-ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_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"
}
package_linux-headers-olinuxino() {
pkgdesc="Header files and scripts for building modules for linux kernel - i.MX233 OLinuXino"
provides=('linux-headers=${pkgver}')
conflicts=('kernel26-headers-olinuxino')
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
cd "${pkgdir}/usr/lib/modules/${_kernver}"
ln -sf ../../../src/linux-${_kernver} build
cd "${srcdir}/linux-${_basekernel}"
install -D -m644 Makefile \
"${pkgdir}/usr/src/linux-${_kernver}/Makefile"
install -D -m644 kernel/Makefile \
"${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile"
install -D -m644 .config \
"${pkgdir}/usr/src/linux-${_kernver}/.config"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include"
for i in acpi asm-generic config crypto drm generated linux math-emu \
media net pcmcia scsi sound trace uapi video xen; do
cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/"
done
# copy arch includes for external modules
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH
cp -a arch/$KARCH/include ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/mach-mxs
cp -a arch/$KARCH/mach-mxs/include ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/mach-mxs/
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/plat-mxc
cp -a arch/$KARCH/plat-mxc/include ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/plat-mxc/
# copy files necessary for later builds, like nvidia and vmware
cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}"
cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}"
# fix permissions on scripts dir
chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel"
cp arch/${KARCH}/Makefile "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
if [ "${CARCH}" = "i686" ]; then
cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
fi
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel/"
# add headers for lirc package
# pci
for i in bt8xx cx88 saa7134; do
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
cp -a drivers/media/pci/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
done
# usb
for i in cpia2 em28xx pwc sn9c102; do
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
cp -a drivers/media/usb/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
done
# i2c
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c"
cp drivers/media/i2c/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
for i in cx25840; do
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
cp -a drivers/media/i2c/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
done
# add docbook makefile
install -D -m644 Documentation/DocBook/Makefile \
"${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
# add dm headers
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
cp drivers/md/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
# add inotify.h
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/linux"
cp include/linux/inotify.h "${pkgdir}/usr/src/linux-${_kernver}/include/linux/"
# add wireless headers
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
cp net/mac80211/*.h "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/9912
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core"
cp drivers/media/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core/"
# and...
# http://bugs.archlinux.org/task/11194
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
cp include/config/dvb/*.h "${pkgdir}/usr/src/linux-${_kernver}/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/src/linux-${_kernver}/drivers/media/dvb-frontends/"
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
# add dvb headers
# in reference to:
# http://bugs.archlinux.org/task/20402
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb"
cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends"
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners"
cp drivers/media/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners/"
# add xfs and shmem for aufs building
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm"
cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h"
# copy in Kconfig files
for i in `find . -name "Kconfig*"`; do
mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'`
cp ${i} "${pkgdir}/usr/src/linux-${_kernver}/${i}"
done
chown -R root.root "${pkgdir}/usr/src/linux-${_kernver}"
find "${pkgdir}/usr/src/linux-${_kernver}" -type d -exec chmod 755 {} \;
# strip scripts directory
find "${pkgdir}/usr/src/linux-${_kernver}/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/src/linux-${_kernver}/arch/{alpha,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,x86,xtensa}
}

View file

@ -0,0 +1,12 @@
diff -upr linux-3.0.orig/kernel/printk.c linux-3.0/kernel/printk.c
--- linux-3.0.orig/kernel/printk.c 2011-07-22 05:17:23.000000000 +0300
+++ linux-3.0/kernel/printk.c 2011-07-27 14:43:07.000000000 +0300
@@ -58,7 +58,7 @@ void asmlinkage __attribute__((weak)) ea
/* We show everything that is MORE important than this.. */
#define MINIMUM_CONSOLE_LOGLEVEL 1 /* Minimum loglevel we let people use */
-#define DEFAULT_CONSOLE_LOGLEVEL 7 /* anything MORE serious than KERN_DEBUG */
+#define DEFAULT_CONSOLE_LOGLEVEL 4 /* anything MORE serious than KERN_DEBUG */
DECLARE_WAIT_QUEUE_HEAD(log_wait);

3650
core/linux-olinuxino/config Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,40 @@
KERNEL_NAME=-olinuxino
KERNEL_VERSION=2.6.35-7-ARCH+
flush_kernel() {
echo "Do you want the new kernel flashed onto mmcblk0p1? [y|N] "
# something traps the last line of output, so users can't see the
# question ...
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
echo ""
echo "Specify NTSC or PAL display output [N|P]: "
read -r disp
if [[ $disp =~ ^([nN][tT][sS][cC]|[nN])$ ]]; then
echo "Writing the NTSC kernel image on /dev/mmcblk0p1 ..."
dd if=/boot/oli-${KERNEL_VERSION}-ntsc.sb of=/dev/mmcblk0p1 ibs=512 seek=4 conv=sync,notrunc
fi
if [[ $disp =~ ^([pP][aA][lL]|[pP])$ ]]; then
echo "Writing the PAL kernel image on /dev/mmcblk0p1 ..."
dd if=/boot/oli-${KERNEL_VERSION}-pal.sb of=/dev/mmcblk0p1 ibs=512 seek=4 conv=sync,notrunc
fi
fi
}
## arg 1: the new package version
post_install() {
flush_kernel
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
depmod ${KERNEL_VERSION}
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
flush_kernel
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
depmod ${KERNEL_VERSION}
}