Replies: 2 comments 1 reply
-
|
I saw that debos internally uses parted, so I tried using parted in my script, and the following also boots. Will try to look at the debos source more. #!/bin/sh
media=parted.img
boot_tar=boot.tar.xz
rm ${media}
truncate -s $(( 1024 * 1024 * 1024 )) ${media}
echo "Create label"
parted -s ${media} mklabel msdos
echo "Create boot partition"
parted -s ${media} mkpart primary fat32 1M 257M
parted -s ${media} set 1 boot on
echo "Create rootfs partition"
parted -s ${media} mkpart primary ext4 257M 100%
echo "Create loop devices"
media_loop=$(losetup -f || true)
sudo losetup ${media_loop} "${media}"
sudo kpartx -av ${media_loop}
sleep 1
sync
media_boot_partition=1
media_rootfs_partition=2
test_loop=$(echo ${media_loop} | awk -F'/' '{print $3}')
if [ -e /dev/mapper/${test_loop}p${media_boot_partition} ] && [ -e /dev/mapper/${test_loop}p${media_rootfs_partition} ] ; then
media_prefix="/dev/mapper/${test_loop}p"
else
ls -lh /dev/mapper/
echo "Error: not sure what to do (new feature)."
exit
fi
sudo mkfs.vfat -F 32 -n BOOT ${media_prefix}${media_boot_partition}
sudo kpartx -dv ${media}
mkdir temp
sudo mount -t vfat ${media} temp -o loop,offset=$((2048 * 512))
tar -xvf ${boot_tar}
sudo cp -r boot/* temp/
sudo umount temp
rm -rf temp
rm -rf boot |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Is there no output from the bootloader when it trys to boot this image? It's been a while since I've tried beaglebone. It'd be nice to share a recipe once you have it working, by the way |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have been trying to use debos to build images for beagle boards. However, I am not sure why but I could not get any images built with debos to even start the uboot present in the image.
All the information that I get from fdisk regarding the image seems to be pretty much the same, so maybe something else is the problem. Regardless, I have created a much simpler test example recipe that does not work, and one that creates image manually, that does.
The
boot.tar.xzis just the/boot/firmwarepartition extracted from a working image. I am not populating rootfs in the example, since it's not particularly important.Here is the test recipe:
And here is a shell script that roughly does the same thing and beagley-ai is able to boot:
Can anyone help me understand what I might be doing wrong in the recipe?
Beta Was this translation helpful? Give feedback.
All reactions