core/linux-cubox cryptodev-linux-headless new package to get max ram but still has fb console

This commit is contained in:
pepedog 2012-12-19 07:35:24 -06:00
parent 870ee857d4
commit 944badc957
8 changed files with 4233 additions and 0 deletions

View file

@ -0,0 +1,110 @@
#
# Configuration for Cubox - /usr/share/alsa/cards/Kirkwood_SPDIF.conf
#
<confdir:pcm/front.conf>
Kirkwood_SPDIF.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type softvol
slave.pcm {
type hw
card $CARD
}
control {
name "PCM Playback Volume"
card $CARD
}
}
Kirkwood_SPDIF.pcm.default {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type plug
slave.pcm {
type softvol
slave.pcm {
@func concat
strings [ "dmix:" $CARD ]
}
control {
name = "PCM Playback Volume"
card $CARD
}
}
}
capture.pcm {
type plug
slave.pcm {
@func concat
strings [ "dnsoop:" $CARD ]
}
}
}
<confdir:pcm/iec958.conf>
Kirkwood_SPDIF.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD { type string }
@args.AES0 { type integer }
@args.AES1 { type integer }
@args.AES2 { type integer }
@args.AES3 { type integer }
type hooks
slave.pcm {
type hw
card $CARD
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
name "IEC958 Playback Default"
lock true
preserve true
optional true
value [ 0x06 0x82 0x00 0x01 ]
# value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}
<confdir:pcm/hdmi.conf>
Kirkwood_SPDIF.pcm.hdmi.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD { type string }
@args.AES0 { type integer }
@args.AES1 { type integer }
@args.AES2 { type integer }
@args.AES3 { type integer }
type hooks
slave.pcm {
type hw
card $CARD
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
name "IEC958 Playback Default"
lock true
preserve true
optional true
value [ 0x06 0x82 0x00 0x01 ]
# value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}

View file

@ -0,0 +1,158 @@
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# Maintainer: Dave ... <pepdog@archlinuxarm.org>
buildarch=4
pkgbase=linux-cubox-headless
pkgname=('linux-cubox-headless' 'linux-headers-cubox-headless')
_kernelname=${pkgname#linux}
_basekernel=3.5
pkgver=${_basekernel}.7
pkgrel=7
cryptover=1.5
arch=('arm')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage' 'git' 'python2')
options=('!strip')
source=('config'
'change-default-console-loglevel.patch'
"http://download.gna.org/cryptodev-linux/cryptodev-linux-${cryptover}.tar.gz"
'dovefb_patch1'.patch
'dovefb_patch2'.patch
"kirkwood-spdif-name.patch"
"Kirkwood_SPDIF.conf")
md5sums=('05dde562a417c40ec002451168c9f171'
'9d3c56a4b999c8bfbd4018089a62f662'
'3a4b8d23c1708283e29477931d63ffb8'
'f1a0a82c5a957c45d3a118e4f7c2a80e'
'778d87956820ce7bffe8bb1a45416d2e'
'9757a7460741b5284cadd0b12a2d7df6'
'a746383e6ce46bcecb662acb3ac21b3f')
__gitroot="git://github.com/vDorst/linux.git"
__gitname="linux"
build() {
cd "${srcdir}"
msg "Connecting to GIT server...."
if [ -d $__gitname ] ; then
cd $__gitname && git pull origin
msg "The local files are updated."
else
git clone --depth 1 $__gitroot
fi
msg "GIT checkout done or server timeout"
cd "${srcdir}/${__gitname}"
# 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"
#video patches
patch -Np1 -i "${srcdir}/dovefb_patch1.patch"
patch -Np1 -i "${srcdir}/dovefb_patch2.patch"
# Changed kirkwood spdif name to SPDIF instead of S/PDIF.
patch -Np1 -i "${srcdir}/kirkwood-spdif-name.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 ../${pkgver}.config
####################
# stop here
# this is useful to configure the kernel
#msg "Stopping build"
#return 1
####################
#yes "" | make config
# build!
make ${MAKEFLAGS} modules uImage
# build cryptodev module
cd "${srcdir}/cryptodev-linux-${cryptover}"
make KERNEL_DIR="${srcdir}/${__gitname}"
}
package_linux-cubox-headless() {
pkgdesc="The Linux Kernel and modules for the Cubox using maximum ram but has console fb still"
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-cubox' 'linux=${pkgver}' 'cryptodev_friendly')
conflicts=('kernel26' 'linux')
replaces=('kernel26')
backup=("etc/mkinitcpio.d/${pkgname}.preset")
install=${pkgname}.install
cd "${srcdir}/${__gitname}"
KARCH=arm
# get kernel version
_kernver="$(make kernelrelease)"
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
cd "${srcdir}/linux"
make INSTALL_MOD_PATH="${pkgdir}" modules_install
cp arch/$KARCH/boot/uImage "${pkgdir}/boot/uImage"
# 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' -exec 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"
# install cryptodev module
cd "${srcdir}/cryptodev-linux-${cryptover}"
make -C "${srcdir}/${__gitname}" INSTALL_MOD_PATH="${pkgdir}" SUBDIRS=`pwd` modules_install
cd "${srcdir}/${__gitname}"
# 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 -Dm644 "${srcdir}/Kirkwood_SPDIF.conf" \
"${pkgdir}/usr/share/alsa/cards/Kirkwood_SPDIF.conf"
}

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);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,54 @@
From: Jean-Francois Moine <moinejf@free.fr>
Date: Thu Nov 15 18:14:43 CET 2012
Stop the dovefb irq's after video display
This patch is to be applied to René van Dorst's linux kernel
git://github.com/vDorst/linux.git
branch
CuBox-v3.5.7-Patched
diff --git a/drivers/video/dovefb/dovefb_ovly.c b/drivers/video/dovefb/dovefb_ovly.c
index 68cfdd2..d640ac7 100644
--- a/drivers/video/dovefb/dovefb_ovly.c
+++ b/drivers/video/dovefb/dovefb_ovly.c
@@ -322,7 +322,7 @@ static int dovefb_ovly_ioctl(struct fb_info *fi, unsigned int cmd,
{
void __user *argp = (void __user *)arg;
struct dovefb_layer_info *dfli = fi->par;
- u32 x;
+ u32 x, irq_ena;
int vmode = 0;
int gfx_on = 1;
int vid_on = 1;
@@ -528,19 +528,19 @@ static int dovefb_ovly_ioctl(struct fb_info *fi, unsigned int cmd,
case DOVEFB_IOCTL_SWITCH_VID_OVLY:
if (copy_from_user(&vid_on, argp, sizeof(int)))
return -EFAULT;
+ x = readl(dfli->reg_base + LCD_SPU_DMA_CTRL0);
+ irq_ena = readl(dfli->reg_base + SPU_IRQ_ENA);
if (0 == vid_on) {
- x = readl(dfli->reg_base + LCD_SPU_DMA_CTRL0) &
- ~CFG_DMA_ENA_MASK;
- writel(x, dfli->reg_base + LCD_SPU_DMA_CTRL0);
+ x &= ~CFG_DMA_ENA_MASK;
+ irq_ena &= ~(DOVEFB_VID_INT_MASK | DOVEFB_VSYNC_INT_MASK);
} else {
- x = readl(dfli->reg_base + LCD_SPU_DMA_CTRL0) |
- CFG_DMA_ENA(0x1);
- writel(x, dfli->reg_base + LCD_SPU_DMA_CTRL0);
+ x |= CFG_DMA_ENA(0x1);
+
/* Enable VID & VSync. */
- x = readl(dfli->reg_base + SPU_IRQ_ENA) |
- DOVEFB_VID_INT_MASK | DOVEFB_VSYNC_INT_MASK;
- writel(x, dfli->reg_base + SPU_IRQ_ENA);
+ irq_ena |= DOVEFB_VID_INT_MASK | DOVEFB_VSYNC_INT_MASK;
}
+ writel(x, dfli->reg_base + LCD_SPU_DMA_CTRL0);
+ writel(irq_ena, dfli->reg_base + SPU_IRQ_ENA);
break;
case DOVEFB_IOCTL_SWITCH_GRA_OVLY:
if (copy_from_user(&gfx_on, argp, sizeof(int)))

View file

@ -0,0 +1,14 @@
diff -upr linux-a/drivers/video/dovefb/dovefb_ovly.c linux-b/drivers/video/dovefb/dovefb_ovly.c
--- linux-a/drivers/video/dovefb/dovefb_ovly.c 2012-11-16 05:47:41.682464311 -0600
+++ linux-b/drivers/video/dovefb/dovefb_ovly.c 2012-11-16 05:41:41.217634544 -0600
@@ -284,7 +284,9 @@ static int check_surface(struct fb_info
(dfli->surface.viewPortInfo.srcWidth != new_info->srcWidth ||
dfli->surface.viewPortInfo.srcHeight != new_info->srcHeight ||
dfli->surface.viewPortInfo.zoomXSize != new_info->zoomXSize ||
- dfli->surface.viewPortInfo.zoomYSize != new_info->zoomYSize)) {
+ dfli->surface.viewPortInfo.zoomYSize != new_info->zoomYSize ||
+ dfli->surface.viewPortInfo.ycPitch != new_info->ycPitch ||
+ dfli->surface.viewPortInfo.uvPitch != new_info->uvPitch)) {
var->xres = new_info->srcWidth;
var->yres = new_info->srcHeight;
var->xres_virtual = new_info->srcWidth;

View file

@ -0,0 +1,31 @@
--- a/sound/soc/kirkwood/kirkwood-spdif.c.orig 2012-11-25 12:55:11.314023286 +0200
+++ b/sound/soc/kirkwood/kirkwood-spdif.c 2012-11-25 12:55:37.494024113 +0200
@@ -72,8 +72,8 @@
static struct snd_soc_dai_link kirkwood_spdif_dai0[] = {
{
- .name = "S/PDIF0",
- .stream_name = "S/PDIF0 PCM Playback",
+ .name = "SPDIF0",
+ .stream_name = "SPDIF0 PCM Playback",
.platform_name = "kirkwood-pcm-audio.0",
.cpu_dai_name = "kirkwood-i2s.0",
.codec_dai_name = "dit-hifi",
@@ -84,7 +84,7 @@
static struct snd_soc_dai_link kirkwood_spdif_dai1[] = {
{
- .name = "S/PDIF1",
+ .name = "SPDIF1",
.stream_name = "IEC958 Playback",
.platform_name = "kirkwood-pcm-audio.1",
.cpu_dai_name = "kirkwood-i2s.1",
@@ -135,7 +135,7 @@
goto kirkwood_spdif_err_card_alloc;
}
- card->name = "Kirkwood S/PDIF";
+ card->name = "Kirkwood SPDIF";
card->owner = THIS_MODULE;
if (pdev->id == 0)
card->dai_link = kirkwood_spdif_dai0;

View file

@ -0,0 +1,24 @@
# arg 1: the new package version
# arg 2: the old package version
KERNEL_NAME=-cubox
KERNEL_VERSION=3.5.7-7-ARCH+
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}
}