Difference between revisions of "RSB-3720 Ubunut creation by Yocto30 kernel"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
 
 
 
  
 
== '''Prepare Image''' ==
 
== '''Prepare Image''' ==
Line 16: Line 14:
 
:<span style="font-size:medium;">[[File:RSB-3720 Prepare ubuntu image.png|RTENOTITLE]]</span>  
 
:<span style="font-size:medium;">[[File:RSB-3720 Prepare ubuntu image.png|RTENOTITLE]]</span>  
  
 +
&nbsp;
  
 
+
&nbsp;
  
 
== '''Mount image''' ==
 
== '''Mount image''' ==
Line 52: Line 51:
 
:&nbsp;  
 
:&nbsp;  
 
:<span style="font-size:large;"><span style="font-size:large;">[[File:RSB-3720 Ubunut creation by Yocto30 kernel Mount Yocto image and Ubuntu image Partition2.png|RTENOTITLE]]</span></span>  
 
:<span style="font-size:large;"><span style="font-size:large;">[[File:RSB-3720 Ubunut creation by Yocto30 kernel Mount Yocto image and Ubuntu image Partition2.png|RTENOTITLE]]</span></span>  
:
+
:&nbsp;  
{| border="1" cellpadding="1" cellspacing="1" style="width: 500px;"
 
|-
 
|
 
&nbsp;
 
 
 
[[File:RSB-3720 Ubunut creation by Yocto30 kernel ubuntu module.png]]
 
 
 
| &nbsp;
 
|-
 
| &nbsp;
 
| &nbsp;
 
|}
 
 
 
  
 
*'''<span style="font-size:medium;">Copy Yocto module to<span style="color:#9b59b6;">${WORKSPACE}</span></span>'''<span style="font-size:medium;">''', then you can find Yocto module in rootfs/lib'''</span>  
 
*'''<span style="font-size:medium;">Copy Yocto module to<span style="color:#9b59b6;">${WORKSPACE}</span></span>'''<span style="font-size:medium;">''', then you can find Yocto module in rootfs/lib'''</span>  
Line 81: Line 67:
  
 
:<span style="font-size:large;"><code>$ sudo cp -a bin boot dev etc home lib media mnt opt proc root run sbin srv swapfile sys tmp usr var ~/yocto/rootfs/</code></span>  
 
:<span style="font-size:large;"><code>$ sudo cp -a bin boot dev etc home lib media mnt opt proc root run sbin srv swapfile sys tmp usr var ~/yocto/rootfs/</code></span>  
:&nbsp;
+
 
 +
:[[File:RSB-3720 Ubunut creation by Yocto30 kernel Delete under Yocto rootfs all files, and replace with Ubuntu rootfs.png|RTENOTITLE]]
 +
 
 +
*'''<span style="font-size:medium;">Repalce with Yocto module</span>'''
 +
 
 +
:<span style="font-size:large;"><code>$ cd ~/yocto/roosfs/lib</code></span>
 +
 
 +
:<span style="font-size:large;"><code>$ sudo rm -rf modules/</code></span>
 +
 
 +
:<span style="font-size:large;"><code>$ sudo cp -a ~/modules ~/yocto/rootfs/lib/</code></span>
 +
 
 +
:<span style="font-size:large;">[[File:RSB-3720 Ubunut creation by Yocto30 kernel change module.png|RTENOTITLE]]</span>
 +
 
 +
*<font size="3">'''Enter target image root directory'''</font>
 +
 
 +
:<span style="font-size:large;"><code>$ sudo chroot rootfs/</code></span>
 +
&nbsp;

Revision as of 05:54, 18 August 2023

Prepare Image

  • Build Yocto Linux image with your expected version (e.g. A0386)
You can follow this SOP to build your Yocto image.
RTENOTITLE
  •  Prepare Ubuntu image (e.g. A0362)
RTENOTITLE

 

 

Mount image

  • You can find Yocto image in${WORKSPACE}/build/tmp/deplay/image/${MC}, and copy to your ${WORKSPACE}.
$ sudo cp –a imx-image-${MC}-20230816082527.rootfs.wic.bz2 ${WORKSPACE}.
RTENOTITLE
  • Unpack rootfs.wic
$sudo bzip2 -d imx-image-full-${MC}-20230814102331.rootfs.wic.bz2
RTENOTITLE
  • Create folders to mount
$mkdir ubuntu yocto
$mkdir ubuntu/rootfs yocto/rootfs
RTENOTITLE
  • Mount Yocto image and Ubuntu image Partition2
$sudo losetup --show -f -P imx-image-full-imx8mprsb3720a1-20230814102331.rootfs.wic
$sudo mount /dev/loop22p2 yocto/rootfs/
$sudo losetup --show -f -P 3720A1AIM30UIVA0362_iMX8MP_4G_2021-11-29.img
$sudo mount /dev/loop23p2 ubuntu/rootfs/
 
RTENOTITLE
 
  • Copy Yocto module to${WORKSPACE}, then you can find Yocto module in rootfs/lib
$ sudo cp -a yocto/rootfs/lib/modules/ /home/adv/
RTENOTITLE
 
  • Delete under Yocto rootfs all files, and replace to  Ubuntu rootfs
$ sudo rm -rf yocto/rootfs/
$ sudo cd ubuntu/rootfs/
$ sudo cp -a bin boot dev etc home lib media mnt opt proc root run sbin srv swapfile sys tmp usr var ~/yocto/rootfs/
RTENOTITLE
  • Repalce with Yocto module
$ cd ~/yocto/roosfs/lib
$ sudo rm -rf modules/
$ sudo cp -a ~/modules ~/yocto/rootfs/lib/
RTENOTITLE
  • Enter target image root directory
$ sudo chroot rootfs/