Meego Wiki
Views
From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
m (Method1: by making a patch)
(How to patch an i586 kernel for MeeGo with obslight?)
Line 9: Line 9:
* From the menu: ''Window'' -> ''Show log''
* From the menu: ''Window'' -> ''Show log''
* When a long operation is running: right click on progress bar and click ''Show log''.
* When a long operation is running: right click on progress bar and click ''Show log''.
-
 
-
== How to patch an i586 kernel for MeeGo with ''obslight''? ==
 
-
 
-
=== Step1: inform ''obslight'' about your OBS account ===
 
-
* If you don't have already an account on an OBS server you can use [http://susegallery.com/a/e0uuBG/meego-obs an OBS appliance].
 
-
* If you don't have any kernel package in your OBS project, you can use [[Obstag | obstag and obs2obscopy]] to add one.
 
-
obslight addObsServer --serverApi https://api.meego.com --serverRepo http://download.meego.com/live --user obsuser --password opensuse
 
-
;''serverApi''
 
-
: is the URL to the OBS control API
 
-
;''serverRepo''
 
-
: is the URL to the OBS package repositories
 
-
 
-
=== Step2: create a local project related to your OBS project ===
 
-
*The project is created in '''~/OBSLight/MeeGo_1.2_oss/'''
 
-
obslight addProject --projectLocalName MeeGo_1.2_oss --projectObsName MeeGo:1.2:oss --obsServer https://api.meego.com --projectArch i586 --projectTarget standard
 
-
;''projectLocalName''
 
-
: is the name you will use to refer to this project with the ''obslight'' command
 
-
;''projectObsName''
 
-
: is the name of the project on the OBS
 
-
;''obsServer''
 
-
: is the URL (or alias) of the OBS from which we get the project (which has been configured in first step)
 
-
;''projectArch''
 
-
: is the target architecture of the project
 
-
 
-
=== Step3: add the kernel package to your local project ===
 
-
*The package is created in '''~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/'''
 
-
*In this directory, the package is manageable by osc.
 
-
obslight addPackage --projectLocalName MeeGo_1.2_oss --package kernel
 
-
 
-
=== Step4: create the chroot of the project ===
 
-
*The chroot directory is '''~/OBSLight/MeeGo_1.2_oss/aChroot/'''.
 
-
*The chroot is created with zypper and your OBS project repository is automatically added.
 
-
obslight createChRoot --projectLocalName MeeGo_1.2_oss
 
-
 
-
=== Step5: add the source of the kernel package into your chroot ===
 
-
*The source package is extracted in directory '''/root/rpmbuild/BUILD/kernel-X.X.X/linux-X.X.X'''.
 
-
*After the installation, a git repository is initialized in package's directory.
 
-
obslight addPackageSourceInChRoot --projectLocalName MeeGo_1.2_oss --package kernel
 
-
 
-
=== Step6: work as you want into your chroot ===
 
-
*The directory '''~/OBSLight/MeeGo_1.2_oss/chrootTransfert/''' is mounted into the chroot in '''/chrootTransfert/'''.
 
-
*Every script executed in ''aChroot'', is stored in '''/chrootTransfert/''' as '''runMe_YYYY-MM-DD_HHhMMmSS.sh'''.
 
-
obslight goToChRoot --projectLocalName MeeGo_1.2_oss --package kernel
 
-
Now you are logged in the chroot.
 
-
In this how-to we just modify the kernel configuration.
 
-
# cp configs/kernel-x86.config .config
 
-
# make menuconfig
 
-
 
-
=== Step7: save your modifications ===
 
-
There are two methods.
 
-
==== Method1: by making a patch ====
 
-
# cp .config config-x86
 
-
# exit
 
-
obslight makePatch --projectLocalName  MeeGo_1.2_oss --package kernel --patch myKernelPatch.patch
 
-
*The patch is automatically added to the local spec file.
 
-
*'''myKernelPatch.patch''' is automatically added to the local package directory.
 
-
*''kernel package specific:'' you must move the patch application command '''%patchXXX -p1''' after the command line '''cp $RPM_SOURCE_DIR/config-* .''' in the local spec file
 
-
vi ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/kernel.spec
 
-
 
-
==== Method2: by copying the new configuration file ====
 
-
# cp .config /chrootTransfert/config-x86
 
-
# exit
 
-
cp /chrootTransfert/config-x86 ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/
 
-
 
-
=== Upstream your modifications to the OBS server ===
 
-
*The command '''addAndCommitChanges''' checks the additions and deletions of files, before committing the package to the OBS server.
 
-
obslight addAndCommitChanges --projectLocalName MeeGo_1.2_oss --package kernel -m "Patch kernel"
 
== How to patch an ARM kernel for MeeGo with obslight? ==
== How to patch an ARM kernel for MeeGo with obslight? ==

Revision as of 10:41, 1 December 2011

Contents

Frequently Asked Questions

Where does obslight store its data?

All data is stored in ~/OBSLight and subdirectories.

Is there a configuration file ?

Configuration file is ~/OBSLight/obslightConfig.

How to show the log ?

  • From the menu: Window -> Show log
  • When a long operation is running: right click on progress bar and click Show log.

How to patch an ARM kernel for MeeGo with obslight?

It's the same approach than with i586 architecture.

  • You can't use the kernel package, because it has flags to prevent builds on ARM. Use for example the kernel-adaptation-n900 package.
obslight addObsServer --serverAPI https://api.meego.com --serverRepos http://download.meego.com/live --user obsuser --passw opensuse
obslight addProject --projectLocalName MeeGo_1.2_oss --projectObsName MeeGo:1.2:oss --obsServer https://api.meego.com --projectArchitecture armv8el --projectTarget standard 
obslight addPackage --projectLocalName MeeGo_1.2_oss --package kernel-adaptation-n900
obslight createChRoot --projectLocalName MeeGo_1.2_oss
obslight addPackageSourceInChRoot --projectLocalName MeeGo_1.2_oss --package kernel-adaptation-n900

Some errors you may encounter:

obslight goToChRoot --projectLocalName MeeGo_1.2_oss --package kernel-adaptation-n900
# cp configs/kernel-adaptation-n900.config .config
# make menuconfig
# cp .config config-adaptation-n900
# exit
vi ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel-adaptation-n900/kernel-adaptation-n900.spec

You must move your patch command %patchXXX -p1 after the command line cp $RPM_SOURCE_DIR/config-* .

obslight makePatch --projectLocalName  MeeGo_1.2_oss  --package kernel-adaptation-n900 --patch myKernelPatch.patch
obslight addAndCommitChange --projectLocalName  MeeGo_1.2_oss  --package kernel-adaptation-n900 -m "Patch kernel"

How install the dependency of a package into the chroot?

If the project on your OBS doesn’t provide some dependencies and you must add a repository to your chroot's zypper configuration, you have two choices:

  • First one, use an URL and an alias:
obslight addRepoInChRoot --projectLocalName MeeGo_1.2_oss --url http://download.meego.com/live/MeeGo:/1.2:/non-oss/MeeGo_1.2/ --alias "MeeGo_non-oss"
  • Second one, add the repository of another local project:
obslight addRepoInChRoot --projectLocalName MeeGo_1.2_oss --fromProject $ProjectName

Where to send bug reports ?

Bugs are centralized on MeeGo's bugzilla.

Links

Personal tools