[linux kernel] Kernel graphical cropping configuration

Publisher:as8849402Latest update time:2022-07-14 Source: csdnKeywords:linux  kernel Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

System version: Ubuntu18.04-64


Compiler version: gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)


uboot version: 2018.07-linux4sam_6.0


Board model: at91sama5d3x-xplained


MCU model: sama5d36


The kernel cross-toolchain relies on the Makefile file for cascade compilation and the Kconfig file for configuration. For example, the current ESP32 also uses this graphical configuration. Good things will be widely accepted.


1. Call up the configuration interface


View the Makefile file and view version information 4.19

insert image description here

make menuconfig

insert image description here

General setup ---> //General configuration <======

[*] Enable loadable module support ---> // Enable insmod

-*- Enable the block layer ---> // Disk IO scheduling, usually the default is ok

System Type ---> //Select a specific arm core/cpu type and its properties. You should confirm this part after make menuconfig

Bus support ---> // Some bus support, usually the default is ok

Kernel Features ---> //Kernel features, such as memory distribution between application and kernel space

Boot options ---> //Boot options, features that can be modified during kernel boot process

CPU Power Management ---> // CPU power management, usually you need to make a choice in battery-powered devices

Power management options ---> // Power management of peripheral devices suspend() resum()

Networking support ---> // Network support, basically all about protocols, such as TCP/IP, domain sockets, multicast, ppp protocol

Device Drivers ---> // Device driver, including two parts: Controller === device driver, frequently visited options

File systems ---> // File system support, such as ntfs, ext4, nfs, cramfs, jiffs, minix................... yaffs, ubifs


Use * to select the compilation item


[*] 

< > You can use spaces to select

() ==> Fill in a value and press Enter, for example (arm-none-linux-gnueabi-) Cross-compiler tool prefix  


General setup --->

    [*] Configure standard kernel features (for small systems) ---> 

        [*] Sysctl syscall support (NEW)

        [*] Load all symbols for debugging/ksymoops (NEW)

        [*] Include all symbols in kallsyms

    //kernel panic, will prompt the code execution stack

System Type --->

    ARM system type (Samsung S5PC100) ---> 

    [*] SMDKC100


Kernel Features --->

    [*] Use the ARM EABI to compile the kernel //If eabi appears in the cross toolchain, be sure to select it

    [*] Allow old ABI binaries to run with this kernel (EXPERIMENTAL) 


Relationship between cmdline and bootags: Same


[ * ] Networking support --->

    Networking options ---> 

        <*> Unix domain sockets 

        [*] TCP/IP networking <===========If you have a network card, you must select one

        [*] IP: multicasting 


File systems ---> 

    <*> Ext3 journalling file system support

    <*> The Extended 4 (ext4) filesystem  

    Pseudo filesystems ---> // Virtual file system: manage files in memory. After power failure, the files will not exist. They will be temporarily created when the computer is turned on.

                // The files in dev/, proc/, and sys/ directories are all temporary

        [*] /proc file system support (NEW) 

        [*] sysfs file system support (NEW) 

        [*] Virtual memory file system support (former shm fs) 

        [*] Tmpfs POSIX Access Control Lists 

    [*] Miscellaneous filesystems ---> //Miscellaneous file systems, support for the management of files stored in nand

        <*> Compressed ROM file system support (cramfs)

        <*> SquashFS 4.0 - Squashed file system support

    [*] Network File Systems (NEW) ---> // Network file system: nfs

        <*> NFS client support 

        [*] NFS client support for NFS version 3

        [*] NFS client support for the NFSv3 ACL protocol extension

    <*> Native language support ---> //Character encoding method supported by the kernel

         <*> Codepage 437 (United States, Canada)

         <*> Simplified Chinese charset (CP936, GB2312)

         <*> ASCII (United States)  

         <*> NLS ISO 8859-1 (Latin 1; Western European Languages) 

         <*> NLS UTF-8


Device Drivers ---> 

    <*> Connector - unified userspace <-> kernelspace linker ---> 

    <*> Memory Technology Device (MTD) support ---> // There are nand, onenand and other devices, you need to select mtd

        [*] MTD partitioning support 

         [*] Command line partition table parsing //uboot can pass the partition table

         <*> NAND Device Support ---> //nand device support, specific nand controller options for a certain platform

    [*] Network device support ---> //A network card is required

    [*] Ethernet (10 or 100Mbit) (NEW) ---> 

        <*> DM9000 support

    [*] USB support --->

        <*> Support for Host-side USB  

        [*] USB device filesystem (DEPRECATED) 

        [*] USB device class-devices (DEPRECATED) (NEW) 

        <*> USB Modem (CDC ACM) support // 3G configuration

        <*> USB Serial Converter support ---> USB to serial port


[*] Networking support —>

insert image description here

Network card driver selection


Device Drivers --->

     [*] Network device support ---> 

        [*] Ethernet driver support --->

        -*- MDIO bus device drivers ---- //MDIO controller reads PHY registers

        -*- PHY Device support and infrastructure --->

            <*> Micrel PHYs // Micrel's ksz9031 and ksz8081


I2C Bus


    I2C support ---> 

    <*> I2C device interface //i2c driver interface

    -*- I2C bus multiplexing support  

          I2C Hardware Bus support ---> //Hardware bus

        <*> GPIO-based bitbanging I2C //Corresponding GPIO pin multiplexing


SPI Bus


 [*] SPI support ---> 

    <*> GPIO-based bitbanging SPI Master

    User mode SPI device driver support //The driver is loaded as a module and communicates with the external MCU via SPI


GPIO Bus


[*] GPIO Support --->

    [*] /sys/class/gpio/... (sysfs interface) //Support sysfs interface to facilitate debugging of character drivers


USB support, mount mouse, keyboard, and USB device


[*] USB support ---> 

    <*> Support for Host-side USB 

    [*] USB announces new devices

    <*> USB Serial Converter support ---> //USB to serial port


<*> MMC/SD/SDIO card support ---> //EMMC

    <*> MMC block device driver //Driver

    (8) Number of minors per block device //Data bus bit number

    [*] MMC host drivers debugging //Print debugging information

    <*> Secure Digital Host Controller Interface support 

    <*> SDHCI platform and OF driver helper

    <*> SDHCI OF support for the Atmel SDMMC controller

    <*> SDHCI support for the Cadence SD/SDIO/eMMC controller


[*] LED Support --->

     [*] LED Trigger support --->

        <*> LED Heartbeat Trigger //When the kernel is running normally, the heartbeat LED indicator light is on. The hardware needs to design an indicator light


Control of kernel compilation:

all:vmlinux


# Build vmlinux

# ---------------------------------------------------------------------------

# vmlinux is built from the objects selected by $(vmlinux-init) and

# $(vmlinux-main). Most are built-in.o files from top-level directories

# in the kernel tree, others are specified in arch/$(ARCH)/Makefile.

# Ordering when linking is important, and $(vmlinux-init) must be first.

#

# vmlinux

# ^

# |

# +-< $(vmlinux-init)

# | +--< init/version.o + more

# |

# +--< $(vmlinux-main)

# | +--< driver/built-in.o mm/built-in.o + more

# |

# +-< kallsyms.o (see description in CONFIG_KALLSYMS section)


=============>

init-y := init/

drivers-y := drivers/ sound/ firmware/

net-y := net/

libs-y := lib/

core-y := usr/

==================================


vmlinux-init := $(head-y) $(init-y)

vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y)

vmlinux-all := $(vmlinux-init) $(vmlinux-main)

vmlinux-lds := arch/$(SRCARCH)/kernel/vmlinux.lds //Link script arch/arm/kernel/vmlinux.lds



head-y cannot be found in the top-level Makefile: actually in arch/arm/Makefile

include $(srctree)/arch/$(SRCARCH)/Makefile

ifeq ($(CONFIG_MMU),) // CONFIG_MMU must not be empty, CONFIG_MMU=y

MMUEXT := -nommu

endif


head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o


arch/arm/kernel/head.S //Entry file

arch/arm/kernel/vmlinux.lds //Link script

OUTPUT_ARCH(arm)

ENTRY(stext) //Entry function

SECTIONS

