qemu support on the yocto-overo-master-2017-07-05-console

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
Followed the old link to setup the QEMU
with the latest master build - Yocto-overo-master-2017-07-05-console,
but did not work:

qemu: fatal: Trying to execute code outside RAM or ROM at 0x00001230

I converted the zImage to uImage using mkimage with u-boot entry point / load address to be 0x80008000,
then used the makeimage.sh to generate the QEMU image using MLO/u-boot/uImage/console-image.

Could anyone help point out what is missing here to boot the latest overo image from QEMU?

Thanks,
Dave




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
Hello Dave,

In newer kernel, there is no longer a uImage file generated. If you don't
see the uImage after you compile the kernel, you don't need to convert or
make a uImage. All you need is MLO, u-boot and kernel image.

I would recommend you to remove your uImage and try again.

Thank you.
Jason



--
View this message in context: http://gumstix.8.x6.nabble.com/qemu-support-on-the-yocto-overo-master-2017-07-05-console-tp4971422p4971423.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Jason
This post has NOT been accepted by the mailing list yet.
In reply to this post by Gumstix mailing list
Hello Dave,

In newer kernel, there is no longer a uImage file generated. If you don't see the uImage after you compile the kernel, you don't need to convert or make a uImage. All you need is MLO, u-boot and kernel image.

I would recommend you to remove your uImage and try again.

Thank you.
Jason
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
In reply to this post by Gumstix mailing list
Hi Jason,

Thanks for the quick response. You are right that there is no uImage available but zImage instead. Could you elaborate how to run QEMU just with MLO/u-boot/zImage (and without console rootfs image?) The makeimage.sh script creates a SD image for QEMU with a vfat partition holding MLO/u-boot/uImage, and an ext3 holding the console rootfs. I actually tried to put the zImage instead of uImage into the vfat partition (hoping that u-boot would boot the zImage directly) but ran into the same issue.

Thanks,
Dave


> On Jul 24, 2017, at 3:33 PM, General mailing list for gumstix users. <[hidden email]> wrote:
>
> Hello Dave,
>
> In newer kernel, there is no longer a uImage file generated. If you don't
> see the uImage after you compile the kernel, you don't need to convert or
> make a uImage. All you need is MLO, u-boot and kernel image.
>
> I would recommend you to remove your uImage and try again.
>
> Thank you.
> Jason
>
>
>
> --
> View this message in context: http://gumstix.8.x6.nabble.com/qemu-support-on-the-yocto-overo-master-2017-07-05-console-tp4971422p4971423.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
Hi Dave,

I believe you can remove the "uImage" or zImage after you following the
instruction using makeimage.sh loaded all files in your SD card.

There is another way of doing it. First you need to run the  mk2partsd
<http://gumstix.8.x6.nabble.com/file/n4971426/mk2partsd.mk2partsd>   script
that can make two partition for your SD card.

After finished runing the script, your should have a SD card with two
partition.
Now run the command below (replace the "sdb" with your actual one for your
SD card, you can use command lsblk to check):

$ sudo mkdir /media/{boot,rootfs}
$ sudo mount -t vfat /dev/sdb1 /media/boot
$ sudo mount -t ext3 /dev/sdb2 /media/rootfs
$ sudo cp MLO /media/boot/MLO
$ sudo cp u-boot.bin /media/boot/u-boot.bin
$ sudo tar -xjvf  your-image-name-replace-here.tar.bz2 -C /media/rootfs
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs

Then your bootable SD card is ready to use.



--
View this message in context: http://gumstix.8.x6.nabble.com/qemu-support-on-the-yocto-overo-master-2017-07-05-console-tp4971422p4971426.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Jason
This post has NOT been accepted by the mailing list yet.
In reply to this post by Gumstix mailing list
Hi Dave,

I believe you can remove the "uImage" or zImage after you following the instruction using makeimage.sh loaded all files in your SD card.

There is another way of doing it. First you need to run the mk2partsd script that can make two partition for your SD card.

After finished runing the script, your should have a SD card with two partition.
Now run the command below (replace the "sdb" with your actual one for your SD card, you can use command lsblk to check):

$ sudo mkdir /media/{boot,rootfs}
$ sudo mount -t vfat /dev/sdb1 /media/boot
$ sudo mount -t ext3 /dev/sdb2 /media/rootfs
$ sudo cp MLO /media/boot/MLO
$ sudo cp u-boot.bin /media/boot/u-boot.bin
$ sudo tar -xjvf  your-image-name-replace-here.tar.bz2 -C /media/rootfs
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs

Then your bootable SD card is ready to use.
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
In reply to this post by Gumstix mailing list
In a word, to use QEMU is the same is usual but without loading the uImage or
zImage into your SD card.
The processes are identical.

Thank you,
Jason



--
View this message in context: http://gumstix.8.x6.nabble.com/qemu-support-on-the-yocto-overo-master-2017-07-05-console-tp4971422p4971428.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Jason
This post has NOT been accepted by the mailing list yet.
In reply to this post by Gumstix mailing list
In a word, to use QEMU is the same is usual but without loading the uImage or zImage into your SD card.
The processes are identical.

