本帖最后由 dirtwillfly 于 2022-4-10 17:02 编辑
4 启动
把TF卡插到哪吒计算条,并连接号usb转ttl模块到pc。
pc打开串口调试工具,我这里用的是xshell。在串口调试工具打开相应的串口,波特率设置为115200,其他配置使用默认的就可以。
然后用type-c数据线供电(或用usb转ttl供5V电),在串口调试工具会输出启动信息:
- [93]HELLO! BOOT0 is starting!
- [96]BOOT0 commit : 27369ab
- OpenSBI v0.6
- ____ _____ ____ _____
- / __ \ / ____| _ \_ _|
- | | | |_ __ ___ _ __ | (___ | |_) || |
- | | | | '_ \ / _ \ '_ \ \___ \| _ < | |
- | |__| | |_) | __/ | | |____) | |_) || |_
- \____/| .__/ \___|_| |_|_____/|____/_____|
- | |
- |_|
- Platform Name : T-HEAD Xuantie Platform
- Platform HART Features : RV64ACDFIMSUVX
- Platform Max HARTs : 1
- Current Hart : 0
- Firmware Base : 0x40000400
- Firmware Size : 75 KB
- Runtime SBI Version : 0.2
- MIDELEG : 0x0000000000000222
- MEDELEG : 0x000000000000b1ff
- PMP0 : 0x0000000040000000-0x000000004001ffff (A)
- PMP1 : 0x0000000040000000-0x000000007fffffff (A,R,W,X)
- PMP2 : 0x0000000080000000-0x00000000bfffffff (A,R,W,X)
- PMP3 : 0x0000000000020000-0x0000000000027fff (A,?
- U-Boot 2018.05-g0a88ac9-dirty-config-dirty (Dec 14 2021 - 18:32:11 +0800) Allwinner Technology
- [00.232]DRAM: 512 MiB
- [00.234]Relocation Offset is: 1df30000
- [00.238]secure enable bit: 0
- [00.241]CPU=1008 MHz(1008),PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
- [00.248]flash init start
- [00.250]workmode = 0,storage type = 1
- [00.253][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1
- [00.259][mmc]: get sdc_type fail and use default host:tm1.
- [00.265][mmc]: can't find node "mmc0",will add new node
- [00.270][mmc]: fdt err returned <no error>
- [00.274][mmc]: Using default timing para
- [00.278][mmc]: SUNXI SDMMC Controller Version:0x50310
- [00.296][mmc]: card_caps:0x3000000a
- [00.299][mmc]: host_caps:0x3000003f
- [00.302]sunxi flash init ok
- [00.305]line:714 init_clocks
- __clk_init: clk pll_periph0x2 already initialized
- register fix_factor clk error
- [00.327]Loading Environment from SUNXI_FLASH... OK
- [00.347]out of usb burn from boot: not need burn key
- root_partition is rootfs
- set root to /dev/mmcblk0p7
- [00.358]update part info
- [00.361]update bootcmd
- [00.365]change working_fdt 0x5eaefda8 to 0x5eacfda8
- [00.384]update dts
- Hit any key to stop autoboot: 0
- Android's image name: d1-nezha
- No reserved memory region found in source FDT
- [00.817]
- Starting kernel ...
- [00.820][mmc]: MMC Device 2 not found
- [00.824][mmc]: mmc 2 not find, so not exit
- Welcome to Debian GNU/Linux 11 (bullseye)!
- [ OK ] Created slice system-getty.slice.
- [ OK ] Created slice system-modprobe.slice.
- [ OK ] Created slice system-serial\x2dgetty.slice.
- [ OK ] Created slice User and Session Slice.
- [ OK ] Started Forward Password R…uests to Wall Directory Watch.
- [ OK ] Reached target Remote File Systems.
- [ OK ] Reached target Slices.
- [ OK ] Reached target Swap.
- [ OK ] Listening on Syslog Socket.
- [ OK ] Listening on fsck to fsckd communication Socket.
- [ OK ] Listening on initctl Compatibility Named Pipe.
- [ OK ] Listening on Journal Socket (/dev/log).
- [ OK ] Listening on Journal Socket.
- [ OK ] Listening on udev Control Socket.
- [ OK ] Listening on udev Kernel Socket.
- Mounting Kernel Debug File System...
- Starting Create list of st…odes for the current kernel...
- Starting Load Kernel Module configfs...
- Starting Load Kernel Module drm...
- Starting Load Kernel Module fuse...
- Starting File System Check on Root Device...
- Starting Journal Service...
- Starting Load Kernel Modules...
- Starting Coldplug All udev Devices...
- [ OK ] Mounted Kernel Debug File System.
- [ OK ] Finished Create list of st… nodes for the current kernel.
- [ OK ] Finished Load Kernel Module configfs.
- [ OK ] Finished Load Kernel Module drm.
- [ OK ] Finished Load Kernel Module fuse.
- Mounting FUSE Control File System...
- Mounting Kernel Configuration File System...
- [ OK ] Started File System Check Daemon to report status.
- [ OK ] Finished File System Check on Root Device.
- [ OK ] Mounted FUSE Control File System.
- [ OK ] Mounted Kernel Configuration File System.
- Starting Remount Root and Kernel File Systems...
- [ OK ] Started Journal Service.
- [ OK ] Finished Remount Root and Kernel File Systems.
- Starting Flush Journal to Persistent Storage...
- Starting Load/Save Random Seed...
- Starting Create System Users...
- [FAILED] Failed to start Load Kernel Modules.
- See 'systemctl status systemd-modules-load.service' for details.
- Starting Apply Kernel Variables...
- [ OK ] Finished Create System Users.
- Starting Create Static Device Nodes in /dev...
- [ OK ] Finished Apply Kernel Variables.
- [ OK ] Finished Flush Journal to Persistent Storage.
- [ OK ] Finished Create Static Device Nodes in /dev.
- [ OK ] Reached target Local File Systems (Pre).
- [ OK ] Reached target Local File Systems.
- Starting Tell Plymouth To Write Out Runtime Data...
- Starting Create Volatile Files and Directories...
- Starting Rule-based Manage…for Device Events and Files...
- [ OK ] Finished Tell Plymouth To Write Out Runtime Data.
- [ 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 Rule-based Manager for Device Events and Files.
- [ OK ] Finished Coldplug All udev Devices.
- Starting Helper to synchronize boot up for ifupdown...
- Starting Show Plymouth Boot Screen...
- [ OK ] Started Show Plymouth Boot Screen.
- [ OK ] Started Forward Password R…s to Plymouth Directory Watch.
- [ OK ] Reached target Local Encrypted Volumes.
- [ OK ] Reached target Paths.
- [ OK ] Started Network Time Synchronization.
- [ OK ] Reached target System Initialization.
- [ OK ] Started Daily Cleanup of Temporary Directories.
- [ OK ] Reached target System Time Set.
- [ OK ] Reached target System Time Synchronized.
- [ OK ] Started Daily apt download activities.
- [ OK ] Started Daily apt upgrade and clean activities.
- [ OK ] Started Periodic ext4 Onli…ata Check for All Filesystems.
- [ OK ] Started Discard unused blocks once a week.
- [ OK ] Started Daily rotation of log files.
- [ OK ] Started Daily man-db regeneration.
- [ OK ] Reached target Timers.
- [ OK ] Listening on D-Bus System Message Bus Socket.
- [ OK ] Reached target Sockets.
- [ OK ] Reached target Basic System.
- [ OK ] Started Regular background program processing daemon.
- [ OK ] Started D-Bus System Message Bus.
- Starting Connection service...
- Starting DUN service...
- Starting Remove Stale Onli…t4 Metadata Check Snapshots...
- Starting Telephony service...
- Starting System Logging Service...
- Starting User Login Management...
- Starting LSB: Start busybox udhcpd at boot time...
- Starting Disk Manager...
- Starting WPA supplicant...
- [ OK ] Started System Logging Service.
- [ OK ] Finished Load/Save Random Seed.
- [ OK ] Started LSB: Start busybox udhcpd at boot time.
- [ OK ] Found device /dev/ttyS0.
- [ OK ] Started DUN service.
- [ OK ] Finished Helper to synchronize boot up for ifupdown.
- [ OK ] Started Telephony service.
- [FAILED] Failed to start Remove Sta…ext4 Metadata Check Snapshots.
- See 'systemctl status e2scrub_reap.service' for details.
- [ OK ] Started WPA supplicant.
- [ OK ] Started Connection service.
- [ OK ] Started User Login Management.
- [ OK ] Reached target Hardware activated USB gadget.
- [ OK ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
- Starting Save/Restore Sound Card State...
- Starting Raise network interfaces...
- Starting Authorization Manager...
- Starting Hostname Service...
- [FAILED] Failed to start Hostname Service.
- See 'systemctl status systemd-hostnamed.service' for details.
- Starting Load/Save RF Kill Switch Status...
- [ OK ] Started Authorization Manager.
- [ OK ] Finished Save/Restore Sound Card State.
- [ OK ] Reached target Sound Card.
- [ OK ] Started Load/Save RF Kill Switch Status.
- [ OK ] Started Disk Manager.
- [FAILED] Failed to start Raise network interfaces.
- See 'systemctl status networking.service' for details.
- [ OK ] Reached target Network.
- Starting OpenBSD Secure Shell server...
- Starting Permit User Sessions...
- [ OK ] Finished Permit User Sessions.
- Starting Light Display Manager...
- Starting Hold until boot process finishes up...
- Debian GNU/Linux 11 sipeed ttyS0
- sipeed login:
从启动信息,可以看出整个启动过程,以及相关的信息。先启动了OpenSBI,然后启动uboot,然后kernel。
在uboot阶段,可以看到内存是512MB,CPU主频是1008Mhz。
在开始引导kernel是有这么一句话“Android's image name: d1-nezha”
从这里可以看出这个uboot之前是为一个Android系统设计的,现在被用来引导启动debian。
在linux启动过程有几个错误信息,咱们暂时先不管。
使用账号:sipeed,密码:licheepi登录系统后,出现如下信息:
- sipeed login: sipeed
- Password:
- Linux sipeed 5.4.61 #207 PREEMPT Fri Dec 24 10:07:52 UTC 2021 riscv64
- The programs included with the Debian GNU/Linux system are free software;
- the exact distribution terms for each program are described in the
- individual files in /usr/share/doc/*/copyright.
- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
- permitted by applicable law.
- Last login: Mon May 24 07:08:35 UTC 2021 from 192.168.1.102 on pts/0
- sipeed@sipeed:~$
- Message from syslogd@sipeed at May 24 06:56:47 ...
- kernel:[ 51.835254] Oops [#4]
可以看到这是一个打了PREEMPT补丁的Debian系统。
|