How to Compile LineageOS and Flash It

How to Compile LineageOS and Flash It

1 Environment Compile host should be Ubuntu 20.04; really avoid using other versions as they have too many pitfalls. If your Ubuntu is a different version, it is recommended to check the required libraries on the LineageOS official website. The device is Flame, compiling LineageOS version 18. Other versions can also refer to this article, … Read more

OpenWrt Compilation Command Record

OpenWrt Compilation Command Record

cp ipq60xx-all.config .config make defconfig make menuconfig # Enter the graphical configuration interface Save and exit: After configuration is complete, press <Esc> until you exit the configuration interface. The system will prompt to save the configuration, choose to save. make oldconfig # Generate configuration based on existing configuration # This method updates and applies your … Read more

Compiling GCC 15.1

Compiling GCC 15.1

During the May Day holiday, I saw that GCC released a new version, so I decided to experience the std after the module refactoring by compiling GCC myself.Environment: Ubuntu 24.041. Download the source codeYou can use the Tsinghua mirror:git clone https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git [Here you can specify the desired folder name]2. Download the necessary dependenciesEnter the source … Read more

Introduction to CMake Basics

Introduction to CMake Basics

Introduction to CMake 1. Overview of CMake CMake is a project build tool that is cross-platform. Other popular project build tools include Makefile (which builds projects using the Make command). Most IDEs integrate make, such as: nmake for VS, GNU make for Linux, and qmake for Qt. If you write a makefile by hand, you … Read more

A Simple Guide to OpenWRT Make

A Simple Guide to OpenWRT Make

Compile a Specific Module make package/qos/clean make package/qos/compile make package/qos/install Compile Firmware # V=99 indicates detailed debug information make V=99 # Compile everything make world # For multi-core CPUs, adding the -j=2 option can theoretically speed up the compilation # make -j 2 V=99 can speed up the compilation (not recommended) make j=2 V=99 Skip … Read more

The Relationship Between Pointers and Arrays in C Language – Part Two

The Relationship Between Pointers and Arrays in C Language - Part Two

2. Analysis from the Implementation Perspective (Compiled Code) Previously, we briefly understood the relationship between arrays and pointers from the perspective of program writing. Next, we will analyze this logic more deeply from the perspective of compilation implementation. int *int_pointer = int_array; lea -0x40(%rbp),%rax ; (%rbp) – 0x40 value of int_array mov %rax,-0x8(%rbp) ; -0x8(%rbp) … Read more

Installing GCC from Source

Installing GCC from Source

My laptop is running CentOS 7 with a version of GCC installed via yum, but this version is too old, so I need to install a newer version of GCC. 1. First, download from the internethttp://mirror.hust.edu.cn/gnu/gcc/ Find the appropriate version and download it. 2. Extract the compressed package # cd /usr/local/# tar -zxvf gcc-6.4.0.tar.gz 3. … Read more

Understanding gcc and g++ Compilers in Linux for Informatics Competitions

Understanding gcc and g++ Compilers in Linux for Informatics Competitions

Students, in the world of Linux, the gcc and g++ compilers are like “super craftsmen” in programming for informatics competitions, capable of “polishing” our written code into instructions that the computer can understand. Next, let’s delve into the usage of these two “super craftsmen”. gcc Compiler (primarily for C language) 1. Basic Compilation: Suppose you … Read more

Makefile Guide for Go Projects

Makefile Guide for Go Projects

This article is a Makefile guide for Go projects. Hello everyone, my name is Xie Wei, and I am a backend developer using the Go language. The theme of this article is: Writing a Makefile guide suitable for Go projects. 1. Prerequisites: Familiarity with Makefile Experience in writing projects in Go During the project development … Read more

Introduction to Make in Linux C

Introduction to Make in Linux C

From WeChat Official Account: One Linux Introduction to Make: Make is an engineering manager, which, as the name suggests, is used to manage a large number of files. The Make engineering manager is essentially an “automatic compilation manager“. The term “automatic” refers to its ability to automatically discover updated files based on file timestamps, thereby … Read more