Changing RootFS in SDK 1.3.2

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Changing RootFS in SDK 1.3.2

Changing RootFS in SDK 1.3.2

Occasionally, one may want to change the root filesystem, and then rebuild the image using Yocto as per the standard SDK.  The SDK manual, goes through the steps necessary in Chapter 2 of the QorIQ_SDK_Infocenter.pdf document.

In the following examples I assume you've already installed the SDK, and set up the host environment. I also assume you compiled an image once already, and through doing so have already run the fsl-setup-poky script. I'm using a P3041DS system, and in my case, the first thing I ran to set up my build was:

     source ./fsl-setup-poky -m p3041ds -j 4 -t 4



As a first example, on my P3041DS system I am using fm1-gb4 as my ethernet port. I want to assign it the static address of 192.168.1.33. In order to do so, I need to create my own /etc/network/interfaces file to implement this function:

     cd <yocto_install_path>

     bitbake -c cleansstate netbase

Then go into the netbase folder:

     cd meta-fsl-ppc/recipes-append/netbase/files

Within this directory, I create an interfaces file for my target:

          auto lo

          iface lo inet loopback

          iface fm1-gb4 inet static

             address 192.168.1.33

             netmask 255.255.255.0

             gateway 192.168.1.1

             network 192.168.1.0

At this point, I just rebuild my image:

     bitbake fsl-image-core

And the network definitions will be installed. (note that I'm building fsl-image-core, but you could build whatever target you're currently using, i.e. fsl-image-minimal)

As a second example, I wish to add a pre-build binary (custom application) into the rootfs. In this example I have an custom application, mr_access that I want to install into /usr

     cd <yocto_install_path>

Then add the files:

     cd meta-fsl-ppc-private/recipes-tools/merge-files

Now, put the files into files/merge. I added mr_access into files/merge/usr

Build the new rootfs image:

     bitbake fsl-image-core

ラベル(1)
コメント

Thanks for the guide. Very helpful indeed.

I notice there 2 directories: meta-fsl-ppc and meta-fsl-ppc-private. I suppose these 2 are called 'layers' in yocto terms?  What is the difference between these 2 directories by the way?

評価なし
バージョン履歴
最終更新日:
‎05-13-2013 09:08 AM
更新者: