如何搭建龙芯2k0300-久久派开发环境并升级内核?
摘要:在《龙芯2k0300 - 久久派开发环境搭建及内核升级(上)》我们对久久派开发板以及uboot、内核、文件系统的编译进行了介绍,本节主要介绍固件的升级,以及驱动移植。 一、更新固件 久久派开发板默认配套的是PMON固件以及linux 4.1
在《龙芯2k0300 - 久久派开发环境搭建及内核升级(上)》我们对久久派开发板以及uboot、内核、文件系统的编译进行了介绍,本节主要介绍固件的升级,以及驱动移植。
一、更新固件
久久派开发板默认配套的是PMON固件以及linux 4.19的内核,这里我们打算将其替换换为uboot以及linux 6.12版本。
1.1 准备工作
1.1.1 串口连接
供电:久久派开发板集成了一个Type-C接口,用于给板子供电,板子上丝印标注DC-5V。
串口:龙邱久久派扩展板上也有一个Type-C接口,其连接久久派UART0,电脑通过Type-C数据线可直接控制久久派,使用更方便。
注意:实际上如果通过串口连接,供电接口可以不用了,因为久久派和龙邱久久派扩展板5V是连通的,所以任意一个Type-C接口提供5V电源都可以。
我们将扩展板上的串口连接到电脑,然后打开电脑的MobaXterm,选择串口端口(我这里是COM4),设置波特率115200。
1.1.2 测试
当我们按照前面的步骤接好线,给久久派复位上电,刚买的板子默认会输出如下信息:
点击查看详情
PMON2000 LOONGARCH Initializing. Standby...
lock scache 90000000 - 90040000
Lock Scache Done.
copy text section to lock cache done.
run in cache.
mem init done!
Copy Bios to memory OK, Uncompressing Bios..........OK, Booting Bios
unlock scache windows first
flush scache to unlock scache
unlock_base 0x9000000090000000
raw_memsz: 0x1
memorysize_high: 0x10000000
FREQ
RTC init done
cpu freq 1000000000, cnt 50000021
cpu freq 1000000000
DONE
set ebase done
DEVI
ENVI
MAPV
in envinit
nvram=1c000000
NVRAM is invalid!
NVRAM@1c000000
STDV
80100000: memory between f800000-f800000 is already been allocated,heap is already above this point
SBDD
Icache 0x8000
Dcache 0x8000
L2 cache 0x100000
L3 cache 0x1
NETI
RTCL
in configure
mainbus0 (root)
localbus0 at mainbus0
emmc0 at localbus0syn0 at localbus0 phy device ID is: adb4, phy vendor ID is: 412
==== Warning: unrecognized gmac phy!
in if attach
syn1 at localbus0 phy device ID is: 0, phy vendor ID is: 0
==== Warning: unrecognized gmac phy!
in if attach
ohci0 at localbus0OHCI revision: 0x00000010
RH: a: 0x02000901 b: 0x00000000
early period(0x0)
OHCI b01f800 initialized ok
drive at ohci0 devnum 1, Product OHCI Root Hub
not configured
lotg0 at localbus0Halt all channels to put them into a known state
USB DWC2
drive at lotg0 devnum 2, Product U-Boot Root Hub
not configured
loopdev0 at mainbus0out configure
begin dc_init
enter dc_init...
frame buffer addr: 7000000
pll found pstdiv[0x26], loopc[0x3e], frefc[0x4]
pll out[0x261f0408]
display controller reg config complete!
fbaddress = 9000000007000000
cfb_console init,fb=9000000007000000
CONSOLE_SIZE 1228800
devconfig done.
ifinit done.
domaininit done.
init_proc....
HSTI
SYMI
SBDE
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|| ||||||||| ||||| |||| ||||| ||||| ||||| ||||| |||| ||||| ||
|| |||||||| |||| ||| |||| ||| |||| |||| |||| ||| |||| ||| |||| ||| |||| ||
|| |||||||| |||||| ||| |||||| ||| | ||| ||| |||||||||||| ||||||| |||||| ||| | ||| ||
|| |||||||| |||||| ||| |||||| ||| || || ||| ||| ||||||| |||| |||||| ||| || || ||
|| |||||||| |||||| ||| |||||| ||| ||| | ||| ||||| |||||||||| ||| |||||| ||| ||| | ||
|| |||||||| |||| ||| |||| ||| |||| ||| |||| ||| ||| |||| |||| ||| |||| ||
|| |||| ||||| |||| ||||| |||| ||||| |||||| |||| ||||| ||
|||||||||||||||||||||||||||||||||||||||[2020 LOONGSON]|||||||||||||||||||||||||||||||||||||||||||
Configuration [loongson,EL,NET,IDE]
Version: PMON 5.0.3-Release (ls2k300) #2: Mon Jun 3 16:45:51 CST 2024 commit bc99ebfd9b4292970989b3a74070ad9897321272 Author: niupengju <niupengju@loongson.cn> Date: Fri May 31 14:08:48 2024 +0800 .
Supported loaders [txt, srec, elf, bin]
Supported filesystems [tfcard, emmc, mtd, net, ext4, fat, fs, disk, iso9660, socket, tty, ram]
This software may be redistributed under the BSD copyright.
Copyright 2000-2002, Opsycon AB, Sweden.
Copyright 2005, ICT CAS.
CPU 3A5000 @ 1000.00 MHzMemory size 512 MB .
L1 Instruction cache size 32KB (128 Line, 4 Way)
L1 Data cache size 32KB (128 Line, 4 Way)
L2 cache size 1024KB
L3 cache size 0KB |BEV1
BEV in SR set to zero.
dtb chsum err! you should load_dtb before boot kernel!!!
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Ŀ
▒ Boot Menu List ▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Ĵ
▒ -> 1 'LoongOS (2k300)' ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ Please Select Boot Menu [1] ▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Use the UP and DOWN keys to select the entry.
Press ENTER to boot selected OS.
Press 'c' to command-line.
Booting system in [0] second(s)
Now booting the 'LoongOS (2k300)' /Loading file: (emmc0,0)/boot/vmlinuz (elf) -(elf)
0x9000000001410000/5966336 + 0x19c0a00/4202528(z) +
Entry address is 9000000001410000
Boot with parameters: console=tty console=ttyS0,115200 rdinit=/sbin/init rootdelay=5 root=/dev/mmcblk0p1
dtb chsum err!!!
[ 0.000000] Linux version 4.19.190+ (loongson@loongson) (gcc version 8.3.0 (LoongArch GNU toolchain rc1.2 (20230615))) #3 SMP Mon Jun 3 10:20:57 CST 2024
[ 0.000000] 64-bit Loongson Processor probed (LA264 Core)
[ 0.000000] CPU0 revision is: 0014a030 (Loongson-64bit)
[ 0.000000] FPU0 revision is: 00000001
[ 0.000000] efi:
[ 0.000000] DMI not present or invalid.
[ 0.000000] The BIOS Version: (null)
[ 0.000000] UEFI runtime services will not be available!
[ 0.000000] software IO TLB: mapped [mem 0x014a0000-0x054a0000] (64MB)
[ 0.000000] PM: Registered nosave memory: [mem 0x011c0000-0x011c3fff]
[ 0.000000] Detected 1 available CPU(s)
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000000200000-0x00000000ffffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000200000-0x000000000effffff]
[ 0.000000] node 0: [mem 0x0000000090000000-0x000000009fffffff]
[ 0.000000] Zeroed struct page in unavailable ranges: 1152 pages
[ 0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x000000009fffffff]
[ 0.000000] percpu: Embedded 7 pages/cpu s62808 r8192 d43688 u114688
[ 0.000000] CPU0 __my_cpu_offset: 4118000
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 31507
[ 0.000000] Kernel command line: earlycon console=tty console=ttyS0,115200 rdinit=/sbin/init rootdelay=5 root=/dev/mmcblk0p1
[ 0.000000] Dentry cache hash table entries: 65536 (order: 5, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 4, 262144 bytes)
[ 0.000000] Memory: 386992K/505856K available (11820K kernel code, 1386K rwdata, 4288K rodata, 992K init, 570K bss, 118864K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] ftrace: allocating 39093 entries in 39 pages
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 4160, nr_irqs: 4160, preallocated irqs: 16
[ 0.000000] timer_probe: no matching timers found
[ 0.000000] Constant clock event device register
[ 0.000000] clocksource: Constant: mask: 0xffffffffffffffff max_cycles: 0x3759f22983, max_idle_ns: 881590413697 ns
[ 0.000005] sched_clock: 64 bits at 120MHz, resolution 8ns, wraps every 4398046511102ns
[ 0.000009] Constant clock source device register
[ 0.000140] Console: colour dummy device 80x25
[ 0.000565] console [tty0] enabled
[ 0.000638] Calibrating delay loop (skipped), value calculated using timer frequency.. 240.00 BogoMIPS (lpj=480000)
[ 0.000679] pid_max: default: 32768 minimum: 301
[ 0.000793] Security Framework initialized
[ 0.000878] Mount-cache hash table entries: 2048 (order: 0, 16384 bytes)
[ 0.000926] Mountpoint-cache hash table entries: 2048 (order: 0, 16384 bytes)
[ 0.002398] Performance counters: loongarch/loongson64 PMU enabled, 4 64-bit counters available to each CPU.
[ 0.002564] rcu: Hierarchical SRCU implementation.
[ 0.003065] smp: Bringing up secondary CPUs ...
[ 0.003089] smp: Brought up 1 node, 1 CPU
[ 0.003748] devtmpfs: initialized
[ 0.007927] random: get_random_u32 called from bucket_table_alloc.isra.9+0x94/0x1e0 with crng_init=0
[ 0.008865] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.008919] futex hash table entries: 256 (order: 0, 16384 bytes)
[ 0.009169] pinctrl core: initialized pinctrl subsystem
[ 0.010176] NET: Registered protocol family 16
[ 0.010933] audit: initializing netlink subsys (disabled)
[ 0.011871] cpuidle: using governor menu
[ 0.013252] audit: type=2000 audit(1577836800.008:1): state=initialized audit_enabled=0 res=1
[ 0.021173] loongson pinctrl 16000490.pinctrl: 7 gpio chip add success, pins 112
[ 0.022501] loongson pinctrl 16000490.pinctrl: loongson pinctrl probe success
[ 0.083205] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.084590] ACPI: Interpreter disabled.
[ 0.086341] vgaarb: loaded
[ 0.086922] SCSI subsystem initialized
[ 0.087944] usbcore: registered new interface driver usbfs
[ 0.089380] usbcore: registered new interface driver hub
[ 0.089496] usbcore: registered new device driver usb
[ 0.090500] pps_core: LinuxPPS API ver. 1 registered
[ 0.090531] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.090648] PTP clock support registered
[ 0.094111] Advanced Linux Sound Architecture Driver Initialized.
[ 0.095048] Bluetooth: Core ver 2.22
[ 0.095128] NET: Registered protocol family 31
[ 0.095148] Bluetooth: HCI device and connection manager initialized
[ 0.095248] Bluetooth: HCI socket layer initialized
[ 0.095273] Bluetooth: L2CAP socket layer initialized
[ 0.095319] Bluetooth: SCO socket layer initialized
[ 0.095942] clocksource: Switched to clocksource Constant
[ 0.180045] pnp: PnP ACPI: disabled
[ 0.199393] NET: Registered protocol family 2
[ 0.200323] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 16384 bytes)
[ 0.200380] TCP established hash table entries: 4096 (order: 1, 32768 bytes)
[ 0.200430] TCP bind hash table entries: 4096 (order: 2, 65536 bytes)
[ 0.200520] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.200628] UDP hash table entries: 512 (order: 0, 16384 bytes)
[ 0.200664] UDP-Lite hash table entries: 512 (order: 0, 16384 bytes)
[ 0.200921] NET: Registered protocol family 1
[ 0.201931] RPC: Registered named UNIX socket transport module.
[ 0.201961] RPC: Registered udp transport module.
[ 0.201981] RPC: Registered tcp transport module.
[ 0.202000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.205739] Initialise system trusted keyrings
[ 0.206638] workingset: timestamp_bits=62 max_order=15 bucket_order=0
[ 0.225701] NFS: Registering the id_resolver key type
[ 0.225776] Key type id_resolver registered
[ 0.225797] Key type id_legacy registered
[ 0.225826] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.225862] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.225895] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 0.227316] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.227864] SGI XFS with security attributes, no debug enabled
[ 1.023911] random: fast init done
[ 1.587976] Key type asymmetric registered
[ 1.588027] Asymmetric key parser 'x509' registered
[ 1.588153] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 1.588190] io scheduler noop registered
[ 1.588385] io scheduler cfq registered (default)
[ 1.588407] io scheduler mq-deadline registered
[ 1.588427] io scheduler kyber registered
[ 1.597067] Serial: 8250/16550 driver, 16 ports, IRQ sharing disabled
[ 1.605376] console [ttyS0] disabled
[ 1.605476] 16100000.serial: ttyS0 at MMIO 0x16100000 (irq = 16, base_baud = 6250000) is a Loongson 2k1500 16550
[ 2.248935] console [ttyS0] enabled
[ 2.253507] 16100400.serial: ttyS1 at MMIO 0x16100400 (irq = 17, base_baud = 6250000) is a Loongson 2k1500 16550
[ 2.264877] 16100800.serial: ttyS2 at MMIO 0x16100800 (irq = 18, base_baud = 6250000) is a Loongson 2k1500 16550
[ 2.276161] loongarch_iommu_ivrs_init get ivrs table failed
[ 2.281806] Failed to init iommu by ivrs
[ 2.288605] [drm] loongson kernel modesetting driver enable
[ 2.295423] [drm] No OF Graph in dtb, fallback to legacy
[ 2.301021] [drm] found 1 display timings for connector-0
[ 2.306463] [drm] connector0 is DPI
[ 2.310029] [drm] Total 1 outputs
[ 2.313672] lsdc 16090000.dc: register irq(71) handler for ls7a2000
[ 2.319979] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.326616] [drm] No driver support for vblank timestamp query.
[ 2.333276] [drm] Initialized lsdc 1.1.1 20190831 for 16090000.dc on minor 0
[ 2.386398] Console: switching to colour frame buffer device 128x37
[ 2.409123] lsdc 16090000.dc: fb0: DRM emulated frame buffer device
[ 2.431364] loop: module loaded
[ 2.436665] ls-nand driver initializing
[ 2.441621] ls-quadspi 16010000.spi0: unable to setup flash chip
[ 2.448042] ls-quadspi: probe of 16010000.spi0 failed with error -1
[ 2.456343] ls-spi-v1 1610c000.spi2: driver initialized
[ 2.462582] libphy: Fixed MDIO Bus: probed
[ 2.469950] CAN device driver interface
[ 2.477324] lbx----->ctucan_platform_probe,76
[ 2.485060] lscanfd 16110800.can: probe addr=ffffff81020d8800,irq=19 can_clk=100000000 ntxbufs=8 res->start=16110800
[ 2.498762] lscanfd 16110800.can: lbx----device id :babe
[ 2.508637] lbx----->ctucan_platform_probe,76
[ 2.516493] lscanfd 16110c00.can: probe addr=ffffff81020e0c00,irq=20 can_clk=100000000 ntxbufs=8 res->start=16110c00
[ 2.530183] lscanfd 16110c00.can: lbx----device id :babe
[ 2.540629] stmmaceth 16020000.ethernet: no reset control found
[ 2.550509] stmmaceth 16020000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[ 2.560321] stmmaceth 16020000.ethernet: DWMAC1000
[ 2.568095] stmmaceth 16020000.ethernet: DMA HW capability register supported
[ 2.578018] stmmaceth 16020000.ethernet: RX Checksum Offload Engine supported
[ 2.587886] stmmaceth 16020000.ethernet: COE Type 2
[ 2.595443] stmmaceth 16020000.ethernet: TX Checksum insertion supported
[ 2.604824] stmmaceth 16020000.ethernet: Wake-Up On Lan supported
[ 2.613843] stmmaceth 16020000.ethernet: Enhanced/Alternate descriptors
[ 2.623214] stmmaceth 16020000.ethernet: Enabled extended descriptors
[ 2.632318] stmmaceth 16020000.ethernet: Ring mode enabled
[ 2.640384] stmmaceth 16020000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 2.658621] libphy: stmmac: probed
[ 2.664724] mdio_bus stmmac-0:01: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
[ 2.679279] dwc2 16040000.otg: 16040000.otg supply vusb_d not found, using dummy regulator
[ 2.691323] dwc2 16040000.otg: Linked as a consumer to regulator.0
[ 2.700492] dwc2 16040000.otg: 16040000.otg supply vusb_a not found, using dummy regulator
[ 2.712124] dwc2 16040000.otg: Configuration mismatch. dr_mode forced to host
[ 2.772143] dwc2 16040000.otg: dwc2_check_params: Invalid parameter lpm=1
[ 2.781683] dwc2 16040000.otg: dwc2_check_params: Invalid parameter lpm_clock_gating=1
[ 2.792310] dwc2 16040000.otg: dwc2_check_params: Invalid parameter besl=1
[ 2.801859] dwc2 16040000.otg: dwc2_check_params: Invalid parameter hird_threshold_en=1
[ 2.813286] dwc2 16040000.otg: DWC OTG Controller
[ 2.821063] dwc2 16040000.otg: new USB bus registered, assigned bus number 1
[ 2.831117] dwc2 16040000.otg: irq 48, io mem 0x16040000
[ 2.840707] hub 1-0:1.0: USB hub found
[ 2.847729] hub 1-0:1.0: 1 port detected
[ 2.855743] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.864939] ehci-pci: EHCI PCI platform driver
[ 2.872940] ehci-platform: EHCI generic platform driver
[ 2.881717] ehci-platform 16080000.ehci: EHCI Host Controller
[ 2.890209] ehci-platform 16080000.ehci: new USB bus registered, assigned bus number 2
[ 2.901114] ehci-platform 16080000.ehci: irq 46, io mem 0x16080000
[ 2.923957] ehci-platform 16080000.ehci: USB 2.0 started, EHCI 1.00
[ 2.934152] hub 2-0:1.0: USB hub found
[ 2.940850] hub 2-0:1.0: 1 port detected
[ 2.948650] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 2.958327] ohci-platform: OHCI generic platform driver
[ 2.966705] ohci-platform 16088000.ohci: Generic Platform OHCI controller
[ 2.976246] ohci-platform 16088000.ohci: new USB bus registered, assigned bus number 3
[ 2.987345] ohci-platform 16088000.ohci: irq 47, io mem 0x16088000
[ 3.061163] hub 3-0:1.0: USB hub found
[ 3.068125] hub 3-0:1.0: 1 port detected
[ 3.076704] usbcore: registered new interface driver usb-storage
[ 3.086621] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[ 3.099208] i8042: PNP: No PS/2 controller found.
[ 3.106448] i8042: Probing ports directly.
[ 3.113843] i8042: No controller found
[ 3.121443] mousedev: PS/2 mouse device common for all mice
[ 3.130511] Gt9xx driver installing..
[ 3.139496] ls2x-rtc 16128000.rtc: rtc core: registered 16128000.rtc as rtc0
[ 3.150505] i2c /dev entries driver
[ 3.158742] goodix-ts 0-0014: GTP Driver Version: V2.8.0.2<2017/12/14>
[ 3.168047] goodix-ts 0-0014: GTP I2C Address: 0x14
[ 3.176585] goodix-ts 0-0014: Unset touchscreen-max-id, use default
[ 3.185536] goodix-ts 0-0014: Unset touchscreen-size-x, use default
[ 3.194372] goodix-ts 0-0014: Unset touchscreen-size-y, use default
[ 3.203169] goodix-ts 0-0014: Unset touchscreen-max-w, use default
[ 3.211876] goodix-ts 0-0014: Unset touchscreen-max-p, use default
[ 3.220507] goodix-ts 0-0014: touch input parameters is [id x y w p]<16 600 1024 1024 1024>
[ 3.231337] goodix-ts 0-0014: int-sync enabled
[ 3.238255] goodix-ts 0-0014: auto-update enabled
[ 3.245686] goodix-ts 0-0014: 0-0014 supply vdd_ana not found, using dummy regulator
[ 3.256422] goodix-ts 0-0014: Linked as a consumer to regulator.0
[ 3.265180] goodix-ts 0-0014: 0-0014 supply vcc_i2c not found, using dummy regulator
[ 3.275816] goodix-ts 0-0014: No pinctrl found
[ 3.282903] goodix-ts 0-0014: Success request irq-gpio
[ 3.290569] goodix-ts 0-0014: Success request rst-gpio
[ 3.298145] goodix-ts 0-0014: Guitar reset
[ 3.403121] goodix-ts 0-0014: I2c read failed,dev:14,reg:8047,size:1
[ 3.411885] goodix-ts 0-0014: GTP i2c test failed time 1
[ 3.441819] goodix-ts 0-0014: I2c read failed,dev:14,reg:8047,size:1
[ 3.450617] goodix-ts 0-0014: GTP i2c test failed time 2
[ 3.480469] goodix-ts 0-0014: I2c read failed,dev:14,reg:8047,size:1
[ 3.489206] goodix-ts 0-0014: GTP i2c test failed time 3
[ 3.507858] goodix-ts 0-0014: Failed communicate with IC use I2C
[ 3.516328] goodix-ts 0-0014: Regulator vcc_i2c disabled
[ 3.523864] goodix-ts 0-0014: Regulator vdd_ana disabled
[ 3.531735] goodix-ts: probe of 0-0014 failed with error -11
[ 3.539761] ls-i2c 16108000.i2c: driver initialized
[ 3.548514] ls-i2c 16109000.i2c: driver initialized
[ 3.557986] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: dm-devel@redhat.com
[ 3.568707] Bluetooth: HCI UART driver ver 2.3
[ 3.575373] Bluetooth: HCI UART protocol H4 registered
[ 3.584655] ls2k_sdio 16140000.mmc0: Use exclusive dma engine.
[ 4.019986] err: get cd, can't find gpio chip
[ 4.027254] ls2k_sdio 16148000.sdio1: Use exclusive dma engine.
[ 5.040287] usbcore: registered new interface driver usbhid
[ 5.048193] usbhid: USB HID core driver
[ 5.058599] soc-audio soc-audio: ASoC: machine LOONGSON-I2S should use snd_soc_register_card()
[ 5.471466] err: get cd, can't find gpio chip
[ 6.894015] mmc1: new high speed SDIO card at address 390b
[ 7.118840] soc-audio soc-audio: ES8323.0-0010 <-> loongson-i2s-dai mapping ok
[ 7.128796] soc-audio soc-audio: ASoC: DAPM unknown pin MicIn
[ 7.142923] soc-audio soc-audio: ES8323.0-0010 <-> loongson-i2s-dai mapping ok
[ 7.152838] soc-audio soc-audio: ASoC: no DMI vendor name!
[ 7.164209] Initializing XFRM netlink socket
[ 7.172879] NET: Registered protocol family 10
[ 7.181778] Segment Routing with IPv6
[ 7.188282] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 7.198303] NET: Registered protocol family 17
[ 7.205910] NET: Registered protocol family 15
[ 7.212868] can: controller area network core (rev 20170425 abi 9)
[ 7.222019] NET: Registered protocol family 29
[ 7.229246] can: raw protocol (rev 20170425)
[ 7.236319] can: broadcast manager protocol (rev 20170425 t)
[ 7.444828] can: netlink gateway (rev 20170425) max_hops=1
[ 7.453855] Bluetooth: RFCOMM TTY layer initialized
[ 7.461768] Bluetooth: RFCOMM socket layer initialized
[ 7.469748] Bluetooth: RFCOMM ver 1.11
[ 7.476214] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 7.484203] Bluetooth: BNEP filters: protocol multicast
[ 7.492178] Bluetooth: BNEP socket layer initialized
[ 7.499714] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 7.508246] Bluetooth: HIDP socket layer initialized
[ 7.516477] Key type dns_resolver registered
[ 7.524913] Loading compiled-in X.509 certificates
[ 7.736624] mmc0: new HS200 MMC card at address 0001
[ 7.745566] ls2x-rtc 16128000.rtc: setting system clock to 2000-01-01 00:08:44 UTC (946685324)
[ 7.757751] mmcblk0: mmc0:0001 08A391 7.28 GiB
[ 7.765957] mmcblk0boot0: mmc0:0001 08A391 partition 1 4.00 MiB
[ 7.774610] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 7.785771] mmcblk0boot1: mmc0:0001 08A391 partition 2 4.00 MiB
[ 7.800895] mmcblk0: p1
[ 7.957281] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 7.966724] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 7.977958] cfg80211: failed to load regulatory.db
[ 7.985464] ALSA device list:
[ 7.991099] #0: LOONGSON-I2S
[ 7.997402] Waiting 5 sec before mounting root device...
[ 13.037973] EXT4-fs (mmcblk0p1): INFO: recovery required on readonly filesystem
[ 13.047905] EXT4-fs (mmcblk0p1): write access will be enabled during recovery
[ 13.065451] EXT4-fs (mmcblk0p1): recovery complete
[ 13.073784] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[ 13.084868] VFS: Mounted root (ext4 filesystem) readonly on device 179:1.
[ 13.100161] devtmpfs: mounted
[ 13.132257] Freeing unused kernel memory: 992K
[ 13.139399] This architecture does not have kernel memory protection.
[ 13.148602] Run /sbin/init as init process
[ 13.292965] systemd[1]: System time before build time, advancing clock.
[ 13.317252] systemd[1]: systemd 247 running in system mode. (+PAM +AUDIT -SELINUX +IMA -APPARMOR -SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL +XZ -LZ4 -ZSTD -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
[ 13.345912] systemd[1]: Detected architecture loongarch64.
Welcome to LoongOS v0.1 (master)!
[ 13.372645] systemd[1]: Set hostname to <LoongOS>.
[ 13.541539] systemd-sysv-generator[988]: SysV service '/etc/init.d/psplash.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[ 13.580208] systemd-sysv-generator[988]: SysV service '/etc/init.d/dropbear' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[ 13.892968] systemd[1]: Queued start job for default target Multi-User System.
[ 13.906062] random: systemd: uninitialized urandom read (16 bytes read)
[ 13.917950] systemd[1]: Created slice system-getty.slice.
[ OK ] Created slice system-getty.slice.
[ 13.944213] random: systemd: uninitialized urandom read (16 bytes read)
[ 13.955768] systemd[1]: Created slice system-modprobe.slice.
[ OK ] Created slice system-modprobe.slice.
[ 13.980261] random: systemd: uninitialized urandom read (16 bytes read)
[ 13.991815] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ 14.020920] systemd[1]: Created slice User and Session Slice.
[ OK ] Created slice User and Session Slice.
[ 14.048791] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Started Dispatch Password …ts to Console Directory Watch.
[ 14.080667] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password R…uests to Wall Directory Watch.
[ 14.108637] systemd[1]: Reached target Host and Network Name Lookups.
[ OK ] Reached target Host and Network Name Lookups.
[ 14.136351] systemd[1]: Reached target Paths.
[ OK ] Reached target Paths.
[ 14.160413] systemd[1]: Reached target Remote File Systems.
[ OK ] Reached target Remote File Systems.
[ 14.184385] systemd[1]: Reached target Slices.
[ OK ] Reached target Slices.
[ 14.208408] systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
[ 14.233489] systemd[1]: Listening on RPCbind Server Activation Socket.
[ OK ] Listening on RPCbind Server Activation Socket.
[ 14.260387] systemd[1]: Reached target RPC Port Mapper.
[ OK ] Reached target RPC Port Mapper.
[ 14.289869] systemd[1]: Listening on Syslog Socket.
[ OK ] Listening on Syslog Socket.
[ 14.312817] systemd[1]: Listening on initctl Compatibility Named Pipe.
[ OK ] Listening on initctl Compatibility Named Pipe.
[ 14.341348] systemd[1]: Listening on Journal Audit Socket.
[ OK ] Listening on Journal Audit Socket.
[ 14.369027] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ 14.397149] systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
[ 14.421315] systemd[1]: Listening on Network Service Netlink Socket.
[ OK ] Listening on Network Service Netlink Socket.
[ 14.449268] systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 14.472931] systemd[1]: Listening on udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
[ 14.497154] systemd[1]: Listening on User Database Manager Socket.
[ OK ] Listening on User Database Manager Socket.
[ 14.527169] systemd[1]: Mounting Huge Pages File System...
Mounting Huge Pages File System...
[ 14.551484] systemd[1]: Mounting POSIX Message Queue File System...
Mounting POSIX Message Queue File System...
[ 14.586795] systemd[1]: Mounting Kernel Debug File System...
Mounting Kernel Debug File System...
[ 14.618755] systemd[1]: Mounting Kernel Trace File System...
Mounting Kernel Trace File System...
[ 14.654547] systemd[1]: Mounting Temporary Directory (/tmp)...
Mounting Temporary Directory (/tmp)...
[ 14.685309] systemd[1]: Condition check resulted in Create list of static device nodes for the current kernel being skipped.
[ 14.703004] systemd[1]: Starting Load Kernel Module configfs...
Starting Load Kernel Module configfs...
[ 14.731230] systemd[1]: Starting Load Kernel Module drm...
Starting Load Kernel Module drm...
[ 14.763024] systemd[1]: Starting Load Kernel Module fuse...
Starting Load Kernel Module fuse...
[ 14.795085] systemd[1]: Starting Start psplash boot splash screen...
Starting Start psplash boot splash screen...
[ 14.827060] systemd[1]: Starting RPC Bind...
Starting RPC Bind...
[ 14.863652] systemd[1]: Starting File System Check on Root Device...
Starting File System Check on Root Device...
[ 14.908759] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[ 14.941918] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
[ 14.956480] systemd[1]: Starting Journal Service...
Starting Journal Service...
[ 14.981195] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.
[ 15.013528] systemd[1]: Mounting NFSD configuration filesystem...
Mounting NFSD configuration filesystem...
[ 15.058979] systemd[1]: Starting Apply Kernel Variables...
Starting Apply Kernel Variables...
[ 15.099211] systemd[1]: Starting Coldplug All udev Devices...
Starting Coldplug All udev Devices...
[ 15.161368] systemd[1]: Started Start psplash boot splash screen.
[ OK ] Started Start psplash boot splash screen.
[ 15.197743] systemd[1]: Started RPC Bind.
[ 15.201950] audit: type=1130 audit(1616581519.900:2): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=psplash-start comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Started RPC Bind.
[ 15.245072] systemd[1]: Mounted Huge Pages File System.
[ OK ] Mounted Huge Pages F[ 15.260185] audit: type=1130 audit(1616581519.948:3): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=rpcbind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
ile System.
[ 15.293308] systemd[1]: Mounted POSIX Message Queue File System.
[ OK ] Mounted POSIX Message Queue File System.
[ 15.333293] systemd[1]: Mounted Kernel Debug File System.
[ OK ] Mounted Kernel Debug File System.
[ 15.369254] systemd[1]: Mounted Kernel Trace File System.
[ OK ] Mounted Kernel Trace File System.
[ 15.397011] systemd[1]: Mounted Temporary Directory (/tmp).
[ OK ] Mounted Temporary Directory (/tmp).
[ 15.425619] systemd[1]: modprobe@configfs.service: Succeeded.
[ 15.441010] systemd[1]: Finished Load Kernel Module configfs.
[ OK ] Finished Load Kernel Module configfs.
[ 15.469800] systemd[1]: modprobe@drm.service: Succeeded.
[ 15.475363] audit: type=1130 audit(1616581520.172:4): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=modprobe@configfs comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 15.501106] systemd[1]: Finished Load Kernel Module drm.
[ OK 15.513497] audit: type=1131 audit(1616581520.172:5): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=modprobe@configfs comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
m] Finished Load Kernel Module drm.
[ 15.549097] systemd[1]: Started Journal Service.
[ 15.553842] audit: type=1130 audit(1616581520.252:6): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=modprobe@drm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK 15.573232] audit: type=1131 audit(1616581520.252:7): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=modprobe@drm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
m] Started Journal Service.
[ 15.608314] audit: type=1130 audit(1616581520.308:8): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journald comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Finished Load Kernel Module fuse.
[ OK 15.646580] audit: type=1130 audit(1616581520.348:9): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=modprobe@fuse comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
m] Finished 15.666977] audit: type=1131 audit(1616581520.348:10): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=modprobe@fuse comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
1;39mFile System Check on Root Device.
[ OK 15.701912] audit: type=1130 audit(1616581520.404:11): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-fsck-root comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
m] Mounted NFSD configuration filesystem.
[ OK ] Finished Apply Kernel Variables.
Mounting Kernel Configuration File System...
[ OK ] Started Start psplash-syst…progress communication helper.
Starting Remount Root and Kernel File Systems...
[ OK ] Mounted Kernel Configuration File System.
[ 15.895183] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[ OK ] Finished Remount Root and Kernel File Systems.
Starting Flush Journal to Persistent Storage...
Starting Create Static Device Nodes in /dev...
[ 15.996449] systemd-journald[1005]: Received client request to flush runtime journal.
[ OK ] Finished Flush Journal to Persistent Storage.
[ OK ] Finished Create Static Device Nodes in /dev.
[ OK ] Reached target Local File Systems (Pre).
Mounting /var/volatile...
Starting Rule-based Manage…for Device Events and Files...
[ OK ] Mounted /var/volatile.
Starting Load/Save Random Seed...
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Finished Coldplug All udev Devices.
[ OK ] Started Rule-based Manager for Device Events and Files.
[ OK ] Finished Create Volatile Files and Directories.
Starting Network Time Synchronization...
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Finished Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target Sound Card.
[ OK ] Reached target Syste[ 18.059977] random: crng init done
m Initialization[ 18.064012] random: 7 urandom warning(s) missed due to ratelimiting
.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Reached target System Time Set.
[ OK ] Reached target System Time Synchronized.
[ OK ] Reached target Timers.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Listening on dropbear.socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
[ OK ] Started Kernel Logging Service.
[ OK ] Started System Logging Service.
[ OK ] Started D-Bus System Message Bus.
Starting IPv6 Packet Filtering Framework...
Starting IPv4 Packet Filtering Framework...
Starting User Login Management...
[ OK ] Finished Load/Save Random Seed.
[ OK ] Finished IPv6 Packet Filtering Framework.
[ OK ] Finished IPv4 Packet Filtering Framework.
[ OK ] Reached target Network (Pre).
Starting Connection service...
Starting Network Service...
[ OK ] Started User Login Management.
[ OK ] Started Connection service.
[ OK ] Started Network Service.
[ OK ] Reached target Network.
[ OK 18.966472] Generic PHY stmmac-0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
m] Started NFS status monitor for NFSv2/3 locking..
[ 19.008056] stmmaceth 16020000.ethernet eth0: No Safety Features support found
[ OK ] Started Respond to IPv6 Node Information Queries.
[ 19.027351] stmmaceth 16020000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
Starting /etc/rc.local Compatibility...
[ 19.083113] stmmaceth 16020000.ethernet eth0: registered PTP clock
[ OK ] Started Network Router Discovery Daemon.
[ 19.135040] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Starting Permit User Sessions...
[ 19.160159] aic8800_bsp: loading out-of-tree module taints kernel.
[ 19.259503] aicbsp_init
[ 19.262081] RELEASE_DATE:2024_0327_3561b08f
[ 19.266390] aicbsp_resv_mem_init
[ OK ] Finished Permit User Sessions.
Starting Hostname Service...
[ OK ] Started Hostname Service.
[ 20.553690] kauditd_printk_skb: 24 callbacks suppressed
[ 20.553697] audit: type=1130 audit(1616581525.256:36): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 20.586400] aicbsp: aicbsp_set_subsys, subsys: AIC_WIFI, state to: 1
[ 20.592859] aicbsp: aicbsp_set_subsys, power state change to 1 dure to AIC_WIFI
[ 20.600185] aicbsp: aicbsp_platform_power_on
[ 20.638246] aicbsp: aicbsp_sdio_probe:1 vid:0xC8A1 did:0x0082
[ 20.646567] aicbsp: aicbsp_sdio_probe:2 vid:0xC8A1 did:0x0182
[ 20.652482] aicbsp: aicbsp_sdio_probe after replace:1
[ 20.659740] AICWFDBG(LOGINFO) aicwf_sdio_chipmatch USE AIC8800D80
[ 20.666019] aicbsp: aicbsp_get_feature, set FEATURE_SDIO_CLOCK 150 MHz
[ 20.672553] aicbsp: aicwf_sdio_reg_init
[ 20.683016] AICWFDBG(LOGINFO) aicbsp: aicbsp_driver_fw_init, chip rev: 7
[ 20.689970] rwnx_load_firmware :firmware path = /vendor/etc/firmware/fw_patch_table_8800d80_u02.bin
[ 20.705272] file md5:0c9bf9c9c10f7a90a22a4c35fa58c967
[ 20.710540] rwnx_plat_bin_fw_upload_android
[ 20.715742] rwnx_load_firmware :firmware path = /vendor/etc/firmware/fw_adid_8800d80_u02.bin
[ 20.725399] file md5:f546881a81b960d89a672578eb45a809
[ 20.748037] rwnx_plat_bin_fw_upload_android
[ 20.752270] rwnx_load_firmware :firmware path = /vendor/etc/firmware/fw_patch_8800d80_u02.bin
[ 20.763114] file md5:35d137b8a76daaeb4f5034df8e15bcde
[ 21.172027] aicbt_patch_table_load bt btmode[3]:5
[ 21.176933] aicbt_patch_table_load bt uart_baud[3]:115200
[ 21.182527] aicbt_patch_table_load bt uart_flowctrl[3]:0
[ 21.188017] aicbt_patch_table_load bt lpm_enable[3]:0
[ 21.193245] aicbt_patch_table_load bt tx_pwr[3]:28463
[ 21.328024] aicbsp: bt patch version: - Mar 07 2024 14:29:05 - git f94a3e4
[ 21.335021] rwnx_plat_bin_fw_upload_android
[ 21.340339] rwnx_load_firmware :firmware path = /vendor/etc/firmware/fmacfw_8800d80_u02.bin
[ 21.363855] file md5:13e6f0e58aae342d260d8672ab61c31f
[ 22.700031] rd_version_val=06090101
[ 22.768262] aicbsp: aicbsp_get_feature, set FEATURE_SDIO_CLOCK 150 MHz
[ 22.774822] aicsdio: aicwf_sdio_reg_init
[ 22.786161] aicbsp: aicbsp_resv_mem_alloc_skb, alloc resv_mem_txdata succuss, id: 0, size: 98304
[ 22.795508] aicbsp: aicbsp_get_feature, set FEATURE_SDIO_CLOCK 150 MHz
[ 22.803507] AICWFDBG(LOGINFO) aicwf_prealloc_txq_alloc size is diff will to be kzalloc
[ 22.811661] aicbsp: sdio_err:<aicwf_sdio_bus_pwrctl,1380>: bus down
[* [ 22.819376] AICWFDBG(LOGINFO) aicwf_prealloc_txq_alloc txq kzalloc successful
] A start job is running for /etc/rc.local Compatibility (8s / no limit)
[ 22.844574] AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_42
[ 22.850455] AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_58
[ 22.856327] AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_106
[ 22.862264] AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_122
[ 22.868199] AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_138
[** ] A start job is running for /etc/rc.local Compatibility (9s / no limit)
[ 23.520044] ieee80211 phy0: HT supp 1, VHT supp 1, HE supp 1
[ 23.540873] ieee80211 phy0:
[ 23.540873] *******************************************************
[ 23.540873] ** CAUTION: USING PERMISSIVE CUSTOM REGULATORY RULES **
Stopping Connection service...
Starting Network Name Resolution...
[ OK ] Stopped Connection service.
[ 26.817156] audit: type=1131 audit(1616581531.520:37): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=connman comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Started Network Name Resolution.
[ 26.997264] audit: type=1130 audit(1616581531.700:38): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-resolved comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Started /etc/rc.local Compatibility.
[ 29.710560] audit: type=1130 audit(1616581534.412:39): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=rc-local comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Started Getty on tty1.
[ 29.761766] audit: type=1130 audit(1616581534.460:40): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ OK ] Started Serial Getty on ttyS0.
[ OK 29.804362] audit: type=1130 audit(1616581534.504:41): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=serial-getty@ttyS0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
m] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes...
[ 29.898042] audit: type=1129 audit(1616581534.600:42): pid=1854 uid=0 auid=4294967295 ses=4294967295 msg='old-level=N new-level=3 comm="systemd-update-utmp" exe="/usr/lib/systemd/systemd-update-utmp" hostname=? addr=? terminal=? res=success'
[ OK ] Finished Update UTMP about System Runlevel Changes.
[ 29.957677] audit: type=1130 audit(1616581534.652:43): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-update-utmp-runlevel comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 29.992600] audit: type=1131 audit(1616581534.652:44): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-update-utmp-runlevel comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
.--.
| |
| | .------. .------. .------. .------.
| | | | | | | | | |
| ------. | | | | | | '------|
'--------' '------' '------' ' ' |
------'
The LoongOS Distribution LoongOS ttyS0
LoongOS v0.1 - Kernel
LoongOS login: [ 50.606131] audit: type=1131 audit(1616581555.308:45): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
1.2 刷写uboot
uboot烧写参考资料:
龙芯2K300-99派更新u-boot固件:《https://www.bilibili.com/video/BV1FTqPYLER2?vd_source=9e5530c6fa951aaadc66d0d7b35a6103》;
久久派新世界系统烧录:《https://www.bilibili.com/video/BV12tsJeXEWK?vd_source=9e5530c6fa951aaadc66d0d7b35a6103 》。
1.2.1 搭建tftp服务器
由于我们要通过PMON中更新PMON固件,首先需要在我们的ubuntu虚拟机搭建一个tftp服务器,具体可以参考《嵌入式Linux开发环境搭建》,这里我在/opt 目录下创建一个子目录tftpboot;
zhengyang@ubuntu:/opt$ sudo mkdir tftpboot
zhengyang@ubuntu:/opt$ sudo chmod 0777 tftpboot
并按照教程中进行搭建tftp服务器,我们需要将我们的固件u-boot-with-spl.bin放在这个目录下;
zhengyang@ubuntu:/opt$ cp /opt/2k0300/build-2k0300/workspace/u-boot/u-boot-with-spl.bin ./tftpboot/
1.2.2 进入PMON命令行
给久久派复位上电,疯狂按c进入进入PMON命令行模式;
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Ŀ
▒ Boot Menu List ▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Ĵ
▒ -> 1 'LoongOS (2k300)' ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ Please Select Boot Menu [1] ▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Use the UP and DOWN keys to select the entry.
Press ENTER to boot selected OS.
Press 'c' to command-line.
Booting system in [3] second(s)
PMON>
直到出现 PMON> 提示符,首先给开发板配置一个与tftp服务器同网段的IP地址:
PMON> ifaddr syn0 172.23.34.188
bootp=f00b740
synopGMAC_linux_open called
Version = 0x1137
MacAddr = 0x0 0x55 0x7b 0xb5 0x7d 0xf7
===phy HALFDUPLEX MODE
DMA status reg = 0x0 before cleared!
DMA status reg = 0x0 after cleared!
register poll interrupt: gmac 0
==arp_ifinit done
===phy FULLDUPLEX MODE
Link is with 1000M Speed
把IP设置为172.23.34.188 ,这样开发板 (172.23.34.188) 和ubuntu虚拟机 (172.23.34.187) 就在同一个网段上,可以开始传文件刷机了;
PMON> ping 172.23.34.187
PING 172.23.34.187 (172.23.34.187): 56 data bytes
64 bytes from 172.23.34.187: icmp_seq=0 ttl=64 time=9.343 ms
64 bytes from 172.23.34.187: icmp_seq=1 ttl=64 time=1.292 ms
64 bytes from 172.23.34.187: icmp_seq=2 ttl=64 time=1.328 ms
64 bytes from 172.23.34.187: icmp_seq=3 ttl=64 time=1.724 ms
--- 172.23.34.187 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.292/3.410/9.343 ms
1.2.3 烧录
从tftp服务器下载指定的固件文件(u-boot-with-spl.bin),并直接将其烧录到当前开发板的引导闪存SPI Nor Flash的起始位置:
PMON> fload tftp://172.23.34.187/u-boot-with-spl.bin
Loading file: tftp://172.23.34.187/u-boot-with-spl.bin dl_offset 900000000f800000 addr 900000000f800000
(bin) |
Loaded 940877 bytes
Programming flash 900000000f800000:e5b4d into 800000001c000000
Erase end! -Programming end!
PMON>
此过程中,务必保持板卡通电,严禁断电。耐心等待加载及烧录完成,直至界面依次出现Erase end!、Programming end!,且PMON命令行再次出现,即表示PMON烧录完成。
给久久派复位上电,等待终端出现大大的LOONGSON和=>字样说明更新uboot固件成功;
LoongArch Initializing ...
RAM(Cache AS RAM) Initializing ...
Lock Scache Done.
Copy spl code to locked scache...
Jump to board_init_f...
_ __ __ _ _ ___ ___ __ _ _ / ___ __ \
| | | | | |\ | | __ [__ | | |\ | | | __ | \ |
|___ |__| |__| | \| |__] ___] |__| | \| \ |__] |__/ /
============ddr4 init and training done!========
Trying to boot from BootSpace
U-boot start ...
Jump to board_init_f...
U-Boot 2022.04-g96038f5a (Mar 20 2026 - 16:36:39 +0800)
CPU: LA264
Speed: Cpu @ 1000 MHz/ Mem @ 800 MHz/ Bus @ 200 MHz
Model: loongson-2k300
Board: LS2K300-99PI-WIFI
DRAM: 512 MiB
512 MiB
Jump to board_init_r....
Core: 36 devices, 20 uclasses, devicetree: board
WDT: Not starting watchdog_d
SF: Detected xt25f08 with page size 256 Bytes, erase size 4 KiB, total 1 MiB
use the default bdinfo
bdinfo is default
MMC: emmc@0x16140000: 0 (eMMC)
Loading Environment from SPIFlash... *** Warning - bad CRC, using default environment
frame buffer addr: 0x900000000dc00000
In: serial
Out: serial
Err: serial vidconsole
Net: eth0: ethernet@0x16020000
************************** Notice **************************
Press c to enter u-boot console, m to enter boot menu
************************************************************
Bus ehci@0x16080000: USB EHCI 1.00
Bus ohci@0x16088000: USB OHCI 1.0
Bus otg@0x16040000: dwc2_usb otg@0x16040000: Core Release: 2.93a
USB DWC2
scanning bus ehci@0x16080000 for devices... 1 USB Device(s) found
scanning bus ohci@0x16088000 for devices... 1 USB Device(s) found
scanning bus otg@0x16040000 for devices... 1 USB Device(s) found
init ls_trigger_boot and set it default value
init ls_trigger_u_kernel and set it default value
init ls_trigger_u_rootfs and set it default value
init ls_trigger_u_uboot and set it default value
init ls_trigger_ab_sys_status and set it default value
init ls_trigger_mac_sync and set it default value
Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
OK
Autoboot in 0 seconds
SF: Detected xt25f08 with page size 256 Bytes, erase size 4 KiB, total 1 MiB
device 0 offset 0xf0000, size 0xd000
SF: 53248 bytes @ 0xf0000 Read: OK
Failed to load '/boot/uImage'
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Bootcmd="setenv bootargs ${bootargs} root=/dev/mmcblk0p${syspart} mtdparts=${mtdparts} fbcon=rotate:${rotate} panel=${panel};sf probe;sf read ${fdt_addr} dtb;ext4load mmc 0:${syspart} ${loadaddr} /boot/uImage;bootm"
Boot Kernel failed. Kernel not found or bad.
=>
1.3 uboot测试
uboot启动后无法正确引导内核的,此时会进入uboot命令行模式,支持许多命令,有兴趣可以查看《Rockchip RK3399 - TPL/SPL方式加载uboot》。
1.3.1 查看板子信息
查看板子信息:
=> bdinfo
boot_params = 0x900000000cc12210
DRAM bank = 0x0000000000000000
-> start = 0x9000000000000000
-> size = 0x0000000010000000
DRAM bank = 0x0000000000000001
-> start = 0x9000000090000000
-> size = 0x0000000010000000
flashstart = 0x0000000000000000
flashsize = 0x0000000000000000
flashoffset = 0x0000000000000000
baudrate = 115200 bps
relocaddr = 0x900000000dc00000
reloc off = 0x0000000000000000
Build = 64-bit
current eth = ethernet@0x16020000
ethaddr = d6:ec:6f:2f:22:c4
IP addr = 192.168.1.20
fdt_blob = 0x900000000ecc7600
new_fdt = 0x900000000cbf9c10
fdt_size = 0x00000000000021c0
Video = dvo@0 active
FB base = 0x900000000dc00000
FB size = 1024x600x32
lmb_dump_all:
memory.cnt = 0x2
memory[0] [0x9000000000000000-0x900000000fffffff], 0x10000000 bytes flags: 0
memory[1] [0x9000000090000000-0x900000009fffffff], 0x10000000 bytes flags: 0
reserved.cnt = 0x2
reserved[0] [0x900000000cbf67c0-0x900000000ebfffff], 0x02009840 bytes flags: 0
reserved[1] [0x900000000f000000-0x900000000fffffff], 0x01000000 bytes flags: 4
devicetree = board
1.3.2 查看环境变量
查看环境变量:
=> printenv
baudrate=115200
bootargs=console=ttyS0,115200 rw noinitrd init=/sbin/init rootfstype=ext4 rootwait
bootcmd=setenv bootargs ${bootargs} root=/dev/mmcblk0p${syspart} mtdparts=${mtdparts} fbcon=rotate:${rotate} panel=${panel};sf probe;sf read ${fdt_addr} dtb;ext4load mmc 0:${syspart} ${loadaddr} /boot/uImage;bootm
bootdelay=0
bootmenu_0=System boot select=updatemenu bootselect 1
bootmenu_1=Update kernel=updatemenu kernel 1
bootmenu_2=Update rootfs=updatemenu rootfs 1
bootmenu_3=Update u-boot=updatemenu uboot 1
bootmenu_4=Update dtb=updatemenu dtb 1
bootmenu_5=Update ALL=updatemenu all 1
bootmenu_6=System install or recover=updatemenu system 1
bootmenu_7=Video resolution select=updatemenu resolution 1
bootmenu_8=Video rotation select=updatemenu rotation 1
bootmenu_delay=10
eth1addr=2e:67:a7:f6:8a:89
ethaddr=d6:ec:6f:2f:22:c4
fdt_addr=0x900000000a000000
fdt_size=0xE000
fdtcontroladdr=900000000ecc7600
ipaddr=192.168.1.20
loadaddr=0x9000000003000000
ls_trigger_ab_sys_status=0
ls_trigger_boot=0
ls_trigger_mac_sync=0
ls_trigger_u_kernel=0
ls_trigger_u_rootfs=0
ls_trigger_u_uboot=0
menucmd=bootmenu
mtdids=nor0=spi0.0
mtdparts=spi0.0:924k(uboot),32k(uboot_env),4k(bdinfo),52k(dtb),4k(bdinfo_e),8k(ddr_context)
nand_pagesize=2048
netmask=255.255.255.0
panel=default
rd_size=0x2000000
rd_start=0x9000000007000000
rotate=0
serverip=192.168.1.2
splashimage=0x9000000003000000
splashpos=m,m
stderr=serial,vidconsole,vidconsole1
stdin=serial,,usbkbd
stdout=serial,vidconsole,vidconsole1
syspart=1
syspart_ch=0
syspart_last=4
ver=U-Boot 2022.04-g96038f5a (Mar 20 2026 - 16:36:39 +0800)
Environment size: 1587/16380 bytes
重点关注:
bootargs:启动参数为console=ttyS0,115200 rw noinitrd init=/sbin/init rootfstype=ext4 rootwait;
bootcmd:启动命令为setenv bootargs ${bootargs} root=/dev/mmcblk0p${syspart} mtdparts=${mtdparts} fbcon=rotate:${rotate} panel=${panel};sf probe;sf read ${fdt_addr} dtb;ext4load mmc 0:${syspart} ${loadaddr} /boot/uImage;bootm,这个我们在前面已经介绍过;
syspart:系统分为1;
fdt_addr:设备树加载地址为0x900000000a000000;
loadaddr:内核加载地址为0x9000000003000000;
mtdparts:板载的SPI Nor Flash分区信息为spi0.0:924k(uboot),32k(uboot_env),4k(bdinfo),52k(dtb),4k(bdinfo_e),8k(ddr_context)。
1.3.3 mmc命令测试
在命令行输入mmc list命令用于来查看当前开发板一共有几个MMC设备:
=> mmc list
emmc@0x16140000: 0 (eMMC)
因为久久派只有一个eMMC,并且大小为8G,编号是 mmc 0,编号是mmc 0。
需要查看eMMC信息,运行如下命令:
=> mmc info
Device: emmc@0x16140000
Manufacturer ID: d6
OEM: 3
Name: 08A391 → 芯片型号
Bus Speed: 52000000 → 速率 52MHz
Mode: MMC High Speed (52MHz) → 高速模式
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit → 8位数据线(速度快)
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
可以使用命令mmc part来查看其分区,比如查看eMMC的分区情况,输入如下命令:
=> mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 16 15269872 00000000-01 83
只有1个分区,整个Linux系统都在mmcblk0p1。
1.3.4 sf
用于操作SPI Flash的命令集,支持探测、擦除、读写SPI NOR Flash芯片,是嵌入式开发中烧录固件、更新uboot、操作环境变量分区的核心工具;
子命令
语法
作用
probe
sf probe
初始化 SPI 控制器并探测 Flash 芯片。在使用任何其他 sf 命令前必须先执行,以检测 Flash 是否存在并获取其大小、型号等信息。
read
sf read <内存地址> <Flash偏移> <长度>
将 Flash 中指定偏移和长度的数据读入内存指定地址。
write
sf write <内存地址> <Flash偏移> <长度>
将内存中的数据写入 Flash 指定偏移(必须先擦除)。
erase
sf erase <Flash偏移> <长度>
擦除 Flash 指定区域(以扇区为单位)。擦除后区域变为 0xFF。
update
sf update <内存地址> <Flash偏移> <长度>
比较内存和 Flash 内容,仅更新不同的部分(节省时间)。常用于升级固件。
test
sf test <Flash偏移> <长度>
对 Flash 区域进行读写测试,用于验证硬件是否正常。
初始化SPI初始化SPI控制器并探测Flash芯片控制器并探测Flash芯片
=> sf probe
SF: Detected xt25f08 with page size 256 Bytes, erase size 4 KiB, total 1 MiB
在进行读、写、擦除时,如果已配置mtdparts,可以直接用分区名代替偏移和长度,比如:
=> sf read ${fdt_addr} dtb # 从 dtb 分区读取设备树
1.3.5 mtdparts
mtdparts 是用于管理MTD分区表的命令。它可以为为SPI Nor Flash、Nand Flash等MTD设备定义逻辑分区,之后就可以用分区名来替代具体的偏移地址和长度,让操作更直观、更安全。
命令
说明
mtdparts
列出当前所有 MTD 设备及其分区
mtdparts default
恢复默认分区表(由 CONFIG_MTDPARTS_DEFAULT 定义)
mtdparts add <设备名> <分区列表>
动态添加或修改分区(例如 mtdparts add nor0 1m(data))
mtdparts del <设备名>
删除该设备的所有分区定义
