Example Image Tree Source File (.its)

Example Image Tree Source (.its) file /dts-v1/; / { description = "U-Boot FIT source file for arm"; images { uboot { data = /incbin/("uboot.img.enc"); type = "standalone"; arch = "arm64"; compression = "none"; load = <0xffffff00>; hash { algo = "sha256"; }; }; }; configurations { default = "conf"; conf { rollback-index = <0x00>; uboot = "uboot"; board-type = "MU_BOARD"; signature { algo = "sha256,rsa2048"; padding = "pss"; key-name-hint = "dev"; sign-images = "uboot"; }; }; }; }; References https://devicetree-specification.readthedocs.io/en/stable/index.html

November 8, 2024 · 1 min

Flattened Devicetree (DTB) Format

Device Tree Standard Properties compatible The compatible property value consists of one or more strings that define the specific programming model for the device. This list of strings should be used by a client program for device driver selection. The property value consists of a concatenated list of null terminated strings, from most specific to most general. They allow a device to express its compatibility with a family of similar devices, potentially allowing a single device driver to match against several devices. ...

November 8, 2024 · 1 min

mkimage

Overview U-Boot expects all bootable files (kernel, device tree blobs, initramfs, scripts, etc.) to have a specific image format called U-Boot Image Format (uImage format). mkimage generates this format. Signing images Generate signed image build/uboot/tools/mkimage -k config/keys/secureboot -f boot.its boot.img Dump information dumpimage -l boot-temp.img Resign the image build/uboot/tools/mkimage -F -k config/keys/secureboot boot.img Directory Structure Expected by -k /path/to/keys/ ├── dev.key <-- Private key (used by mkimage) ├── dev.crt <-- X.509 certificate (optional) ├── dev.pub <-- Public key (for embedding in U-Boot, or image) The filename prefix (dev) maps to the key-name in the .its file. ...

November 5, 2024 · 1 min

RSA

RSA (Rivest–Shamir–Adleman) is an asymmetric cryptographic algorithm, widely used for secure data transmission, especially for signing and encrypting data. In the RSA signing process, a private key is used to sign the message, while a public key is used to verify the signature. Here’s how the signing and verification process works: 1. Public and Private Keys Private Key: This key is kept secret and is used to sign data. Only the entity that owns the private key should be able to generate the signature. Public Key: This key is shared with others. It is used to verify that the data was indeed signed by the corresponding private key holder. Key Pair: RSA works on a pair of keys(one private and one public). A unique public/private key pair is generated together. There cannot be multiple private keys for a given public key. For embedded systems, where resources (CPU, memory) are limited, RSA’s asymmetric nature means that only the private key holder can sign, while anyone with the public key can verify. This is useful in secure boot processes or authenticating firmware updates, as the system can verify code signed by the vendor. ...

October 18, 2024 · 4 min

Format Comparison

Compression Format Comparison Format Compression Ratio Speed (Compression/ Decompression) Encryption Speciality/Uniqueness Open Source/ License gz (.gz) Moderate Fast / Fast No native (use gpg) Widely supported and fast for most general uses. Yes GNU GPL bzip2 (.bz2) Better than gzip Slow / Moderate No native (use gpg) Higher compression ratio and robust error detection. Yes BSD xz (.xz) Best Very slow / Fast No native (use gpg) Highest compression ratio; slow compression speed. Yes GNU GPL zip (.zip) Moderate Fast / Fast Built-in encryption Commonly used with built-in encryption and wide software support. Yes Various (Info-ZIP) tar (.tar) Depends on method Fast (archive only) / Fast (archive only) No native (use gpg) Primarily used for archiving; compression depends on additional tools. Yes GNU GPL 7z (.7z) Excellent Moderate / Slow at high settings AES-256 encryption Excellent compression with advanced encryption options. Yes LGPL rar (.rar) Good Moderate / Moderate AES-256 encryption Includes error recovery and strong encryption; proprietary format. No Proprietary lzma (.lzma) Very high Very slow / Moderate No native (use gpg) High compression ratio with reliable decompression; requires separate decompressor. Yes GNU GPL Key Points gz (.gz): Well-rounded for speed and compatibility, commonly used for general purposes. bzip2 (.bz2): Provides a higher compression ratio compared to gzip, though slower. xz (.xz): Offers the best compression ratio but at the cost of slower compression speed. zip (.zip): Convenient with built-in encryption and broad compatibility. tar (.tar): Primarily an archiving format; often used in combination with other compression methods. 7z (.7z): Excellent compression and strong encryption; requires specific software for full support. rar (.rar): Known for robust recovery features and encryption, but is proprietary. lzma (.lzma): Delivers a high compression ratio and reliable decompression, though it’s slow.

August 7, 2024 · 2 min

PAN Breakdown

