Meego Wiki
Views

ARM/Creating ARM image using MeeGo Image Creator

From MeeGo wiki
< ARM(Difference between revisions)
Jump to: navigation, search
(Run MeeGo Image Creator)
 
(40 intermediate revisions not shown)
Line 1: Line 1:
-
'''Under construction'''
 
-
 
-
'''If you are searching information about older page containing mic2 instructions follow the link:'''
 
-
[[ARM/Creating ARM image using MIC2]]
 
-
 
== Requirements ==
== Requirements ==
-
   * Fedora 12
+
   * Fedora 12/13/14, Ubuntu 10.10 or other mic compatible linux distribution.
-
   * mkfs.ubifs, ubinize and meego-arm-static from meego-tools repositories (install instructions below).
+
   * Required tools, e.g., qemu-arm-static, btrfs-progs and uboot-tools
-
   * MeeGo Image Creator from git
+
   * MeeGo Image Creator tool from MeeGo tools repository
-
      * requires git-core (# yum install git-core)
+
-
=== Install qemu-arm-static, mkfs.ubifs and ubinize ===
+
=== Fedora 12/13===
-
'''NOTE:''' Fedora has its own mtd-utils package, but that does not include the required tools for ubi creation.
+
Insert the suitable .repo file for you system from: http://repo.meego.com/MeeGo/tools/repos/fedora/ to /etc/yum.repos.d/
-
'''NOTE:''' You need both of the repositories below for Fedora 12 because some packages are only available in Fedora 11 currently.
+
This is likely now broken as the F11 repository is now empty.
-
Add following lines to for example '''/etc/yum.repos.d/meego-tools.repo'''
+
For fedora 12 and later, install the qemu-arm-static from Fedora 11 repository:
-
  [meego-tools-f12]
+
  sudo rpm -Uvh http://repo.meego.com/MeeGo/tools/repos/fedora/11/i386/qemu-arm-static-0.12.3-1.2.i386.rpm
-
name=Meego tools F12
+
-
failovermethod=priority
+
-
baseurl=http://repo.meego.com/tools/repos/fedora/12/
+
-
enabled=1
+
-
gpgcheck=0
+
-
+
-
[meego-tools-f11]
+
-
name=Meego tools F11
+
-
failovermethod=priority
+
-
baseurl=http://repo.meego.com/tools/repos/fedora/11/
+
-
enabled=1
+
-
gpgcheck=0
+
Install the required package:
Install the required package:
-
  yum install mtd-utils mtd-utils-ubi qemu-arm-static
+
  sudo yum install btrfs-progs mic2
-
== Get and install MeeGo Image Creator code ==
+
=== Fedora 14===
-
If Git version control system or make are missing those can be installed with commands:
+
Add the MeeGo Tools repository for Fedora 14 to your /etc/yum.repos.d from here: http://repo.meego.com/MeeGo/tools/repos/fedora/14/meego-tools.repo
-
  yum install git
+
-
  yum install make
+
-
Git clone the Meego Image Creator sources to temporary directory and install the codes:
+
To that, you must also append the equivalent repository Fedora 13, otherwise you will not be able to install all packages due to missing dependencies. The file once merged should look something like this:
-
  git clone git://gitorious.org/meego-developer-tools/image-creator.git
+
<pre>
-
  cd image-creator
+
[meego-tools]
-
   sudo tools/mic-check-alldeps
+
name=MeeGo Tools
-
   ./autogen.sh
+
type=rpm-md
-
   ./configure
+
baseurl=http://repo.meego.com/MeeGo/tools/repos/fedora/14
-
   make clean
+
gpgcheck=1
-
  make
+
enabled=1
-
   sudo make install
+
 
-
   cd ..
+
[meego-tools-13]
 +
name=MeeGo Tools 13
 +
type=rpm-md
 +
baseurl=http://repo.meego.com/MeeGo/tools/repos/fedora/13
 +
gpgcheck=1
 +
enabled=1
 +
</pre>
 +
 
 +
Once that is done, you can now install mic2: <tt>sudo yum install mic2</tt>
 +
 
 +
=== Ubuntu ===
 +
 
 +
Add MeeGo tools repository to your sources.list
 +
 
 +
for ubuntu 10.04
 +
   deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.04/ /
 +
 
 +
for ubuntu 10.10
 +
   deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/ /
 +
 
 +
Get and add the repository key (edit the path to match you ubuntu version).
 +
   wget http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/Release.key
 +
   sudo apt-key add Release.key && rm Release.key
 +
 
 +
Update package lists
 +
   sudo apt-get update
 +
 
 +
Install the packages
 +
   sudo apt-get install mic2 btrfs-tools qemu-arm-static
== Run MeeGo Image Creator ==
== Run MeeGo Image Creator ==
Create a working directory and copy your kickstart file there.
Create a working directory and copy your kickstart file there.
-
Sample kickstart files can be found [http://repo.meego.com/MeeGo/devel/n900/images/ here].
 
-
In the working directory run either of the following commands as root:
 
-
Image will be created in working directory.
+
Latest kickstart files can be found [http://meego.gitorious.org/meego-os-base/image-configurations gitorious] (click appropriate branch and then tree).
 +
 
 +
'''NOTE:''' When using the kickstarts from the gitorious repository shown earlier, you also need to use ''--release='' option in mic to get ''@BUILD_ID@'' set properly. If you wish to build current daily, define ''--release=daily''.
 +
 
 +
There are also kickstarts available with the [[ARM/N900/Releases/Weekly|weekly build]] repos, which will generate that specific weekly release.
 +
 
 +
Image will be created in working directory by default.
Packages will be cached in mycachedir to speed up the next image creation.
Packages will be cached in mycachedir to speed up the next image creation.
Line 65: Line 77:
  <nowiki>proxy=http://proxy.yourcompany.com:8080</nowiki>
  <nowiki>proxy=http://proxy.yourcompany.com:8080</nowiki>
to '''/etc/mic2/mic2.conf'''.
to '''/etc/mic2/mic2.conf'''.
-
 
-
=== Ubifs image ===
 
-
sudo mic-image-creator --run-mode=0 --cache=mycachedir --format=ubi --arch=armv5tel --config='''YOUR_KICKSTART'''
 
=== Loop image ===
=== Loop image ===
-
  sudo mic-image-creator --run-mode=0 --cache=mycachedir --format=loop --arch=armv5tel --config='''YOUR_KICKSTART'''  
+
  sudo mic-image-creator --run-mode=0 --cache=mycachedir --format=loop --arch=armv7l --config='''YOUR_KICKSTART'''  
-
 
+
-
=== Raw image ===
+
-
Raw images are ment to be put to for example external MMC card. Because we need kernel to be flashed seperately to the N900 device, you should insert following code block to the ''%post --nochroot'' section of your kickstart file. If this ''%post --nochroot'' section does not exist add it after the ''%post'' section:
+
-
 
+
-
KERNEL_VERSION=`ls -1 $INSTALL_ROOT/boot/vmlinuz* | tail -1 | xargs basename | cut --complement -b 1-8`
+
-
cp $INSTALL_ROOT/boot/vmlinuz-$KERNEL_VERSION $IMG_NAME-vmlinuz-$KERNEL_VERSION
+
-
After this you can create the image with following command
+
=== Raw image (PREFERRED) ===
 +
Create the image with following command:
-
  sudo mic-image-creator --cache=mycachedir --format=raw --arch=armv5tel --config='''YOUR_KICKSTART'''  
+
  sudo mic-image-creator --run-mode=0 --cache=mycachedir --format=raw --arch=armv7l --save-kernel --config='''YOUR_KICKSTART'''
-
You will get a directory which ends with '''-raw''' suffix and file that includes '''vmlinuz''' in its name. The directory contains the '''*.raw''' file that is put to the memory card and vmlinuz is put to the N900 with flasher.
+
In the end of the mic-image-creator, the output files are listed. In this list, the file that contains '''raw''' in its name is the rootfs image and the file with '''vmlinuz''' is the kernel. For more information on writing the image/flashing the kernel, see the pages for the appropriate device, such as, [[ARM/N900/Install/MMC|N900 MMC installation]].
== Troubleshooting ==
== Troubleshooting ==
Line 88: Line 92:
  warning: %post(libgcc-4.4.2-12.2.armv5tel) scriptlet failed, exit status 255  
  warning: %post(libgcc-4.4.2-12.2.armv5tel) scriptlet failed, exit status 255  
This is caused by SELinux, which can be disabled with:
This is caused by SELinux, which can be disabled with:
 +
setenforce 0
 +
or
  echo "0" > /selinux/enforce
  echo "0" > /selinux/enforce
-
This fix is valid until you reboot your device.
+
This fix is valid, until you reboot your device.

Latest revision as of 16:25, 24 June 2011

Contents

Requirements

 * Fedora 12/13/14, Ubuntu 10.10 or other mic compatible linux distribution.
 * Required tools, e.g., qemu-arm-static, btrfs-progs and uboot-tools
 * MeeGo Image Creator tool from MeeGo tools repository

Fedora 12/13

Insert the suitable .repo file for you system from: http://repo.meego.com/MeeGo/tools/repos/fedora/ to /etc/yum.repos.d/

This is likely now broken as the F11 repository is now empty.

For fedora 12 and later, install the qemu-arm-static from Fedora 11 repository:

sudo rpm -Uvh http://repo.meego.com/MeeGo/tools/repos/fedora/11/i386/qemu-arm-static-0.12.3-1.2.i386.rpm

Install the required package:

sudo yum install btrfs-progs mic2

Fedora 14

Add the MeeGo Tools repository for Fedora 14 to your /etc/yum.repos.d from here: http://repo.meego.com/MeeGo/tools/repos/fedora/14/meego-tools.repo

To that, you must also append the equivalent repository Fedora 13, otherwise you will not be able to install all packages due to missing dependencies. The file once merged should look something like this:

[meego-tools]
name=MeeGo Tools
type=rpm-md
baseurl=http://repo.meego.com/MeeGo/tools/repos/fedora/14
gpgcheck=1
enabled=1

[meego-tools-13]
name=MeeGo Tools 13
type=rpm-md
baseurl=http://repo.meego.com/MeeGo/tools/repos/fedora/13
gpgcheck=1
enabled=1

Once that is done, you can now install mic2: sudo yum install mic2

Ubuntu

Add MeeGo tools repository to your sources.list

for ubuntu 10.04

 deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.04/ /

for ubuntu 10.10

 deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/ /

Get and add the repository key (edit the path to match you ubuntu version).

 wget http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/Release.key
 sudo apt-key add Release.key && rm Release.key

Update package lists

 sudo apt-get update

Install the packages

 sudo apt-get install mic2 btrfs-tools qemu-arm-static

Run MeeGo Image Creator

Create a working directory and copy your kickstart file there.

Latest kickstart files can be found gitorious (click appropriate branch and then tree).

NOTE: When using the kickstarts from the gitorious repository shown earlier, you also need to use --release= option in mic to get @BUILD_ID@ set properly. If you wish to build current daily, define --release=daily.

There are also kickstarts available with the weekly build repos, which will generate that specific weekly release.

Image will be created in working directory by default.

Packages will be cached in mycachedir to speed up the next image creation.

If you are behind a proxy, you can set it to mic by adding

proxy=http://proxy.yourcompany.com:8080

to /etc/mic2/mic2.conf.

Loop image

sudo mic-image-creator --run-mode=0 --cache=mycachedir --format=loop --arch=armv7l --config=YOUR_KICKSTART 

Raw image (PREFERRED)

Create the image with following command:

sudo mic-image-creator --run-mode=0 --cache=mycachedir --format=raw --arch=armv7l --save-kernel --config=YOUR_KICKSTART

In the end of the mic-image-creator, the output files are listed. In this list, the file that contains raw in its name is the rootfs image and the file with vmlinuz is the kernel. For more information on writing the image/flashing the kernel, see the pages for the appropriate device, such as, N900 MMC installation.

Troubleshooting

exit status 255 error

warning: %post(libgcc-4.4.2-12.2.armv5tel) scriptlet failed, exit status 255 

This is caused by SELinux, which can be disabled with:

setenforce 0

or

echo "0" > /selinux/enforce

This fix is valid, until you reboot your device.

Personal tools