硬件:
- DOPI EV200开发板
- 一张16G的TF卡
- 一条usb线
- 安装好RNIDS驱动,并分配IP地址,详细参考玩转rtsp一文章
上电启动后, 程序从Nand Flash启动后,文件系统制作在TF卡中,debain+jupyter在1.3G左右,整个启动过程在30秒内。
dopi@Dopi:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 1.3G 13G 9% /
devtmpfs 28M 0 28M 0% /dev
tmpfs 29M 0 29M 0% /dev/shm
tmpfs 29M 1.2M 27M 5% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 29M 0 29M 0% /sys/fs/cgroup
dopi@Dopi:~$
开机启动:
启动log:
System startup
Uncompress Ok!
U-Boot 2016.11-dirty (Jul 05 2020 - 22:34:46 +0800)hi3516ev200
Relocation Offset is: 03734000
Relocating to 43f34000, new gd at 43e93ef0, sp at 43e93ed0
SPI Nor: Boot Media isn't SPI Nor
NAND: SPI Nand ID Table Version 2.7
SPI Nand(cs 0) ID: 0xef 0xaa 0x21 Name:"W25N01GV"
Block:128KB Page:2KB OOB:64B ECC:4bit/512
Chipsize:128 MiB
MMC:
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: eth0
Warning: eth0 (eth0) using random MAC address - 7a:fc:90:53:6a:41
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x80000, size 0x500000
5242880 bytes read: OK
## Booting kernel from Legacy Image at 42000000 ...
Image Name: Linux-4.9.37
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3724416 Bytes = 3.6 MiB
Load Address: 40008000
Entry Point: 40008000
Loading Kernel Image ... OK
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 4.9.37 (phoenix@DOPI) (gcc version 6.3.0 (HC&C V100R002C00B032_20190114) ) #345 Sun Jun 21 20:11:02 CST 2020
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: Hisilicon HI3516EV200 DEMO Board
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=tty0 console=ttyAMA0,115200 noinitrd root=/dev/mmcblk0p1 rw rootdelay=2 rootfstype=ext4
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 57344K/65536K available (5506K kernel code, 192K rwdata, 1336K rodata, 188K init, 261K bss, 8192K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0568a20 (5507 kB)
.init : 0xc06b9000 - 0xc06e8000 ( 188 kB)
.data : 0xc06e8000 - 0xc0718320 ( 193 kB)
.bss : 0xc071a000 - 0xc075b768 ( 262 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16 nr_irqs:16 16
Gic dist init...
arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (phys).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
Switching to timer-based delay loop, resolution 20ns
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
console [tty0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=500000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x40008200 - 0x40008258
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
12040000.uart: ttyAMA0 at MMIO 0x12040000 (irq = 21, base_baud = 0) is a PL011 rev2
console [ttyAMA0] enabled
SCSI subsystem initialized
ssp-pl022 12071000.spi: ARM PL022 driver, device ID: 0x00800022
ssp-pl022 12071000.spi: mapped registers from 0x12071000 to c486b000
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Linux video capture interface: v2.00
clocksource: Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=30 max_order=14 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
pl061_gpio 120b0000.gpio_chip: PL061 GPIO chip @0x120b0000 registered
pl061_gpio 120b1000.gpio_chip: PL061 GPIO chip @0x120b1000 registered
pl061_gpio 120b2000.gpio_chip: PL061 GPIO chip @0x120b2000 registered
pl061_gpio 120b4000.gpio_chip: PL061 GPIO chip @0x120b4000 registered
pl061_gpio 120b5000.gpio_chip: PL061 GPIO chip @0x120b5000 registered
pl061_gpio 120b6000.gpio_chip: PL061 GPIO chip @0x120b6000 registered
pl061_gpio 120b7000.gpio_chip: PL061 GPIO chip @0x120b7000 registered
pl061_gpio 120b8000.gpio_chip: PL061 GPIO chip @0x120b8000 registered
brd: module loaded
loop: module loaded
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
hisi-sfc hisi_spi_nor.0: unrecognized Manufacturer ID
hisi-sfc hisi_spi_nor.0: spi nor register fail!
hisi-sfc: probe of hisi_spi_nor.0 failed with error -2
SPI Nand ID Table Version 2.7
SPI Nand(cs 0) ID: 0xef 0xaa 0x21
nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
nand: Winbond W25N01GV
nand: 128MiB, SLC, page size: 2048
Nand(Auto): OOB:64B
ECC:4bit/512 nand: ECC provided by Flash Memory Controller
FEPHY:addr=1, la_am=0xb, ldo_am=0x4, r_tuning=0x1d
libphy: hisi_femac_mii_bus: probed
libphy: Fixed MDIO Bus: probed
Generic PHY 10041100.mdio:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=10041100.mdio:01, irq=-1)
phy_id=0x20669903, phy_mode=mii
hisi-femac 10040000.ethernet: using random MAC address fe:bc:45:c3:5e:35
dwc3 10030000.hidwc3: Configuration mismatch. dr_mode forced to gadget
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
hibvt_rtc 120e0000.rtc: rtc core: registered 120e0000.rtc as rtc0
hibvt_rtc 120e0000.rtc: RTC driver for hibvt enabled
i2c /dev entries driver
hibvt-i2c 12060000.i2c: hibvt-i2c0@100000hz registered
hibvt-i2c 12061000.i2c: hibvt-i2c1@100000hz registered
hibvt-i2c 12062000.i2c: hibvt-i2c2@100000hz registered
uvcvideo: Unable to create debugfs directory
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on 10010000.sdhci [10010000.sdhci] using ADMA in legacy mode
mmc1: SDHCI controller on 10020000.sdhci [10020000.sdhci] using ADMA in legacy mode
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
Key type dns_resolver registered
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SL16G 14.8 GiB
mmcblk0: p1
hibvt_rtc 120e0000.rtc: setting system clock to 1970-01-01 00:00:03 UTC (3)
uart-pl011 12040000.uart: no DMA platform data
Waiting 2 sec before mounting root device...
EXT4-fs (mmcblk0p1): recovery complete
EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:1.
devtmpfs: mounted
Freeing unused kernel memory: 188K (c06b9000 - c06e8000)
This architecture does not have kernel memory protection.
random: fast init done
systemd[1]: System time before build time, advancing clock.
systemd[1]: Failed to insert module 'autofs4': No such file or directory
systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
systemd[1]: Detected architecture arm.
Welcome to Debian GNU/Linux 9 (stretch)!
systemd[1]: Set hostname to <Dopi>.
systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
systemd[1]: Created slice User and Session Slice.
[ OK ] Created slice User and Session Slice.
systemd[1]: Created slice System Slice.
[ OK ] Created slice System Slice.
systemd[1]: Reached target Slices.
[ OK ] Reached target Slices.
systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
systemd[1]: Starting Remount Root and Kernel File Systems...
Starting Remount Root and Kernel File Systems...
Starting Load Kernel Modules...
[ OK ] Reached target Remote File Systems.
Starting Create Static Device Nodes in /dev...
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ OK ] Created slice system-getty.slice.
[ OK ] Listening on udev Control Socket.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Reached target Encrypted Volumes.
[ OK ] Reached target Paths.
[ OK ] Listening on Syslog Socket.
Starting Journal Service...
[ OK ] Started Remount Root and Kernel File Systems.
[ OK ] Started Load Kernel Modules.
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Started Journal Service.
Starting udev Kernel Device Manager...
Mounting Configuration File System...
Starting Apply Kernel Variables...
Starting Load/Save Random Seed...
Starting udev Coldplug all Devices...
Activating swap /swap/swapfile...
Starting Flush Journal to Persistent Storage...
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Reached target Local File Systems.
[ OK ] Mounted Configuration File System.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started Apply Kernel Variables.
[ OK ] Started Load/Save Random Seed.
systemd-journald[705]: Received request to flush runtime journal from PID 1
Starting Raise network interfaces...
[ OK ] Started Flush Journal to Persistent Storage.
Starting Create Volatile Files and Directories...
[FAILED] Failed to start Raise network interfaces.
See 'systemctl status networking.service' for details.
Adding 262140k swap on /swap/swapfile. Priority:-1 extents:2 across:270332k SS
[ OK ] Activated swap /swap/swapfile.
[ OK ] Reached target Swap.
[ OK ] Reached target Network.
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
Starting Network Time Synchronization...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Reached target System Initialization.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Reached target Timers.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting System Logging Service...
[ OK ] Started D-Bus System Message Bus.
Starting vsftpd FTP server...
[ OK ] Started Regular background program processing daemon.
Starting Login Service...
Starting Permit User Sessions...
[ OK ] Started System Logging Service.
[ OK ] Started vsftpd FTP server.
[ OK ] Started Permit User Sessions.
[ OK ] Found device /dev/ttyAMA0.
[ OK ] Started Login Service.
[ OK ] Started Serial Getty on ttyAMA0.
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Update UTMP about System Runlevel Changes.
Debian GNU/Linux 9 Dopi ttyAMA0
Dopi login: root (automatic login)
Last login: Mon Jul 6 14:07:24 UTC 2020 on ttyAMA0
Linux Dopi 4.9.37 #345 Sun Jun 21 20:11:02 CST 2020 armv7l
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.
using random self ethernet address
using random host ethernet address
usb0: HOST MAC a6:6c:5c:31:81:f4
usb0: MAC a2:09:9b:2a:ef:bb
using random self ethernet address
using random host ethernet address
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
process id is empty, process is not existed...
jupyter process will start...
jupyter process has start...
dopi@Dopi:~$ g_ether gadget: high-speed config #2: RNDIS
[W 14:07:38.494 NotebookApp] All authentication is disabled. Anyone who can connect to this server will be able to run code.
[I 14:07:38.613 NotebookApp] Serving notebooks from local directory: /home/dopi
[I 14:07:38.614 NotebookApp] The Jupyter Notebook is running at:
[I 14:07:38.615 NotebookApp] http://Dopi:8888/
[I 14:07:38.616 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
启动jupyter
浏览器输入
jupyter的terminal