[Dev] About kickstarter file and repository to build tizen image

Lv, RuiX ruix.lv at intel.com
Fri Sep 5 03:18:31 GMT 2014


Hi Heecheol,

Let me walk you through the whole process.


1.       Performing local full build



(1)     url in .gbs.conf

.gbs.conf under the top-level dir of your Tizen project is enough.

No need to modify it.

(2)     url in ks

1)       Tizen 2.x

Both remote and local repo are needed to guarantee successful image creation

because local repo generated by `gbs build` (<Path_to_GBS-ROOT>/local/repos/tizen<Version>_<Profile>/<Arch>)

cannot provide all needed packages.



Take Tizen 2.2 as an example,

you should make the following modification in ks file

(http://download.tizen.org/snapshots/tizen/rd-pq/tizen_20140602.4/images/RD-PQ/RD-PQ.ks)



Replace

“repo --name=mobile --baseurl=http://download.tizen.org/snapshots/tizen/mobile/@BUILD_ID@/repos/mobile/armv7l/packages/ --save  --ssl_verify=no”

with

“

repo --name=Tizen-main --baseurl=http://download.tizen.org/releases/2.2/tizen-2.2/repos/tizen-main/<Arch>/packages/ --save --ssl_verify=no --priority=99

repo --name=Tizen-base --baseurl=http://download.tizen.org/releases/2.2/tizen-2.2/repos/tizen-base/<Arch>/packages/ --save --ssl_verify=no --priority=99

repo --name=local --baseurl=file://<Path_to_GBS-ROOT>/local/repos/tizen<Version>_<Profile>/<Arch>

”

2)       Tizen 3.0

Directly replace remote repo with local repo because local repo generated by `gbs build` can provide all needed packages.

That is,

replace

“repo --name=mobile --baseurl=http://download.tizen.org/snapshots/tizen/mobile/@BUILD_ID@/repos/mobile/armv7l/packages/ --save  --ssl_verify=no”

with

“repo --name=local --baseurl=file://<Path_to_GBS-ROOT>/local/repos/tizen<Version>_<Profile>/<Arch>”



2.       Rebuilding single package “systemd” after adding debug info

At this point, you need to install the local version of systemd package to the image instead of the one obtained from remote repo.

1)       Tizen 2.x

Because remote repo exists in ks file, to guarantee mic installs local systemd package,

you need to append “--excludepkgs=systemd” at the end of

“

repo --name=Tizen-main --baseurl=http://download.tizen.org/releases/2.2/tizen-2.2/repos/tizen-main/<Arch>/packages/ --save --ssl_verify=no --priority=99

repo --name=Tizen-base --baseurl=http://download.tizen.org/releases/2.2/tizen-2.2/repos/tizen-base/<Arch>/packages/ --save --ssl_verify=no --priority=99

repo --name=local --baseurl=file://<Path_to_GBS-ROOT>/local/repos/tizen<Version>_<Profile>/<Arch>

”
       That is,

“

repo --name=Tizen-main --baseurl=http://download.tizen.org/releases/2.2/tizen-2.2/repos/tizen-main/<Arch>/packages/ --save --ssl_verify=no --priority=99 --excludepkgs=systemd

repo --name=Tizen-base --baseurl=http://download.tizen.org/releases/2.2/tizen-2.2/repos/tizen-base/<Arch>/packages/ --save --ssl_verify=no --priority=99 --excludepkgs=system

repo --name=local --baseurl=file://<Path_to_GBS-ROOT>/local/repos/tizen<Version>_<Profile>/<Arch>

”

2)       Tizen 3.0

Run MIC without modifying ks file because all remote repos have been removed from ks.

In this scenario, MIC will install from the local repo below, which is added during local full build.

“repo --name=local --baseurl=file://<Path_to_GBS-ROOT>/local/repos/tizen<Version>_<Profile>/<Arch>”



Other open issues found during my analysis:

l  --baseurl in http://download.tizen.org/snapshots/tizen/rd-pq/tizen_20140602.4/images/RD-PQ/RD-PQ.ks is incorrect.



“repo --name=mobile --baseurl=http://download.tizen.org/snapshots/tizen/mobile/@BUILD_ID@/repos/mobile/armv7l/packages/ --save  --ssl_verify=no”

should be changed to

