Re: Running chroot-like command in Yocto #yocto
"Nicolas Wirth" <[email protected]>
| Newsgroups | org.yoctoproject.lists.poky |
|---|---|
| Message-ID | <[email protected]> |
That's not entirely true. The syslinux class does indeed a lot of this, I was able to experiment with this using the live hddimage. However, this mechanism ends up creating 2 different partitions, one containing the bootloader, and one containing the rootfs. I would like to have them in the same partition. I was able to find how to do it by scripting, but it's outside of the build environment. My script looks like this:
loop_dev =$( losetup --find --partscan --show " my-image-genericx86-64.wic " )
if [[ -z " $loop_dev " ]]; then
echo " Failed to set up loop device! "
exit 1
fi
if [[ " $arch " == " amd64 " ]]; then
echo " Setting up Extlinux "
mount_dir =$( mktemp --directory )
mount ${ loop_dev } p1 ${ mount_dir }
extlinux --install ${ mount_dir } /boot/syslinux
umount ${ loop_dev } p1
fi