Skip to contentSkip to conversation

About how port yocto to a customized MIPS cpu

DISCUSSION 张健 2 participants 6 messages Jan 27, 2016 – Feb 5, 2016

lore
Share & tools
lore

张健

author
#0 lore raw

hi,everyone:

This is Jack from Shanghai, in my first year in graduate school.
I'm sending email here to asking for some help about how to port linux on a customized cpu run on FPGA board.

Before I have been working on how to use "verilog" to make a cpu (based on MIPS32 ISA) on a FPGA board, and for now I could form a set of cpu code, and use assembly on it. The following is my tetris demo,which is written in assembly language and run on the MPIS32 CPU (written in verilog on FPGA board).

http://www.tudou.com/programs/view/e-E5lVrQfTw/

These days, I start to think the question about how to port linux on my tiny "cpu". So I find "yocto",which seems the thing that could help me. I have finished the "yocto project quick start" document online yesterday. (http://www.yoctoproject.org/docs/2.0/yocto-project-qs/yocto-project-qs.html)
and was very happy to see that it could "boot" on the qemu simulator.

and I found the following are the boot image files.

In some embedded boards, they usually write a linux image file(.img ) to a sd card. Then plug in to the board. Finally it boots. But I have no idea what's inside the .img files, and how to let my fpga board to understand the .img files.

So this is reason why I'm here to ask you guys for some help.

And wish to know if it is possible to port the "yocto" to my own project.

Thank you and Best wishes !
To geeks :)

Jack

======================================
the yocto quick start training:

author
#1 lore raw

hi,everyone:

This is Jack from Shanghai, in my first year in graduate school.
I'm sending email here to asking for some help about how to port linux on a customized cpu run on FPGA board.

Before I have been working on how to use "verilog" to make a cpu (based on MIPS32 ISA) on a FPGA board, and for now I could form a set of cpu code, and use assembly on it. The following is my tetris demo,which is written in assembly language and run on the MPIS32 CPU (written in verilog on FPGA board).

http://www.tudou.com/programs/view/e-E5lVrQfTw/

These days, I start to think the question about how to port linux on my tiny "cpu". So I find "yocto",which seems the thing that could help me. I have finished the "yocto project quick start" document online yesterday. (http://www.yoctoproject.org/docs/2.0/yocto-project-qs/yocto-project-qs.html)
and was very happy to see that it could "boot" on the qemu simulator.

and I found the following are the boot image files.

In some embedded boards, they usually write a linux image file(.img ) to a sd card. Then plug in to the board. Finally it boots. But I have no idea what's inside the .img files, and how to let my fpga board to understand the .img files.

So this is reason why I'm here to ask you guys for some help.

And wish to know if it is possible to port the "yocto" to my own project.

Thank you and Best wishes !
To geeks :)

Jack

======================================
the yocto quick start training:

author
#2 lore raw

hi,everyone:

This is Jack from Shanghai, in my first year in graduate school.
I'm sending email here to asking for some help about how to port linux on a customized cpu run on FPGA board.

Before I have been working on how to use "verilog" to make a cpu (based on MIPS32 ISA) on a FPGA board, and for now I could form a set of cpu code, and use assembly on it. The following is my tetris demo,which is written in assembly language and run on the MPIS32 CPU (written in verilog on FPGA board).

http://www.tudou.com/programs/view/e-E5lVrQfTw/

These days, I start to think the question about how to port linux on my tiny "cpu". So I find "yocto",which seems the thing that could help me. I have finished the "yocto project quick start" document online yesterday. (http://www.yoctoproject.org/docs/2.0/yocto-project-qs/yocto-project-qs.html)
and was very happy to see that it could "boot" on the qemu simulator.

and I found the following are the boot image files.

In some embedded boards, they usually write a linux image file(.img ) to a sd card. Then plug in to the board. Finally it boots. But I have no idea what's inside the .img files, and how to let my fpga board to understand the .img files.

So this is reason why I'm here to ask you guys for some help.

And wish to know if it is possible to port the "yocto" to my own project.

Thank you and Best wishes !
To geeks :)

Jack

======================================
the yocto quick start training:

#3 lore raw
In reply to 张健
Quoted 8 lines · 张健

But I have no idea what's inside the .img files, and how to let my fpga board to understand the .img files.

So this is reason why I'm here to ask you guys for some help.

And wish to know if it is possible to port the "yocto" to my own project.

​image files are generated in several formats. There is option to generate tarballs. You can always take the tarball and untar it and look what inside secondly, for your FPGA to understand this, you probably will need tools to download the binary to memory which is visitible to FPGA if I assume FPGA is sitting along with a application processor which can then help you to flash it to relevant memory parts.

if your application processor has a bootloader e.g. uboot which can use SD cards as boot media then you can use wic tool to generate SD card images directly from yocto. wic is documented in dev manual so please look there on how to set it up. Or you can look at some other BSPs like beaglebone ( angstrom ) or raspberrypi or freescale layer for scripts to generate the SD card images and model your using those.​

author
#4 lore raw