“repo --name=mobile --baseurl=http://download.tizen.org/snapshots/tizen/rd-pq//@BUILD_ID@/repos/mobile/armv7l/packages/<http://download.tizen.org/snapshots/tizen/rd-pq/@BUILD_ID@/repos/mobile/armv7l/packages/> --save  --ssl_verify=no”

Note that --name=rd-pq may be more appropriate,

but keeping it as “--name=mobile” doesn’t have any impact on image creation,

because the name (mobile) corresponds to the repo name of local cache (/var/tmp/mic/cache/packages/mobile) generated by MIC.



Can the responsible engineer help fix this?



l   “Adding local repo in ks” vs. “Using –local-pkg-path=<Path_to_GBS-ROOT>/local/repos/tizen<Version>_<Profile>/<Arch>/RPMS”



In normal cases, the two methods are equivalent.

However, we recommend that users should add local repo in ks instead of using –local-pkg-path option in cmd.

Because the 2nd method may lead to the following error:

“ERROR: Unable to find package: systemd”

Rui


From: Dev [mailto:dev-bounces at lists.tizen.org] On Behalf Of Heecheol, Yang
Sent: Friday, September 05, 2014 10:59 AM
To: Ding, Jian-feng; Li, Hao H
Cc: dev at lists.tizen.org
Subject: Re: [Dev] About kickstarter file and repository to build tizen image

Wow, I think I’ve got something important.
Thank you all.
I will try it right now!

Regards,
Hee-cheol, Yang.

From: JF Ding [mailto:jian-feng.ding at intel.com]
Sent: Friday, September 5, 2014 9:42 AM
To: Li, Hao H; Heecheol, Yang
Cc: dev at lists.tizen.org<mailto:dev at lists.tizen.org>
Subject: Re: [Dev] About kickstarter file and repository to build tizen image

Yes, the repo url inside gbs.conf should be that link. And in the image creation step, to use —local-pig-path is the most convenience way to include local built rpms into images for debugging.
And the base url in RD-PQ.ks file contain a placeholder string "@BUILD_ID@“, which will be replaced with the actual snapshot id to be specified in mic command line. Like:

mic create auto RD-PQ.ks —release=tizen_20140602.4<http://download.tizen.org/snapshots/tizen/rd-pq/tizen_20140602.4/images/RD-PQ/>

thanks
- jf.ding


On Friday, September 5, 2014 at 8:33 AM, Li, Hao H wrote:

For gbs.conf, you might use the repo like http://download.tizen.org/snapshots/tizen/rd-pq/tizen_20140602.4/repos/mobile/armv7l/packages/ to do the local build for your updated source package.

For building customized image, you can use --local-pkgs-path=LOCAL_PKGS_PATH during mic cr - https://source.tizen.org/documentation/reference/mic-image-creator/mic-create

You also can check https://source.tizen.org/documentation/reference/mic-image-creator/customize-image





From: Dev [mailto:dev-bounces at lists.tizen.org] On Behalf Of Heecheol, Yang
Sent: Thursday, September 04, 2014 11:19 PM
To: dev at lists.tizen.org<mailto:dev at lists.tizen.org>
Subject: [Dev] About kickstarter file and repository to build tizen image



Hello, I am porting Tizen on my own board, and using an image which I downloaded from the link [1]

However, I got an error about systemd (To be specific, systemd doesn’t work showing “/run/systemd/private no such file or directory” error message”).

So I decided to add some debug messages to systemd to identify the reason why.

But, there is a problem.

As you know, to create a tizen image, there are mainly two steps.

1)     Download and build Tizen source codes.

2)     Create image using compiled packages from (1)

Step 1 can be done through “gbs build” command, and we have to specify URL of the repository in gbs.conf file.

Step 2 can be done through “gbs createimage” or “mic” command, and we need .ks file.

But, it doesn’t seems that the .ks file from [2] is for the image[1]. To be specific, we need to modify --baseurl field properly. But I couldn’t find the URL.

Could you tell me which URLs should be specified in .ks and gbs.conf files?



Regards,

Hee-cheol, Yang

[1] http://download.tizen.org/snapshots/tizen/rd-pq/tizen_20140602.4/images/RD-PQ/

[2] http://download.tizen.org/snapshots/tizen/rd-pq/tizen_20140602.4/images/RD-PQ/RD-PQ.ks


_______________________________________________
Dev mailing list
Dev at lists.tizen.org<mailto:Dev at lists.tizen.org>
https://lists.tizen.org/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140905/e168e127/attachment-0001.html>


More information about the Dev mailing list