Mastering Linux on MCU Series Part 17: New Boot Design for Loading Linux – Image Layout and Loader Implementation

Mastering Linux on MCU Series Part 17: New Boot Design for Loading Linux - Image Layout and Loader Implementation

1. Introduction We have completed the foundational work, enabling us to have shell interaction capabilities, allowing arbitrary import and export of content in on-chip memory and SPIFLASH. Now we can enter the most critical phase: programming the image and loading it to run. First, we need to design the storage structure of the image in … Read more

Mastering Linux on MCU Series Part 18: New Boot Design to Load and Start Linux (5) – Loading from SPIFLASH

Mastering Linux on MCU Series Part 18: New Boot Design to Load and Start Linux (5) - Loading from SPIFLASH

1. Introduction Previously, we completed the design and source code implementation of the storage layout and loader. Now we will practice and test loading the image from SPIFLASH into SDRAM for execution. Of course, during debugging, we can also directly transfer the image to SDRAM using xmodem for direct execution. See the code at:https://github.com/qinyunti/stm32f429-boot.git Please … Read more

Modifying/Compiling Kernel and Logging into LuCI on OpenWrt

Modifying/Compiling Kernel and Logging into LuCI on OpenWrt

1. Modify the kernel. In the directory openwrt/imx_openwrt/target/linux/imx/patches-5.15/, there are numerous patch files used to apply patches to the target image. Here, modify the kernel patch. Modify the device tree patch file 0002-add-dts-files.patch +&pcie0{+ pinctrl-names = "default";+ pinctrl-0 = <&pcie0_pinctrl>;+ disable-gpio = <&gpio1 5 GPIO_ACTIVE_LOW>;+ reset-gpio = <&gpio4 21 GPIO_ACTIVE_LOW>;+ clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>,+ <&clk … Read more

Driver for MPU6050 on RK3588S

Driver for MPU6050 on RK3588S

1. Main Registers of MPU6050 1.1 Initialization Registers and Their Settings 1.2 Data Registers 2. Hardware Connections 3. Device Tree Configuration 4. Writing Driver Code 4.1 i2c_mpu6050.h 4.2 mpu6050.c 5. Timing Observations of Initialization Functions in Probe 5.1 Overall Timing 5.2 CLK 5.3 Host Writing One Byte to Slave 5.4 Host Reading One Byte from … Read more

RISC-V Linux Kernel and Related Technology Updates

RISC-V Linux Kernel and Related Technology Updates

20220723: Issue 4 Kernel Updates v4: Fix RISC-V’s arch-topology reporting The arm64 topology code is largely applicable to RISC-V as well, so it has been made generic along with the removal of MPIDR related code, which appears to be redundant since ‘3102bc0e6ac7 (“arm64: topology: Stop using MPIDR for topology information”)’ replaced the code that actually … Read more

How to Develop Your Own Kernel Driver and Device Tree on Linux ARM

How to Develop Your Own Kernel Driver and Device Tree on Linux ARM

IntroductionI only have a basic understanding of Linux, and this document serves as my personal memo. If there are any errors, I hope the experts will kindly provide guidance! Thank you!===========================================Source Code Downloadhttps://mirrors.edge.kernel.org/pub/linux/kernel/It is best to use a release version that is permanently maintained.I am using version 5.10Device TreeLocated in the directory arch/arm/boot/dtsYou can create … Read more

RK3399 Boot Modes and Partition Design in Embedded Linux Drivers

RK3399 Boot Modes and Partition Design in Embedded Linux Drivers

1. Analysis of RK3399 Boot Modes The boot process of RK3399 is divided into hardware initialization and software boot stages, with the core logic consisting of BootROM, SPL/U-Boot, and the kernel. 1. BootROM Stage (Hardware Initialization) Firmware: The unmodifiable code stored in the chip’s internal ROM, responsible for: Initializing the CPU core clock and DDR … Read more

Firmware System Architecture Based on ARMv8

Firmware System Architecture Based on ARMv8

The firmware system based on the ARMv8 architecture The firmware system based on the ARMv8 architecture consists of multiple layers and modules designed to provide secure, flexible, and efficient booting and management for ARMv8-based servers and embedded devices. Its design structure typically includes the following main components and stages: 1. Overview of Firmware Architecture The … Read more

Introduction to the Platform Device Driver Model

Introduction to the Platform Device Driver Model

In the Linux kernel, the <span>platform</span> device driver model is used to manage devices that are not directly mounted on physical buses (such as PCI or USB), for example, hardware modules (such as GPIO controllers, timers, etc.) within a System on Chip (SoC). This model associates devices (<span>platform_device</span>) and drivers (<span>platform_driver</span>) through a virtual <span>platform_bus_type</span> … Read more

Mastering Zephyr: A Step-by-Step Guide to Building Your Embedded Project (Part 1)

Mastering Zephyr: A Step-by-Step Guide to Building Your Embedded Project (Part 1)

Zephyr Basics Series: Starting from Scratch with Embedded Development Hello everyone, welcome to Lixin Embedded. Today, we are embarking on a brand new journey – the “Zephyr Basics Series”. The goal of this series is to guide you step by step into the powerful embedded real-time operating system, Zephyr, and to understand its core functionalities. … Read more