[ELDK] To compile ELDK from scratch

Ashutosh Sharma ashu0204 at yahoo.com
Mon Jun 15 11:58:38 CEST 2009


To build ELDK from source using Red Hat 7.3 root file system.

These days it is difficult to find PC with IDE HDD. So installation of Red Hat 7.3 is not possible on these. I faced this problem too.

Using the root file system with qemu is vary painful task as it is very speed.

To compile ELDK from scratch I am using openSUSE 11.1 and the root file system of Red Hat 7.3

To do so follow the following steps.

1. Download root files system, Red Hat 7.3, from ftp://ftp.denx.de/pub/eldk/build-env/root-rh-7.3.img.gz
2. Uncompress the file system 
#gunzip root-rh-7.3.img.gz to get root-rh-7.3.img
3. using /sbin/fdisk check the partitions on the image. (This is a disk image). It looks like:

#/sbin/fdisk root-rh-7.3.img

Command (m for help): p

Disk root-rh-7.3.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

          Device Boot      Start         End      Blocks   Id  System
root-rh-7.3.img1   *           1         653     5245191   83  Linux
root-rh-7.3.img2             654         783     1044225   82  Linux swap / Solaris

4. Calculate the offset now.
offset = 512*63=32,256
5. Mount the image as loop bak device (as root).
#mount -t ext2 -o loop,offset=32256 root-rh-7.3.img /mnt

6. Create a folder where you want to build the system

#mkdir ~build/eldk

7. Copy the contents of root file system to this folder.

#cp -dpr /mnt/* ~build/eldk

8. Copy the eldk source checked out from git to the same folder “git://www.denx.de/git/eldk/module”
#cp git_data ~build/eldk/opt/eldk

(git_data = build, SRPM and tarball)

9. Open a new shell and change the root to the folder where root file system of Red Hat 7.3 is present.
# chroot ~build/eldk (as root)

10. Now in new root system will be using kernel of the host system and tool chain from red hat 7.3
#cd /opt/eldk
#./ELDK_BUILD

I used the above mentioned system to build tool chain for PPC successfully.

Hope this will help you :)


Regards,

Ashutosh Sharma

+--------------------+     \\//     +-----------------------------+
| Ashutosh Sharma    |    ( .. )    |      ashu0204 at yahoo.com     |
+--------------------+-ooO-(__)-Ooo-+-----------------------------+



      


More information about the eldk mailing list