gcc4.1中的machine_mode

本文介绍了GCC中的Machine Mode概念,它是描述特定CPU能处理的数据类型和长度的枚举类型。文章详细解释了Machine Mode的定义来源及其分类,并展示了GCC如何通过动态生成的头文件来创建这些模式。
 
   
1   定义
对于machine_mode,gcc internals是这样解释的:
A machine mode describes a size of data object and the representation used for it. In the C code, machine modes are represented by an enumeration type, enum machine_mode, defined in ‘machmode.def’. Each RTL expression has room for a machine mode and so do certain kinds of tree expressions (declarations and types, to be precise).
而machmode.def中的注释是:
/* This file defines all the MACHINE MODES used by GCC.
 
   A machine mode specifies a size and format of data
   at the machine level.
 
   Each RTL expression has a machine mode.
 
   At the syntax tree level, each ..._TYPE and each ..._DECL node
   has a machine mode which describes data of that type or the
   data of the variable declared. */
 
从上面的解释可以看出machine_mode指的是一个具体的CPU所能实现的操作数类型和数据长度,如单字节整数,双字节整数,浮点数等等。gcc internals给出了几十种的数据类型,但是通常一个CPU只能实现其中的一部分。比如bf561这个DSP,它实现的操作数类型就只有以下几种(insn-modes.h):
 VOIDmode,                /* machmode.def:146 */
 BLKmode,                 /* machmode.def:150 */
 CCmode,                  /* machmode.def:178 */
 BImode,                  /* machmode.def:153 */
 QImode,                  /* machmode.def:158 */
 HImode,                  /* machmode.def:159 */
 SImode,                  /* machmode.def:160 */
 DImode,                  /* machmode.def:161 */
 TImode,                  /* machmode.def:162 */
 PDImode,                 /* config/bfin/bfin-modes.def:23 */
 SFmode,                  /* machmode.def:173 */
 DFmode,                  /* machmode.def:174 */
 CQImode,                 /* machmode.def:186 */
 CHImode,                 /* machmode.def:186 */
 CSImode,                 /* machmode.def:186 */
 CDImode,                 /* machmode.def:186 */
 CTImode,                 /* machmode.def:186 */
 SCmode,                  /* machmode.def:187 */
 DCmode,                  /* machmode.def:187 */
 V2HImode,                /* config/bfin/bfin-modes.def:25 */
 V2SImode,                /* config/bfin/bfin-modes.def:26 */
 V2PDImode,               /* config/bfin/bfin-modes.def:27 */
可以看出以上模式的定义来自两个文件,machmode.def和config/bfin/bfin-modes.def。其中machmode.def定义了每个CPU都必须实现的mode,而config目录下的def文件则是不同的CPU实现的mode。
在gcc internals列出的几十种machine_mode中,gcc又将之分为9大类,这就是所谓的MODE_CLASS。在gcc/mode-classes.def中定义。
#define MODE_CLASSES                                                   /
 DEF_MODE_CLASS (MODE_RANDOM),             /* other */                       /
 DEF_MODE_CLASS (MODE_CC),         /* condition code in a register */ /
 DEF_MODE_CLASS (MODE_INT),               /* integer */                     /
 DEF_MODE_CLASS (MODE_PARTIAL_INT),      /* integer with padding bits */          /
 DEF_MODE_CLASS (MODE_FLOAT),          /* floating point */            /
 DEF_MODE_CLASS (MODE_COMPLEX_INT), /* complex numbers */             /
 DEF_MODE_CLASS (MODE_COMPLEX_FLOAT),                                     /
 DEF_MODE_CLASS (MODE_VECTOR_INT),       /* SIMD vectors */                 /
 DEF_MODE_CLASS (MODE_VECTOR_FLOAT)
 
