Pages personnelles de Benoît Vaillant

Home > SFR M ! Pc Pocket > Compiling the psb stuff

Step 3

Compiling the psb stuff

Notez cet article
7 Votes

Friday 6 May 2016, by Benoît

For this part, i’ve been greatly helped by this post. So many thanks to the author for writing it!

We’ll follow the steps he provides and addapt them when needed.

Steps 1 and 2 should no pose no major problem. Add the required /etc/apt/sources.list entry, update and install the needed packages.

dkms is only available in backports for the moment, apt might warn about this package not being found. You might also want to install the devscripts package. The m-a prepare step will fail in getting the kernel headers since we compiled from the git sources. We already have the header files, so we don’t care about that. We’ll fix the link manually:

cd /usr/src
rm linux

ln -s 2.6.33-rc2-wl/ linux

Note: I’m compiling in /usr/src not in the home user directory.

Step 3: we retrieve the modified files.

cd /usr/src/psb/drm

apt-get source psb-kernel-source

wget http://blogs.koolwal.net/wp-content/uploads/debian/psb-kernel-source-modified-files.tar

cd psb-kernel-source-4.41.1/

tar -xvf ../psb-kernel-source-modified-files.tar

We want to be able to handle more than one kernel so we adapt the debian/rules file:

< KERNEL_VER := $(shell ls -1 /lib/modules)

— -

> KERNEL_VER := $(shell uname -r)

While we’re at it edit the install-stamp target and change drm.ko to drm-psb.ko in the last cp command otherwise the debuild command will fail.

The paches in the tar file are not needed, we just move them and get other patches needed for kernels newer than 2.6.31:

mv debian/patches/ debian/nopatch

cd ..

wget http://download1.rpmfusion.org/nonfree/fedora/updates/11/SRPMS/psb-kmod-4.41.1-10.fc11.6.src.rpm

aptitude install alien

alien psb-kmod-4.41.1-10.fc11.6.src.rpm

dpkg -i psb-kmod_4.41.1-11_i386.deb

mv /psb-k* .

patch -p0 < psb-kernel-source-4.41.1-agp_memory.patch

patch -p0 < psb-kernel-source-4.41.1-drmpsb.patch

patch -p0 < psb-kernel-source-4.41.1-i2c-intelfb.patch

We’re still not ready! Edit or apply the patch available in this post.

Finally, we edit the control and debian/control files and remove the denpendency for kernel headers and kernel files: we’ve got our own. Now all should be ok. So let’s go!

cd psb-kernel-source-4.41.1

debuild -i -us -uc -d -b

cd ..

dpkg -i psb-kernel-headers_4.41.1-0ubuntu1 904um1_all.deb

psb-modules_4.41.1-0ubuntu1 904um1_i386.deb

cp /lib/modules/2.6.33-rc2-wl/updates/char/drm/* /lib/modules/2.6.33-rc2-wl/kernel/drivers/gpu/

rm -rf /lib/modules/2.6.33-rc2-wl/kernel/drivers/gpu/drm

depmod -ae

Step 4 is now to be taken care of!

cd ..; mkdir -p psb/xorg; cd psb/xorg

apt-get source libdrm-poulsbo libva psb-firmware psb-meta xpsb-glx xserver-xorg-video-psb

Then, steps 4(a) to 4(e) should be fine. Maybe you’ll get some lintian errors but that’s no problem as far as I could see.

Step 4(f) should go through too in lenny, yet while trying to build in squeeze, I got errors due to changes in header files in some mesa-*-dev package. Either I had the wrong one, or the changes were definitely incompatible with the source files. If you have errors, you may edit the libmm/mm_defines.h and add the relevent lines somewhere. I can provide the needed lines.

While in squeeze i also needed to get access to some files:

cp ../libdrm-poulsbo-2.3.0/shared-core/psb_* src/

I also had to comment the mask entry in the const struct drm_bo_info_rep of file psb_ioctl.c (line 174) and add the reference to the previously modified .h file to psb_video.c

Anyhow, that was in squeeze, here in lenny, all went fine. Install the packages and force overwrite:

dpkg -i —force-overwrite poulsbo-driver-*.deb xserver-xorg-video-psb_0.31.0-0ubuntu1 904um1_i386.deb xpsb-*.deb libva*.deb

Step 5 is easy to go through: in lenny, there is no /usr/lib/libdrm.so.2.4.0 yet we have a libdrm.so.2.3.1 so let’s adapt:

rm /usr/lib/libdrm.so.2.3.1

ln -s /usr/lib/libdrm.so.2.3.0 /lib/libdrm.so.2

ln -s /usr/lib/libdrm.so.2.3.0 /lib/

Copy the xorg file from step 6 to /etc/X11 and you should be ready for steps 7 and 8.

Reboot, check that all goes fine.

Got X11 working? Cool! Time to plug-in your mouse if you didn’t do it before and take care of the touchscreen.