Friday, May 12, 2023

Designing Your Own Linux Single Board Computer Running OpenWRT: Lecture 1 - Processor Selection

Courtesy of GPT-4

Designing a Single Board Computer (SBC) from scratch involves selecting and integrating many different components into a compact, functional system. This is an involved process and requires some understanding of computer architecture, digital logic, and circuit design. The processor (also known as the CPU, or Central Processing Unit) is the brain of your SBC, and it's the first component you'll need to choose.


1. Understand Your Requirements

Before diving into the vast array of processors available on the market, you should first define what you want your SBC to do. Since you're interested in creating a WiFi router running OpenWRT, you'll need a processor that's capable of handling network traffic efficiently and running the OpenWRT Linux distribution.


Some key requirements to consider are:

Power Consumption: As a WiFi router, your SBC will likely be powered on continuously. Therefore, a processor with low power consumption is preferred.

Cost: Depending on your budget, you may be restricted in your choice of processor.

Performance: Your processor should be capable of handling multiple WiFi connections and the associated data traffic. It should also be powerful enough to run OpenWRT smoothly.

Software Compatibility: Ensure that your chosen processor can run OpenWRT. OpenWRT supports a wide range of architectures, including MIPS, ARM, and x86.

Connectivity: The processor or the associated System on a Chip (SoC) needs to support various interfaces for connecting components like RAM, storage, and especially the WiFi module.

2. Processor Architectures

There are several popular processor architectures used in SBCs: ARM, MIPS, and x86 are the most common.


ARM: Many SBCs use ARM processors due to their good performance-to-power ratio. ARM processors are used in a wide range of devices, from smartphones to servers, and are supported by OpenWRT. Examples include the Broadcom BCM2837 in the Raspberry Pi 3 and the Allwinner H3 in the Orange Pi Zero.


MIPS: MIPS processors are commonly used in networking equipment and are known for their efficiency. They are also supported by OpenWRT. Examples include the Qualcomm Atheros QCA9531 in the GL.iNet GL-AR150 and the MediaTek MT7620 in the Asus RT-N14U router.


x86: x86 processors are powerful and versatile, but they are less common in SBCs due to their higher power consumption and cost. Examples include the Intel Atom series.


3. Processor Selection

Having considered the requirements and available architectures, let's look at a few processors that could be used for your SBC router:


Broadcom BCM2711: This is the processor used in the Raspberry Pi 4 Model B. It's a quad-core ARM Cortex-A72 CPU with good performance and low power consumption. However, note that Broadcom's support for open-source software has been historically patchy, which might cause issues with OpenWRT.


MediaTek MT7621: This is a dual-core MIPS processor used in many routers. It has built-in support for networking features and is well-supported by OpenWRT.


Qualcomm Atheros QCA9531: This is a single-core MIPS processor designed specifically for wireless networking applications. It's less powerful than the other two options but consumes less power and is well-supported by OpenWRT.


Of these options, I'd recommend the MediaTek MT7621 for this project. It strikes a good balance between power and energy efficiency and has built-in support for networking. Furthermore, it's used in many commercial routers, which means that it's

---

Designing Your Own Linux Single Board Computer Running OpenWRT: Lecture 1 - Processor Selection

Designing a Single Board Computer (SBC) from scratch involves selecting and integrating many different components into a compact, functional system. This is an involved process and requires some understanding of computer architecture, digital logic, and circuit design. The processor (also known as the CPU, or Central Processing Unit) is the brain of your SBC, and it's the first component you'll need to choose.


1. Understand Your Requirements

Before diving into the vast array of processors available on the market, you should first define what you want your SBC to do. Since you're interested in creating a WiFi router running OpenWRT, you'll need a processor that's capable of handling network traffic efficiently and running the OpenWRT Linux distribution.


Some key requirements to consider are:


Power Consumption: As a WiFi router, your SBC will likely be powered on continuously. Therefore, a processor with low power consumption is preferred.

Cost: Depending on your budget, you may be restricted in your choice of processor.

Performance: Your processor should be capable of handling multiple WiFi connections and the associated data traffic. It should also be powerful enough to run OpenWRT smoothly.

Software Compatibility: Ensure that your chosen processor can run OpenWRT. OpenWRT supports a wide range of architectures, including MIPS, ARM, and x86.

Connectivity: The processor or the associated System on a Chip (SoC) needs to support various interfaces for connecting components like RAM, storage, and especially the WiFi module.

2. Processor Architectures

There are several popular processor architectures used in SBCs: ARM, MIPS, and x86 are the most common.


ARM: Many SBCs use ARM processors due to their good performance-to-power ratio. ARM processors are used in a wide range of devices, from smartphones to servers, and are supported by OpenWRT. Examples include the Broadcom BCM2837 in the Raspberry Pi 3 and the Allwinner H3 in the Orange Pi Zero.


MIPS: MIPS processors are commonly used in networking equipment and are known for their efficiency. They are also supported by OpenWRT. Examples include the Qualcomm Atheros QCA9531 in the GL.iNet GL-AR150 and the MediaTek MT7620 in the Asus RT-N14U router.


x86: x86 processors are powerful and versatile, but they are less common in SBCs due to their higher power consumption and cost. Examples include the Intel Atom series.


3. Processor Selection

Having considered the requirements and available architectures, let's look at a few processors that could be used for your SBC router:


Broadcom BCM2711: This is the processor used in the Raspberry Pi 4 Model B. It's a quad-core ARM Cortex-A72 CPU with good performance and low power consumption. However, note that Broadcom's support for open-source software has been historically patchy, which might cause issues with OpenWRT.


MediaTek MT7621: This is a dual-core MIPS processor used in many routers. It has built-in support for networking features and is well-supported by OpenWRT.


Qualcomm Atheros QCA9531: This is a single-core MIPS processor designed specifically for wireless networking applications. It's less powerful than the other two options but consumes less power and is well-supported by OpenWRT.


Of these options, I'd recommend the MediaTek MT7621 for this project. It strikes a good balance between power and energy efficiency and has built-in support for networking. Furthermore, it's used in many commercial routers, which means that it's well-supported by OpenWRT and other open-source software.


The MediaTek MT7621 includes several other essential features for your WiFi router project:


Integrated Ethernet Switch: It includes a 5-port Gigabit Ethernet switch, which can be used to connect your router to other devices or to a modem for internet access.

PCI Express: It supports PCI Express, which can be used to connect to a WiFi card. This is especially useful if you want your router to support the latest WiFi standards.

USB: It includes USB 2.0 and USB 3.0 support, which can be used for connecting external storage or other peripherals.

DDR3 Memory Controller: It supports DDR3 RAM, which will provide good performance for your router.

Now that we've selected the MediaTek MT7621 as our processor, we can move on to selecting the other components for our SBC WiFi router. In the next lecture, we will discuss memory selection, including RAM and storage.


Remember, building a Single Board Computer from scratch is a complex task and requires a good understanding of electronic circuits and computer architecture. I'd recommend starting with a development board like the Banana Pi R2, which already includes the MediaTek MT7621 and essential components, and allows you to focus on software development with OpenWRT. Once you're comfortable with that, you could move on to designing and building your own custom board.


I hope this lecture was helpful in understanding the selection process for the processor in your SBC design. In the next lecture, we will dive into the world of memory and storage, where we will discuss different types of RAM and storage options, how much you might need for your SBC, and how to choose the right components.

No comments:

Post a Comment