ABCPL1234X Format First 3 Characters: Random letters (e.g., ABC). 4th Character: Category of the holder: P: Individual, C: Company, H: HUF, G: Government, T: Trust, etc. 5th Character: First letter of the holder’s surname or entity name (e.g., K for Kumar). Next 4 Characters: Unique sequential number (e.g., 1234). 10th Character: Check digit for validation. Example Individual PAN: ABCPL1234X “ABC” → Random sequence. “P” → Individual. “L” → Surname starts with L. “1234” → Sequential number. “X” → Check digit. Company PAN: XYZCA6789K “XYZ” → Random sequence. “C” → Company. “A” → Company name starts with A. “6789” → Sequential number. “K” → Check digit.

June 20, 2024 · 1 min

CU (call up another system)

Official Description The cu command is used to call up another system and act as a dial-in terminal (mostly on a serial line ie. serial monitor). It can also do simple file transfers with no error checking. cu is part of the UUCP(Unix to Unix Copy Program) source but has been split into its own package because it can be useful even if you do not do uucp. Usage Start ...

June 18, 2024 · 1 min

Hola Bot

Holonomic Drive Robot: A Versatile Path-Planning Machine Overview The Holonomic Drive Robot is an innovative, three-wheeled robot designed for precision path planning and image-based drawing. It combines advanced robotics algorithms, custom hardware, and creative problem-solving to deliver exceptional performance in a variety of tasks, from geometric pattern generation to drawing intricate images like logos. Key Highlights 1. Motion Planning and Control Implemented a novel path-planning approach to optimize motor velocity and trajectory precision. Designed custom algorithms to address trajectory distortion caused by motor speed limitations. 2. Hardware and Software Integration Successfully integrated ESP32, eYFI Mega, stepper motors, and LiPo batteries into a cohesive system. Overcame challenges such as faulty motor drivers and optimized power delivery for reliability. 3. Image Processing and Simulation Extracted contours from images and translated them into robot motion commands. Utilized ROS and Gazebo for testing and refining the system in a simulated environment. 4. Real-Time Problem Solving Debugged critical hardware issues, such as malfunctioning motor drivers and damaged LiPo cells. Enhanced communication latency between the laptop and ESP32 from 1 second to 200ms by identifying and resolving protocol bottlenecks. 5. Creative Outputs Enabled the robot to draw patterns such as Lissajous figures (infinity loops) and complex logos. Developed a custom ink mixture to ensure visibility and erasability for pattern drawing. Technologies Used Hardware: ESP32, eYFI Mega, LiPo batteries, and stepper motors. Software: ROS for robot control, Gazebo for simulation, and Python, C for software logic. Tools & Libraries: OpenCV for image processing, AccelStepper for motor control, and custom ROS packages for integration. Development Timeline January - February 2023: Prototyping and Hardware Development Designed and built the physical robot body, integrating motor drivers, sensors, and controllers. Calibrated the camera with over 100 samples for precise localization. Debugged and optimized motor driver configurations, achieving simultaneous operation of all wheels. Developed non-blocking motor control using the AccelStepper library. March 2023: Software Refinement and Final Tests Created a contour extraction function for converting images into path points for drawing. Integrated a servo-based pen mechanism for on/off control during drawing operations. Conducted intensive testing, fixing indexing bugs, and optimizing scripts for various patterns, including the Snapchat logo and infinity shapes. Demonstrated successful path-following in a simulation environment using Gazebo. Challenges Overcome Latency in Data Transmission: Resolved slow communication by identifying a missing newline character in transmitted data, reducing latency from 1 second to 200ms. Battery and Power Issues: Diagnosed and replaced faulty LiPo battery cells, ensuring uninterrupted operation. Hardware Failures: Addressed motor driver failures and loose connections with creative soldering solutions and robust wiring techniques. Achievements Successfully implemented conditional path-following to optimize motor velocity during complex path execution. Demonstrated precise image drawing with minimal distortion using camera-calibrated localization. Created a detailed documentation repository and shared project outcomes through YouTube videos, showcasing the robot’s capabilities. Media Video Demonstrations: Watch Demo Video Conclusion The Holonomic Drive Robot is a testament to innovative thinking, technical expertise, and perseverance. It serves as a versatile platform for robotics experimentation, offering potential applications in art, industrial automation, and beyond. ...

March 30, 2023 · 3 min

Man Pages

Sections Executable programs or shell commands System calls (functions provided by the kernel) Library calls (functions within program libraries) Special files (usually found in /dev) File formats and conventions, e.g. /etc/passwd Games Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7), man-pages(7) System administration commands (usually only for root) Kernel routines (Non standard) To see if any COMMAND has available sections use whatis of man -f man -f COMMAND

October 18, 2022 · 1 min

Introduction to Linux

What is Operating System ? An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. What is Kernel? The kernel is a part of operating system which has complete control over everything in the system. It is the portion of the operating system code that is always resident in memory,[2] and facilitates interactions between hardware and software components. What is Linux? Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance. ...

July 12, 2022 · 6 min