Welcome to my thecnical blog

Welcome to my thecnical blog

Welcome to my thecnical blog

This blog is about technical stuff like: Linux, embedded, RT, algorithm, web, etc'


Secure Boot Path: From BootROM to Userspace in ZynqMP and i.MX8

Published at July 18, 2025 ·  5 min read

🔐 Introduction Secure Boot ensures that only authenticated and untampered code runs on a system. This post walks through the secure boot process from BootROM all the way to Linux userspace, focusing on Xilinx ZynqMP and NXP i.MX8. We explain how keys are stored and verified, how FIT images are authenticated, and what protections are required even after Linux boots. 📊 Secure Boot Flow Overview The diagram below illustrates the secure boot process commonly used in embedded SoCs like Xilinx ZynqMP and NXP i....

Securing U-Boot with FIT Signature and Key Injection on ZynqMP

Published at July 17, 2025 ·  4 min read

This blog post provides a comprehensive guide to implementing secure boot with U-Boot using FIT image signatures and RSA public key injection, targeting Xilinx ZynqMP platforms such as the ZCU102. It includes theory, differences between DTB embedding methods, and a practical Yocto-based implementation. Background: FIT Signing and Public Key Injection Modern U-Boot supports signed FIT images to enforce boot-time validation of kernel and other binaries. The verification is done using an RSA public key embedded in U-Boot’s DTB....

Installing Xen Support on Xilinx ZynqMP

Published at July 15, 2025 ·  3 min read

This blog post summarizes how to install and run Xen with Linux as Dom0 from an SD card on the ZCU102 Rev 1.1 development board by Xilinx. The method is based on a Yocto-generated build but includes a few manual adjustments to enable Xen hypervisor support without embedding it directly in the Yocto recipes. This approach is useful for debugging, experimenting with boot configurations, and staying flexible. Boot Script The following U-Boot script is used to load Xen, Linux, and the device tree blob (DTB) from the SD card....

Data streaming between two BLE devices: PSoc6 and nRF52832

Published at September 10, 2022 ·  3 min read

I had a project where I had to stream data between two BLE devices. The data source was connected to PSoc6 and sent using its BLE transceiver to the destination device, nRF52832. Usually but not must, the peripheral devices are used as a GATT client, and the central machines are used as a GATT server. Therefore, I set the PSoc6 (The data source) as the central device (client) and the nRF52832 as the peripheral device (server)....

WebSockets with C++

Published at March 3, 2022 ·  2 min read

I have wrap libwebsockets (lws) in c++ classes to implement WebSockets on c++. It gives a simple way to work with lws and create a WebSocket connection with a few lines of code. The architecture of the lws is hierarchical. It has several protocols, and each protocol includes detail like address, path, destination port (443,9443), and WebSocket interface (WSI). A protocol can serve several services, where the users should subscribe to it....

REST API Server with c++

Published at February 23, 2022 ·  5 min read

Here is a simple project to implement a general REST API service module in c++ using reasbed library. The library uses a modern c++ to implement REST API calls. And it is possible to use the REST service to access databases, access, and control a complex application to help the QA & verification process by accessing internal SW modules. Moreover, the module is simple and easily removed in production modes....

Setup SDCARD on stm32 MCU

Published at November 18, 2021 ·  3 min read

This post describes simple steps to make the STM32H7 work with SDCARD. I have used STM32Cube to set up the BSP for the project. It uses the library FatFS as its FAT files system at the top of the driver level. The firmware for drivers is also taken from the STM32Cube. Emphasis for SDCARD setup Select external transceiver to “yes” if the board has one. External transceivers are translating between 1....

Setup UART BLE using Nordic nrf52832

Published at September 16, 2021 ·  4 min read

I have played with Murata’s MBN52832 module BLE module. This module is based on a Nordic chipset (nRF52832), it has BLE and NFC capabilities and MCU with cortex-m4 to manage the radio operation. The module comes with a demo firmware without an AT Command interface, and the user has to write its application. However, the SW flexibility allows creating a standalone application with BLE and NFC without using a host device like a PC to operate the BLE radio....

Task for job interview for RT embbeded position

Published at August 10, 2021 ·  6 min read

This post is a collection of tasks and questions for RT embedded job interviews. Table Of Contents Kernel disassembler Letter Counter Programming Task Sort Binary Array Sort Two Array Kernel disassembler We want you to write a loadable kernel module that could be compiled against any kernel > v4.0 (kernel path will be passed to as an environment variable : KERNEL=/some/path/to/kernel/source) The kernel should be compiled to include a disassembler, we recommend using zydis as we find it to be the easiest to embed, although you could use what ever you like....

Low Level Debug of STM32MP15c7

Published at June 21, 2021 ·  4 min read

Low-level debug of MCU may essential during the bring-up process of a new board. Especially for checking critical components like the DDR. The MCU under debubung is STM32MP157. I strongly based on the yocto build system for the SDK and the compilation and signature of the system. See here and How to configure TF for a manual build of TF-A without yocto. It can be uses the STM32_Programmer_CLI load TSV files into the EMMC....