Yocto QEMU UNFS test procedure: Difference between revisions

From Yocto Project
Jump to navigationJump to search
(Created page with "{{DISPLAYTITLE:Yocto QEMU UNFS test case procedure}} ==Steps to run the NFS test case for all qemu machines== <strong>Prerequisites:</strong> 1. Have a clone of poky <pre>...")
 
 
(10 intermediate revisions by 4 users not shown)
Line 3: Line 3:
==Steps to run the NFS test case for all qemu machines==
==Steps to run the NFS test case for all qemu machines==


<strong>Prerequisites:</strong>
<strong>[[Prerequisites:]]</strong>


1. Have a clone of poky  
1. Have a clone of poky  
Line 9: Line 9:


2. Checkout the correct hash.
2. Checkout the correct hash.
<pre>$ git checkout and/or git log</pre>
<pre>$ git checkout   and/or   $ git log</pre>


3. Download the "kernel" file (<zimage>.bin) and the image compressed file (.tar.bz2) from desire autobilder link.
3. Download the "kernel" file (<ZIMAGE>.bin) and the image compressed file (<IMAGE NAME>.tar.bz2) from autobilder link.


<strong>Steps:</strong>
<strong>[[Steps:]]</strong>


1. Open a terminal and place in poky/ directory.
1. Open a terminal and place in poky/ directory.
Line 20: Line 20:
2. Source the environment:
2. Source the environment:
<pre>$ source oe-init-build-env build</pre>
<pre>$ source oe-init-build-env build</pre>
<pre>$ MACHINE=<MACHINE_TESTED> on conf/local.conf </pre>


4. Place the downloaded kernel (<zimage>.bin) and the .tar.bz2 file after "build" directory, something like "/home/YOURUSER/poky/build/tmp/deploy/images/qemuXYZ/" Note: First you need to create manually those directories in your system.
4. Place the downloaded kernel (<ZIMAGE>.bin) and the <IMAGE NAME>.tar.bz2 file after "build" directory, something like "/home/<YOURUSER>/poky/build/tmp/deploy/images/qemu<MACHINE>/"  
a) In poky directory create tmp directory (~/poky/build$ mkdir tmp); b) Then access to tpm ($ cd tmp); c) Create deploy directory ($ mkdir deploy); d) Access to deploy directory ($ cd deploy); e) Create images directory ($ mkdir images); f) Access to images directory ($ cd images); g) create your qemu folder, for example if you are testing qemux86 ($ mkdir qemux86); h) Access to qemux86 directory ($ cd qemux86)
 
Note: you can avoid to download and copy here the files and directly download in this path, typing in this path the following command:
'''Note 1:''' First you need to create manually those directories in your system.
<pre>$ wget /webaddresofthe_Kernel_image</pre>
a) In poky directory create tmp directory (<code>~/poky/build$ mkdir tmp</code>); b) Then access to tpm (<code>$ cd tmp </code>); c) Create deploy directory (<code>$ mkdir deploy </code>); d) Access to deploy directory (<code>$ cd deploy </code>); e) Create images directory (<code>$ mkdir images </code>); f) Access to images directory (<code> $ cd images </code>); g) create your qemu folder, for example if you are testing qemux86 (<code>$ mkdir qemux86</code> ); h) Access your qemu folder, for instance to qemux86 directory (<code> $ cd qemux86 </code>)
<pre>$ wget /webaddressof_the.tar.bz2 file</pre>
 
'''Note 2:''' you can avoid to download and copy here the files and directly download in this path, typing in this path the following command:
<pre>$ wget /<WEB_ADRESS_OF_THE_KERNEL_IMAGE>/<ZIMAGE>.bin</pre>
<pre>$ wget /<WEB_ADRESS_OF_THE_IMAGE>/<IMAGE NAME>.tar.bz2 </pre>


5. Go to build directory:
5. Go to build directory:
<pre>$ cd /home/youruser/poky/build<pre>
<pre>$ cd /home/<YOURUSER>/poky/build</pre>


6. Extract the SDK, typing in a terminal the following command:
6. Extract the SDK, typing in a terminal the following command:
<pre>$ runqemu-extract-sdk tpm/deploy/images/qemux86/core-image-sato-sdk-qemux86.tar.bz2 rootfs</pre>
<pre>$ runqemu-extract-sdk tmp/deploy/images/qemux<MACHINE>/<IMAGE NAME>.tar.bz2 rootfs</pre>
 
'''Note 3:''' "rootfs" is referring to a directory going to be created, you can choose any name as you want.


Note1: "rootfs" is referring to a directory going to be created, you can choose any name as you want.
'''Note 4:''' is it possible that the system will ask you to bitbake the system first. If so, then type in the terminal <code>$ bitbake meta-ide-support</code> (This process would take a while). Then type again in a terminal: <code>$ runqemu-extract-sdk tpm/deploy/images/qemux<MACHINE>/<IMAGE NAME>.tar.bz2 rootfs </code>
Note2: is it possible that the system will ask you to bitbake the system first. Then type in the terminal $ bitbake meta-ide-support (grab a cup of coffe, this process will take a while).


