(→Recompiling the MeeGo Kernel) |
(→build kernel in chroot) |
||
| Line 8: | Line 8: | ||
** You can get build binary package from http://repo.meego.com/MeeGo/tools/repos/ per your Linux distribution, if your Linux distribution isn't there, you can get build source package from http://www.gitorious.org/opensuse/build to build it yourself manually. | ** You can get build binary package from http://repo.meego.com/MeeGo/tools/repos/ per your Linux distribution, if your Linux distribution isn't there, you can get build source package from http://www.gitorious.org/opensuse/build to build it yourself manually. | ||
* configure 'proxy' | * configure 'proxy' | ||
| - | ** If your network needs proxy, please export proxy environment variables, for example: | + | **If your network needs proxy, please export proxy environment variables, for example: |
| - | + | <pre> | |
| - | + | export http_proxy=http://proxy.yourcompany.com:8080/ | |
| - | ** If you used to run “sudo build …” and your network needs proxy, please ensure sudo to inherit proxy environment variables, you can do this by adding the below line to /etc/sudoers | + | export no_proxy=localhost,127.0.0.0/8,.yourcompany.com, 172.16.0.0/16 |
| - | + | </pre> | |
| + | **If you used to run “sudo build …” and your network needs proxy, please ensure sudo to inherit proxy environment variables, you can do this by adding the below line to /etc/sudoers | ||
| + | <pre> | ||
| + | Defaults env_keep += "http_proxy no_proxy HTTP_PROXY NO_PROXY" | ||
| + | </pre> | ||
| + | |||
===build kernel in MeeGo=== | ===build kernel in MeeGo=== | ||
If your host system is MeeGo, you should install some additional packages, including build, perl-XML-Parser | If your host system is MeeGo, you should install some additional packages, including build, perl-XML-Parser | ||
Contents |
This page explains the kernel recompilation process. There is also information on how to configure the MeeGo kernel. There already is a guide on how to compile the kernel for MeeGo, including links to packaging: Tips on compiling and packaging kernels in MeeGo.
export http_proxy=http://proxy.yourcompany.com:8080/ export no_proxy=localhost,127.0.0.0/8,.yourcompany.com, 172.16.0.0/16
Defaults env_keep += "http_proxy no_proxy HTTP_PROXY NO_PROXY"
If your host system is MeeGo, you should install some additional packages, including build, perl-XML-Parser
The first thing you'll need to do to recompile the MeeGo kernel is to download and unpack the MeeGo kernel package. To get that package you can download it with wget like this;
wget http://repo.meego.com/MeeGo/releases/1.1/core/repos/source/kernel-2.6.35.3-10.3.src.rpm
You can of course get your kernel directly from upstream at kernel.org for example or clone it from MeeGo's git repos;
git clone git://gitorious.org/meego-os-base/kernel-source.git
If you take the packaged MeeGo kernel, then you'll need to unpack this rpm. You can do that this way;
rpm2cpio kernel-2.6.35.3-10.3.src.rpm | cpio -id
Your development work should be in the kernel source code directory, you may do the follow modification:
Once you development work is done, you can use ‘build’ command to generate new RPM based on you changes. Command as follows:
build --repository http://repo.meego.com/MeeGo/releases/1.2.0/repos/oss/ia32/packages/ --arch i686 XXX.spec
binary RPM package can be found in /var/tmp/build-root/home/abuild/rpmbuild/RPMS/.
If you encounter "rpm verify failed" issue while executing build. You need to download the meego-release pacakge from repo, and import the gpg key in meego-release package.
For example:
wget http://repo.meego.com/MeeGo/releases/1.2.0/repos/oss/ia32/packages/noarch/meego-release-1.2.0-2.1.noarch.rpm rpm2cpio meego-release-1.2.0-2.1.noarch.rpm | cpio -idmv rpm --import ./etc/pki/rpm-gpg/RPM-GPG-KEY-meego02
If your host system is MeeGo, you should install some additional packages, including build, perl-XML-Parser.
You may occur some issue while your host system is 64 bit, once you have encountered issue, you'd better chroot to the chroot env, and build it manually. for example: you may met the follow error while building kernel
----------------------------------------------------------------- ----- building kernel.spec (user abuild) ----------------------------------------------------------------- ----------------------------------------------------------------- + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' /home/abuild/rpmbuild/SOURCES/kernel.spec error: Architecture is not included: x86_64
You should follow the steps to solve this :
[root@xq-desktop development]# chroot /var/tmp/mybuildroot/ bash-3.2# su abuild bash-3.2$ exec rpmbuild -ba --define '_srcdefattr (-,root,root)' /home/abuild/rpmbuild/SOURCES/kernel.spec --target=i686
You may also meet compiling error as follows:
sorry, unimplemented: 64-bit mode not compiled in
To solve this issue, you still need to go into chroot, and exclude -m64 options in CFLAGS CXXFLAGS and CPPFLAGS.