2   动态生成
gcc对machine_mode的定义放在insn-modes.h里面,这是一个动态生成的头文件,由genmodes.c生成的可执行文件动态创建(带-h参数执行)。genmodes生成mode的定义,同时还将这些mode按照MODE_CLASS进行了排序。
这里有意思的一点是config/bfin/bfin-modes.def的包含。
genmodes.c中有这样一个函数:
static void
create_modes (void)
{
#include "machmode.def"
}
这个函数就是用来创建mode的链表的。当然在此函数之前事先定义了一些宏,如
#define INT_MODE(N, Y) FRACTIONAL_INT_MODE (N, -1U, Y)
#define FRACTIONAL_INT_MODE(N, B, Y) /
 make_int_mode (#N, B, Y, __FILE__, __LINE__)
 
static void
make_int_mode (const char *name,
            unsigned int precision, unsigned int bytesize,
            const char *file, unsigned int line)
{
 struct mode_data *m = new_mode (MODE_INT, name, file, line);
 m->bytesize = bytesize;
 m->precision = precision;
}
这样machmode.def中的
INT_MODE (QI, 1);
这样的语句就可以展开为一个函数调用,而在此函数中将新的模式放到链表中去。
而为了要包含config目录下不同的def文件,在machmode.def中有这样的语句:
/* Allow the target to specify additional modes of various kinds. */
#if HAVE_EXTRA_MODES
# include EXTRA_MODES_FILE
#endif
这其中的EXTRA_MODES_FILE是哪来的呢?
经过搜索可以在auto-host.h中发现它的定义:
/* Define to the name of a file containing a list of extra machine modes for
   this architecture. */
#ifndef USED_FOR_TARGET
#define EXTRA_MODES_FILE "config/bfin/bfin-modes.def"
#endif
我们知道auto-host.h是由gcc/configure动态生成的,在此文件是搜索,发现了这样的语句:
# Look for a file containing extra machine modes.
if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
 extra_modes_file='$(srcdir)'/config/${extra_modes}
 
 
cat >>confdefs.h <<_ACEOF
#define EXTRA_MODES_FILE "config/$extra_modes"
_ACEOF
 
fi
再搜索 extra_modes的定义,在config.gcc中可以找到定义:
if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
then
     extra_modes=${cpu_type}/${cpu_type}-modes.def
fi
原来如此!其实这一切都是取决于configure –target的配置。
 
解析一下这个开机流程: Ver:20230302-T40XP adc:1955 -1 3300, EV:38, SEC_EV:-1, is night:0, pwm duty:-1, led mode:close [ 0.000000] Linux version 4.4.94 (root@LAPTOP-7UK6Q288) (gcc version 7.2.0 (Ingenic Linux-Release5.1.1.a-Default(xburst2(fp64)+glibc2.29) 2022.03-01 09:37:14) ) #8 SMP PREEMPT Fri Sep 5 16:03:30 CST 2025 [ 0.000000] CPU0 RESET ERROR PC:FFFFFFCB [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU0 revision is: 00132100 (Ingenic XBurst@II) [ 0.000000] FPU revision is: 00f32100 [ 0.000000] MIPS: machine is ingenic,shark [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 00613000 @ 00010000 (usable) [ 0.000000] memory: 0003d000 @ 00623000 (usable after init) [ 0.000000] User-defined physical RAM map: [ 0.000000] memory: 08000000 @ 00000000 (usable) [ 0.000000] Initial ramdisk at: 0x80800000 (8073728 bytes) [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] [SMP] Slave CPU(s) 1 available. [ 0.000000] Primary instruction cache 32kB, VIPT, 8-way, linesize 32 bytes. [ 0.000000] Primary data cache 32kB, 8-way, VIPT, no aliases, linesize 32 bytes [ 0.000000] =======found ...... ingenic sc cache ops ...!, found: 1 [ 0.000000] [ 0.000000] Unified secondary cache 128kB 8-way, linesize 64 bytes. [ 0.000000] PERCPU: Embedded 10 pages/cpu @81117000 s8432 r8192 d24336 u40960 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping off. Total pages: 32512 [ 0.000000] Kernel command line: console=ttyS1,115200n8 mem=128M@0x0 rmem=96M@0x8000000 nmem=32M@0xE000000 root=/dev/ram0 rw rdinit=/linuxrc mtdparts=jz_sfc:256K(boot),288K(tag),3584k(kernel),3584k(rootfs),3584K(recovery),4576K(system),512K(config),16M@0(all) lpj=11968512 senv;[HW];init_vw=1936;init_vh=1280;nrvbs=2;mode=0;sensor_num=1;debug;eenv; lzo_size=3373666 rd_start=0x80800000 rd_size=0x7b3200 [ 0.000000] ir_switch_parse mode: 2 threshold min:2000 max:2500 [ 0.000000] ir_switch_parse width:1936 height:1280 nrvbs:2 [ 0.000000] ir_switch_parse hight framerate mode change num:5 [ 0.000000] ir_switch_parse dayEv:0 nightEv:0 coeff:0 wbr:0 wbb:0 [ 0.000000] Sensor Calibration Mode:0 [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Memory: 115180K/131072K available (4996K kernel code, 444K rwdata, 772K rodata, 244K init, 172K bss, 15892K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] Build-time adjustment of leaf fanout to 32. [ 0.000000] NR_IRQS:419 [ 0.000000] parse cpu-intc-iomap, intc define in dt is too large! [ 0.000000] core irq setup finished [ 0.000000] percpu irq inited. [ 0.000000] t40 Clock Power Management Unit init! [ 0.000000] =========== t40 clocks: ============= [ 0.000000] apll = 900000000 , mpll = 1200000000 [ 0.000000] cpu_clk = 900000000 , l2c_clk = 450000000 [ 0.000000] ahb0_clk = 200000000 , ahb2_clk = 200000000 [ 0.000000] apb_clk = 100000000 , ext_clk = 24000000 [ 0.000000] [ 0.000000] parse cpu-ost-iomap, ost number define in dt is too large! [ 0.000000] percpu cpu_num:0 timerevent init [ 0.000000] clockevents_config_and_register success. [ 0.000000] clocksource: jz_clocksource: mask: 0x7fffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000000] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000094] ERROR epc 0xffffffcb [ 0.003318] Calibrating delay loop (skipped) preset value.. 2393.70 BogoMIPS (lpj=11968512) [ 0.011756] pid_max: default: 32768 minimum: 301 [ 0.016528] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.023162] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.030842] [SMP] Prepare 2 cores., cpu: 0 [ 0.041753] [SMP] Booting CPU1 ... [ 0.045154] CPU1 RESET ERROR PC:FFFBFFEE [ 0.045170] Primary instruction cache 32kB, VIPT, 8-way, linesize 32 bytes. [ 0.045175] Primary data cache 32kB, 8-way, VIPT, no aliases, linesize 32 bytes [ 0.045179] =======found ...... ingenic sc cache ops ...!, found: 1 [ 0.045179] [ 0.045182] Unified secondary cache 128kB 8-way, linesize 64 bytes. [ 0.045237] #### now starting init for cpu : 1 [ 0.045244] percpu irq inited. [ 0.045247] percpu cpu_num:1 timerevent init [ 0.045260] clockevents_config_and_register success. [ 0.045266] CPU1 revision is: 00132100 (Ingenic XBurst@II) [ 0.045268] FPU revision is: 00f32100 [ 0.045357] Brought up 2 CPUs [ 0.045852] [SMP] slave cpu1 start up finished. [ 0.112181] devtmpfs: initialized [ 0.120871] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.130859] futex hash table entries: 512 (order: 2, 16384 bytes) [ 0.137078] pinctrl core: initialized pinctrl subsystem [ 0.142715] NET: Registered protocol family 16 [ 0.152317] ingenic pinctrl 10010000.pinctrl: 4 gpio chip add success, pins 128 [ 0.160387] ingenic pinctrl 10010000.pinctrl: ingenic pinctrl probe success [ 0.177605] dmmu_init 807 PTRS_PER_PTE = 1024 [ 0.181975] Can't analyze schedule() prologue at 804ec944 [ 0.189841] ingenic-i2c 10050000.i2c: register i2c0 success. [ 0.196028] ingenic-i2c 10051000.i2c: register i2c1 success. [ 0.202354] ingenic-i2c 10052000.i2c: register i2c2 success. [ 0.208518] ingenic-i2c 10053000.i2c: register i2c3 success. [ 0.239265] ingenic-dma 13420000.dma: INGENIC SoC DMA initialized [ 0.246630] usbcore: registered new interface driver usbfs [ 0.252350] usbcore: registered new interface driver hub [ 0.257911] usbcore: registered new device driver usb [ 0.263179] inno phy probe success [ 0.266993] media: Linux media interface: v0.10 [ 0.271690] Linux video capture interface: v2.00 [ 0.276467] t40 set isp clk is 300000000 [ 0.280426] AE Para ADDR = a3700000 [ 0.283913] Tuning mode is:0 [ 0.289291] @@@@ tx-isp-probe ok (version H20221213a), compiler date: Mar 14 2023 15:44:53 @@@@@ [ 0.298350] The apll was not found! [ 0.301905] fast_wdr_mode = 0 [ 0.301905] main_user_wdr = 0 [ 0.307888] Main sensor name = isr2006 i2c = 0x60 [ 0.313226] probe ok ------->isr2006 build:Sep 5 2025 16:03:15 [ 0.319280] set sensor mclk(1) gpio [ 0.322787] isr2006 chip found @ 0x60 (i2c1) [ 0.327104] sensor driver version H20211019a [ 0.331672] Create framechan0 OK! [ 0.335444] Create framechan1 OK! [ 0.339218] Create framechan2 OK! [ 0.342942] Calibration ADDR = a3810000 [ 0.352061] Calibration len = 204800 [ 0.355684] Calibration len = 204800 [ 0.359267] Load Sensor Setting DATE:calibration mode 0 MD5:calibration crc 3473617380 [ 0.367296] Calibration len = 204800 [ 0.372307] *********** fliker print ********************** [ 0.377911] para1 = 5 [ 0.380197] para2 = 14 [ 0.382572] thr_fliker = 20 [ 0.385399] thr_energe_value = 30 [ 0.585785] Main sensor NCU: size = 5407744 paddr = 0x8000000 [ 0.591680] fs0 start ev is 38 [ 0.594998] isr2006 stream on [ 0.597986] TTFF frame_channel_fast_start 261 W:1936 H:1280 N:2 [ 0.603941] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 0 Start:1215 [ 0.611659] buf_id = 0 buf_ptr = 8529000 buf_len = 3717120 [ 0.617400] buf_id = 1 buf_ptr = 88b4800 buf_len = 3717120 [ 0.619409] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 1 Start:1230 [ 0.633483] clocksource: Switched to clocksource jz_clocksource [ 0.639553] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 2 Start:1250 [ 0.649619] NET: Registered protocol family 2 [ 0.654594] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.661615] TCP bind hash table entries: 1024 (order: 1, 8192 bytes) [ 0.661686] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 3 Start:1273 [ 0.662033] TTFF frame_channel_buffer_done:255 Chn:0 Buf:0 Write Done:1273 [ 0.681678] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 4 Start:1293 [ 0.682014] TTFF frame_channel_buffer_done:255 Chn:0 Buf:1 Write Done:1293 [ 0.697449] TCP: Hash tables configured (established 1024 bind 1024) [ 0.701363] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 5 Start:1312 [ 0.711564] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.717490] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.718873] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 6 Start:1330 [ 0.731623] NET: Registered protocol family 1 [ 0.737406] RPC: Registered named UNIX socket transport module. [ 0.739216] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 7 Start:1350 [ 0.751092] RPC: Registered udp transport module. [ 0.755823] RPC: Registered tcp transport module. [ 0.760561] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.760636] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 8 Start:1372 [ 0.774963] Trying to unpack rootfs image as initramfs... [ 0.780372] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 9 Start:1391 [ 0.797146] TTFF isp_vic_interrupt_service_routine0:1301 Chn:0 Frame 10 Start:1408 [ 0.832436] Freeing initrd memory: 7884K [ 0.862486] jitterentropy: Initialization failed with host not compliant with requirements: 2 [ 0.871917] io scheduler noop registered [ 0.875892] io scheduler deadline registered [ 0.880197] io scheduler cfq registered (default) [ 0.885666] vs021xrm display-dsi:panel_VS021XRM@0: invalid gpio backlight.gpio: -2 [ 0.893307] registered panel driver(vs021xrm) to mipi-dsi driver. [ 0.905366] vsync_skip_ratio = 9 [ 0.908561] vsync_skip_map = 0x000003ff [ 0.912497] dsi->video_config->h_total_pixels: 1650 [ 0.917452] dsi->video_config->v_total_lines: 1500 [ 0.922315] jzfb_pdata.modes->refresh: 50 [ 0.926393] jzfb_pdata.bpp: 24 [ 0.929444] dsi->video_config->no_of_lanes: 4 [ 0.933900] ---dsi->video_config->byte_clock: 0 [ 0.938613] +++++++++++++warning: DATALANE_BPS is over lcd max_bps allowed ,auto set it lcd max_bps 92812 [ 0.948407] jzdsi_init, 1102 byte_clock 92812 KHz, pixel_clock:123762 KHz [ 0.955594] dsi phy address = 0xb0004000 [ 0.959500] init_dsi_phy,497 step0 do nothing now. [ 0.964489] init_dsi_phy,511 reg write error. Step1 [ 0.969382] reg:0x03, value:0x1 [ 0.972560] init_dsi_phy,526 reg write error. Step2 [ 0.977620] reg:0x04, value:0x8c [ 0.980819] reg:0x01, value:0xe4 [ 0.984131] reg:0x00, value:0x7d [ 0.987351] reg:0x01, value:0xe0 [ 1.013544] reg:0x20, value:0x1e [ 1.016809] reg:0x20, value:0x1f [ 1.033538] init_dsi_phy,642 dsi phy init over now... [ 1.038733] before setting dsi phy: pll_clk_sel: 0xc0, set_pll_clk_sel: 0x2 [ 1.045818] after setting dsi phy: pll_clk_sel: 0x2, output_freq: 742496000 [ 1.052807] configure master-phy is ok [ 1.543891] ingenic-fb 13050000.dpu: uboot is not display logo! [ 1.551430] JZ DBOX probe ok!!!! [ 1.556952] 10031000.serial: ttyS1 at MMIO 0x10031000 (irq = 58, base_baud = 6250000) is a uart1 [ 1.566047] console [ttyS1] enabled [ 1.566047] console [ttyS1] enabled [ 1.573187] bootconsole [early0] disabled [ 1.573187] bootconsole [early0] disabled [ 1.581880] 10032000.serial: ttyS2 at MMIO 0x10032000 (irq = 57, base_baud = 6250000) is a uart2 [ 1.604496] brd: module loaded [ 1.610458] loop: module loaded [ 1.615556] zram: Added device: zram0 [ 1.620091] zram: Added device: zram1 [ 1.626314] ingenic SADC driver registeres over! [ 1.631649] ingenic sadc aux probe success [ 1.636330] ingenic sadc aux probe success [ 1.640891] ingenic sadc aux probe success [ 1.645510] ingenic sadc aux probe success [ 1.650091] ingenic sadc aux probe success [ 1.654740] ingenic sadc aux probe success [ 1.661035] ingenic-tcu 10002000.tcu: Ingenic TCU driver register completed ret = 0 [ 1.683542] Bus Mode Reg after reset: 0x00020101, cnt=0 [ 1.693298] libphy: ingenic_mii_bus: probed [ 1.698419] dwc-mac 134b0000.mac: Ingenic on-chip Ethernet MAC driver, Version 1.0 [ 1.723881] dwc2 13500000.otg: Configuration mismatch. Forcing host mode [ 1.730981] OTG CLK 1c1e5f80 [ 1.734846] CPCCR CLK 1580 [ 1.937218] dwc2 13500000.otg: DWC OTG Controller [ 1.942181] dwc2 13500000.otg: new USB bus registered, assigned bus number 1 [ 1.949618] dwc2 13500000.otg: irq 29, io mem 0x00000000 [ 1.956134] hub 1-0:1.0: USB hub found [ 1.960124] hub 1-0:1.0: 1 port detected [ 1.964867] ingenic,watchdog 10002000.watchdog: Failed to get mfd cell [ 1.971711] ingenic,watchdog: probe of 10002000.watchdog failed with error -12 [ 1.980189] Netfilter messages via NETLINK v0.30. [ 1.985245] ip_set: protocol 6 [ 1.988595] ip_tables: (C) 2000-2006 Netfilter Core Team [ 1.994307] NET: Registered protocol family 17 [ 2.000401] run=0, wait=0 [ 2.005302] Freeing unused kernel memory: 244K [ 2.107666] Enter 'CDT' mode. [ 2.110776] Enter 'DMA Descriptor chain' mode. [ 2.115649] the id code = ef4018, the flash name is WIN25Q128 [ 2.130653] ingenic-sfc 13440000.sfc: nor flash quad mode is set, now use quad mode! [ 2.138851] 8 cmdlinepart partitions found on MTD device jz_sfc [ 2.145076] Creating 8 MTD partitions on "jz_sfc": [ 2.150101] 0x000000000000-0x000000040000 : "boot" [ 2.157440] 0x000000040000-0x000000088000 : "tag" [ 2.168286] 0x000000088000-0x000000408000 : "kernel" [ 2.179364] 0x000000408000-0x000000788000 : "rootfs" [ 2.189351] 0x000000788000-0x000000b08000 : "recovery" [ 2.202104] 0x000000b08000-0x000000f80000 : "system" [ 2.212722] 0x000000f80000-0x000001000000 : "config" [ 2.223105] 0x000000000000-0x000001000000 : "all" [ 2.232190] ingenic-sfc 13440000.sfc: SPI NOR MTD LOAD OK [ 2.253111] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. [ 2.267513] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 2.281396] jffs2: notice: (608) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. [ 2.306282] zram0: detected capacity change from 0 to 16777216 Setting up swapspace version 1, size = 16773120 bytes UUID=f09220ba-239e-458e-98cf-d[ 2.319858] Adding 16380k swap on /dev/zram0. Priority:-1 extents:1 across:16380k SS cf2b749d9c5 [ 2.336618] Bus Mode Reg after reset: 0x00020101, cnt=0 [ 2.349153] Bus Mode Reg after reset: 0x00020101, cnt=0 / sh: write error: Invalid argument [ 2.421576] jz_pwm_probe[328] d_name = ingenic,tcu_chn3 [ 2.427821] jz_pwm_probe[328] d_name = ingenic,tcu_chn4 [ 2.433888] jz_pwm_probe[328] d_name = ingenic,tcu_chn5 [ 2.444752] The version of PWM driver is H20210412a [ 2.460654] request pwm channel 3 successfully [ 2.465502] request pwm channel 4 successfully [ 2.470126] request pwm channel 5 successfully [ 2.475180] pwm-jz pwm-jz: jz_pwm_probe register ok ! Zeratul login: [ 3.047453] RTW: module init start [ 3.051013] RTW: rtl8188eu v5.15.11-0-g96e5f190c.20231003 [ 3.056698] RTW: build time: Sep 1 2025 15:53:12 [ 3.061670] RTW: rtw_inetaddr_notifier_register [ 3.066635] usbcore: registered new interface driver rtl8188eu [ 3.072714] RTW: module init ret=0 [ 3.098832] sdhci: Secure Digital Host Controller Interface driver [ 3.105303] sdhci: Copyright(c) Pierre Ossman [ 3.113665] mmc gpio ingenic,cd-gpios num:122 en-level: 0 [ 3.119498] ingenic,sdhci 13060000.msc: allocated mmc-pwrseq [ 3.163531] mmc0: SDHCI controller on ingenic-sdhci [13060000.msc] using ADMA [ 3.171270] mmc0: card removed [ 3.213551] mmc1: SDHCI controller on ingenic-sdhci [13070000.msc] using ADMA [ 4.693728] dwc-mac 134b0000.mac eth0: Link is Up - 100Mbps/Full - flow control rx/tx TF card is not mount, please mount tf card at first ! root Jan 1 00:00:11 login[625]: root login on 'console' Hello Zeratul! [root@Zeratul:~]# lsmod ingenic_sdhci_sdio 8544 - - Live 0xc0965000 sdhci 23856 - - Live 0xc0956000 mmc_block 25136 - - Live 0xc0941000 mmc_core 79088 - - Live 0xc091e000 8188eu 1867280 - - Live 0xc072e000 (O) sample_pwm_hal 3296 - - Live 0xc042d000 (O) sample_pwm_core 2400 - - Live 0xc0425000 (O) squashfs 23920 - - Live 0xc03e3000 jffs2 113504 - - Live 0xc036a000 zlib_deflate 18192 - - Live 0xc0336000 jz_sfc 22288 - - Live 0xc0326000 [root@Zeratul:~]# [ 14.649909] random: nonblocking pool is initialized ls bin dev linuxrc opt root sys usr config etc media proc run system var config_bak lib mnt re.sh sbin tmp [root@Zeratul:~]#
最新发布
09-06
ld.lld: error: undefined symbol: kasan_init_hw_tags >>> referenced by smp.c:471 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/arch/arm64/kernel/smp.c:471) >>> vmlinux.o:(smp_prepare_boot_cpu) ld.lld: error: undefined symbol: __kasan_cache_create_kmalloc >>> referenced by kasan.h:143 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:143) >>> vmlinux.o:(create_kmalloc_cache) ld.lld: error: undefined symbol: kasan_flag_enabled >>> referenced by irqbypass.c >>> vmlinux.o:(__jump_table+0xE58) >>> referenced by irqbypass.c >>> vmlinux.o:(__jump_table+0xE88) >>> referenced by irqbypass.c >>> vmlinux.o:(__jump_table+0x5FD8) >>> referenced 894 more times ld.lld: error: undefined symbol: kasan_init_hw_tags_cpu >>> referenced by cpufeature.c:1877 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/arch/arm64/kernel/cpufeature.c:1877) >>> vmlinux.o:(cpu_enable_mte) ld.lld: error: undefined symbol: kasan_report_async >>> referenced by mte.c:187 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/arch/arm64/kernel/mte.c:187) >>> vmlinux.o:(mte_check_tfsr_el1) >>> referenced by mte.c:187 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/arch/arm64/kernel/mte.c:187) >>> vmlinux.o:(mte_thread_switch) >>> referenced by mte.c:187 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/arch/arm64/kernel/mte.c:187) >>> vmlinux.o:(mte_suspend_enter) ld.lld: error: undefined symbol: kasan_report >>> referenced by fault.c:334 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/arch/arm64/mm/fault.c:334) >>> vmlinux.o:(__do_kernel_fault) ld.lld: error: undefined symbol: __kasan_unpoison_range >>> referenced by kasan.h:111 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:111) >>> vmlinux.o:(dup_task_struct) >>> referenced by kasan.h:111 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:111) >>> vmlinux.o:(mempool_exit) >>> referenced by kasan.h:111 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:111) >>> vmlinux.o:(remove_element) >>> referenced 3 more times ld.lld: error: undefined symbol: __kasan_unpoison_vmalloc >>> referenced by kasan.h:416 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:416) >>> vmlinux.o:(scs_alloc) >>> referenced by kasan.h:416 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:416) >>> vmlinux.o:(scs_free) >>> referenced by kasan.h:416 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:416) >>> vmlinux.o:(vm_map_ram) >>> referenced 2 more times ld.lld: error: undefined symbol: __kasan_poison_vmalloc >>> referenced by kasan.h:425 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:425) >>> vmlinux.o:(scs_alloc) >>> referenced by kasan.h:425 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:425) >>> vmlinux.o:(vm_unmap_ram) >>> referenced by kasan.h:425 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:425) >>> vmlinux.o:(__vunmap) ld.lld: error: undefined symbol: __kasan_unpoison_pages >>> referenced by kasan.h:127 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:127) >>> vmlinux.o:(mempool_exit) >>> referenced by kasan.h:127 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:127) >>> vmlinux.o:(remove_element) >>> referenced by kasan.h:127 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:127) >>> vmlinux.o:(mempool_resize) >>> referenced 4 more times ld.lld: error: undefined symbol: __kasan_poison_pages >>> referenced by kasan.h:119 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:119) >>> vmlinux.o:(mempool_init_node) >>> referenced by kasan.h:119 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:119) >>> vmlinux.o:(mempool_resize) >>> referenced by kasan.h:119 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:119) >>> vmlinux.o:(mempool_free) >>> referenced 2 more times ld.lld: error: undefined symbol: __kasan_slab_free_mempool >>> referenced by kasan.h:208 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:208) >>> vmlinux.o:(mempool_init_node) >>> referenced by kasan.h:208 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:208) >>> vmlinux.o:(mempool_resize) >>> referenced by kasan.h:208 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:208) >>> vmlinux.o:(mempool_free) ld.lld: error: undefined symbol: __kasan_never_merge >>> referenced by kasan.h:103 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:103) >>> vmlinux.o:(slab_unmergeable) >>> referenced by kasan.h:103 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:103) >>> vmlinux.o:(find_mergeable) >>> referenced by kasan.h:103 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:103) >>> vmlinux.o:(find_mergeable) ld.lld: error: undefined symbol: __kasan_kmalloc_large >>> referenced by kasan.h:237 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:237) >>> vmlinux.o:(kmalloc_order) ld.lld: error: undefined symbol: __kasan_check_byte >>> referenced by kasan.h:259 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:259) >>> vmlinux.o:(krealloc) >>> referenced by kasan.h:259 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:259) >>> vmlinux.o:(kfree_sensitive) >>> referenced by kasan.h:259 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:259) >>> vmlinux.o:(ksize) ld.lld: error: undefined symbol: __kasan_krealloc >>> referenced by kasan.h:247 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:247) >>> vmlinux.o:(krealloc) ld.lld: error: undefined symbol: kasan_free_pages >>> referenced by page_alloc.c:1361 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/mm/page_alloc.c:1361) >>> vmlinux.o:(__free_pages_ok) >>> referenced by page_alloc.c:1361 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/mm/page_alloc.c:1361) >>> vmlinux.o:(free_unref_page_prepare) ld.lld: error: undefined symbol: kasan_alloc_pages >>> referenced by page_alloc.c:2410 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/mm/page_alloc.c:2410) >>> vmlinux.o:(post_alloc_hook) >>> referenced by page_alloc.c:2410 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/mm/page_alloc.c:2410) >>> vmlinux.o:(prep_new_page) ld.lld: error: undefined symbol: __kasan_metadata_size >>> referenced by kasan.h:150 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:150) >>> vmlinux.o:(print_trailer) >>> referenced by kasan.h:150 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:150) >>> vmlinux.o:(check_object) ld.lld: error: undefined symbol: __kasan_kmalloc >>> referenced by kasan.h:227 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:227) >>> vmlinux.o:(kmem_cache_alloc_trace) >>> referenced by kasan.h:227 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:227) >>> vmlinux.o:(__kmalloc) >>> referenced by kasan.h:227 (/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/include/linux/kasan.h:227) >>> vmlinux.o:(__kmalloc_track_caller) ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors) make[1]: *** [/home/lhl/ga-4.1/repo_code/out/oriole/kernel/src_tmp/linux-5.15/Makefile:1277: vmlinux] Error 1 make[1]: Leaving directory '/home/lhl/ga-4.1/repo_code/out/oriole/kernel/OBJ/linux-5.15' make: *** [Makefile:237: __sub-make] Error 2
07-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嵌云阁主

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值