Difference between revisions of "RSB-3720 Ubunut creation by Yocto30 kernel"
From ESS-WIKI
| Line 1: | Line 1: | ||
| − | == '''Prepare Image''' == | + | == <span style="color:#3498db;">'''Prepare Image'''</span> == |
*<span style="font-size:medium;">Build Yocto Linux image with your expected version (e.g. A0386)</span> | *<span style="font-size:medium;">Build Yocto Linux image with your expected version (e.g. A0386)</span> | ||
| Line 14: | 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> | ||
| − | == '''Mount image''' == | + | == <span style="color:#3498db;">'''Mount image'''</span> == |
*<span style="font-size:medium;">You can find Yocto image in'''<span style="color:#9b59b6;">${WORKSPACE}</span>'''/build/tmp/deplay/image/<span style="color:#9b59b6;">'''${MC}'''</span>, and copy to your '''<span style="color:#9b59b6;">${WORKSPACE}</span>'''.</span> | *<span style="font-size:medium;">You can find Yocto image in'''<span style="color:#9b59b6;">${WORKSPACE}</span>'''/build/tmp/deplay/image/<span style="color:#9b59b6;">'''${MC}'''</span>, and copy to your '''<span style="color:#9b59b6;">${WORKSPACE}</span>'''.</span> | ||
| Line 51: | Line 51: | ||
| | ||
| − | == '''Change rootfs''' == | + | == <span style="color:#3498db;">'''Change rootfs'''</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: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 79: | Line 79: | ||
:<span style="font-size:large;">[[File:RSB-3720 Ubunut creation by Yocto30 kernel change module.png|RTENOTITLE]]</span> | :<span style="font-size:large;">[[File:RSB-3720 Ubunut creation by Yocto30 kernel change module.png|RTENOTITLE]]</span> | ||
| − | == '''Analyze dependency file''' == | + | == <span style="color:#3498db;">'''Analyze dependency file'''</span> == |
*<font size="3">'''Enter target image root directory'''</font> | *<font size="3">'''Enter target image root directory'''</font> | ||
| Line 93: | Line 93: | ||
:[[File:RSB-3720 Ubunut creation by Yocto30 kernel Analyze file replaced by module dependencies.png|RTENOTITLE]] | :[[File:RSB-3720 Ubunut creation by Yocto30 kernel Analyze file replaced by module dependencies.png|RTENOTITLE]] | ||
| − | == '''Umount target image''' == | + | == <span style="color:#3498db;">'''Umount target image'''</span> == |
*<font size="3">'''Umount rootfs'''</font> | *<font size="3">'''Umount rootfs'''</font> | ||
| Line 115: | Line 115: | ||
| | ||
| − | == '''Flash target image''' == | + | == <span style="color:#3498db;">'''Flash target image'''</span> == |
*<span style="font-size:medium;">'''Creating boot-up on-board flash from built sdcard image'''</span> | *<span style="font-size:medium;">'''Creating boot-up on-board flash from built sdcard image'''</span> | ||
| Line 123: | Line 123: | ||
:[[File:RSB-3720 Ubunut creation by Yocto30 kernel Flash target image.png|RTENOTITLE]] | :[[File:RSB-3720 Ubunut creation by Yocto30 kernel Flash target image.png|RTENOTITLE]] | ||
| + | | ||
== '''Complete''' == | == '''Complete''' == | ||
Revision as of 07:36, 18 August 2023
Contents
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 ${rootfs.wic_IMAGE}.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 ${rootfs.wic_IMAGE}
$sudo mount /dev/loop22p2 yocto/rootfs/
$sudo losetup --show -f -P 3720A1AIM30UIVA0362_iMX8MP_4G_2021-11-29.img
Change 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
$ 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/
- Repalce with Yocto module
$ cd ~/yocto/roosfs/lib
$ sudo rm -rf modules/
$ sudo cp -a ~/modules ~/yocto/rootfs/lib/
Analyze dependency file
- Enter target image root directory
$ sudo chroot rootfs/
- Analyze file replaced by module dependencies
$ depmod -a 5.4.70-2.3.0/
Umount target image
- Umount rootfs
$ exit
$ sudo umount ~/yocto/rootfs/
$ sudo umount ~/ubuntu/rootfs/
- Remove virtual device
sudo losetup -d /dev/loop22
sudo losetup -d /dev/loop23
Flash target image
- Creating boot-up on-board flash from built sdcard image
$ sudo dd if=${rootfs.wic_IMAGE} of=/dev/sde bs=1M conv=fsync
Complete
- Pleace insert SDcard to target machine, You can see Ubuntu Desktop on the monitor.