{

 . = 0xC0000000 + 0x00008000; // Space above 3G

 .init : { /* Init code and data Contains code and data. free 144K mem */

  _stext = .; // Starting segment

  _sinittext = .;

   *(.head.text) // There is a text section

   *(.init.text) *(.cpuinit.text) *(.meminit.text)

  _einittext = .;

  __proc_info_begin = .; //Starting position

   *(.proc.info.init) // Special segment, very similar to the .u_boot_cmd segment

  __proc_info_end = .; //End position

  __arch_info_begin = .;

   *(.arch.info.init)

  __arch_info_end = .;

  __tagtable_begin = .;

   *(.taglist.init)

  __tagtable_end = .;


========================================================

Relationship between Kconfig---> Makefile

make menuconfig --> Kcongfig in each directory ==> save .config

CONFIG_CPU_S5PC100=y 

 ==> Kbuild processing: 1, to Makefile

         obj-$(CONFIG_CPU_S5PC100) += cpu.o init.o clock.o gpiolib.o irq-gpio.o

        2. Generate a header file for use in C language code

        ./include/generated/autoconf.h:98:#define CONFIG_CPU_S5PC100 1

        #define CONFIG_CPU_S5PC100 1

        If CONFIG_INET6_XFRM_MODE_TUNNEL value is y

            #define CONFIG_INET6_XFRM_MODE_TUNNEL 1

        If CONFIG_INET6_XFRM_MODE_TUNNEL value is m

            #define CONFIG_INET6_XFRM_MODE_TUNNEL_MODULE 1


================================================

If you compile the code mytest.c in the kernel

1. Write Kcongfig

    config MY_TEST

        tristate "this is a config test"

        help

          this is a help info to choose my_test

    Writing a Makefile

    obj-$(CONFIG_MY_TEST) += mytest.o


2. Modify the Makfile directly

    obj-y += mytest.o


    File systems --->

    <*> The Extended 4 (ext4) filesystem

[1] [2]
Keywords:linux  kernel Reference address:[linux kernel] Kernel graphical cropping configuration

Previous article:[linux kernel] The pitfalls of ksz9031 driver debugging under the kernel
Next article:[linux kernel] Kernel transplant process record

Recommended ReadingLatest update time:2024-11-16 11:52

Setting up an Arm Linux development environment on Ubuntu
I use a Youshan 2410 board. I used to use Fedora, but now I have switched my home computer to Linux, and installed Ubuntu. But I still want to play with embedded systems, and I encountered some minor troubles during the loading process. I will record them here, firstly because I am forgetful, and secondly, I hope to gi
[Microcontroller]
Detailed analysis of SWI in the Arm Linux system call process
Unix systems implement most of the interfaces between user-mode processes and hardware devices by issuing system calls to the kernel. System calls are services provided by the operating system. User programs use various system calls to reference various services provided by the kernel. The execution of system call
[Microcontroller]
Detailed analysis of SWI in the Arm Linux system call process
A brief discussion on how to pass parameters from U-boot to Kernel under ARM
We may all know that U-boot will pass many parameters to the Linux Kernel, such as serial port baud rate, RAM Size, videofb, MAC Address, etc., and the Linux kernel will also read and process these parameters. The parameters are passed between the two through struct tag. U-boot saves the things to be passed to the k
[Microcontroller]
ARM watchdog program under Linux
Since the application layer under LINUX cannot directly access the registers, it only needs to use the driver as a bridge   // Driver:  #ifndef __KERNEL__  #define __KERNEL__ #endif #ifdef MODULE  #define __MODULE__ #endif #include module.h #include linux/fs.h #include linux/iobuf.h #include linux/major.h #include
[Microcontroller]
OK6410A Development Board (VIII) 55 linux-5.11 OK6410A armv6 Exception Overview
Perceptual knowledge When a program is running normally according to its design, an event interrupts the normal execution flow of the program. This event is called an exception. Exception is a hardware concept Definition of abnormality An arithmetic exception occurs when an attempted atomic arithmetic operat
[Microcontroller]
Porting Boa Server in Embedded Linux System (OK6410)
OK6410 Boa server transplantation: 1 Boa compilation 1. Download the latest version of Boa server from www.boa.org: boa-0.94.13.tar.gz. 2. Unzip: tar xzf boa-0.94.13.tar.gz 3. Enter the src folder inside the unzipped folder boa-0.94.13 and modify the source file as follows
[Microcontroller]
Porting Boa Server in Embedded Linux System (OK6410)
Uncompressing Linux... done, booting the kernel
Today, we use the mainline Linux kernel to port to MINI6410. The mainline kernel 2.6.37.1 basically supports the MINI6410 board, so it is very simple to port to the stage where it can be started. However, a common problem still occurs during the porting: MINI6410 # bootm 0x50008000 ## Booting ke
[Microcontroller]
S3C6410 Embedded Application Platform Construction (IV) - Linux-3.14.4 Ported to OK6410 (Preliminary Startup)
This time, I will port the basic Linux source code to OK6410. At the same time, I will also write down the problems I encountered and their solutions during the porting process. However, some methods are borrowed from the Internet, and some are added by myself, so there will be some minor bugs. 1. Basic Wor
[Microcontroller]
S3C6410 Embedded Application Platform Construction (IV) - Linux-3.14.4 Ported to OK6410 (Preliminary Startup)
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号