Bybit360
Bybit360

Reputation: 166

How I could make a Linux OS for a CPU that I designed?

Background information on the architecture: I just designed a set of instructions for a CPU that I'm going to put in an FPGA, but I want to be able to do it compatible with Linux (a simple Linux system) but I just started with this and I do not know much about this, I'm sure Linux can serve in my CPU. I think AVR supports Linux too, but I do not know if this is true but if this is true I think my CPU can also. My CPU is 16 bits, and it has the following registers:

  1. AX

  2. BX

  3. CX

  4. DX

  5. EX

  6. FX

This can support up to 256 (16-bits registers), I also only put a few registers because I do not know if it will give me space for the VGA driver in my FPGA, think that 8 registers more could fit in the register file. My FPGA board has a Cyclone IV. The program counter or (PC) of my CPU is 16 bits. My CPU handles data with Pointers (ARP, BRP) that point to two registers and take the value of the registers to the two outputs that can be used to put the values (A, B) of the ALU. To save data in the registers I use two pointers as well (CRP, DRP) with these I point to the registers where the values will be stored, the instructions say if the pointers are going to be used to save a value because otherwise, the value would be saved in two registers by mistake. I do not know if this information is useful to give you an idea if I'm going to be able to use Linux in my design. Thank you so much! ☺

Question: Is it possible to port Linux to a 16bit architecture?

Edit: After almost 3 years of gained experience with embedded systems, I see how ignorant this question is. I cannot provide an answer to this question because this question is flagged to not accept answers. But I will try to explain why porting Linux natively to a 16bit CPU is almost impossible.

If you really want to run an OS in your custom CPU, you can port it to the LCC compiler. Run RTOS. This is a more realistic approach. But still, it is a challenging one.

Upvotes: 1

Views: 290

Answers (1)

gby
gby

Reputation: 15218

You are out of luck. Linux requires a 32 bit system to run.

Upvotes: 3

Related Questions