Arch on Freerunner (Arch on ARM)
Hi all!
I know there is a thread about porting Arch Linux to ARM, but I think this is more related to porting it to Neo Freerunner phone.
Most of the info is currently located here:
http://wiki.openmoko.org/wiki/User:Hiciu
Includes instructions to build cross-compiling toolchain, current project status etc.
Is there anybody who would like to get involved?
We are in serious need of a leader for this project, but other help is welcome too
I'll probably start looking at some base PKGBUILDs (kernel26, gcc...). They probably need some work. And I was thinking trying to get basic install script setup ( debian install.sh could probably work as a good base). But for most of the stuff we need to wait for hiciu to finish building and making the qemu image.
Hi!
I am very interested in this project, I have been working for 2 months with a BeagleBoard with Debian, but I want to run it with Arch.
How can I get involved in this project?
Similar Messages
-
Merging Arch Linux ARM with mainstream Arch Linux
I just came across a thread [1] in the forums that had discussed unifying support for other architectures into mainstream ArchLinux. Although the thread was a couple of years old, there seemed to be considerable interest even then to bring in ARM support into the mainstream ArchLinux. Is there any possiblity of it happening now?
[1] https://bbs.archlinux.org/viewtopic.php?id=157314Trilby wrote:
note, this post is just from user Trilby, not moderator Trilby
hashken wrote:merging the projects would benefit everyone as a whole, as quality talent from both projects can now work on a unified project and reduce duplication of efforts.
This sounds nice - but on what basis is this actually true? If the criteria of unifying talent were sufficient to justify merging, then we should not only merge archlinux and archlinuxarm, but also ubuntu, mint, fedora, suse, and ever other distro out there. All the talent would be unified.
But all that talent would then be useless, as one who is familiar with fedora may not be helpful to someone using archlinux. Archlinuxarm is sufficiently different that one cannot assume that familiarity or proficiency in one will translate to the other.
There is a recurring case to have such a merger - and it may be well worth discussion. But what the discussion needs is a clear assessment of pros and cons. And a statement that merging unifies talents simply does not hold water as it simultaneously diffuses expertise.
Didn't Arch have an April Fool's joke one year about rebranding all the distros into one? -
We have been talking to the Arch Linux ARM team and have decided to refine our policy around that architecture.
The Other Architectures forum has been moved into the Technical Issues and Asssistance category, and the ARM sticky has been updated with clearer direction about our policy.
If you are an ARM user, please take a couple of minutes to familiarize yourself with the updated policy. Both the Arch mod team and the ALARM team feel that this is the best way to ensure that assistance is sought from the community that is best placed to help.Whoa, everyone's reading far too much into what I said. I just meant that I got it installed under the chroot in android following the steps that were on the plugapps site; the actual page doesn't seem to exist anymore, but I found similar instructions here. I meant that I thought it was cool that I had a functioning build of pacman running locally on the device. Didn't mean to imply that it was a native install.
Although I understand the reaction as I'm watching the developments in this thread with just as much anticipation.
Last edited by jb (2011-06-30 18:00:45) -
[solved]patch 2.6.29-3-ARCH confilict with aufs2
After checked the aufs2 standalone code and 2.6.29-3-ARCH patch, I found 2.6.29-3-ARCH confilict with aufs2...
2.6.29-3-ARCH changed the do_splice_from of fs/splice.c to vfs_splice_from... while aufs2 standalone need do_splice_from ...
And there is no such change on kernel official patch 2.6.29.1...
So,
If you need aufs2 support, abandon 2.6.29-3-ARCH patch is the best way...
-------------090406----------------
2.6.29.1-2-ARCH patch already contained aufs patch, use vfs_splice_from...
With kernel26-2.6.29.1-2.pkg.tar.gz, just need " modprobe aufs" to use aufs...
Last edited by carbonjiao (2009-04-07 01:49:36)HI, godane, thanks for your reply!
Could you share your kernel PKGBUILD?
I must add tuxonice patch and kernel UTF-8 Chinese characters patch...
Here is my PKGBUILD I am compliling now (haven't finished now...)
pkgname=kernel26-archlive
_realpkgname=kernel26
_basekernel=2.6.29
pkgver=2.6.29.1
pkgrel=1
_patchname="patch-${_basekernel}-3-ARCH"
pkgdesc="Archlive内核及模块,加入了gentoo官方补丁、UTF-8补丁、reiser4补丁、aufs补丁及tuxonice支持."
#pkgdesc="Kernel configs for Archlive, with Gentoo patch set, fbcondecor patch, Chinese fonts patch, \
# and reiser4 patch, aufs patch, also with tuxonice patch set."
arch=(i686 x86_64)
license=('GPL2')
groups=('base')
url="http://archlive.googlecode.com"
backup=(etc/mkinitcpio.d/${_realpkgname}.preset)
depends=('coreutils' 'module-init-tools' 'mkinitcpio>=0.5.18')
provides=('kernel26=2.6.29')
optdepends=('sreadahead: daemon for data sequential boot from disk')
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi' 'kernel26'
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
'gspcav1')
install=${_realpkgname}.install
source=(
http://www.cn.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
#http://www.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
#http://www.cn.kernel.org/pub/linux/kernel/v2.6/patch-${pkgver}.bz2
#http://www.kernel.org/pub/linux/kernel/v2.6/patch-${pkgver}.bz2
ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2
http://www.tuxonice.net/downloads/all/tuxonice-3.0-for-2.6.29.patch.bz2
#http://dev.gentoo.org/~dsd/genpatches/trunk/${_basekernel}/4100_dm-bbr.patch
#http://dev.gentoo.org/~dsd/genpatches/trunk/${_basekernel}/4200_fbcondecor-0.9.4.patch
#http://dev.gentoo.org/~dsd/genpatches/trunk/${_basekernel}/4400_alpha-sysctl-uac.patch
http://svn.berlios.de/svnroot/repos/fullstory/linux-sidux-2.6/tags/2.6.29-7/debian/patches/bugfix/ext4-flush-on-close.patch
#http://svn.berlios.de/svnroot/repos/fullstory/linux-sidux-2.6/tags/2.6.29-7/debian/patches/features/aufs2-20090322.diff
http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.29.patch.gz
http://nchc.dl.sourceforge.net/sourceforge/ibm-acpi/thinkpad-acpi-0.22-20090318-BETA_v2.6.29.patch.gz
config
config.x86_64
mkinitcpio.conf
kernel26.preset ecryptfs.patch
0001-kernel-trace-open.patch aufs2.patch aufs2-standalone.patch #aufs2-linux-2.6.29.patch
4100_dm-bbr.patch 4200_fbcondecor-0.9.4.patch 4400_alpha-sysctl-uac.patch
utf8-kernel-2.6-fonts-1.patch.tar.gz
utf8-kernel-2.6.29-core-1.patch
utf8-kernel-2.6.29-fbcondecor-1.patch
md5sums=('64921b5ff5cdadbccfcd3820f03be7d8'
#'1ee50bb06a8b981efb6cfacaee7ea2f2'
#'d94bf612ff1a7899f7da9baed4533cf0'
#'1cdc40cd1b8a3a9cfbb22626ad1e3d66'
#'325299ab1c4b5634ec7d2769031d29e0'
#'7ed983ea4f0f47844352ed6e81c8cb55'
build() {
[ "${CARCH}" = "i686" ] && KARCH=x86
[ "${CARCH}" = "x86_64" ] && KARCH=x86
### mkinitcpio
cd $startdir
mkdir $pkgdir/etc
cp mkinitcpio.conf $pkgdir/etc
chmod 644 $pkgdir/etc/mkinitcpio.conf
cd ${srcdir}/linux-$_basekernel
# applying aufs patch
patch -Np1 -i ${srcdir}/aufs2.patch || return 1
patch -Np1 -i ${srcdir}/aufs2-standalone.patch || return 1
patch -Np1 -i ${srcdir}/ecryptfs.patch || return 1
#patch -Np1 -i ${srcdir}/aufs2-linux-2.6.29.patch || return 1
# Applying gentoo patches
for i in $(ls ../[1-9][0-9][0-9][0-9]*);do
patch -Np1 -i ../$i
done
patch -Np1 -i ${srcdir}/0001-kernel-trace-open.patch #|| return 1
# Add kernel utf-8 characters patch
patch -Np1 -i ${srcdir}/utf8-kernel-2.6.29-core-1.patch || return 1
patch -Np1 -i ${srcdir}/utf8-kernel-2.6.29-fbcondecor-1.patch || return 1
patch -Np1 -i ${srcdir}/utf8-kernel-2.6-fonts-1.patch || return 1
patch -Np1 -i ${srcdir}/tuxonice-3.0-for-2.6.29.patch #|| return 1
# Add -ARCH patches
# See http://projects.archlinux.org/git/?p=linux-2.6-ARCH.git;a=summary
#patch -Np1 -i ${srcdir}/${_patchname} #|| return 1
# Applying official patch
patch -Np1 -i ${srcdir}/patch-$pkgver #|| return 1
# applying ext4 patch
patch -Np1 -i ${srcdir}/ext4-flush-on-close.patch #|| return 1
# applying reiserfs4 patch
patch -Np1 -i ${srcdir}/reiser4-for-2.6.29.patch #|| return 1
# applying thinkpad-acpi patch
patch -Np1 -i ${srcdir}/thinkpad-acpi-0.22-20090318-BETA_v2.6.29.patch #|| return 1
if [ "$CARCH" = "x86_64" ]; then
cp ../config.x86_64 ./.config
else
cp ../config ./.config
fi
source ./.config
_kernver="$_basekernel${CONFIG_LOCALVERSION}"
# configure kernel
# use menuconfig, if you want to change the configuration
# make menuconfig
yes "" | make config
# build kernel
make bzImage modules || return 1
mkdir -p $startdir/pkg/{lib/modules,boot}
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
install -D -m644 System.map $startdir/pkg/boot/System.map26
install -D -m644 arch/$KARCH/boot/bzImage $startdir/pkg/boot/vmlinuz26
install -D -m644 Makefile $startdir/pkg/usr/src/linux-$_kernver/Makefile
install -D -m644 kernel/Makefile $startdir/pkg/usr/src/linux-$_kernver/kernel/Makefile
install -D -m644 .config $startdir/pkg/usr/src/linux-$_kernver/.config
install -D -m644 .config $startdir/pkg/boot/kconfig26
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/include
for i in acpi asm-{generic,$KARCH} config linux math-emu media net pcmcia scsi sound video; do
cp -a include/$i $startdir/pkg/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/
# copy files necessary for later builds, like nvidia and vmware
cp Module.symvers $startdir/pkg/usr/src/linux-$_kernver
cp -a scripts $startdir/pkg/usr/src/linux-$_kernver
# fix permissions on scripts dir
chmod og-w -R $startdir/pkg/usr/src/linux-$_kernver/scripts
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/arch/$KARCH/kernel
cp arch/$KARCH/Makefile $startdir/pkg/usr/src/linux-$_kernver/arch/$KARCH/
if [ "${CARCH}" = "i686" ]; then
cp arch/$KARCH/Makefile_32.cpu $startdir/pkg/usr/src/linux-$_kernver/arch/$KARCH/
fi
cp arch/$KARCH/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-$_kernver/arch/$KARCH/kernel/
# add headers for lirc package
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video
cp drivers/media/video/*.h $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301
do
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h $startdir/pkg/usr/src/linux-$_kernver/drivers/media/video/$i
done
# add dm headers
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/drivers/md
cp drivers/md/*.h $startdir/pkg/usr/src/linux-$_kernver/drivers/md
# add inotify.h
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/include/linux
cp include/linux/inotify.h $startdir/pkg/usr/src/linux-$_kernver/include/linux/
# add CLUSTERIP file for iptables
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/net/ipv4/netfilter/
cp net/ipv4/netfilter/ipt_CLUSTERIP.c $startdir/pkg/usr/src/linux-$_kernver/net/ipv4/netfilter/
# add wireless headers
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/net/mac80211/
cp net/mac80211/*.h $startdir/pkg/usr/src/linux-$_kernver/net/mac80211/
# add xfs and shmem for aufs building
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/fs/xfs
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/mm
cp fs/xfs/xfs_sb.h $startdir/pkg/usr/src/linux-$_kernver/fs/xfs/xfs_sb.h
cp mm/shmem.c $startdir/pkg/usr/src/linux-$_kernver/mm/shmem.c
# add vmlinux
cp vmlinux $startdir/pkg/usr/src/linux-$_kernver
# copy in Kconfig files
for i in $(find . -name "Kconfig*")
do
mkdir -p $startdir/pkg/usr/src/linux-$_kernver/$(echo $i | sed 's|/Kconfig.*||')
cp $i $startdir/pkg/usr/src/linux-$_kernver/$i
done
cd $startdir/pkg/usr/src/linux-$_kernver/include && ln -s asm-$KARCH asm
chown -R root.root $startdir/pkg/usr/src/linux-$_kernver
find $startdir/pkg/usr/src/linux-$_kernver -type d -exec chmod 755 {} \;
cd $startdir/pkg/lib/modules/$_kernver && (rm -f source build; ln -sf ../../../usr/src/linux-$_kernver build)
# install fallback mkinitcpio.conf file and preset file for kernel
install -m644 -D ${srcdir}/${_realpkgname}.preset ${pkgdir}/etc/mkinitcpio.d/${_realpkgname}.preset || return 1
# set correct depmod command for install
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/kernel26.install
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${_realpkgname}.kver
# remove unneeded architectures
rm -rf $startdir/pkg/usr/src/linux-$_kernver/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa} -
Beaglebone black, arch, and docker
Based on reading this issue tracker:
https://github.com/dotcloud/docker/issues/636
I am under the impression that I should be able to install arch (I installed the latest this morning) on my beaglebone black and get docker working out of the box. I tried the following after installing docker with pacman:
[root@alarm tmp]# docker import http://archlinuxarm.org/os/ArchLinuxARM … est.tar.gz archbase
Downloading from http://archlinuxarm.org/os/ArchLinuxARM … est.tar.gz
b292df94485143e8417f827a8d89c80f17504d0fa34e051e388484d010b04515
[root@alarm tmp]# ===========================================>] 179.4 MB/179.4 MB
[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
archbase latest b292df944851 3 minutes ago 378.1 MB
[root@alarm tmp]# docker run -i -t archbase /bin/bash
2014/05/12 16:59:05 Error: Cannot start container 6f0ce084b89d2664f60f251a85285148695127989c0fcb882f65480dbe52aa78: mountpoint not found
It doesn't work. Does anyone have any insight?Even though you posted this in the 'other architectures' part of the forum, I would highly recommend you ask this on the Arch Linux ARM boards. The chances someone can help you with this specific problem will probably be much higher.
-
Should "Arch Linux" also include architectures beyond x86?
I've realized that there are separate community projects for ports of Arch to different architectures, e.g. Arch Linux ARM. Different cpu architectures are clearly becoming more and more important in the current world of technology. Would it not be logical to merge these all under "Arch Linux" as a whole? I feel that this would contribute to Arch's core value of simplicity.
Additionally, I feel like a port for Arch would be needed for the upcoming Parallela board, which I think will be very popular.
What's your take on it?The problem behind supporting a broad range of architectures is an obvious one: You need people to do the work. Gentoo excels at supporting many machine archs because it's a souce-based distribution. Hence, the work that Arch; devs do to give us repositories of binary packages are, in the case of Gentoo, off-loaded to the users. Anyone who wants to install Arch on, say, SPARC or PowerPC can probably do so, if they're willing to manually tweak the builds. Not sure why one would want to do so with Arch, though.
Mindstormcreator wrote:Different cpu architectures are clearly becoming more and more important in the current world of technology.
Disregarding ARM, what are these different architectures? All PCs use x86 these days, as do servers, the next generation of gaming consoles, most HTPCs...
OT:
Paralella Kickstarter Page wrote:
Q: Why do you call the Parallella a supercomputer?
The Parallella project is not a board, it's intended to be a long term computing project and community dedicated to advancing parallel computing. The current $99 board aren't considered supercomputers by 2012 standards, but a cluster of 10 Parallella boards would have been considered a supercomputer 10 years ago...
That's one hell of a bad sales pitch. -
Arch is an OS option on Pogoplug??
I just did a swift search of the forums after catching this on Lifehacker. (It's a couple days old, I was catching up after the weekend.)
Lifehacker Article
About half way through it, I noticed the update command... pacman! Am I just late to the party, or did PogoPlug port Arch?
Lifehacker wrote:
SSH back in again, because there are a few more things we'll want to do. First, update your Plugbox's packages:
pacman -Syu
You may need to run this a couple of times because pacman, itself, may need an update. Once pacman's done, you'll want to do a couple of other things..:B:. wrote:
LeoSolaris wrote:
I just did a swift search of the forums after catching this on Lifehacker. (It's a couple days old, I was catching up after the weekend.)
Lifehacker Article
About half way through it, I noticed the update command... pacman! Am I just late to the party, or did PogoPlug port Arch?
There is a topic around on Arch on ARM. Someone ported Arch to ARM, not just pacman .
https://bbs.archlinux.org/viewtopic.php?id=99109
urist already mentioned that link :-)
There's also http://wiki.archlinux.org/index.php/Arc … nux_Mobile -
SOLVED - Reinstall Arch on new thumb drive
Hello all, I'm a noob to Linux, but not afraid of command lines (old school dos guy). I bought a pogoplug on a whim and installed using these instructions: http://archlinuxarm.org/platforms/armv5 … 2-pinkgray but I would like to reinstall arch on a new faster thumb drive and start over. My question is how to go about this (I did google it too). I would like to avoid bricking the pogo. This is my thinking:
sda is the current slow, small, old thumbdrive, i plug in my new drive it would be sdb right?
My pass at the reinstall:
Start fdisk on the USB drive:
/sbin/fdisk /dev/sdb
At the fdisk prompt, delete old partitions and create a new one:
Type o. This will clear out any partitions on the drive.
Type p to list partitions. There should be no partitions left.
Now type n, then p for primary, 1 for the first partition on the drive, and then press ENTER, accepting default values.
Exit by typing w.
Now create the ext2 filesystem:
wget http://archlinuxarm.org/os/pogoplug/mke2fs
chmod 755 mke2fs
./mke2fs /dev/sdb1
mkdir usb
mount /dev/sdb1 usb
Download and install Arch Linux ARM:
cd usb
wget http://archlinuxarm.org/os/ArchLinuxARM … est.tar.gz
tar -xzvf ArchLinuxARM-armv5te-*.tar.gz # This will take a long time
rm ArchLinuxARM-armv5te-*.tar.gz
sync # Takes a while when using a flash drive
Clean up, reboot, remove old thumb drive. Cross your fingers and hope for the best.
cd ..
umount usb
/sbin/reboot
Once powered down, pull old thumb drive
The SSH key of your device will be different, so you need to tell Mac OS X or Linux to remove it from ~/.ssh/known_hosts before using SSH again:
ssh-keygen -R 192.168.1.123 # Use your device's IP
Log back in after your Pogoplug reboots using username root and password root.
*whew* so am I missing a step? Will the bootloader balk at the new drive?
Thanks in advance
Last edited by ubermacin (2013-01-20 04:36:58)Not sure. But I think they are images and system tar in your link.
For images I would use dd (as say Ŝaran and later resize). You write all the system in the thumb drive and get a bootloader.
The second (systema tar), you get all files but you don't get bootloader.
You can do, too, what Ŝaran say. Do an image of your current system with dd. It's like clonning. Later resize your filesystem.
dd if=old_thumb_drive of=new_thumb_drive bs=4M
(from a third system)
Beware with dd and /dev/ (same people say that it stands for data destroyer)
*bs=4M is, generally, the block size of thumbdrives. So it takes less time to write.
Last edited by Alber (2013-01-19 10:35:34) -
[SOLVED]Laptop Internal SD card reader no longer working
Two weeks ago I purchased a Raspberry Pi and set up my own SD card with Arch Linux ARM using the directions at http://archlinuxarm.org/platforms/armv6/raspberry-pi with the internal SD card reader on my laptop and had no issues. Today I decided to load up a XBMC distro to a new SD card, but my internal card reader doesn't seem to autodetect or mount my new card. I tried inserting my other card with Arch ARM that I know is a good card, but it no longer works with that card either. Here are all my logs that I could think of to post for any advice:
uname -r
3.9.8-1-ARCH
lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 02)
00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 4 (rev 02)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [IDE mode] (rev 02)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 02)
01:00.0 VGA compatible controller: NVIDIA Corporation G73M [GeForce Go 7600] (rev a1)
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 01)
06:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0)
06:04.0 CardBus bridge: ENE Technology Inc CB-712/4 Cardbus Controller (rev 10)
06:04.1 FLASH memory: ENE Technology Inc ENE PCI Memory Stick Card Reader Controller (rev 01)
06:04.2 SD Host controller: ENE Technology Inc ENE PCI Secure Digital Card Reader Controller (rev 01)
06:04.4 FLASH memory: ENE Technology Inc SD/MMC Card Reader Controller (rev 01)
lsusb
Bus 001 Device 002: ID 0c45:624f Microdia PC Camera (SN9C201 + OV9650)
Bus 004 Device 002: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 74.5G 0 disk
|-sda1 8:1 0 9.3G 0 part /
|-sda2 8:2 0 63.3G 0 part /home
`-sda3 8:3 0 1.9G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes, 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000f2f32
Device Boot Start End Blocks Id System
/dev/sda1 * 63 19535039 9767488+ 83 Linux
/dev/sda2 19535040 152296199 66380580 83 Linux
/dev/sda3 152296200 156301487 2002644 83 Linux
dmesg | tail
[17198.557922] mmc0: new SDHC card at address aaaa
[17535.391900] mmc0: card aaaa removed
[17537.984043] mmc1: new SDHC card at address aaaa
[18198.208331] usb 4-1: new full-speed USB device number 3 using uhci_hcd
[18199.855227] mmc1: card aaaa removed
[18221.345032] usb 4-1: USB disconnect, device number 3
[18473.771242] mmc1: new SDHC card at address aaaa
[20787.874847] mmc1: card aaaa removed
[21102.784624] mmc1: new high speed SDHC card at address e624
[21119.691467] mmc1: card e624 removed
It seems I have all the necessary information, but I am not sure where to go from here. It's obvious my laptop is detecting the card being inserted and removed, but the card reader is never listed in /dev so I can't mount it. It's listed under lspci but not under lsusb. I'm assuming that it was two weeks ago and that's why it worked, but I'm not sure how to get lsusb to detect it so it will work again. Thanks for any help you guys have.
Last edited by coolcashews (2013-07-06 00:32:55)Thanks for your quick reply. Here are the logs you asked for:
lsmod | grep mm
mmc_core 94486 2 sdhci,sdhci_pci
usb_common 954 1 usbcore
pacman -Qi linux
Name : linux
Version : 3.9.9-1
Description : The linux kernel and modules
Architecture : x86_64
URL : http://www.kernel.org/
Licenses : GPL2
Groups : base
Provides : kernel26=3.9.9
Depends On : coreutils linux-firmware kmod mkinitcpio>=0.7
Optional Deps : crda: to set the correct wireless channels of your country
Required By : None
Optional For : None
Conflicts With : kernel26
Replaces : kernel26
Installed Size : 65511.00 KiB
Packager : Tobias Powalowski <[email protected]>
Build Date : Wed Jul 3 16:00:01 2013
Install Date : Fri Jul 5 11:31:57 2013
Install Reason : Explicitly installed
Install Script : Yes
Validated By : Signature -
Trouble printing with my HP Deskjet printer using CUPS and hplip
tl;dr This 1,646 word post describes my frustration with CUPS and hplip. I cannot get my HP Deskjet F4400 set up with CUPS, and all the solutions I've tried don't work.
I'm running Arch Linux ARM on my Seagate DockStar, a small ARM-based "plug computer" that I use as a home server. My printer is the HP Deskjet F4480, which is part of the HP Deskjet F4400 series.
I previously had CUPS set up to share my printer with my home network, using hplip for the printer driver. I never upgraded CUPS or hplip because those versions worked fine, and I didn't want to break anything avoid breaking anything. The versions that I was using had to have been at least one to two years old.
Everything was working very smoothly... until a few days ago. The drive I was running Arch Linux ARM on became corrupt, so I had to install a fresh copy of the operating system. That meant losing all of the working versions and configuration files each application I had installed, including CUPS. I thought I had a backup image of the drive, but it didn't work when I tried to restore it. (Yes, it was stupid of me not to test my backup.)
Setting up CUPS was one of the first things that I wanted to do after reinstalling, since my family depends on the network printing functionality almost daily. Unfortunately, I could not get CUPS to work with my printer correctly. It wouldn't be able to display a list of drivers, HP's setup utility encountered an error adding it, and it threw various errors when I tried to print test pages. I ended up reading hundreds of forum posts, wiki articles, and CUPS/hplip tutorials to try to figure out how to properly set it up. I ended up spending a total of nearly ten hours trying to get the printer to print with CUPS, and it's still not working after all that work.
I'm going to explain in this post some of the many things that I've tried so far. I just removed all of the printing packages from my system and any extra files that were left behind. I'm now going to be installing all of the packages again and documenting everything that I have been trying to do to get it to work. I'll try to include exact error messages and logs where necessary.
1. I first found this article on the Arch Linux ARM website on how to set up a CUPS printer. I didn't really want to use webmin, but I did it anyway so that I could follow the guide. I installed all the packages mentioned except for cups-pdf, since I didn't need print to PDF support. Everything installed smoothly, and I configured CUPS and webmin to allow access to other computers on the network. I started to notice problems in the instructions - /etc/rc.d/cups was actually /etc/rc.d/cupsd, /etc/printers.conf was actually /etc/cups/printers.conf, and webmin didn't actually add anything to the printers.conf file. I uninstalled webmin at this point because I didn't need it, and I decided I wasn't going to follow that guide with incorrect information.
2. I then tried to set up the printer on my own using the CUPS web interface listening on port 631. I clicked the Add Printer button and it switched me to the HTTPS web interface. I then logged into the root account and was presented with the list of printers. My printer was listed as "HP Deskjet F4400 series (HP Deskjet F4400 series)", so I selected it and continued. I saw a list of printer models (PPD files) ending in CUPS+Gutenprint v5.2.9. There was no entry for my printer, so I tried the "HP DeskJet Series (en)" one. I set the default options and chose Maintenaince->Print test page. I then got a ridiculously simple error: "Unable to print test page: No such file or directory". How do I even know what file or directory it's referencing? I read online that it may be because I'm not in the lp group, but root is indeed in there. I saw in the error log "Avahi client failed: -26". I started dbus and avahi-daemon just in case, but I still got that silly error. I restarted cups and the same error message occured.
3. I researched online that pretty much the only way for my printer to have a driver would be to install hplip. Before installing hplip, I uninstalled CUPS, leaving cupsd.conf but deleting printers.conf. Then I installed CUPS and hplip together, with hplip requiring foomatic-db, foomatic-db-engine, and foomatic-filters. Everything seemed to install correctly. I started CUPS again and then ran hp-setup -i to try to install my printer. I selected USB and it found my printer, hp:/usb/Deskjet_F4400_series?serial=[printer serial number here]. I entered a simple name and then was told that no PPD file was found for the printer but that I could specify one manually. There were none I could find online; everywhere it just said to install hplip. I used the find command to find "f4400" and finally found 2 compressed PPDs located at /usr/share/ppd/HP/hp-deskjet_f4400_series-hpijs.ppd.gz and /usr/share/ppd/HP/hp-deskjet_f4400_series.ppd.gz. I gunzipped both of them and pointed hpsetup to the hpijs one, knowing that I was using the hpijs one when it was working before. It told me "Description for the file: HP Deskjet f4400 Series hpijs, 3.12.6". Hooray! I selected to use it, but then setup failed: "error: Printer queue setup failed. Please restart CUPS and try again." Ugh!
4. I restarted CUPS and went into the hp-setup process again. It gave me the same printer queue setup failed error. I don't know if these entries in the CUPS error log are related or not, but these errors relating to foomatic showed up. I restarted CUPS again and this time used the non-hpijs file with hp-setup. This one was called "Description for the file: HP Deskjet f4400 Series, hpcups 3.12.6". It failed again with the same error and the same entries in the error log. I found lots of posts online about this error, but none seemed to have a solution that would work for me. Now I tried running hp-setup in debug mode with -g. Here is what it said before the error. I then tried to Google "debug: addPrinter() returned (0, Unable to connect to CUPS server)". I saw on an Arch bug report to install dbus-python and python2-gobject, as well as create a symlink for /usr/bin/python2 to /usr/bin/python. It didn't work - same error.
5. I then tried to add the printer to CUPS via its web interface. Now there were two listed, HP Deskjet F4400 series (HP Deskjet F4400 series) and HP Deskjet F4400 series USB [printer serial number here] HPLIP (HP Deskjet F4400 series). So, hplip added the second one. I tried both of them, but after clicking Continue the page started to hang. I got another stupid, undescriptive error. "Unable to get list of printer drivers: Success". I saw the same foomatic errors in the error log as before. I then started reading the ArchWiki page on CUPS, located here. I tried the blacklisting usblp. I tried changing the permissions on the device node, although this starts to become ridiculous that it is even required to do that. Nothing was working; the printer installation still didn't work with hp-setup or with CUPS. Then, I found what I was looking for: the exact error I had on the wiki page! It said for "Unable to get list of printer drivers" you should "Try to remove Foomatic drivers." WTF? Foomatic is required for hplip, and hplip is required for my printer. I can't do that. Forum posts say to try that or do the permissions or usblp thing. Nothing is working.
6. I tried various other things to get it to work, even though I knew they probably wouldn't make it any different. I copied the PPDs from hplip to another folder and uninstalled hplip and foomatic. I then added them to /usr/share/cups/model and CUPS successfully found them and set up the printer. I reinstalled hplip and foomatic since they're needed for those PPDs to function, and I tried printing a test page. It failed. I tried using the CUPS web interface to modify the printer driver; nope, that wasn't going to happen: "Unable to get list of printer drivers: Success".
That concludes the list of some of the things that I have tried so far. I really want to get this printer working, but right now I am really fed up with CUPS and hplip. It's things like this that make me hesitant to recommend Linux to anyone else. So much manual configuration and tinkering the inner workings of things is required to do tasks that would be quite simple on Windows. For example, I can plug this printer into my Windows 7 machine right now, wait for the driver to automatically be installed and configured, and have a test page in my hands less than a minute after I first plugged in the USB cable. I can share the printer with any other Windows machine on the network by checking a single checkbox.
But back to my problem with getting the printer to work on my DockStar. I just uninstalled all of CUPS, hplip, and foomatic again and removed all of their files. I can walk through things to try that you guys post and then give you full logs of everything - just give me exactly what to do and install and the exact order to do it all in. I just don't know what to do at this point and am so frustrated with this that I'm about to give up.
Does anyone have any suggestions on how to get this printer working? I know this was a very long post, but I just wanted to explain everything that I've tried and how nothing worked. I really hope that we can figure this out so that I'll be able to print, and maybe it'll solve a few other people's problems with their printers, too. Thanks for reading, and thanks in advance for the help.Had similar issue with my HP Deskjet F4500C All in one printer, here's what I did:
make sure these packages are installed or install them
pacman -S cups cups-pdf hplip pyqt3 python2-pyqt
pacman -S system-config-printer-gnome
rc.d cups start
To add device and install hp driver:
1. Run ‘hp-setup’ as root.
2. Click ‘Show Advanced Options’ button and check-enable ‘Manual Discovery’.
3. Enter IP address 192.168.59.63 in the ‘…device ID…’ entry and click ‘Next’ to install driver.
run system-config-printer as root, to add printer
# system-config-printer
click “Add”, Select Device -> Network Printer -> input the IP address of the printer such as “192.168.1.3″, click “Find” -> “Process”
you should be ok from here, if not some further steps:
If you encounter the following error:
File “/usr/share/system-config-printer/newprinter.py”, line 1531, in getNetworkPrinterMakeModel
debugprint (host + “: ” + args)
TypeError: cannot concatenate ‘str’ and ‘list’ objects
You should comment out the error line at 1531 of newprinter.py, and then continue to add the printer.
4). Finally, you can run hp-check to see what problems exists for the printer. -
(SOLVED) 1st PKGBUILD & submission to AUR, cant do "makepkg --source"
I'm trying to add my own Live kernel to AUR
it is kernel 2.6.35.6 patched with Tuxonice, BFS, BFQ, Aufs2 and squashfs-lzma
however, when I do "makepkg --source"
it fails saying
PKGBUILD: line 34: syntax error near unexpected token `('
heres my PKGBUILD; mostly taken from the AUR's kernel26-pf PKGBUILD
# Original PKGBUILD from kernel26-pf
# Maintainer: <thepenandpaper at gmail dot com>
_basekernel=2.6.35
_pkgname=kernel26-livez
_pfrel=1
pkgname=kernel26-livez
pkgver=${_basekernel}
pkgrel=${_pfrel}
_kernelname=-livez
arch=(i686 x86_64)
_pkgdesc="Linux kernel and modules with patches (BFS included), tuxonice, BFQ]. Also included: aufs2 and squashfs-lzma."
pkgdesc=${_pkgdesc}
license=('GPL2')
groups=('base')
backup=(etc/mkinitcpio.d/${_pkgname}.preset)
depends=('coreutils' 'module-init-tools' 'linux-firmware' 'mkinitcpio>=0.5.20')
optdepends=('crda: to set the correct wireless channels of your country'
'pm-utils: utilities and scripts for suspend and hibernate power management'
'tuxonice-userui: TuxOnIce userspace user interface'
'hibernate-script: set of scripts for managing TuxOnIce, hibernation and suspend to RAM')
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
# kernel24 support is dropped since glibc24
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
'gspcav1' 'atl2' 'wlan-ng26' 'aufs' 'rt2500')
install='kernel26.install'
source=(http://multidistro.com/downloads/kernel26-livez/linux-2.6.35.6.tar.bz2
config config.x86_64 # the main kernel config files
kernel26.preset # standard config files for mkinitcpio ramdisk
sha256sums=('e25123d1397806015c9b480d9809834461af0aa90179d0404eae87db3598ae5e'
provides=(${_pkgname}=${_basekernel}) # for $pkgname-optimized
#provides=('kernel26-headers' 'kernel26=$pkgver') # for when you have no other kernel (which is a bad idea anyway)
build() {
KARCH=x86
cd ${srcdir}/linux-${_basekernel}
bzip2 -dk ${startdir}/logo_linux_*.bz2
mv -f ${startdir}/logo_linux_*.p?m drivers/video/logo/
bzip2 -dc ${srcdir}/${_pfpatchname} | patch -Np1
patch -Np1 < ${srcdir}/aufs2-sqlzma.patch
sed -i "s/EXTRAVERSION = -${_pfrel}/EXTRAVERSION = ${_kernelname}/" Makefile
if [ "$CARCH" = "x86_64" ]; then
cat ../config.x86_64 >./.config
else
cat ../config >./.config
fi
_arch=$CARCH
echo
echo "==================================================="
echo "You might be prompted below for some config options"
echo "==================================================="
echo
echo "Do you want to use your running kernel's config? (y/N)"
echo "(needs IKCONFIG and IKCONFIG_PROC, run 'modprobe configs'"
echo " as root before hitting <Y>, if uncertain)"
read answer
shopt -s nocasematch
if [[ "$answer" = "y" ]]; then
if [[ -s /proc/config.gz ]]; then
echo "Extracting config from /proc/config.gz..."
modprobe configs
zcat /proc/config.gz > ./.config
else
echo "You kernel was not compiled with IKCONFIG_PROC. Using stock ARCH kernel .config (with BFS and TuxOnIce enabled)"
fi
fi
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"\"|g" ./.config
fi
# Make some good use of MAKEFLAGS
MAKEFLAGS=`grep -v '#' /etc/makepkg.conf | grep MAKEFLAGS= | sed s/MAKEFLAGS=// | sed s/\"//g`
# get kernel version
make ${MAKEFLAGS} prepare
# uncomment to decrease kernel size and compilation time. However, be prepared to deal with missing modules :P
# make localmodconfig
# allows you to edit config
# make menuconfig && cp -v .config ${startdir}/config && msg "Stopping build"
# load configuration
# yes "" | make config
# This allows building cpu-optimized packages with according package names.
# Useful for repo maintainers.
CPU=`egrep "MK8=y|MCORE2=y|MPSC=y|MATOM=y|MPENTIUMII=y|MPENTIUMIII=y|MPENTIUMM=y|MPENTIUM4=y|MK7=y|CONFIG_GENERIC_CPU=y|CONFIG_X86_GENERIC=y" ./.config`
CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
case $CPU in
CORE2)
pkgname="${_pkgname}-core2"
pkgdesc="${_pkgdesc} Intel Core2 optimized."
K8)
pkgname="${_pkgname}-k8"
pkgdesc="${_pkgdesc} AMD K8 optimized."
PSC)
pkgname="${_pkgname}-psc"
pkgdesc="${_pkgdesc} Intel Pentium4/D/Xeon optimized."
ATOM)
pkgname="${_pkgname}-atom"
pkgdesc="${_pkgdesc} Intel Atom optimized."
K7)
pkgname="${_pkgname}-k7"
pkgdesc="${_pkgdesc} AMD K7 optimized."
PENTIUMII)
pkgname="${_pkgname}-p3"
pkgdesc="${_pkgdesc} Intel Pentium3 optimized."
PENTIUMIII)
pkgname="${_pkgname}-p2"
pkgdesc="${_pkgdesc} Intel Pentium2 optimized."
PENTIUMM)
pkgname="${_pkgname}-pm"
pkgdesc="${_pkgdesc} Intel Pentium-M optimized."
PENTIUM4)
pkgname="${_pkgname}-p4"
pkgdesc="${_pkgdesc} Intel Pentium4 optimized."
default)
pkgname="${_pkgname}"
pkgdesc="Linux kernel and modules with pf-kernel patch [-ck patchset (BFS included), tuxonice, BFQ, IMQ]. Also included: aufs2 and squashfs-lzma."
esac
# build!
_kernver="$(make kernelrelease)"
make ${MAKEFLAGS} bzImage modules
### package_kernel26
mkdir -p ${pkgdir}/{lib/modules,boot}
make INSTALL_MOD_PATH=${pkgdir} modules_install
cp System.map ${pkgdir}/boot/System.map26${_kernelname}
cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
# add vmlinux
# cp vmlinux ${pkgdir}/usr/src/linux-${_kernver}
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
# install fallback mkinitcpio.conf file and preset file for kernel
install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset
# 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}/kernel26.install
sed \
-e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
-e "s|default_image=.*|default_image=\"/boot/${_pkgname}.img\"|g" \
-e "s|fallback_image=.*|fallback_image=\"/boot/${_pkgname}-fallback.img\"|g" \
-i ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.kver
### package_kernel26-headers
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 generated linux math-emu media net pcmcia scsi sound trace video; 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/x86
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
# 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
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$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/dvb-core
cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/11194
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
[[ -e 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/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
# 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
# add headers for virtualbox
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/drm ${pkgdir}/usr/src/linux-${_kernver}/include/
# add headers for broadcom wl
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/trace ${pkgdir}/usr/src/linux-${_kernver}/include/
# 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 {} \;
cd ${pkgdir}/lib/modules/${_kernver} && \
(rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
# 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}
# remove the firmware
rm -rf ${pkgdir}/lib/firmware
# eof
line #34 is the sha256sum line
heres the contents of the source folder "kernel26-livez"
config
config.x86_64
kernel26.install
kernel26.preset
PKGBUILD
can anyone tell me whats wrong,etc?
I reall hate the syntax error issues as no matter how I have edited it, the same error?
thanks
Last edited by 72linus (2010-09-30 00:08:28)yep
thanks guys I got it!
PKGBUILD
# Original PKGBUILD from kernel26-pf
# Maintainer: <thepenandpaper at gmail dot com>
_basekernel=2.6.35
_pkgname=kernel26-livez
_pfrel=1
pkgname=kernel26-livez
pkgver=${_basekernel}
pkgrel=${_pfrel}
_kernelname=-livez
arch=(i686 x86_64)
_pkgdesc="Linux kernel and modules with patches (BFS included), tuxonice, BFQ]. Also included: aufs2 and squashfs-lzma."
pkgdesc=${_pkgdesc}
license=('GPL2')
groups=('base')
backup=(etc/mkinitcpio.d/${_pkgname}.preset)
depends=('coreutils' 'module-init-tools' 'linux-firmware' 'mkinitcpio>=0.5.20')
optdepends=('crda: to set the correct wireless channels of your country'
'pm-utils: utilities and scripts for suspend and hibernate power management'
'tuxonice-userui: TuxOnIce userspace user interface'
'hibernate-script: set of scripts for managing TuxOnIce, hibernation and suspend to RAM')
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
# kernel24 support is dropped since glibc24
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
'gspcav1' 'atl2' 'wlan-ng26' 'aufs' 'rt2500')
install='kernel26.install'
source=(http://multidistro.com/downloads/kernel26-livez/linux-2.6.35.6.tar.bz2
config config.x86_64 # the main kernel config files
kernel26.preset) # standard config files for mkinitcpio ramdisk
sha256sums=('e25123d1397806015c9b480d9809834461af0aa90179d0404eae87db3598ae5e')
provides=(${_pkgname}=${_basekernel}) # for $pkgname-optimized
#provides=('kernel26-headers' 'kernel26=$pkgver') # for when you have no other kernel (which is a bad idea anyway)
build() {
KARCH=x86
cd ${srcdir}/linux-${_basekernel}
bzip2 -dk ${startdir}/logo_linux_*.bz2
mv -f ${startdir}/logo_linux_*.p?m drivers/video/logo/
bzip2 -dc ${srcdir}/${_pfpatchname} | patch -Np1
patch -Np1 < ${srcdir}/aufs2-sqlzma.patch
sed -i "s/EXTRAVERSION = -${_pfrel}/EXTRAVERSION = ${_kernelname}/" Makefile
if [ "$CARCH" = "x86_64" ]; then
cat ../config.x86_64 >./.config
else
cat ../config >./.config
fi
_arch=$CARCH
echo
echo "==================================================="
echo "You might be prompted below for some config options"
echo "==================================================="
echo
echo "Do you want to use your running kernel's config? (y/N)"
echo "(needs IKCONFIG and IKCONFIG_PROC, run 'modprobe configs'"
echo " as root before hitting <Y>, if uncertain)"
read answer
shopt -s nocasematch
if [[ "$answer" = "y" ]]; then
if [[ -s /proc/config.gz ]]; then
echo "Extracting config from /proc/config.gz..."
modprobe configs
zcat /proc/config.gz > ./.config
else
echo "You kernel was not compiled with IKCONFIG_PROC. Using stock ARCH kernel .config (with BFS and TuxOnIce enabled)"
fi
fi
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"\"|g" ./.config
fi
# Make some good use of MAKEFLAGS
MAKEFLAGS=`grep -v '#' /etc/makepkg.conf | grep MAKEFLAGS= | sed s/MAKEFLAGS=// | sed s/\"//g`
# get kernel version
make ${MAKEFLAGS} prepare
# uncomment to decrease kernel size and compilation time. However, be prepared to deal with missing modules :P
# make localmodconfig
# allows you to edit config
# make menuconfig && cp -v .config ${startdir}/config && msg "Stopping build"
# load configuration
# yes "" | make config
# This allows building cpu-optimized packages with according package names.
# Useful for repo maintainers.
CPU=`egrep "MK8=y|MCORE2=y|MPSC=y|MATOM=y|MPENTIUMII=y|MPENTIUMIII=y|MPENTIUMM=y|MPENTIUM4=y|MK7=y|CONFIG_GENERIC_CPU=y|CONFIG_X86_GENERIC=y" ./.config`
CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
case $CPU in
CORE2)
pkgname="${_pkgname}-core2"
pkgdesc="${_pkgdesc} Intel Core2 optimized."
K8)
pkgname="${_pkgname}-k8"
pkgdesc="${_pkgdesc} AMD K8 optimized."
PSC)
pkgname="${_pkgname}-psc"
pkgdesc="${_pkgdesc} Intel Pentium4/D/Xeon optimized."
ATOM)
pkgname="${_pkgname}-atom"
pkgdesc="${_pkgdesc} Intel Atom optimized."
K7)
pkgname="${_pkgname}-k7"
pkgdesc="${_pkgdesc} AMD K7 optimized."
PENTIUMII)
pkgname="${_pkgname}-p3"
pkgdesc="${_pkgdesc} Intel Pentium3 optimized."
PENTIUMIII)
pkgname="${_pkgname}-p2"
pkgdesc="${_pkgdesc} Intel Pentium2 optimized."
PENTIUMM)
pkgname="${_pkgname}-pm"
pkgdesc="${_pkgdesc} Intel Pentium-M optimized."
PENTIUM4)
pkgname="${_pkgname}-p4"
pkgdesc="${_pkgdesc} Intel Pentium4 optimized."
default)
pkgname="${_pkgname}"
pkgdesc="Linux kernel and modules with pf-kernel patch [-ck patchset (BFS included), tuxonice, BFQ, IMQ]. Also included: aufs2 and squashfs-lzma."
esac
# build!
_kernver="$(make kernelrelease)"
make ${MAKEFLAGS} bzImage modules
### package_kernel26
mkdir -p ${pkgdir}/{lib/modules,boot}
make INSTALL_MOD_PATH=${pkgdir} modules_install
cp System.map ${pkgdir}/boot/System.map26${_kernelname}
cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
# add vmlinux
# cp vmlinux ${pkgdir}/usr/src/linux-${_kernver}
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
# install fallback mkinitcpio.conf file and preset file for kernel
install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset
# 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}/kernel26.install
sed \
-e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
-e "s|default_image=.*|default_image=\"/boot/${_pkgname}.img\"|g" \
-e "s|fallback_image=.*|fallback_image=\"/boot/${_pkgname}-fallback.img\"|g" \
-i ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.kver
### package_kernel26-headers
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 generated linux math-emu media net pcmcia scsi sound trace video; 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/x86
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
# 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
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$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/dvb-core
cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/11194
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
[[ -e 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/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
# 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
# add headers for virtualbox
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/drm ${pkgdir}/usr/src/linux-${_kernver}/include/
# add headers for broadcom wl
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/trace ${pkgdir}/usr/src/linux-${_kernver}/include/
# 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 {} \;
cd ${pkgdir}/lib/modules/${_kernver} && \
(rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
# 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}
# remove the firmware
rm -rf ${pkgdir}/lib/firmware
# eof
kernel26.preset
# mkinitcpio preset file for kernel26
# DO NOT EDIT THIS LINE:
source /etc/mkinitcpio.d/kernel26-livez.kver
ALL_config="/etc/mkinitcpio.conf"
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/kernel26-livez.img"
#default_options=""
#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/kernel26-livez-fallback.img"
fallback_options="-S autodetect"
kernel26.install
# arg 1: the new package version
# arg 2: the old package version
KERNEL_NAME=-livez
KERNEL_VERSION=2.6.35-livez
post_install () {
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
depmod $KERNEL_VERSION
# generate init ramdisks
echo ">>> MKINITCPIO SETUP"
echo ">>> ----------------"
echo ">>> If you use LVM2, Encrypted root or software RAID,"
echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
echo ">>> More information about mkinitcpio setup can be found here:"
echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
echo ""
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
/sbin/mkinitcpio -p kernel26${KERNEL_NAME}
post_upgrade() {
pacman -Q grub &>/dev/null
hasgrub=$?
pacman -Q grub2 &>/dev/null
hasgrub2=$?
pacman -Q lilo &>/dev/null
haslilo=$?
# reminder notices
if [ $haslilo -eq 0 ]; then
echo ">>>"
if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
else
echo ">>> You appear to be using the LILO bootloader. You should run"
echo ">>> 'lilo' before rebooting."
fi
echo ">>>"
fi
if grep "^[^#]*/boot" /etc/fstab 2>&1 >/dev/null; then
if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then
echo "WARNING: /boot appears to be a seperate partition but is not mounted"
echo " This is most likely not what you want. Please mount your /boot"
echo " partition and reinstall the kernel unless you are sure this is OK"
fi
fi
if [ "`vercmp $2 2.6.13`" -lt 0 ]; then
# important upgrade notice
echo ">>>"
echo ">>> IMPORTANT KERNEL UPGRADE NOTICE"
echo ">>> -------------------------------"
echo ">>> As of kernel 2.6.13, DevFS is NO LONGER AVAILABLE!"
echo ">>> If you still use DevFS, please make the transition to uDev before"
echo ">>> rebooting. If you really need to stay with DevFS for some reason,"
echo ">>> then you can manually downgrade to an older version:"
echo ">>>"
echo ">>> # pacman -U http://archlinux.org/~judd/kernel/kernel26-scsi-2.6.12.2-1.pkg.tar.gz"
echo ">>>"
echo ">>> If you choose to downgrade, don't forget to add kernel26-scsi to your"
echo ">>> IgnorePkg list in /etc/pacman.conf"
echo ">>>"
echo ">>> (NOTE: The following portion applies to uDev users as well!)"
echo ">>>"
echo ">>> If you use any DevFS paths in your GRUB menu.lst, then you will not"
echo ">>> be able to boot! Change your root= parameter to use the classic"
echo ">>> naming scheme."
echo ">>>"
echo ">>> EXAMPLES:"
echo ">>> - change root=/dev/discs/disc0/part3 to root=/dev/sda3"
echo ">>> - change root=/dev/md/0 to root=/dev/md0"
echo ">>>"
fi
# generate new init ramdisk
if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
echo ">>> --------------------------------------------------------------"
echo ">>> | WARNING: |"
echo ">>> |mkinitrd is not supported anymore in kernel >=2.6.18 series!|"
echo ">>> | Please change to Mkinitcpio setup. |"
echo ">>> --------------------------------------------------------------"
echo ">>>"
fi
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
depmod $KERNEL_VERSION
echo ">>> MKINITCPIO SETUP"
echo ">>> ----------------"
if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
echo ">>> Please change your bootloader config files:"
echo ">>> Grub: /boot/grub/menu.lst | Lilo: /etc/lilo.conf"
echo "------------------------------------------------"
echo "| - initrd26.img to kernel26${KERNEL_NAME}.img |"
echo "| - initrd26-full.img to kernel26${KERNEL_NAME}-fallback.img |"
echo "------------------------------------------------"
fi
if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
echo ""
echo ">>> New PATA/IDE subsystem - EXPERIMENTAL"
echo ">>> ----------"
echo ">>> To use the new pata drivers, change the 'ide' hook "
echo ">>> to 'pata' in /etc/mkinicpio.conf HOOKS="
echo ">>> The new system changes: /dev/hd? to /dev/sd?"
echo ">>> Don't forget to modify GRUB, LILO and fstab to the"
echo ">>> new naming system. "
echo ">>> eg: hda3 --> sda3, hdc8 --> sdc8"
echo ""
echo ">>> piix/ata_piix (Intel chipsets) - IMPORTANT"
echo "----------"
echo ">>> If you have enabled ide/pata/sata HOOKs in /etc/mkinitcpio.conf"
echo ">>> the 'ata_piix' module will be used."
echo ">>> This may cause your devices to shift names, eg:"
echo ">>> - IDE: devices from hd? to sd?"
echo ">>> - SATA: sda might shift to sdc if you have 2 other disks on a PIIX IDE port."
echo ">>> To check if this will affect you, check 'mkinitcpio -M' for piix/ata_piix"
echo ""
fi
echo ">>> If you use LVM2, Encrypted root or software RAID,"
echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
echo ">>> More information about mkinitcpio setup can be found here:"
echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
echo ""
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
/sbin/mkinitcpio -p kernel26${KERNEL_NAME} -m "ATTENTION:\nIf you get a kernel panic below
and are using an Intel chipset, append 'earlymodules=piix' to the
kernel commandline"
else
/sbin/mkinitcpio -p kernel26${KERNEL_NAME}
fi
if [ "`vercmp $2 2.6.21`" -lt 0 ]; then
echo ""
echo "Important ACPI Information:"
echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized."
echo ">>> The modules are located at:"
echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi"
echo ">>> For more information about ACPI modules check this wiki page:"
echo ">>> 'http://wiki.archlinux.org/index.php/ACPI_modules'"
fi
post_remove() {
rm -f /boot/kernel26${KERNEL_NAME}.img
rm -f /boot/kernel26${KERNEL_NAME}-fallback.img
so, I just tar.gz the kernel26-livez folder which contains
config
config.x86_64
kernel26.install
kernel26.preset
PKGBUILD
and submit to AUR??
first, I'm going to run it thru the motions on my 32bit and x86_64 arch installs to test it
as I already have compiled it successfully, and now want to package it,etc
thanks for all your help!
PS
I also have to make a AUR package for the linux-live-6.30_x86 and linux-live-6.3.0x86_64 remaster kits which this kernel is meant for
and gotta figure out how to do that too...
Last edited by 72linus (2010-09-27 20:26:04) -
Makepkg fails on custom kernel.
Hi.
I'm trying to compile the arch kernel with a few added patches to increase battery life.
What I have done is: Installed abs, and ran ABS as root. Then I made a directory called kernel, copied the kernel26 from ABS to that directory (so kernel had a subdirectory called kernel26).
Then I ran this script (changed the name to mine) in the kernel (not kernel26) folder, which created a new kernel26-gigamo folder.
What I did next was copy these four patches to that directory, and added them in to the pkgbuild:
avoid-overflows-in-kernel-timec.patch
clockevent-simplify-list-operations.patch
uvesafb-small-cleanups.patch
writeback-speed-up-writeback-of-big-dirty-files.patch
(they come from here)
My PKGBUILD:
# $Id: PKGBUILD,v 1.294 2008/03/05 14:44:07 tpowa Exp $
# Maintainer: Tobias Powalowski <[email protected]>
# Maintainer: Thomas Baechler <[email protected]>
pkgname=kernel26-gigamo
_basekernel=2.6.24
pkgver=2.6.24.3
pkgrel=3
pkgdesc="The Linux Kernel and modules"
arch=(i686 x86_64)
license=('GPL2')
groups=('base')
url="http://www.kernel.org"
backup=('boot/kconfig26-gigamo' etc/mkinitcpio.d/${pkgname}.preset etc/mkinitcpio.d/${pkgname}-fallback.conf)
depends=('coreutils' 'module-init-tools' 'mkinitcpio>=0.5.15')
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26-gigamo now
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
# kernel24 support is dropped since glibc24
replaces=('kernel24' 'kernel24-scsi' 'kernel26-gigamo-scsi'
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs')
md5sums=('')
install=kernel26-gigamo.install
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
### next two lines only needed for rc kernel building
#http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.24-rc6.bz2
#http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.24-rc6-git2.bz2
# the main kernel config files
config config.x86_64
# the archlinux boot logos
logo_linux_clut224.ppm
logo_linux_mono.pbm
logo_linux_vga16.ppm
# standard config files for mkinitcpio ramdisk
kernel26-gigamo.preset
mkinitcpio-$pkgname.conf
# add possibility to load your own dsdt acpi table
acpi-dsdt-initrd-v0.8.4-2.6.21.patch
# own patches
avoid-overflows-in-kernel-timec.patch
clockevent-simplify-list-operations.patch
uvesafb-small-cleanups.patch
writeback-speed-up-writeback-of-big-dirty-files.patch
# fix bluetooth on some toshiba notebooks
toshiba-bluetooth.patch
# add additional unusual usb entry
usb-storage-unusual-devs.patch
# improve intel macintosh support
mactel-linux-2.6.24.patch
# fix broken acpi c states on buggy bioses, which violate acpi specification
acpi-buggy-bios.patch
# add squashfs and unionfs
http://heanet.dl.sourceforge.net/sourceforge/squashfs/squashfs3.3.tar.gz
http://download.filesystems.org/unionfs/stable/unionfs-2.2.4_for_2.6.24.2.diff.gz
# patch below for aufs compatibility
lhash-2.6.24.patch
put_filp-2.6.24.patch
sec_perm-2.6.24.patch
splice-2.6.24.patch
#put_filp.patch
# add possibility to undervolt certain cpus
linux-phc-0.3.0-kernel-vanilla-2.6.23rc3.patch
# adding genpatches from gentoo
2000_no-if-addrlabel.patch
2100_sd-sr-medium-detection.patch
2101_sr-follow-tray-status.patch
2102_sr-test-unit-ready.patch
2300_pci-use-conf1.patch
2400_e1000e-crc-stripping.patch
2405_sis190-eeprom-mac.patch
2500_arcmsr-dma-coherent-warnings.patch
2700_alsa-hda-lifebook-e8410.patch
# fix Leadtek_WinFast_2000
winfast-2000.patch
# fix fuse
fuse-2.6.24.patch
# fix ata limit
ata-2.6.24.patch
# fix keymap
keymap-2.6.24.patch
# fix some sis agp ids
sis671-intelgly-2.6.24.patch
build() {
[ "${CARCH}" = "i686" ] && KARCH=x86
[ "${CARCH}" = "x86_64" ] && KARCH=x86
cd $startdir/src/linux-$_basekernel
# add upstream patch from 2.6.24 series
patch -Np1 -i ../patch-$pkgver || return 1
# add queued patches for 2.6.24 series
#http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
#patch -Np1 -i ../pre-2.6.24.3.patch || return 1
### next 2 lines are only needed for rc kernels
#patch -Np1 -i ../patch-$pkgver-rc6 || return 1
#patch -Np1 -i ../patch-2.6.24-rc6-git2 || return 1
# add custom acpi dsdt patch, in reference to:
# http://gaugusch.at/kernel.shtml
# http://acpi.sourceforge.net
patch -Np1 -i ../acpi-dsdt-initrd-v0.8.4-2.6.21.patch || return 1
# fix enabling of bluetooth on some toshiba notebooks in reference to:
# http://bugs.archlinux.org/task/5608
# http://www.cwrose.de/toshiba/s5200.html#bluetooth
patch -Np1 -i ../toshiba-bluetooth.patch || return 1
# fix I/O errors with Teac HD-35PU devices
patch -Np1 -i ../usb-storage-unusual-devs.patch || return 1
# improve intel macintosh support, in reference to:
# http://www.mactel-linux.org/wiki/Main_Page
# http://mactel-linux.svn.sourceforge.net/viewvc/mactel-linux/trunk/kernel/
patch -Np1 -i ../mactel-linux-2.6.24.patch || return 1
# add possibility to undervolt certain cpus, in reference to:
# https://www.dedigentoo.org/trac/linux-phc/
patch -Np1 -i ../linux-phc-0.3.0-kernel-vanilla-2.6.23rc3.patch || return 1
# fix buggy bios acpi to get c states, which violate acpi specification, in reference to:
# http://bugzilla.kernel.org/show_bug.cgi?id=7578
# http://bugs.archlinux.org/task/6875
patch -Np1 -i ../acpi-buggy-bios.patch || return 1
# fix Leadtek_WinFast_2000
# in reference to:
# http://www.linuxtv.org/v4lwiki/index.php/Leadtek_WinFast_2000
patch -Np0 -i ../winfast-2000.patch || return 1
# fix fuse
# in reference to:
# http://groups.google.com/group/linux.kernel/msg/20cd4e76b289d738
patch -Np1 -i ../fuse-2.6.24.patch || return 1
# fix keymaps
# in reference to:
# http://bugzilla.kernel.org/show_bug.cgi?id=10143
# http://bugs.archlinux.org/task/9593
patch -Np1 -i ../keymap-2.6.24.patch || return 1
# fix sis ids
# in reference to:
# http://www.linuxconsulting.ro/xorg-drivers/
# http://bugs.archlinux.org/task/9655
patch -Np1 -i ../sis671-intelgly-2.6.24.patch || return 1
# fix some ata limits
# http://bugs.archlinux.org/task/9386
# in reference to:
# http://www.mail-archive.com/linux-ide%40vger.kernel.org/msg14722.html
patch -Np2 -i ../ata-2.6.24.patch || return 1
# adding some genpatches from gentoo, in reference to:
# http://sources.gentoo.org/viewcvs.py/linux-patches/genpatches-2.6/trunk/2.6.24/
patch -Np1 -i ../2000_no-if-addrlabel.patch || return 1
patch -Np1 -i ../2100_sd-sr-medium-detection.patch || return 1
patch -Np1 -i ../2101_sr-follow-tray-status.patch || return 1
patch -Np1 -i ../2102_sr-test-unit-ready.patch || return 1
patch -Np1 -i ../2300_pci-use-conf1.patch || return 1
patch -Np1 -i ../2400_e1000e-crc-stripping.patch || return 1
patch -Np1 -i ../2405_sis190-eeprom-mac.patch || return 1
patch -Np1 -i ../2500_arcmsr-dma-coherent-warnings.patch || return 1
patch -Np1 -i ../2700_alsa-hda-lifebook-e8410.patch || return 1
# own patches
patch -Np1 -i ../avoid-overflows-in-kernel-timec.patch || return 1
patch -Np1 -i ../clockevent-simplify-list-operations.patch || return 1
patch -Np1 -i ../uvesafb-small-cleanups.patch || return 1
patch -Np1 -i ../writeback-speed-up-writeback-of-big-dirty-files.patch || return 1
# add sqashfs support, in reference to:
# http://squashfs.sourceforge.net/
patch -Np1 -i ../squashfs3.3/kernel-patches/linux-2.6.24/squashfs3.3-patch || return 1
# add unionfs support. in reference to:
# http://www.fsl.cs.sunysb.edu/project-unionfs.html
patch -Np1 -i ../unionfs-2.2.4_for_2.6.24.2.diff || return 1
# add sec_perm-2.6.24.patch for aufs, in reference to:
# http://aufs.sourceforge.net/
patch -Np1 -i ../sec_perm-2.6.24.patch || return 1
patch -Np0 -i ../put_filp-2.6.24.patch || return 1
patch -Np1 -i ../lhash-2.6.24.patch || return 1
patch -Np0 -i ../splice-2.6.24.patch || return 1
# remove the extraversion from Makefile
### next line is only needed for rc kernels
#sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =-rc6|g' Makefile
sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =|g' Makefile
# Arch logo!
cp ../logo_linux_clut224.ppm drivers/video/logo/
cp ../logo_linux_mono.pbm drivers/video/logo/
cp ../logo_linux_vga16.ppm drivers/video/logo/
if [ "$CARCH" = "x86_64" ]; then
cat ../config.x86_64 >./.config
else
cat ../config >./.config
fi
# build the full kernel version to use in pathnames
. ./.config
### next line is only needed for rc kernels
#_kernver="2.6.24-rc6${CONFIG_LOCALVERSION}"
_kernver="${_basekernel}${CONFIG_LOCALVERSION}"
# configure kernel before build
make menuconfig
# load configuration
yes "" | make config
# build!
# stop here
#msg "Stopping build"
#return 1
make bzImage modules || return 1
mkdir -p $startdir/pkg/{lib/modules,boot}
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
cp System.map $startdir/pkg/boot/System.map26-gigamo
cp arch/$KARCH/boot/bzImage $startdir/pkg/boot/vmlinuz26-gigamo
install -D -m644 Makefile \
$startdir/pkg/usr/src/linux-${_kernver}/Makefile
install -D -m644 kernel/Makefile \
$startdir/pkg/usr/src/linux-${_kernver}/kernel/Makefile
install -D -m644 .config \
$startdir/pkg/usr/src/linux-${_kernver}/.config
install -D -m644 .config $startdir/pkg/boot/kconfig26-gigamo
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include
for i in acpi asm-{generic,x86} config linux math-emu media net pcmcia scsi sound video; do
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernver}/include/
done
# copy files necessary for later builds, like nvidia and vmware
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernver}
cp -a scripts $startdir/pkg/usr/src/linux-${_kernver}
# fix permissions on scripts dir
chmod og-w -R $startdir/pkg/usr/src/linux-${_kernver}/scripts
#mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/.tmp_versions
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/kernel
cp arch/$KARCH/Makefile $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
cp arch/$KARCH/Makefile_32 $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
cp arch/$KARCH/Makefile_64 $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
if [ "$CARCH" = "i686" ]; then
cp arch/$KARCH/Makefile_32.cpu $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
fi
cp arch/$KARCH/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
# add headers for lirc package
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/$i
done
# add dm headers
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/md
cp drivers/md/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/md
# add inotify.h
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include/linux
cp include/linux/inotify.h $startdir/pkg/usr/src/linux-${_kernver}/include/linux/
# add CLUSTERIP file for iptables
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/net/ipv4/netfilter/
cp net/ipv4/netfilter/ipt_CLUSTERIP.c $startdir/pkg/usr/src/linux-${_kernver}/net/ipv4/netfilter/
# add wireless headers
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/net/mac80211/
cp net/mac80211/*.h $startdir/pkg/usr/src/linux-${_kernver}/net/mac80211/
# add xfs and shmem for aufs building
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/fs/xfs
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/mm
cp fs/xfs/xfs_sb.h $startdir/pkg/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
cp mm/shmem.c $startdir/pkg/usr/src/linux-${_kernver}/mm/shmem.c
# add vmlinux
cp vmlinux $startdir/pkg/usr/src/linux-${_kernver}
# copy in Kconfig files
for i in `find . -name "Kconfig*"`; do
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
cp $i $startdir/pkg/usr/src/linux-${_kernver}/$i
done
cd $startdir/pkg/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm
chown -R root.root $startdir/pkg/usr/src/linux-${_kernver}
find $startdir/pkg/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
cd $startdir/pkg/lib/modules/${_kernver} && \
(rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
# install fallback mkinitcpio.conf file and preset file for kernel
install -m644 -D $startdir/src/${pkgname}.preset $startdir/pkg/etc/mkinitcpio.d/${pkgname}.preset || return 1
install -m644 -D $startdir/src/mkinitcpio-$pkgname.conf $startdir/pkg/etc/mkinitcpio.d/$pkgname-fallback.conf || return 1
# set correct depmod command for install
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/kernel26-gigamo.install
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${startdir}/pkg/etc/mkinitcpio.d/${pkgname}.kver
# remove unneeded architectures
rm -rf $startdir/pkg/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
And the error I'm getting when running makepkg (in the kernel26-gigamo directory where my own pathces are added and the pkgbuild resides in):
~/kernel/kernel26-gigamo]: makepkg
==> Making package: kernel26-gigamo 2.6.24.3-3 (Tue Mar 11 23:02:49 CET 2008)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
-> Found linux-2.6.24.tar.bz2 in build dir
-> Found patch-2.6.24.3.bz2 in build dir
-> Found config in build dir
-> Found config.x86_64 in build dir
-> Found logo_linux_clut224.ppm in build dir
-> Found logo_linux_mono.pbm in build dir
-> Found logo_linux_vga16.ppm in build dir
-> Found kernel26-gigamo.preset in build dir
-> Found mkinitcpio-kernel26-gigamo.conf in build dir
-> Found acpi-dsdt-initrd-v0.8.4-2.6.21.patch in build dir
-> Found avoid-overflows-in-kernel-timec.patch in build dir
-> Found clockevent-simplify-list-operations.patch in build dir
-> Found uvesafb-small-cleanups.patch in build dir
-> Found writeback-speed-up-writeback-of-big-dirty-files.patch in build dir
-> Found toshiba-bluetooth.patch in build dir
-> Found usb-storage-unusual-devs.patch in build dir
-> Found mactel-linux-2.6.24.patch in build dir
-> Found acpi-buggy-bios.patch in build dir
-> Found squashfs3.3.tar.gz in build dir
-> Found unionfs-2.2.4_for_2.6.24.2.diff.gz in build dir
-> Found lhash-2.6.24.patch in build dir
-> Found put_filp-2.6.24.patch in build dir
-> Found sec_perm-2.6.24.patch in build dir
-> Found splice-2.6.24.patch in build dir
-> Found linux-phc-0.3.0-kernel-vanilla-2.6.23rc3.patch in build dir
-> Found 2000_no-if-addrlabel.patch in build dir
-> Found 2100_sd-sr-medium-detection.patch in build dir
-> Found 2101_sr-follow-tray-status.patch in build dir
-> Found 2102_sr-test-unit-ready.patch in build dir
-> Found 2300_pci-use-conf1.patch in build dir
-> Found 2400_e1000e-crc-stripping.patch in build dir
-> Found 2405_sis190-eeprom-mac.patch in build dir
-> Found 2500_arcmsr-dma-coherent-warnings.patch in build dir
-> Found 2700_alsa-hda-lifebook-e8410.patch in build dir
-> Found winfast-2000.patch in build dir
-> Found fuse-2.6.24.patch in build dir
-> Found ata-2.6.24.patch in build dir
-> Found keymap-2.6.24.patch in build dir
-> Found sis671-intelgly-2.6.24.patch in build dir
==> WARNING: Integrity checks (md5) are missing or incomplete.
==> Extracting Sources...
-> bsdtar -x -f linux-2.6.24.tar.bz2
-> bunzip2 -f patch-2.6.24.3.bz2
-> bsdtar -x -f squashfs3.3.tar.gz
-> gunzip -d -f unionfs-2.2.4_for_2.6.24.2.diff.gz
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting build()...
patching file Documentation/video4linux/CARDLIST.cx23885
patching file Makefile
patching file arch/powerpc/platforms/chrp/pci.c
patching file arch/powerpc/platforms/powermac/feature.c
patching file arch/s390/lib/uaccess_std.c
patching file arch/sparc/lib/rwsem.S
patching file arch/sparc64/lib/rwsem.S
patching file arch/x86/kernel/Makefile_32
patching file arch/x86/mm/pageattr_64.c
patching file drivers/acpi/blacklist.c
patching file drivers/acpi/osl.c
patching file drivers/base/firmware_class.c
patching file drivers/char/drm/drm_stub.c
patching file drivers/char/drm/drm_vm.c
patching file drivers/char/mspec.c
patching file drivers/firmware/dmi_scan.c
patching file drivers/macintosh/smu.c
patching file drivers/media/video/cx23885/cx23885-cards.c
patching file drivers/net/bonding/bond_main.c
patching file drivers/net/dl2k.h
patching file drivers/net/forcedeth.c
patching file drivers/net/pcmcia/smc91c92_cs.c
patching file drivers/net/sky2.c
patching file drivers/net/wireless/b43/dma.c
patching file drivers/net/wireless/b43/main.c
patching file drivers/net/wireless/b43/xmit.c
patching file drivers/net/wireless/b43/xmit.h
patching file drivers/net/wireless/b43legacy/dma.c
patching file drivers/net/wireless/b43legacy/main.c
patching file drivers/net/wireless/b43legacy/pio.c
patching file drivers/net/wireless/b43legacy/xmit.c
patching file drivers/net/wireless/b43legacy/xmit.h
patching file drivers/pci/hotplug/fakephp.c
patching file drivers/scsi/gdth.c
patching file drivers/scsi/sd.c
patching file drivers/usb/class/usblp.c
patching file drivers/usb/core/driver.c
patching file drivers/usb/core/hub.c
patching file drivers/usb/gadget/fsl_usb2_udc.c
patching file drivers/usb/misc/usbtest.c
patching file drivers/usb/serial/cp2101.c
patching file drivers/usb/serial/ftdi_sio.c
patching file drivers/usb/serial/ftdi_sio.h
patching file drivers/usb/serial/keyspan.c
patching file drivers/usb/serial/kobil_sct.c
patching file drivers/usb/serial/option.c
patching file drivers/usb/serial/pl2303.c
patching file drivers/usb/serial/pl2303.h
patching file drivers/usb/serial/sierra.c
patching file drivers/usb/storage/unusual_devs.h
patching file fs/eventpoll.c
patching file fs/inotify_user.c
patching file fs/ncpfs/mmap.c
patching file fs/nfs/write.c
patching file fs/splice.c
patching file fs/xfs/linux-2.6/xfs_file.c
patching file include/asm-powerpc/pmac_feature.h
patching file include/linux/Kbuild
patching file include/linux/dmi.h
patching file include/linux/hrtimer.h
patching file include/linux/hugetlb.h
patching file include/linux/ktime.h
patching file include/linux/wait.h
patching file kernel/audit.c
patching file kernel/compat.c
patching file kernel/futex.c
patching file kernel/futex_compat.c
patching file kernel/hrtimer.c
patching file kernel/irq/chip.c
patching file kernel/posix-timers.c
patching file kernel/relay.c
patching file kernel/sched_fair.c
patching file kernel/sysctl.c
patching file mm/filemap.c
patching file mm/fremap.c
patching file mm/hugetlb.c
patching file mm/memory.c
patching file mm/mmap.c
patching file mm/slab.c
patching file mm/slub.c
patching file net/bluetooth/hci_sysfs.c
patching file net/ipv4/fib_hash.c
patching file net/ipv4/fib_trie.c
patching file net/ipv4/inet_diag.c
patching file net/ipv4/ip_output.c
patching file net/ipv4/ipcomp.c
patching file net/ipv4/sysctl_net_ipv4.c
patching file net/ipv4/xfrm4_tunnel.c
patching file net/ipv6/ip6_output.c
patching file net/ipv6/ipcomp6.c
patching file net/netfilter/nf_conntrack_proto_tcp.c
patching file net/sched/em_meta.c
patching file net/sched/ematch.c
patching file scripts/mod/file2alias.c
patching file security/selinux/ss/services.c
patching file sound/oss/via82cxxx_audio.c
patching file sound/usb/usx2y/usX2Yhwdep.c
patching file sound/usb/usx2y/usx2yhwdeppcm.c
The next patch would create the file Documentation/dsdt-initrd.txt,
which already exists! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file Documentation/dsdt-initrd.txt.rej
patching file drivers/acpi/Kconfig
Hunk #1 succeeded at 274 (offset -24 lines).
patching file drivers/acpi/osl.c
Hunk #1 succeeded at 312 (offset 56 lines).
patching file init/initramfs.c
patching file init/main.c
Hunk #1 succeeded at 91 with fuzz 1 (offset -6 lines).
Hunk #2 succeeded at 650 (offset 13 lines).
==> ERROR: Build Failed.
Aborting...
Sorry for the long post and thanks for bothering with me.
Last edited by Gigamo (2008-03-11 22:09:12)I removed the src/ directory and ran makepkg and it succeeded. Pacman -U kernel.pkg.tar.gz also worked. Now all that's left is rebooting and trying.
Thanks everyone.
OK, I guess it's not over yet. I rebooted in the new kernel, but it says it can't find /dev/sda3 (which is my / partition).
This is my grub entry:
title Arch Linux Gigamo
root (hd0,2)
kernel /boot/vmlinuz26 root=/dev/sda3 ro
initrd /boot/kernel26-gigamo.img
Okay well, I didnt realise there was a vmlinux26-gigamo as well. Will see if that fixes it.
Last edited by Gigamo (2008-03-12 16:53:22) -
Need some help with a split package
Basically, I'd like to have some code in my PKGBUILD that will append some extra info to the package name based on a file the user defined. This is for kernel26-ck and the file I speak of is the .config he/she makes. Below is the code that doesn't work and I think it doesn't work because the name of the package is the name of the package_name() {} function and both of of these have to match the pkgname array. What I want is to have the pkgname array get generated dynamically based on the code below which starts before the make command in the build section. Advise is appreciated. Is what I'm asking for possible?
# Contributor: graysky <graysky AT archlinux dot us>
# Contributor: Cray "MP2E" Elliott <MP2E { AT } archlinux.us>
# Contributor: Tobias Powalowski <[email protected]>
# Contributor: Thomas Baechler <[email protected]>
# Patch and Build Options
_BFQ_patches="n" # add BFQ patches
_makemenucfg="n" # menuconfig option
_streamline_="n" # run Steven Rostedt's streamline_config.pl script - see notes below!
_use_current="n" # use the current kernel's .config file - see notes below!
# More Details and References
## Note all kernels get the ck patch set - there is no option to enable/disable it!
## BFQ
# read, http://algo.ing.unimo.it/people/paolo/disk_sched/
## MAKEMENUCONFIG OPTION
# Allow you to select additional kernel options prior to a build via a menuconfig.
## STREAMLINE_CONFIG OPTION
# Similar to a make localmodconfig but this actually works!
# WARNING - make CERTAIN that all modules are modprobed BEFORE you begin making the pkg!
# read, https://bbs.archlinux.org/viewtopic.php?pid=830221#p830221
# to keep track of which modules are needed for your specific system/hardware, give my module_db script.
# a try: http://aur.archlinux.org/packages.php?ID=41689
# Not that if you use my script, this PKGBUILD will auto run the reload_data base for you to probe
# all the modules you have logged!
## USE CURRENT KERNEL'S .CONFIG
# Enabling this option will use the .config of the RUNNING kernel rather than the ARCH defaults.
# Useful when the package gets updated and you already went through the trouble of customizing your
# config options. NOT recommended when a new kernel is released, but again, convenient for package bumps.
pkgname='kernel26-ck'
#true && pkgname=("kernel26-ck" "kernel26-ck-headers")
_basekernel=2.6.36
pkgver=${_basekernel}.1
pkgrel=4
arch=('i686' 'x86_64')
license=('GPL2')
url="http://users.on.net/~ckolivas/kernel"
_archpatchversion=3
_ckpatchversion=2
_kernelname=-ck
_patchname="patch-${pkgver}-${_archpatchversion}-ARCH"
_ckpatchname="patch-${_basekernel}-ck${_ckpatchversion}"
_bfqpath="http://algo.ing.unimo.it/people/paolo/disk_sched/patches/2.6.36"
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2 # kernel source
ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2 # arch patchset
config config.x86_64 kernel26.preset # configs
# ck patchset
http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/${_basekernel}/${_basekernel}-ck${_ckpatchversion}/${_ckpatchname}.bz2
# BFQ patches
${_bfqpath}/0001-bfq_iosched-block-prepare_IO_context_code-v1-2.6.36.patch
${_bfqpath}/0002-bfq_iosched-block-add-cgroups-kconfig-and-build-bits-for-BFQ-v1-2.6.36.patch
${_bfqpath}/0003-bfq_iosched-block-introduce_BFQ-v1-2.6.36.patch)
build() {
# Patch source with -ARCH patches
# See http://projects.archlinux.org/linux-2.6-ARCH.git/
msg "Patching source with-ARCH patches"
cd ${srcdir}/linux-$_basekernel
patch -Np1 -i ${srcdir}/${_patchname}
# Patch source for BFQ patches
if [ ${_BFQ_patches} = "y" ]; then
msg "Patching source with BFQ patches"
for p in $(ls ${srcdir}/*-bfq_*); do
patch -Np1 -i $p
done
fi
# Patch source with ck
# Fix double name in EXTRAVERSION
sed -i -re "s/^(.EXTRAVERSION).*$/\1 = /" ${srcdir}/${_ckpatchname}
# Add -ck base patch set
msg "Patching source with ck1 patch set"
patch -Np1 -i ${srcdir}/${_ckpatchname}
msg "Running make mrproper to clean source tree"
make mrproper
if [ "$CARCH" = "x86_64" ]; then
cat ../config.x86_64 >./.config
else
cat ../config >./.config
fi
# use current kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ ${_use_current} = "y" ]; then
if [[ -s /proc/config.gz ]]; then
msg "Extracting config from /proc/config.gz..."
modprobe configs
zcat /proc/config.gz > ./.config
else
warning "You kernel was not compiled with IKCONFIG_PROC!"
warning "You cannot read the current config!"
warning "Aborting!"
exit 0
fi
fi
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
fi
msg "Running make prepare for you to enable patched options of your choosing"
make prepare
# If user patched to BFQ and enabled it in the prev step, set it as default io scheduler
if [ ${_BFQ_patches} = "y" ]; then
sed -i s'/CONFIG_DEFAULT_CFQ=y/# CONFIG_DEFAULT_CFQ is not set/g' ./.config
sed -i s'/# CONFIG_DEFAULT_BFQ is not set/CONFIG_DEFAULT_BFQ=y/g' ./.config
sed -i s'/CONFIG_DEFAULT_IOSCHED="cfq"/CONFIG_DEFAULT_IOSCHED="bfq"/g' ./.config
fi
if [ $_streamline_ = "y" ]; then
msg "If you have modprobe_db installed, running reload_database now"
if [ -e /usr/bin/reload_database ]; then
/usr/bin/reload_database
fi
msg "Running Steven Rostedt's streamline_config script now "
chmod +x ./scripts/kconfig/streamline_config.pl
./scripts/kconfig/streamline_config.pl > config_strip
cp config_strip .config
msg "An error about ksource in line 118 blah blah is NORMAL as are the one you will get for each"
msg "module you have probed that is not in the kernel itself like nvidia for example!"
fi
if [ $_makemenucfg = "y" ]; then
msg "Running make menuconfig"
make menuconfig
fi
# This allows building cpu-optimized packages with according package names.
# Useful for repo maintainers.
CPU=`egrep "MK8=y|MCORE2=y|MPSC=y|MATOM=y|MPENTIUMII=y|MPENTIUMIII=y|MPENTIUMM=y|MPENTIUM4=y|MK7=y|CONFIG_GENERIC_CPU=y|CONFIG_X86_GENERIC=y|M686=y" ./.config`
CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
case $CPU in
CORE2)
_pn="-core2"
_pd=" Intel Core2 optimized."
K8)
_pn="-k8"
_pd="AMD K8 optimized."
PSC)
_pn="-psc"
_pd="Intel Pentium4/D/Xeon optimized."
ATOM)
_pn="-atom"
_pd="Intel Atom optimized."
K7)
_pn="-k7"
_pd="AMD K7 optimized."
PENTIUMII)
_pn="-p2"
_pd="Intel Pentium2 optimized."
PENTIUMIII)
_pn="-p3"
_pd="Intel Pentium3 optimized."
PENTIUMM)
_pn="-pm"
_pd="Intel Pentium-M optimized."
PENTIUM4)
_pn="-p4"
_pd="Intel Pentium4 optimized."
default)
esac
# save to a file for reacall in subsequent sections
echo "_pn=\"${_pn}\"" > vars
echo "_pd=\"${_pd}\"" >> vars
msg "Running make bzImage and modules"
make bzImage modules
package_kernel26-ck() {
. ${srcdir}/linux-$_basekernel/vars
pkgname="kernel26-ck${_pn}"
pkgdesc="ARCH kernel with Con Kolivas' patchset using the Brain Fuck Scheduler (BFS). Budget Fair Queueing (BFQ) I/O scheduler optional.${_pd}"
backup=(etc/mkinitcpio.d/kernel26.preset)
depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.5.20')
install=kernel26.install
optdepends=('crda: to set the correct wireless channels of your country' \
'nvidia-ck-stable: NVIDIA drivers for kernel26-ck' \
'nvidia-beta-ck: NVIDIA beta drivers for kernel26-ck' \
'modprobed_db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
KARCH=x86
cd ${srcdir}/linux-$_basekernel
#get kernel version
_kernver="$(make kernelrelease)"
mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
msg "Running make modules_install"
make INSTALL_MOD_PATH=${pkgdir} modules_install
cp System.map ${pkgdir}/boot/System.map26${_kernelname}
cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
# add vmlinux
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
# install fallback mkinitcpio.conf file and preset file for kernel
install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
# 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/kernel26.install
sed \
-e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
-e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
-e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
-i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
# remove build and source links
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf ${pkgdir}/lib/firmware
package_kernel26-ck-headers () {
. ${srcdir}/linux-$_basekernel/vars
pkgname="kernel26-ck${_pn}-headers"
pkgdesc="Header files and scripts to build modules for kernel26-ck.${_pd}"
provides=("kernel26-ck${_pn}-headers=${pkgver}")
mkdir -p ${pkgdir}/lib/modules/${_kernver}
cd ${pkgdir}/lib/modules/${_kernver}
ln -sf ../../../usr/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 generated linux math-emu media net pcmcia scsi sound trace video; 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/x86
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
# 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
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
# need to remove zc0301 from the array with 2.26.36
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo; do
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$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/dvb-core
cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/11194
if [ -d ${srcdir}/linux-$_basekernel/include/config/dvb ]; then
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
fi
# 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/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
# add dvb headers
# in reference to:
# http://bugs.archlinux.org/task/20402
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb
cp drivers/media/dvb/dvb-usb/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/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/common/tuners
cp drivers/media/common/tuners/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/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
# add headers for virtualbox
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
# add headers for broadcom wl
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
# 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 {} \;
# 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}
# Global pkgdesc and depends are here so that they will be picked up by AUR
pkgdesc="ARCH kernel with Con Kolivas' patchset using the Brain Fuck Scheduler (BFS). Budget Fair Queueing (BFQ) I/O scheduler optional."
depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.5.20')
sha256sums=('15a076d1a435a6bf8e92834eba4b390b4ec094ce06d47f89d071ca9e5788ce04'
'96ed15bd64ae90163f81996ee31c3db6c7433d8af156e546ca7b36bedec1728b'
'1b9abff4752d4a294716b05ae17b981e2e5aaae1b51d19613e6b4bac0aea989d'
'd1b8757e99ee6cbeacf0b4185236c654440d5d945458b94948fd2cc4af0a881d'
'7ead13bbe2fdfc5308ddc3a0484d66f8150f78bbdbc59643e0b52bb9e776b5da'
'092e17164f453bdca8bd50e4fd71c074755740252bd8ad5c3eb6d2d51e78a104'
'f5c42a2ec2869a756e53fabada51a25dcb9de13861f367463e9ec4da8bf0b86a'
'f3f52953a2ccc07af3f23c7252e08e61580ec4b165934c089351ddd719c3e41f'
'cca4eea16278e302c2f7649a145e4d5ceb5ff2ece25fea3988eca82290b0c633')
Last edited by graysky (2010-11-24 20:09:31)Got it!
Allan wrote:What about in the -headers package?
Yep, headers package is good too!
# Generated by makepkg 3.4.1
# using fakeroot version 1.14.4
# Wed Nov 24 23:06:36 UTC 2010
pkgname = kernel26-ck-headers-core2
pkgbase = kernel26-ck
pkgver = 2.6.36.1-4
pkgdesc = Header files and scripts to build modules for kernel26-ck. Intel Core2 optimized.
url = http://users.on.net/~ckolivas/kernel
builddate = 1290639996
packager = Unknown Packager
size = 31174656
arch = x86_64
license = GPL2
depend = coreutils
depend = linux-firmware
depend = module-init-tools
depend = mkinitcpio>=0.5.20
provides = kernel26-ck-headers-core2=2.6.36.1
makepkgopt = strip
makepkgopt = docs
makepkgopt = libtool
makepkgopt = emptydirs
makepkgopt = zipman
makepkgopt = purge
PKGBUILD built using the modified makepkg suggested by nous.
# Contributor: graysky <graysky AT archlinux dot us>
# Contributor: Cray "MP2E" Elliott <MP2E { AT } archlinux.us>
# Contributor: Tobias Powalowski <[email protected]>
# Contributor: Thomas Baechler <[email protected]>
# Patch and Build Options
_BFQ_patches="n" # add BFQ patches
_makemenucfg="n" # menuconfig option
_streamline_="n" # run Steven Rostedt's streamline_config.pl script - see notes below!
_use_current="n" # use the current kernel's .config file - see notes below!
# More Details and References
## Note all kernels get the ck patch set - there is no option to enable/disable it!
## BFQ
# read, http://algo.ing.unimo.it/people/paolo/disk_sched/
## MAKEMENUCONFIG OPTION
# Allow you to select additional kernel options prior to a build via a menuconfig.
## STREAMLINE_CONFIG OPTION
# Similar to a make localmodconfig but this actually works!
# WARNING - make CERTAIN that all modules are modprobed BEFORE you begin making the pkg!
# read, https://bbs.archlinux.org/viewtopic.php?pid=830221#p830221
# to keep track of which modules are needed for your specific system/hardware, give my module_db script.
# a try: http://aur.archlinux.org/packages.php?ID=41689
# Not that if you use my script, this PKGBUILD will auto run the reload_data base for you to probe
# all the modules you have logged!
## USE CURRENT KERNEL'S .CONFIG
# Enabling this option will use the .config of the RUNNING kernel rather than the ARCH defaults.
# Useful when the package gets updated and you already went through the trouble of customizing your
# config options. NOT recommended when a new kernel is released, but again, convenient for package bumps.
pkgname='kernel26-ck'
true && pkgname=("kernel26-ck" "kernel26-ck-headers")
_basekernel=2.6.36
pkgver=${_basekernel}.1
pkgrel=4
arch=('i686' 'x86_64')
license=('GPL2')
url="http://users.on.net/~ckolivas/kernel"
_archpatchversion=3
_ckpatchversion=2
_kernelname=-ck
_patchname="patch-${pkgver}-${_archpatchversion}-ARCH"
_ckpatchname="patch-${_basekernel}-ck${_ckpatchversion}"
_bfqpath="http://algo.ing.unimo.it/people/paolo/disk_sched/patches/2.6.36"
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2 # kernel source
ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2 # arch patchset
config config.x86_64 kernel26.preset # configs
# ck patchset
http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/${_basekernel}/${_basekernel}-ck${_ckpatchversion}/${_ckpatchname}.bz2
# BFQ patches
${_bfqpath}/0001-bfq_iosched-block-prepare_IO_context_code-v1-2.6.36.patch
${_bfqpath}/0002-bfq_iosched-block-add-cgroups-kconfig-and-build-bits-for-BFQ-v1-2.6.36.patch
${_bfqpath}/0003-bfq_iosched-block-introduce_BFQ-v1-2.6.36.patch)
build() {
# Patch source with -ARCH patches
# See http://projects.archlinux.org/linux-2.6-ARCH.git/
msg "Patching source with-ARCH patches"
cd ${srcdir}/linux-$_basekernel
patch -Np1 -i ${srcdir}/${_patchname}
# Patch source for BFQ patches
if [ ${_BFQ_patches} = "y" ]; then
msg "Patching source with BFQ patches"
for p in $(ls ${srcdir}/*-bfq_*); do
patch -Np1 -i $p
done
fi
# Patch source with ck
# Fix double name in EXTRAVERSION
sed -i -re "s/^(.EXTRAVERSION).*$/\1 = /" ${srcdir}/${_ckpatchname}
# Add -ck base patch set
msg "Patching source with ck1 patch set"
patch -Np1 -i ${srcdir}/${_ckpatchname}
msg "Running make mrproper to clean source tree"
make mrproper
if [ "$CARCH" = "x86_64" ]; then
cat ../config.x86_64 >./.config
else
cat ../config >./.config
fi
# use current kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ ${_use_current} = "y" ]; then
if [[ -s /proc/config.gz ]]; then
msg "Extracting config from /proc/config.gz..."
modprobe configs
zcat /proc/config.gz > ./.config
else
warning "You kernel was not compiled with IKCONFIG_PROC!"
warning "You cannot read the current config!"
warning "Aborting!"
exit 0
fi
fi
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
fi
msg "Running make prepare for you to enable patched options of your choosing"
make prepare
# If user patched to BFQ and enabled it in the prev step, set it as default io scheduler
if [ ${_BFQ_patches} = "y" ]; then
sed -i s'/CONFIG_DEFAULT_CFQ=y/# CONFIG_DEFAULT_CFQ is not set/g' ./.config
sed -i s'/# CONFIG_DEFAULT_BFQ is not set/CONFIG_DEFAULT_BFQ=y/g' ./.config
sed -i s'/CONFIG_DEFAULT_IOSCHED="cfq"/CONFIG_DEFAULT_IOSCHED="bfq"/g' ./.config
fi
if [ $_streamline_ = "y" ]; then
msg "If you have modprobe_db installed, running reload_database now"
if [ -e /usr/bin/reload_database ]; then
/usr/bin/reload_database
fi
msg "Running Steven Rostedt's streamline_config script now "
chmod +x ./scripts/kconfig/streamline_config.pl
./scripts/kconfig/streamline_config.pl > config_strip
cp config_strip .config
msg "An error about ksource in line 118 blah blah is NORMAL as are the one you will get for each"
msg "module you have probed that is not in the kernel itself like nvidia for example!"
fi
if [ $_makemenucfg = "y" ]; then
msg "Running make menuconfig"
make menuconfig
fi
# This allows building cpu-optimized packages with according package names.
# Useful for repo maintainers.
# Code by nous.
CPU=`egrep "MK8=y|MCORE2=y|MPSC=y|MATOM=y|MPENTIUMII=y|MPENTIUMIII=y|MPENTIUMM=y|MPENTIUM4=y|MK7=y|CONFIG_GENERIC_CPU=y|CONFIG_X86_GENERIC=y|M686=y" ./.config`
CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
case $CPU in
CORE2)
_pn="-core2"
_pd=" Intel Core2 optimized."
K8)
_pn="-k8"
_pd="AMD K8 optimized."
PSC)
_pn="-psc"
_pd="Intel Pentium4/D/Xeon optimized."
ATOM)
_pn="-atom"
_pd="Intel Atom optimized."
K7)
_pn="-k7"
_pd="AMD K7 optimized."
PENTIUMII)
_pn="-p2"
_pd="Intel Pentium2 optimized."
PENTIUMIII)
_pn="-p3"
_pd="Intel Pentium3 optimized."
PENTIUMM)
_pn="-pm"
_pd="Intel Pentium-M optimized."
PENTIUM4)
_pn="-p4"
_pd="Intel Pentium4 optimized."
default)
esac
# save to a file for reacall in subsequent sections
echo "_pn=\"${_pn}\"" > vars
echo "_pd=\"${_pd}\"" >> vars
msg "Running make bzImage and modules"
make bzImage modules
package_kernel26-ck() {
. ${srcdir}/linux-$_basekernel/vars
pkgname="kernel26-ck${_pn}"
pkgdesc="ARCH kernel with Con Kolivas' patchset using the Brain Fuck Scheduler (BFS). Budget Fair Queueing (BFQ) I/O scheduler optional.${_pd}"
backup=(etc/mkinitcpio.d/kernel26.preset)
depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.5.20')
install=kernel26.install
optdepends=('crda: to set the correct wireless channels of your country' \
'nvidia-ck-stable: NVIDIA drivers for kernel26-ck' \
'nvidia-beta-ck: NVIDIA beta drivers for kernel26-ck' \
'modprobed_db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
KARCH=x86
cd ${srcdir}/linux-$_basekernel
#get kernel version
_kernver="$(make kernelrelease)"
mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
msg "Running make modules_install"
make INSTALL_MOD_PATH=${pkgdir} modules_install
cp System.map ${pkgdir}/boot/System.map26${_kernelname}
cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
# add vmlinux
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
# install fallback mkinitcpio.conf file and preset file for kernel
install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
# 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/kernel26.install
sed \
-e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
-e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
-e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
-i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
# remove build and source links
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf ${pkgdir}/lib/firmware
package_kernel26-ck-headers () {
. ${srcdir}/linux-$_basekernel/vars
pkgname="kernel26-ck-headers${_pn}"
pkgdesc="Header files and scripts to build modules for kernel26-ck.${_pd}"
provides=("kernel26-ck-headers${_pn}=${pkgver}")
mkdir -p ${pkgdir}/lib/modules/${_kernver}
cd ${pkgdir}/lib/modules/${_kernver}
ln -sf ../../../usr/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 generated linux math-emu media net pcmcia scsi sound trace video; 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/x86
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
# 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
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
# need to remove zc0301 from the array with 2.26.36
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo; do
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$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/dvb-core
cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/11194
if [ -d ${srcdir}/linux-$_basekernel/include/config/dvb ]; then
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
fi
# 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/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
# add dvb headers
# in reference to:
# http://bugs.archlinux.org/task/20402
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb
cp drivers/media/dvb/dvb-usb/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/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/common/tuners
cp drivers/media/common/tuners/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/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
# add headers for virtualbox
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
# add headers for broadcom wl
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
# 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 {} \;
# 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}
# Global pkgdesc and depends are here so that they will be picked up by AUR
pkgdesc="ARCH kernel with Con Kolivas' patchset using the Brain Fuck Scheduler (BFS). Budget Fair Queueing (BFQ) I/O scheduler optional."
depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.5.20')
sha256sums=('15a076d1a435a6bf8e92834eba4b390b4ec094ce06d47f89d071ca9e5788ce04'
'96ed15bd64ae90163f81996ee31c3db6c7433d8af156e546ca7b36bedec1728b'
'1b9abff4752d4a294716b05ae17b981e2e5aaae1b51d19613e6b4bac0aea989d'
'd1b8757e99ee6cbeacf0b4185236c654440d5d945458b94948fd2cc4af0a881d'
'7ead13bbe2fdfc5308ddc3a0484d66f8150f78bbdbc59643e0b52bb9e776b5da'
'092e17164f453bdca8bd50e4fd71c074755740252bd8ad5c3eb6d2d51e78a104'
'f5c42a2ec2869a756e53fabada51a25dcb9de13861f367463e9ec4da8bf0b86a'
'f3f52953a2ccc07af3f23c7252e08e61580ec4b165934c089351ddd719c3e41f'
'cca4eea16278e302c2f7649a145e4d5ceb5ff2ece25fea3988eca82290b0c633')
@Allan - can you see any other potential down sides of implementing the patch suggested by nous? What about dependency issues? For example, nvidia-ck depends on kernel26-ck, not kernel26-ck-core2. Perhaps circumvent this with a provides=('kernel26-ck-headers') for headers and provides=('kernel26-ck') for the main package?
Last edited by graysky (2010-11-24 23:08:02) -
PKGBUILD for custom kernel issue
Hi all,
Last night I was putting together a PKGBUILD for a kernel I'd like to compile that has the ck patchset, grsecurity (latest testing), and had broadcom-wl on it already so I don't have to keep reinstalling it from AUR and doing depmod each time as it keeps making me have to find an ethernet cable. I used the kerne26 Arch PKGBUILD as a base and included parts of kernel-netbook for broadcom-wl, kernel26-grsecurity, and kernel26-ck and altered name variables and links etc so it all works and all sources are downloaded. I also got the two .patch files (semaphore and something else) from the kernel-netbook tarball to build the thing with, I don't know if it would work without them.
However when I get into the build() a few patches are applied before I get messages about patches already applied or reversed, and then it says build failed because of an error, I can't tell which package is causing thins or why (it all goes by too fast, and the error says failed without reason, and the reversed patch messages are what is immediately previous to it). I have not yet gone all the way through the pkgbuild - especially towards the end, and I felt that the standard setup of init file system creation and such were ok, and if anything does need altering about it, I can deal with it once I get these first troubles solved.
Below is my pkgbuild so far. Hopefully there are people out there who can aid me with this.
Thanks,
Ben.
# Maintainer: Ben Ward <[email protected]>
pkgbase="kernel26"
# pkgname=('kernel26' 'kernel26-headers' 'kernel26-docs') # Build stock -ARCH kernel
pkgname=kernel26-custom # Build kernel with a different name
#Base kernel info
_kernelname=${pkgname#kernel26}
_basekernel=2.6.38
pkgver=${_basekernel}.3
pkgrel=1
#ARCH patch info
_archpatchver=1
_archpatchname="patch-${pkgver}-${_archpatchver}-ARCH"
#_archpatchname="patch-${pkgver}-1-ARCH"
#grsecurity info
_grsec=2.2.2
_timestamp=201104182227
#Broadcom-wl info
_broadcom_ver=5.100.82.38
_broadcom="hybrid-portsrc_x86_32-v${_broadcom_ver//./_}"
#ck-patch info
_ckpatchversion=3
_ckpatchname="patch-${_basekernel}-ck${_ckpatchversion}"
arch=(i686 x86_64)
license=('GPL2')
url="http://www.kernel.org"
options=(!strip)
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-${pkgver}.bz2
ftp://ftp.archlinux.org/other/kernel26/${_archpatchname}.bz2
http://grsecurity.net/test/grsecurity-${_grsec}-${pkgver}-${_timestamp}.patch
http://www.broadcom.com/docs/linux_sta/${_broadcom}.tar.gz
http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/${_basekernel}/${_basekernel}-ck${_ckpatchversion}/${_ckpatchname}.bz2
"semaphore.patch"
"mutex-sema.patch"
# the main kernel config files
config config.x86_64
# standard config files for mkinitcpio ramdisk
kernel26.preset)
md5sums=('7d471477bfa67546f902da62227fa976'
'b3677121c4b5efcb8128c2000788d0aa'
'5b14b6eb2cdcb074905d4974437c4df6'
'a19024797f192fe21a468de80c101d8a'
'c0074a1622c75916442e26763ddf47d0'
'88d5b3e0622f8c48dad19ab9ac3c16f0'
'aee89fe7f034aea2f2ca95322774c1b5'
'21ce3f7967d7305064bf7eb60030ffea'
'f66543886835ab8599b29cd0c48aa66d'
'd866bcc06672fee17736bd5022f700fe'
'25584700a0a679542929c4bed31433b6')
build() {
cd ${srcdir}/linux-$_basekernel
# Apply kernel.org patch to basekernel
msg "Checking basekernel is ip to date..."
if [[ "${_basekernel}" != "${pkgver}" ]]; then
msg "Patching source with upstream patch..."
patch -Np1 -i "${srcdir}/patch-${pkgver}" || return 1
fi
# Add -ARCH patches
# See http://projects.archlinux.org/linux-2.6-ARCH.git/
msg "Patching Kernel with ARCH patches..."
patch -Np1 -i ${srcdir}/${_archpatchname}
# Add ck patch
msg "Patching Kernel with ck patches..."
patch -Np1 -i ${srcdir}/${_ckpatchname}
# Add grsecurity patch
msg "Patching kernel with grsecurity testing branch..."
if [ "$CARCH" = "x86_64" ]; then
cat ../config.x86_64 >./.config
else
cat ../config >./.config
fi
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
fi
# 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
# stop here
# this is useful to configure the kernel
#msg "Stopping build"
#return 1
yes "" | make config
# build!
make ${MAKEFLAGS} bzImage modules
package_kernel26() {
pkgdesc="The Linux Kernel and modules"
groups=('base')
backup=(etc/mkinitcpio.d/${pkgname}.preset)
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.12-2' 'mkinitcpio>=0.6.8-2')
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
# kernel24 support is dropped since glibc24
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'nouveau-drm')
install=kernel26.install
optdepends=('crda: to set the correct wireless channels of your country')
KARCH=x86
cd ${srcdir}/linux-$_basekernel
# get kernel version
_kernver="$(make kernelrelease)"
mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
make INSTALL_MOD_PATH=${pkgdir} modules_install
cp System.map ${pkgdir}/boot/System.map26${_kernelname}
cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
# # add vmlinux
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
# install fallback mkinitcpio.conf file and preset file for kernel
install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
# 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/kernel26.install
sed \
-e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
-e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
-e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
-i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
# 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 safe 100MB of space
find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;
##Section: Broadcom-wl
msg "Compiling broadcom-wl module:"
cd ${srcdir}/
#patching broadcom as broadcom-wl package on AUR
patch -p1 < license.patch
patch -p1 < semaphore.patch
patch -p1 < mutex-sema.patch
make -C ${srcdir}/linux-$_basekernel M=`pwd`
install -D -m 755 wl.ko ${pkgdir}/lib/modules/$_kernver/kernel/drivers/net/wireless/wl.ko
package_kernel26-headers() {
pkgdesc="Header files and scripts for building modules for kernel26"
mkdir -p ${pkgdir}/lib/modules/${_kernver}
cd ${pkgdir}/lib/modules/${_kernver}
ln -sf ../../../usr/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 generated linux math-emu media net pcmcia scsi sound trace 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/x86
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
# 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
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102; do
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
done
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/staging/usbvideo/
cp -a drivers/staging/usbvideo/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/staging/usbvideo/
# 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/dvb-core
cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
# add dvb headers for external modules
# in reference to:
# 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/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
# add dvb headers
# in reference to:
# http://bugs.archlinux.org/task/20402
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb
cp drivers/media/dvb/dvb-usb/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/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/common/tuners
cp drivers/media/common/tuners/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/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
# add headers vor virtualbox
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
# add headers for broadcom wl
# in reference to:
# http://bugs.archlinux.org/task/14568
cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
# add headers for crypto modules
# in reference to:
# http://bugs.archlinux.org/task/22081
cp -a include/crypto $pkgdir/usr/src/linux-${_kernver}/include/
# 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,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}
package_kernel26-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
cd ${srcdir}/linux-$_basekernel
mkdir -p $pkgdir/usr/src/linux-$_kernver
mv Documentation $pkgdir/usr/src/linux-$_kernver
find $pkgdir -type f -exec chmod 444 {} \;
find $pkgdir -type d -exec chmod 755 {} \;
# remove a file already in kernel26 package
rm -f $pkgdir/usr/src/linux-$_kernver/Documentation/DocBook/Makefile
I wonder if localyesconfig would take care of broadcom-wl for me...
Last edited by Ben9250 (2011-04-20 00:12:44)Thank you. I guess trying the abs method wouldn't hurt. My main issue was configuration. I've only just skimmed the PKGBUILD so I'm not aware of how it handles it. I suppose I could write my own as described in the wiki as well. Thanks again.
Edit: Further research has revealed to me that the kernel headers are merely there for when the full source tree isn't. Seeing as the full tree is present in my case, the headers are unnecessary. I may take graysky's advice though and use pacman to manage my kernel.
Last edited by smithr.michael1997 (2011-03-31 02:17:29) -
[SOLVED] Radeon HD 6310 on AMD E350 APU
I currently have a Raspberry PI running as a download/XBMC server with Arch Linux ARM connected to a TV through HDMI. This worked well so far, but I wanted to take some load off the RPi and bought an AMD E350 APU with an integrated Radeon HD 6310 GPU. Unfortunately, I'm not getting the video/audio out to work properly with Arch Linux x86_64.
Here is what I have done so far (reboots between appropriate steps):
Followed the Beginners' guide as for any other install.
Installed alsa-utils, mesa, mesa-demos, xorg-[server, server-utils, xinit], and created a user and added the user to the "audio,video" groups.
Installed the open source "xf86-video-ati" driver, added "radeon" to my MODULES array, found no other modesetting options, regenerated initramfs, and added a /etc/X11/xorg.conf.d/20-radeon.conf file for good measure. I also added "radeon.audio=1" to my kernel parameters and regenerated the GRUB config file.
With that setup, I tested the sound with the following:
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
# aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
# speaker-test -c 2
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
where the aplay command didn't return an error, but also did not play any sound. Note that a test to the analogue sound did in fact work.
In addition to the sound not working, I wanted to test if the video will work with XBMC with
# glxinfo
Error: unable to open display
Thinking that maybe something went wrong, I reinstalled most of the above mentioned packages to no avail, and also checked that the "radeon" module was loaded, which it was. I then uninstalled the open source driver, removed "radeon" and "radeon.audio=1" from the appropriate files and regenerated GRUB and initramfs.
Next I decided to try the proprietary driver (reboots between appropriate steps):
Added the Vi0l0 [xorg114] and [catalyst] repositories
Installed xorg-related packes, catalyst-[hook, utils, libgl] and checked that "fglrx" was added and blacklisted "radeon".
Ran "aticonfig --initial" and checked the file.
Testing if the display works after verifying that the module loaded with lsmod:
# fglrxinfo
Error: unable to open display (null)
At this point I started to doubt the drivers working with the hardware, so I booted up with a live openSUSE 13.1 USB (kernel 3.11) with the "radeon.audio=1" option enabled. Testing the display here (cropped):
# glxinfo
name of display: :0
display: :0 screen: 0
direct rendering: Yes
seems to work fine, along with HDMI audio.
I have then clean installed Arch again, reinstalled mesa, xorg and xf86-video-ati and re-added all the parameters and such. Also tried some random things like adding "amd64_agp" to the modules, "radeon.pcie_gen2=0" to the kernel parameters in any attempt to get it to work, but nothing has yet.
At this point I'm stuck. Any help in getting this to work will be greatly appreciated.
Other useful info (cropped for relevance):
# cat /proc/asound/cards
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfeb44000 irq 42
1 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfeb40000 irq 16
# cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel
# lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 14h Processor Root Complex
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Wrestler [Radeon HD 6310]
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Wrestler HDMI Audio
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
# dmesg | grep radeon
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=e847df24-9ec6-4d7a-8cb9-58c67334c6a5 rw quiet radeon.audio=1
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=e847df24-9ec6-4d7a-8cb9-58c67334c6a5 rw quiet radeon.audio=1
[ 1.780114] [drm] radeon kernel modesetting enabled.
[ 1.780205] fb: conflicting fb hw usage radeondrmfb vs VESA VGA - removing generic driver
[ 1.781733] radeon 0000:00:01.0: VRAM: 384M 0x0000000000000000 - 0x0000000017FFFFFF (384M used)
[ 1.781739] radeon 0000:00:01.0: GTT: 1024M 0x0000000018000000 - 0x0000000057FFFFFF
[ 1.782586] [drm] radeon: 384M of VRAM memory ready
[ 1.782589] [drm] radeon: 1024M of GTT memory ready.
[ 1.807454] radeon 0000:00:01.0: WB enabled
[ 1.807463] radeon 0000:00:01.0: fence driver on ring 0 use gpu addr 0x0000000018000c00 and cpu addr 0xffff8800b36bec00
[ 1.807468] radeon 0000:00:01.0: fence driver on ring 3 use gpu addr 0x0000000018000c0c and cpu addr 0xffff8800b36bec0c
[ 1.808256] radeon 0000:00:01.0: fence driver on ring 5 use gpu addr 0x0000000000072118 and cpu addr 0xffffc90010eb2118
[ 1.808306] radeon 0000:00:01.0: irq 40 for MSI/MSI-X
[ 1.808334] radeon 0000:00:01.0: radeon: using MSI.
[ 1.808379] [drm] radeon: irq initialized.
[ 1.946378] [drm] radeon: dpm initialized
[ 2.025643] fbcon: radeondrmfb (fb0) is primary device
[ 2.069485] radeon 0000:00:01.0: fb0: radeondrmfb frame buffer device
[ 2.069490] radeon 0000:00:01.0: registered panic notifier
[ 2.069526] [drm] Initialized radeon 2.36.0 20080528 for 0000:00:01.0 on minor 0
Edit: Spelling and dmesg output.
Last edited by cornelus (2014-04-04 15:17:33)Hello andy123, thanks for the response.
As far as I know, I do not believe the /etc/X11/xorg.conf.d/20-radeon.conf file is necessary, but I tested the system with and without it. The current contents is just
Section "Device"
Identifier "Radeon"
Driver "radeon"
EndSection
As you mentioned, I would also prefer using the open source driver as I've often read and heard that it has better support than Catalyst.
Regarding the groups, I did in fact test the system with and without my user being in the video and audio groups. I do not start Xserver explicitly in a desktop environment, but rather just test for an available display via glxinfo. This test works well, as XBMC does the same check to see if OpenGL support is available, will not run if it is not available and prints the same error as glxinfo. No Xorg logs are available in /var/log/, maybe because it does not even begin to start due to lack of display.
The analogue channel is unmuted, and the default HDMI channel does not show a 'Master' or any other channel for that matter except S/PDIF. From a friend I've heard that this is correct, as the HDMI volume can not be set like this. The alsamixer UI is the same as on the openSUSE live disk, which worked fine.
I haven't installed XBMC on the new installation again, but will do so now and see if that forces X to write some logs.
Maybe you are looking for
-
Change BSEG-ZUONR during the Post Goods issue.
Hi We wanted to Update the BSEG-ZUONR with sales Order no( traverse back to the Original SO during reversal) ( Basically Assignment field (ZUONR) in the Accounting side) after performing the Post Goods issue USING TRANSACTION VL02N. Is there any us
-
Convert catalog from PSE 6 to 10, is it necessary to include the jpegs?
Hello I am testing PSE 10 (from PSE 6) and have copied the catalog to a test XP box (but not the jpegs). The catalog refuses to convert with an unspecic error: "Catalog conversion failed" see "Catalog Conversion Errors" for more details. PSE 6 can f
-
Crop to trim: Page size may not be reduced ERROR
I have a client wanting the complete back catalogue of his journal's hi-res PDFs supplied but without the trim marks, printer's info and bleed. This ought to be easy enough - Acrobat will trim a PDF for me and I can automate the process. Except that
-
I bought a MiniDVI to VGA adaptor to connect my 32plf9705h/12 TV (Philips) to my macbook and with much disappoint, i realised that it's not working. All the cables are brand new, and everything is working with a PC monitor and a Samsung HD-Ready TV..
-
EXIT_SAPMM06E_017 - showing Error Message
Hi, i'm using the above user Exit for RFQ to do some validation and based on that it has to triggered the error message. Everything works fine but when i give the error message, it keeps on prompting it when i press enter or go to next screen. The wh