Thank you,
Jason
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
In reply to this post by Gumstix mailing list
Hi Jason,

Thanks for the elaboration. I see now the kernel image is included in the generated rootfs automatically, and updated the makeimage script to skip the uImage copying part. Here is what I have got so far. For the master build 2017-07-05 from gumstix (kernel 3.18), QEMU complained about accessing the illegal address as before for both the console and the XFCE images. I then tried my own yocto build (kernel 4.5). QEMU complained the guest does not have a display initialized for both the console and the XFCE images. I start to doubt if I am using the right QEMU command options:
qemu-system-arm -M overo -m 256 -sd ./test.img -clock unix -serial stdio -device usb-mouse -device usb-kbd
This is the command line from [1]. I also tried to play within these options by removing some of them and adding more (e.g., -nographic, -monitor stdio) but got no luck. While I am still digging around, if you have some clue, please do share.

Thanks,
Dave





On Jul 24, 2017, at 4:47 PM, General mailing list for gumstix users. <[hidden email]> wrote:

In a word, to use QEMU is the same is usual but without loading the uImage or
zImage into your SD card.
The processes are identical.

Thank you,
Jason



--
View this message in context: http://gumstix.8.x6.nabble.com/qemu-support-on-the-yocto-overo-master-2017-07-05-console-tp4971422p4971428.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
Hi Dave,

To be honest, I have never use QEMU. I will try to use it with different
images on my computer to see if there is anything wrong with QEMU. As I am a
little bit busy, I will post back to you latter. If anyone has idea, welcome
to post here.

Thank you,

Jason




--
View this message in context: http://gumstix.8.x6.nabble.com/qemu-support-on-the-yocto-overo-master-2017-07-05-console-tp4971422p4971431.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Jason
This post has NOT been accepted by the mailing list yet.
In reply to this post by Gumstix mailing list
Hi Dave,

To be honest, I have never use QEMU. I will try to use it with different images on my computer to see if there is anything wrong with QEMU. As I am a little bit busy, I will post back to you latter. If anyone has idea, welcome to post here.

Thank you,

Jason
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
In reply to this post by Gumstix mailing list
Hi Dave,

From my observation, the script is out of date. When I use the makeimage
script to generate the image, it takes no time to finish. If you look into
it, and remove the "&> /dev/null" at line 74, using the script will throw
out errors. It is because of the sfdisk command is not usable in newer
version.

I am fixing it by replacing the code:

sfdisk -u S -L ${OUTFILE} << EOF
,9,0x0C,*
,,,-
EOF

But now I have error in populate_image() function, under the output Format
vfat partition. I cannot address the problem yet, if you have any idea
please share here as well.

Thank you

Jason



--
View this message in context: http://gumstix.8.x6.nabble.com/qemu-support-on-the-yocto-overo-master-2017-07-05-console-tp4971422p4971433.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Jason
This post has NOT been accepted by the mailing list yet.
In reply to this post by Gumstix mailing list
Hi Dave,

From my observation, the script is out of date. When I use the makeimage script to generate the image, it takes no time to finish. If you look into it, and remove the "&> /dev/null" at line 74, using the script will throw out errors. It is because of the sfdisk command is not usable in newer version.

I am fixing it by replacing the code:

sfdisk -u S -L ${OUTFILE} << EOF
,9,0x0C,*
,,,-
EOF

But now I have error in populate_image() function, under the output Format vfat partition. I cannot address the problem yet, if you have any idea please share here as well.

Thank you

Jason
Reply | Threaded
Open this post in threaded view
|

Re: qemu support on the yocto-overo-master-2017-07-05-console

Gumstix mailing list
In reply to this post by Gumstix mailing list
Interesting. The sfdisk works fine for me, probably because I am running ubuntu 14.04, and sfdisk from util-linux 2.20.1 (sfdisk -v). I could run the makeimgae script without trouble, and it works (if you look at the final image using fdisk -l -u)

Thanks,
Dave


> On Jul 27, 2017, at 4:25 PM, General mailing list for gumstix users. <[hidden email]> wrote:
>
> Hi Dave,
>
> From my observation, the script is out of date. When I use the makeimage
> script to generate the image, it takes no time to finish. If you look into
> it, and remove the "&> /dev/null" at line 74, using the script will throw
> out errors. It is because of the sfdisk command is not usable in newer
> version.
>
> I am fixing it by replacing the code:
>
> sfdisk -u S -L ${OUTFILE} << EOF
> ,9,0x0C,*
> ,,,-
> EOF
>
> But now I have error in populate_image() function, under the output Format
> vfat partition. I cannot address the problem yet, if you have any idea
> please share here as well.
>
> Thank you
>
> Jason
>
>
>
> --
> View this message in context: http://gumstix.8.x6.nabble.com/qemu-support-on-the-yocto-overo-master-2017-07-05-console-tp4971422p4971433.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users