About image files, i guess there are various types of it, like .img, .vdi,..etc (https://en.wikibooks.org/wiki/QEMU/Images),but I wish to find a type that is machine code of the target machine so that it could be booted directly.

About bootloader, do you you mean yocto project doesn't include bootloader tools like uboot? For now, I realize the YP is a tool chain for generating linux distributions. So it builds the source code,and converts it to linux image files, doesn't it? So in the future, I should focus on how to use uboot to boot the linux images (generated by YP) to my my own "tiny" cpu, right?

Thank you and Best wishes.

------------------ Original ------------------

From:  "Khem Raj"<[email protected]>;
Date:  Thu, Jan 28, 2016 03:10 AM
To:  "JackZhang"<[email protected]>; 

Cc: "yocto"<[email protected]>;
Subject: Re: [yocto] About how port yocto to a customized MIPS cpu

On Tue, Jan 26, 2016 at 7:09 PM, 张健 <[email protected]> wrote:
But I have no idea what's inside the .img files, and how to let my fpga board to understand the .img files.

So this is reason why I'm here to ask you guys for some help.

And wish to know if it is possible to port the "yocto" to my own project.

​image files are generated in several formats. There is option to generate tarballs. You can always take the tarball and untar it and look what inside secondly, for your FPGA to understand this, you probably will need tools to download the binary to memory which is visitible to FPGA if I assume FPGA is sitting along with a application processor which can then help you to flash it to relevant memory parts.

if your application processor has a bootloader e.g. uboot which can use SD cards as boot media then you can use wic tool to generate SD card images directly from yocto. wic is documented in dev manual so please look there on how to set it up. Or you can look at some other BSPs like beaglebone ( angstrom ) or raspberrypi or freescale layer for scripts to generate the SD card images and model your using those.​

author
#5 lore raw

plan-list for porting linux Re: About how port yocto to a customized MIPS cpu

In reply to Khem Raj

Hi,everyone:
For now, I have finished the yocto qurk_start document, and succeeded in building the yocto-raspberrypi image for my rpi2 B+ board. I beleive it's a good start!
But after that, I still wish to figure out how to port a linux system to my fpga board with a "mips32" cpu. In the future, I will look into how to write the bsp of yocto project by refering to the poky reference distribution, the meta-raspberrypi as well as the document "yocto project BSP devellops' guide2.0" .

This is my plan lists:
01. to write a yocto bsp for my device
02.learn to use qemu
03.learn to use uboo
04.learn to use archlinux for a general understanding of how a linux system runs and it's mechanisms.
...

If anyone gets some ideas,pls feel free to contact with me Thank you,and best regards
Jack
Shanghai

------------------ Original ------------------

From:  "Khem Raj"<[email protected]>;
Date:  Thu, Jan 28, 2016 03:10 AM
To:  "JackZhang"<[email protected]>; 

Cc: "yocto"<[email protected]>;
Subject: Re: [yocto] About how port yocto to a customized MIPS cpu

On Tue, Jan 26, 2016 at 7:09 PM, 张健 <[email protected]> wrote:
But I have no idea what's inside the .img files, and how to let my fpga board to understand the .img files.

So this is reason why I'm here to ask you guys for some help.

And wish to know if it is possible to port the "yocto" to my own project.

​image files are generated in several formats. There is option to generate tarballs. You can always take the tarball and untar it and look what inside secondly, for your FPGA to understand this, you probably will need tools to download the binary to memory which is visitible to FPGA if I assume FPGA is sitting along with a application processor which can then help you to flash it to relevant memory parts.

if your application processor has a bootloader e.g. uboot which can use SD cards as boot media then you can use wic tool to generate SD card images directly from yocto. wic is documented in dev manual so please look there on how to set it up. Or you can look at some other BSPs like beaglebone ( angstrom ) or raspberrypi or freescale layer for scripts to generate the SD card images and model your using those.​

==============
On Tue, Jan 26, 2016 at 7:09 PM, 张健 <[email protected]> wrote:

hi,everyone:
This is Jack from Shanghai, in my first year in graduate school.
I'm sending email here to asking for some help about "how to port linux on a customized cpu run on FPGA board".
Before I have been working on how to use "verilog" to make a cpu (based on MIPS32 ISA) on a FPGA board, and for now I could form a set of cpu code, and use assembly on it. The following is my tetris demo,which is written in assembly language and run on the MPIS32 CPU (written in verilog on FPGA board).
http://www.tudou.com/programs/view/e-E5lVrQfTw/
These days, I start to think the question about how to port linux on my tiny "cpu". So I find "yocto",which seems the thing that could help me. I have finished the "yocto project quick start" document online yesterday. (http://www.yoctoproject.org/docs/2.0/yocto-project-qs/yocto-project-qs.html)
and was very happy to see that it could "boot" on the qemu simulator.
and I found the following are the boot image files:
bzImage; bzImgage.bin; core-imgae-sato-qemux86.ext4;core-image-sato-qemux86.tar.bz2;modules-qemux86.tgz ...etc

In some embedded boards, they usually write a linux image file(.img ) to a sd card. Then plug in to the board. Finally it boots. But I have no idea what's inside the .img files, and how to let my fpga board to understand the .img files. So this is reason why I'm here to ask you guys for some help.
And wish to know if it is possible to port the "yocto" to my own project.
Thank you and Best wishes !
To geeks :)

Jack