Difference between revisions of "RSB-3720 Ubunut creation by Yocto30 kernel"
From ESS-WIKI
(→Mount image) |
|||
| Line 15: | Line 15: | ||
:<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> | ||
| + | |||
== '''Mount image''' == | == '''Mount image''' == | ||
| Line 22: | Line 23: | ||
:<span style="font-size:large;"><code>$ sudo cp –a imx-image-<span style="color:#9b59b6;">'''${MC}'''</span>-20230816082527.rootfs.wic.bz2 <span style="color:#9b59b6;">'''${WORKSPACE}'''</span>.</code></span> | :<span style="font-size:large;"><code>$ sudo cp –a imx-image-<span style="color:#9b59b6;">'''${MC}'''</span>-20230816082527.rootfs.wic.bz2 <span style="color:#9b59b6;">'''${WORKSPACE}'''</span>.</code></span> | ||
| − | : | + | :[[File:RSB-3720 copy Yocto30 image to workspace.png|RTENOTITLE]] |
*<span style="font-size:medium;">'''Unpack rootfs.wic'''</span> | *<span style="font-size:medium;">'''Unpack rootfs.wic'''</span> | ||
| Line 28: | Line 29: | ||
:<span style="font-size:large;"><code>$sudo bzip2 -d imx-image-full-<span style="color:#9b59b6;">'''${MC}'''</span>-20230814102331.rootfs.wic.bz2</code></span> | :<span style="font-size:large;"><code>$sudo bzip2 -d imx-image-full-<span style="color:#9b59b6;">'''${MC}'''</span>-20230814102331.rootfs.wic.bz2</code></span> | ||
| − | : | + | :[[File:RSB-3720 unpack yocto30 image.png|RTENOTITLE]] |
*<span style="font-size:medium;">'''Create folders to mount'''</span> | *<span style="font-size:medium;">'''Create folders to mount'''</span> | ||
| Line 47: | Line 48: | ||
:<span style="font-size:large;"><span style="font-size:large;"><span style="font-size:large;"><span style="font-size:large;"><code>$sudo mount /dev/loop23p2 ubuntu/rootfs/</code></span></span></span></span> | :<span style="font-size:large;"><span style="font-size:large;"><span style="font-size:large;"><span style="font-size:large;"><code>$sudo mount /dev/loop23p2 ubuntu/rootfs/</code></span></span></span></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> | ||
| + | |||
| + | :<span style="font-size:large;"><code>$ sudo cp -a yocto/rootfs/lib/modules/ /home/adv/</code></span> | ||
*'''<span style="font-size:medium;">Delete under Yocto rootfs all files, and replace to Ubuntu rootfs</span>''' | *'''<span style="font-size:medium;">Delete under Yocto rootfs all files, and replace to Ubuntu rootfs</span>''' | ||
:[[File:RSB-3720 Ubunut creation by Yocto30 kernel Mount Yocto image and Ubuntu image Partition2.png|RTENOTITLE]] | :[[File:RSB-3720 Ubunut creation by Yocto30 kernel Mount Yocto image and Ubuntu image Partition2.png|RTENOTITLE]] | ||
Revision as of 03:01, 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.
- Modify kernel to "Add commit to support the Ubuntu desktop version"
- Prepare Ubuntu image (e.g. A0362)
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}.
- Unpack rootfs.wic
$sudo bzip2 -d imx-image-full-${MC}-20230814102331.rootfs.wic.bz2
- Create folders to mount
$mkdir ubuntu yocto
$mkdir ubuntu/rootfs yocto/rootfs
- 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/
- Copy Yocto module to${WORKSPACE}, then you can find Yocto module in rootfs/lib
$ sudo cp -a yocto/rootfs/lib/modules/ /home/adv/
- Delete under Yocto rootfs all files, and replace to Ubuntu rootfs