7. Type again in a terminal:  
7. Start the qemu machine with NFS:
<pre>$ runqemu-extract-sdk tpm/deploy/images/qemux86/core-image-sato-sdk-qemux86.tar.bz2 rootfs </pre>
<pre>$ runqemu nfs tmp/deploy/images/qemux<MACHINE>/<ZIMAGE>.bin rootfs</pre>
qemu machine should be launch after this command.


8. Start the qemu machine with NFS:
'''Note 5:'''if you get the error:
<pre>$ runqemu nfs tmp/deploy/images/qemux86/<zimage>.bin/ rootfs</pre>
================================================================================================================
qemu machine should be launche after this comand.
Error: neither rpcbind nor portmap appear to be running
Please install and start one of these services first
================================================================================================================
for recent Ubuntu hosts, run:
  $sudo apt-get install rpcbind
for Fedora: 
  $ sudo dnf install rpcbind
 
Then add OPTIONS="-i -w" to the configuration file into Ubuntu machines: /etc/default/rpcbind or Fedora machines: /etc/sysconfig/rpcbind and run
  Ubuntu: sudo service portmap restart
  Fedora: sudo systemctl restart rpcbind
and run again step 7.


9. From qemu open a terminal and type  
8. Finally, from qemu open a terminal and type  
<pre>$ poweroff</pre>
<pre>$ poweroff</pre>
 
to exit.
<pre>$ git clone git://git.yoctoproject.org/qa-tools</pre>


Contributing to any of the yoctoproject.org repositories, including qa-tools, can be achieved with the [[Poky Contributions]] guidelines.
Contributing to any of the yoctoproject.org repositories, including qa-tools, can be achieved with the [[Poky Contributions]] guidelines.

Latest revision as of 21:44, 29 September 2017


Steps to run the NFS test case for all qemu machines

Prerequisites:

1. Have a clone of poky

$ git clone git://git.yoctoproject.org/poky

2. Checkout the correct hash.

$ git checkout    and/or   $ git log

3. Download the "kernel" file (<ZIMAGE>.bin) and the image compressed file (<IMAGE NAME>.tar.bz2) from autobilder link.

Steps:

1. Open a terminal and place in poky/ directory.

$ cd $PATH/poky

2. Source the environment:

$ source oe-init-build-env build
$ MACHINE=<MACHINE_TESTED> on conf/local.conf 

4. Place the downloaded kernel (<ZIMAGE>.bin) and the <IMAGE NAME>.tar.bz2 file after "build" directory, something like "/home/<YOURUSER>/poky/build/tmp/deploy/images/qemu<MACHINE>/"

Note 1: First you need to create manually those directories in your system. a) In poky directory create tmp directory (~/poky/build$ mkdir tmp); b) Then access to tpm ($ cd tmp ); c) Create deploy directory ($ mkdir deploy ); d) Access to deploy directory ($ cd deploy ); e) Create images directory ($ mkdir images ); f) Access to images directory ( $ cd images ); g) create your qemu folder, for example if you are testing qemux86 ($ mkdir qemux86 ); h) Access your qemu folder, for instance to qemux86 directory ( $ cd qemux86 )

Note 2: you can avoid to download and copy here the files and directly download in this path, typing in this path the following command:

$ wget /<WEB_ADRESS_OF_THE_KERNEL_IMAGE>/<ZIMAGE>.bin
$ wget /<WEB_ADRESS_OF_THE_IMAGE>/<IMAGE NAME>.tar.bz2 

5. Go to build directory:

$ cd /home/<YOURUSER>/poky/build

6. Extract the SDK, typing in a terminal the following command:

$ runqemu-extract-sdk tmp/deploy/images/qemux<MACHINE>/<IMAGE NAME>.tar.bz2 rootfs

Note 3: "rootfs" is referring to a directory going to be created, you can choose any name as you want.

Note 4: is it possible that the system will ask you to bitbake the system first. If so, then type in the terminal $ bitbake meta-ide-support (This process would take a while). Then type again in a terminal: $ runqemu-extract-sdk tpm/deploy/images/qemux<MACHINE>/<IMAGE NAME>.tar.bz2 rootfs

7. Start the qemu machine with NFS:

$ runqemu nfs tmp/deploy/images/qemux<MACHINE>/<ZIMAGE>.bin rootfs

qemu machine should be launch after this command.

Note 5:if you get the error:

====================================================================================================

Error: neither rpcbind nor portmap appear to be running Please install and start one of these services first

====================================================================================================
for recent Ubuntu hosts, run:
 $sudo apt-get install rpcbind
for Fedora:  
 $ sudo dnf install rpcbind
 

Then add OPTIONS="-i -w" to the configuration file into Ubuntu machines: /etc/default/rpcbind or Fedora machines: /etc/sysconfig/rpcbind and run

 Ubuntu: sudo service portmap restart
 Fedora: sudo systemctl restart rpcbind 

and run again step 7.

8. Finally, from qemu open a terminal and type

$ poweroff

to exit.

Contributing to any of the yoctoproject.org repositories, including qa-tools, can be achieved with the Poky Contributions guidelines.