移植Python3到TQ2440(一)

平台

硬件:TQ2440  64MB内存 256MB NandFlash
bootloader:U-Boot 2015.04
kernel:linux-4.9
Python: Python-3.6.0
工具链:arm-none-linux-gnueabi-gcc  4.8.3

概述

现在树莓派很火,在树莓派上面用户可以通过Python来控制板子上面的GPIO资源, 然后我想TQ2440也应该做到这一点。 将来根文件系统会通过NFS的方式挂载到开发板上面。

正文

一、工具链

登录这个网址:http://www.veryarm.com/arm-none-linux-gnueabi-gcc

我们这里使用的是最新的Linux解压版:arm-2014.05-29,由于TQ2440用的arm9属于armv4t架构,所以在编译运行于TQ2440上的程序的时候需要给工具链传递参数-march=armv4t,为了简单起见,我们可以用下面的办法:

 1 ( pengdl@ubuntu | ~/Study/cross_compile/arm-2014.05/bin | Remote:True )
 2 $ls -l
 3 total 22581248
 4 lrwxrwxrwx 1 pengdl pengdl      32 Apr 19 19:53 arm-linux-addr2line -> arm-none-linux-gnueabi-addr2line*
 5 lrwxrwxrwx 1 pengdl pengdl      25 Apr 19 19:54 arm-linux-ar -> arm-none-linux-gnueabi-ar*
 6 lrwxrwxrwx 1 pengdl pengdl      25 Apr 19 19:54 arm-linux-as -> arm-none-linux-gnueabi-as*
 7 lrwxrwxrwx 1 pengdl pengdl      26 Apr 19 19:54 arm-linux-c++ -> arm-none-linux-gnueabi-c++*
 8 lrwxrwxrwx 1 pengdl pengdl      30 Apr 19 19:54 arm-linux-c++filt -> arm-none-linux-gnueabi-c++filt*
 9 lrwxrwxrwx 1 pengdl pengdl      26 Apr 19 19:54 arm-linux-cpp -> arm-none-linux-gnueabi-cpp*
10 lrwxrwxrwx 1 pengdl pengdl      25 Apr 19 19:55 arm-linux-cs -> arm-none-linux-gnueabi-cs*
11 lrwxrwxrwx 1 pengdl pengdl      32 Apr 19 19:55 arm-linux-cs-daemon -> arm-none-linux-gnueabi-cs-daemon*
12 lrwxrwxrwx 1 pengdl pengdl      30 Apr 19 19:55 arm-linux-elfedit -> arm-none-linux-gnueabi-elfedit*
13 -rwxrwxr-x 1 pengdl pengdl      57 Apr 19 20:00 arm-linux-g++*
14 -rwxrwxr-x 1 pengdl pengdl      57 Apr 19 20:06 arm-linux-gcc*
15 -rwxrwxr-x 1 pengdl pengdl      63 Apr 19 20:02 arm-linux-gcc-4.8.3*
16 lrwxrwxrwx 1 pengdl pengdl      29 Apr 19 19:56 arm-linux-gcc-ar -> arm-none-linux-gnueabi-gcc-ar*
17 lrwxrwxrwx 1 pengdl pengdl      29 Apr 19 19:56 arm-linux-gcc-nm -> arm-none-linux-gnueabi-gcc-nm*
18 lrwxrwxrwx 1 pengdl pengdl      33 Apr 19 19:57 arm-linux-gcc-ranlib -> arm-none-linux-gnueabi-gcc-ranlib*
19 lrwxrwxrwx 1 pengdl pengdl      27 Apr 19 19:57 arm-linux-gcov -> arm-none-linux-gnueabi-gcov*
20 lrwxrwxrwx 1 pengdl pengdl      26 Apr 19 19:57 arm-linux-gdb -> arm-none-linux-gnueabi-gdb*
21 lrwxrwxrwx 1 pengdl pengdl      28 Apr 19 19:57 arm-linux-gprof -> arm-none-linux-gnueabi-gprof*
22 lrwxrwxrwx 1 pengdl pengdl      25 Apr 19 19:57 arm-linux-ld -> arm-none-linux-gnueabi-ld*
23 lrwxrwxrwx 1 pengdl pengdl      25 Apr 19 19:58 arm-linux-nm -> arm-none-linux-gnueabi-nm*
24 lrwxrwxrwx 1 pengdl pengdl      30 Apr 19 19:58 arm-linux-objcopy -> arm-none-linux-gnueabi-objcopy*
25 lrwxrwxrwx 1 pengdl pengdl      30 Apr 19 19:58 arm-linux-objdump -> arm-none-linux-gnueabi-objdump*
26 lrwxrwxrwx 1 pengdl pengdl      29 Apr 19 19:58 arm-linux-ranlib -> arm-none-linux-gnueabi-ranlib*
27 lrwxrwxrwx 1 pengdl pengdl      30 Apr 19 19:58 arm-linux-readelf -> arm-none-linux-gnueabi-readelf*
28 lrwxrwxrwx 1 pengdl pengdl      27 Apr 19 19:58 arm-linux-size -> arm-none-linux-gnueabi-size*
29 lrwxrwxrwx 1 pengdl pengdl      30 Apr 19 19:58 arm-linux-strings -> arm-none-linux-gnueabi-strings*
30 lrwxrwxrwx 1 pengdl pengdl      28 Apr 19 19:58 arm-linux-strip -> arm-none-linux-gnueabi-strip*
31 -rwxr-xr-x 1 pengdl pengdl  736300 May 30  2014 arm-none-linux-gnueabi-addr2line*
32 -rwxr-xr-x 2 pengdl pengdl  763504 May 30  2014 arm-none-linux-gnueabi-ar*
33 -rwxr-xr-x 2 pengdl pengdl 1253360 May 30  2014 arm-none-linux-gnueabi-as*
34 -rwxr-xr-x 2 pengdl pengdl  687056 May 30  2014 arm-none-linux-gnueabi-c++*
35 -rwxr-xr-x 1 pengdl pengdl  734604 May 30  2014 arm-none-linux-gnueabi-c++filt*
36 -rwxr-xr-x 1 pengdl pengdl  686128 May 30  2014 arm-none-linux-gnueabi-cpp*
37 -rwxr-xr-x 1 pengdl pengdl  186548 May 30  2014 arm-none-linux-gnueabi-cs*
38 -rwxr-xr-x 1 pengdl pengdl 2186780 May 30  2014 arm-none-linux-gnueabi-cs-daemon*
39 -rwxr-xr-x 1 pengdl pengdl   24692 May 30  2014 arm-none-linux-gnueabi-elfedit*
40 -rwxr-xr-x 2 pengdl pengdl  687056 May 30  2014 arm-none-linux-gnueabi-g++*
41 -rwxr-xr-x 2 pengdl pengdl  686128 May 30  2014 arm-none-linux-gnueabi-gcc*
42 -rwxr-xr-x 2 pengdl pengdl  686128 May 30  2014 arm-none-linux-gnueabi-gcc-4.8.3*
43 -rwxr-xr-x 1 pengdl pengdl   23608 May 30  2014 arm-none-linux-gnueabi-gcc-ar*
44 -rwxr-xr-x 1 pengdl pengdl   23576 May 30  2014 arm-none-linux-gnueabi-gcc-nm*
45 -rwxr-xr-x 1 pengdl pengdl   23576 May 30  2014 arm-none-linux-gnueabi-gcc-ranlib*
46 -rwxr-xr-x 1 pengdl pengdl  307000 May 30  2014 arm-none-linux-gnueabi-gcov*
47 -rwxr-xr-x 1 pengdl pengdl 4484452 May 30  2014 arm-none-linux-gnueabi-gdb*
48 -rwxr-xr-x 1 pengdl pengdl  805164 May 30  2014 arm-none-linux-gnueabi-gprof*
49 -rwxr-xr-x 2 pengdl pengdl 1200784 May 30  2014 arm-none-linux-gnueabi-ld*
50 -rwxr-xr-x 2 pengdl pengdl  747500 May 30  2014 arm-none-linux-gnueabi-nm*
51 -rwxr-xr-x 2 pengdl pengdl  912812 May 30  2014 arm-none-linux-gnueabi-objcopy*
52 -rwxr-xr-x 2 pengdl pengdl 1109932 May 30  2014 arm-none-linux-gnueabi-objdump*
53 -rwxr-xr-x 2 pengdl pengdl  763504 May 30  2014 arm-none-linux-gnueabi-ranlib*
54 -rwxr-xr-x 1 pengdl pengdl  420160 May 30  2014 arm-none-linux-gnueabi-readelf*
55 -rwxr-xr-x 1 pengdl pengdl  737260 May 30  2014 arm-none-linux-gnueabi-size*
56 -rwxr-xr-x 1 pengdl pengdl  736332 May 30  2014 arm-none-linux-gnueabi-strings*
57 -rwxr-xr-x 2 pengdl pengdl  912812 May 30  2014 arm-none-linux-gnueabi-strip*
即在原来的工具链上面做一些软连接,对arm-linux-gcc/g++/gcc-4.8.3做一些特殊处理:
 1 $cat arm-linux-gcc
 2 #!/bin/bash
 3 arm-none-linux-gnueabi-gcc -march=armv4t $*
 4 
 5 $cat arm-linux-g++
 6 #!/bin/bash
 7 arm-none-linux-gnueabi-g++ -march=armv4t $*
 8 
 9 $cat arm-linux-gcc-4.8.3 
10 #!/bin/bash
11 arm-none-linux-gnueabi-gcc-4.8.3 -march=armv4t $*

此外, 还需要注意的是, 将来在制作用于TQ2440的根文件系统的时候拷贝的工具链的lib库的位置:

arm-2014.05/arm-none-linux-gnueabi/libc/armv4t/lib

而不是:

arm-2014.05/arm-none-linux-gnueabi/libc/lib

这个用于高于armv4t架构的平台,如exynos4412用的是armv7架构。

二、Bootloader

使用的uboot可以到https://github.com/pengdonglin137/u-boot下载,可以参考:

u-boot-2015.04 在tq2440上的移植(使用spl引导u-boot)

将来的分区稍有变化:

1MB  SPL    
1MB UBOOT    

1MB PARAMS    

5MB KERNEL    
1MB DTB247MB ROOTFS
由于将来采用NFS挂载根文件系统启动的方式,下面是bootargs以及bootcmd:

bootargs:

noinitrd root=/dev/nfs rw nfsroot=192.168.1.101:/nfsroot/rootfs ethmac=1C:6F:65:34:51:7E ip=192.168.1.6:192.168.1.101:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0,115200n

这里板子的IP是192.168.1.6,HOST的IP是192.168.1.101, 当然由于采用了设备树的方式, 所以也可以不在uboot里设置bootargs,而是放到设备树的chosen节点当中。

bootcmd:
nand read 0x300080000x3000000x500000; nand read 0x320000000x8000000x100000; bootm 0x30008000-0x32000000
这里会了加快启动速度, 提前把uImage和dtb文件少些到的nandflash中, 关于在tq2440上面支持dtb,请参考  讓TQ2440也用上設備樹(1)

三、kernel

可以到https://github.com/pengdonglin137/linux-4.9下载,tq2440_dt分支, 使用方法参考 讓TQ2440也用上設備樹(1)

烧写kernel和dtb到nand中:

 1 烧写kernel:
 2 mw.b 0x30008000 0xff 0x500000
 3 tftp 0x30008000 uImage
 4 nand erase 0x300000 0x500000
 5 nand write 0x30008000 0x300000 0x500000
 6 
 7 烧写dtb:
 8 mw.b 0x30008000 0xff 0x100000
 9 tftp 0x30008000 dtb
10 nand erase 0x800000 0x100000
11 nand write 0x30008000 0x800000 0x100000

四、Python

参考 

交叉编译Python-2.7.13到ARM(aarch32)平台
交叉编译Python-2.7.13到ARM(aarch32)—— 支持sqlite3
交叉编译Python-3.6.0到aarch64/aarch32 —— 支持sqlite3
由于上面两篇博文采用的是qemu模拟的cortex-a9平台,属于armv7架构,而我们的tq2440是armv4架构,所以需要做一些修改。
  • SQlite

 1 #!/bin/bash
 2 
 3 ../sqlite-autoconf-3170000/configure --host=arm-none-linux-gnueabi \
 4         --prefix=`pwd` \
 5         CFLAGS="-march=armv4t" \
 6         CPPFLAGS="-march=armv4t" \
 7         LDFLAGS="-march=armv4t"
 8 
 9 make -j4
10 make install
  • Readline

 1 #!/bin/bash
 2 
 3 ../readline-7.0/configure --host=arm-none-linux-gnueabi \
 4         --prefix=`pwd` \
 5         CFLAGS="-march=armv4t" \
 6         CPPFLAGS="-march=armv4t" \
 7         LDFlAGS="-march=armv4t"
 8 
 9 make -j4
10 make install
  • Termcap

配置:
1 #!/bin/bash
2 
3 ../termcap-1.3.1/configure --host=arm-none-linux-gnueabi \
4         --prefix=`pwd`

修改Makefile:

1 CC = arm-none-linux-gnueabi-gcc
2 AR = arm-none-linux-gnueabi-ar
3 RANLIB = arm-none-linux-gnueabi-ranlib
4 ... ...
5 CFLAGS = -g -march=armv4t

然后 make && make install

  • Python3

配置:
 1 #!/bin/bash
 2 
 3 ../Python-3.6.0/configure \
 4         --host=arm-linux \
 5         --build=armv4 \
 6         --prefix=`pwd` \
 7         --enable-ipv6 \
 8         --enable-shared \
 9         ac_cv_file__dev_ptmx="yes" \
10         ac_cv_file__dev_ptc="no" \
11         LDFLAGS="-L/home/pengdl/Study/tq2440/Python/SQlite/tq2440/lib \
12         -L/home/pengdl/Study/tq2440/Python/Readline/tq2440/lib \
13         -L/home/pengdl/Study/tq2440/Python/Termcap/tq2440" \
14         CPPFLAGS="-I/home/pengdl/Study/tq2440/Python/SQlite/tq2440/include \
15         -I/home/pengdl/Study/tq2440/Python/Readline/tq2440/include"

 别忘了修改Modules/Setup文件,然后执行 make && make install即可。

五、根文件系统

参考博客 用Qemu搭建aarch32学习环境
 
下面是制作根文件系统的脚本:
 1 #!/bin/bash
 2 
 3 sudo rm -rf rootfs
 4 sudo rm -rf tmpfs
 5 sudo rm -rf ramdisk*
 6 
 7 sudo mkdir rootfs
 8 sudo cp ../busybox-1.24.2/_install/*  rootfs/ -raf
 9 
10 sudo mkdir -p rootfs/proc/
11 sudo mkdir -p rootfs/sys/
12 sudo mkdir -p rootfs/tmp/
13 sudo mkdir -p rootfs/root/
14 sudo mkdir -p rootfs/var/
15 sudo mkdir -p rootfs/mnt/
16 
17 sudo cp etc rootfs/ -arf
18 sudo mkdir -p rootfs/lib
19 
20 sudo cp -arf /home/pengdl/Study/cross_compile/arm-2014.05/arm-none-linux-gnueabi/libc/armv4t/lib/*.so* rootfs/lib
21 
22 #Python3
23 sudo mkdir -p rootfs/usr
24 pushd rootfs/usr
25 sudo cp  -raf /home/pengdl/Study/tq2440/Python/Python3/tq2440/lib .
26 sudo cp  -raf /home/pengdl/Study/tq2440/Python/Python3/tq2440/include .
27 sudo cp  -raf /home/pengdl/Study/tq2440/Python/Python3/tq2440/bin .
28 sudo cp  -raf /home/pengdl/Study/tq2440/Python/Python3/tq2440/share .
29 sudo arm-none-linux-gnueabi-strip lib/python*
30 popd
31 
32 #sqlite3
33 sudo cp -raf /home/pengdl/Study/tq2440/Python/SQlite/tq2440/bin/* rootfs/bin
34 sudo cp -raf /home/pengdl/Study/tq2440/Python/SQlite/tq2440/include/* rootfs/include
35 sudo cp -raf /home/pengdl/Study/tq2440/Python/SQlite/tq2440/lib/* rootfs/lib
36 sudo cp -raf /home/pengdl/Study/tq2440/Python/SQlite/tq2440/share/* rootfs/usr/share
37 sudo arm-linux-strip rootfs/bin/sqlite3
38 
39 #readline
40 sudo cp -raf /home/pengdl/Study/tq2440/Python/Readline/tq2440/include/* rootfs/include
41 sudo cp -raf /home/pengdl/Study/tq2440/Python/Readline/tq2440/lib/* rootfs/lib
42 
43 sudo rm -f rootfs/lib/libwv* rootfs/lib/libuniconf*
44 sudo rm -f rootfs/lib/*.a
45 sudo rm -f rootfs/lib/*.la
46 sudo arm-none-linux-gnueabi-strip rootfs/lib/*
47 
48 sudo mkdir -p rootfs/dev/
49 sudo mknod rootfs/dev/tty1 c 4 1
50 sudo mknod rootfs/dev/tty2 c 4 2
51 sudo mknod rootfs/dev/tty3 c 4 3
52 sudo mknod rootfs/dev/tty4 c 4 4
53 sudo mknod rootfs/dev/console c 5 1
54 sudo mknod rootfs/dev/null c 1 3
55 
56 sudo rm /nfsroot/rootfs_bak -rf
57 sudo mv /nfsroot/rootfs /nfsroot/rootfs_bak
58 sudo cp ./rootfs /nfsroot/ -raf

其中的etc目录可以到这里下载:http://files.cnblogs.com/files/pengdonglin137/etc.zip

六、测试

  • 启动log

  1 U-Boot 2015.04-g5095150 (Dec 21 2015 - 06:17:05)
  2 CPUID: 32440001
  3 FCLK:      400 MHz
  4 HCLK:      100 MHz
  5 PCLK:       50 MHz
  6 I2C:   ready
  7 DRAM:  64 MiB
  8 WARNING: Caches not enabled
  9 Flash: 0 Bytes
 10 NAND:  256 MiB
 11 In:    serial
 12 Out:   serial
 13 Err:   serial
 14 Net:   dm9000
 15 Hit any key to stop autoboot:  0 
 16 NAND read: device 0 offset 0x300000, size 0x500000
 17  5242880 bytes read: OK
 18 NAND read: device 0 offset 0x800000, size 0x100000
 19  1048576 bytes read: OK
 20 ## Booting kernel from Legacy Image at 30008000 ...
 21    Image Name:   Linux-4.9.0+
 22    Created:      2017-04-19   9:51:19 UTC
 23    Image Type:   ARM Linux Kernel Image (uncompressed)
 24    Data Size:    3503832 Bytes = 3.3 MiB
 25    Load Address: 30008000
 26    Entry Point:  30008000
 27    Verifying Checksum ... OK
 28 ## Flattened Device Tree blob at 32000000
 29    Booting using the fdt blob at 0x32000000
 30    Loading Kernel Image ... OK
 31    Loading Device Tree to 33aa6000, end 33aaa62c ... OK
 32 Starting kernel ...
 33 Uncompressing Linux... done, booting the kernel.
 34 [    0.000000] Booting Linux on physical CPU 0x0
 35 [    0.000000] Linux version 4.9.0+ (pengdl@ubuntu) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #1 Wed Apr 19 02:51:06 PDT 2017
 36 [    0.000000] CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c000717f
 37 [    0.000000] CPU: VIVT data cache, VIVT instruction cache
 38 [    0.000000] OF: fdt:Machine model: TQ2440
 39 [    0.000000] Memory policy: Data cache writeback
 40 [    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
 41 [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
 42 [    0.000000] Kernel command line: noinitrd root=/dev/nfs rw nfsroot=192.168.1.101:/nfsroot/rootfs ethmac=1C:6F:65:34:51:7E ip=192.168.1.6:192.168.1.101:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0,115200n
 43 [    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
 44 [    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
 45 [    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
 46 [    0.000000] Memory: 57900K/65536K available (4729K kernel code, 234K rwdata, 1376K rodata, 204K init, 262K bss, 7636K reserved, 0K cma-reserved)
 47 [    0.000000] Virtual kernel memory layout:
 48 [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
 49 [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
 50 [    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
 51 [    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
 52 [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
 53 [    0.000000]       .text : 0xc0008000 - 0xc04a67f0   (4730 kB)
 54 [    0.000000]       .init : 0xc0627000 - 0xc065a000   ( 204 kB)
 55 [    0.000000]       .data : 0xc065a000 - 0xc0694840   ( 235 kB)
 56 [    0.000000]        .bss : 0xc0694840 - 0xc06d60a8   ( 263 kB)
 57 [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
 58 [    0.000000] NR_IRQS:103
 59 [    0.000000] irq: clearing pending status 00000002
 60 [    0.000000] _get_rate: could not find clock xti
 61 [    0.000131] sched_clock: 16 bits at 1000kHz, resolution 1000ns, wraps every 32767500ns
 62 [    0.000254] clocksource: samsung_clocksource_timer: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 29163075 ns
 63 [    0.001154] Console: colour dummy device 80x30
 64 [    0.001358] Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
 65 [    0.035124] pid_max: default: 32768 minimum: 301
 66 [    0.035715] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
 67 [    0.035803] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
 68 [    0.039125] CPU: Testing write buffer coherency: ok
 69 [    0.041720] Setting up static identity map for 0x30008200 - 0x30008258
 70 [    0.067396] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302231375000 ns
 71 [    0.068020] pinctrl core: initialized pinctrl subsystem
 72 [    0.071279] NET: Registered protocol family 16
 73 [    0.074528] DMA: preallocated 256 KiB pool for atomic coherent allocations
 74 [    0.096698] cpuidle: using governor ladder
 75 [    0.097401] No ATAGs?
 76 [    0.357763] SCSI subsystem initialized
 77 [    0.359225] usbcore: registered new interface driver usbfs
 78 [    0.359894] usbcore: registered new interface driver hub
 79 [    0.360865] usbcore: registered new device driver usb
 80 [    0.364272] Advanced Linux Sound Architecture Driver Initialized.
 81 [    0.395750] clocksource: Switched to clocksource samsung_clocksource_timer
 82 [    0.462505] NET: Registered protocol family 2
 83 [    0.466700] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
 84 [    0.466838] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
 85 [    0.466899] TCP: Hash tables configured (established 1024 bind 1024)
 86 [    0.467514] UDP hash table entries: 256 (order: 0, 4096 bytes)
 87 [    0.467638] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 88 [    0.468746] NET: Registered protocol family 1
 89 [    0.547937] RPC: Registered named UNIX socket transport module.
 90 [    0.548047] RPC: Registered udp transport module.
 91 [    0.548062] RPC: Registered tcp transport module.
 92 [    0.548076] RPC: Registered tcp NFSv4.1 backchannel transport module.
 93 [    0.556526] futex hash table entries: 256 (order: -1, 3072 bytes)
 94 [    0.565590] workingset: timestamp_bits=30 max_order=14 bucket_order=0
 95 [    0.699034] NFS: Registering the id_resolver key type
 96 [    0.699281] Key type id_resolver registered
 97 [    0.699297] Key type id_legacy registered
 98 [    0.699372] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
 99 [    0.699649] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
100 [    0.709262] romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
101 [    0.730545] io scheduler noop registered
102 [    0.730657] io scheduler deadline registered
103 [    0.732323] io scheduler cfq registered (default)
104 [    0.947381] 50000000.serial: ttySAC0 at MMIO 0x50000000 (irq = 32, base_baud = 0) is a S3C2440
105 [    1.387359] random: fast init done
106 [    1.611283] console [ttySAC0] enabled
107 [    1.767633] brd: module loaded
108 [    1.772241] s3c24xx-nand 4e000000.nand: Tacls=1, 10ns Twrph0=3 30ns, Twrph1=1 10ns
109 [    1.774282] s3c24xx-nand 4e000000.nand: NAND ECC disabled
110 [    1.780114] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xda
111 [    1.786112] nand: Samsung NAND 256MiB 3,3V 8-bit
112 [    1.790528] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
113 [    1.798195] nand: NAND_ECC_NONE selected by board driver. This is not recommended!
114 [    1.805811] Scanning device for bad blocks
115 [    1.835095] Bad eraseblock 364 at 0x000002d80000
116 [    1.835485] Bad eraseblock 369 at 0x000002e20000
117 [    1.848196] Bad eraseblock 558 at 0x0000045c0000
118 [    1.884281] Bad eraseblock 1291 at 0x00000a160000
119 [    1.909046] Bad eraseblock 1792 at 0x00000e000000
120 [    1.909215] Bad eraseblock 1793 at 0x00000e020000
121 [    1.925484] Creating 6 MTD partitions on "tq2440-0":
122 [    1.925650] 0x000000000000-0x000000100000 : "SPL"
123 [    1.934143] ftl_cs: FTL header not found.
124 [    1.941575] 0x000000100000-0x000000200000 : "U-BOOT"
125 [    1.949569] ftl_cs: FTL header not found.
126 [    1.954926] 0x000000200000-0x000000300000 : "PARAMS"
127 [    1.963831] ftl_cs: FTL header not found.
128 [    1.969370] 0x000000300000-0x000000600000 : "KERNEL"
129 [    1.978445] ftl_cs: FTL header not found.
130 [    1.984058] 0x000000600000-0x000000700000 : "DTB"
131 [    1.993049] ftl_cs: FTL header not found.
132 [    1.998630] 0x000000700000-0x000010000000 : "ROOTFS"
133 [    2.010883] ftl_cs: FTL header not found.
134 [    2.023036] eth0: dm9000e at c4932000,c4934004 IRQ 7 MAC: 00:00:de:ad:be:ef (platform data)
135 [    2.026768] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
136 [    2.032382] ohci-s3c2410: OHCI S3C2410 driver
137 [    2.039610] s3c2410-ohci 49000000.usb_ohci: OHCI Host Controller
138 [    2.042708] s3c2410-ohci 49000000.usb_ohci: new USB bus registered, assigned bus number 1
139 [    2.051552] s3c2410-ohci 49000000.usb_ohci: irq 26, io mem 0x49000000
140 [    2.124944] hub 1-0:1.0: USB hub found
141 [    2.127292] hub 1-0:1.0: 2 ports detected
142 [    2.133433] usbcore: registered new interface driver usb-storage
143 [    2.136449] mousedev: PS/2 mouse device common for all mice
144 [    2.141909] s3c-rtc 57000000.rtc: rtc disabled, re-enabling
145 [    2.145961] rtc rtc0: alarm rollover not handled
146 [    2.149532] rtc rtc0: invalid alarm value: 1900-2-1 0:0:0
147 [    2.156227] s3c-rtc 57000000.rtc: rtc core: registered s3c as rtc0
148 [    2.162236] i2c /dev entries driver
149 [    2.168574] s3c2410-wdt 53000000.watchdog: watchdog inactive, reset disabled, irq disabled
150 [    2.175323] sdhci: Secure Digital Host Controller Interface driver
151 [    2.178802] sdhci: Copyright(c) Pierre Ossman
152 [    2.185919] hidraw: raw HID events driver (C) Jiri Kosina
153 [    2.197719] usbcore: registered new interface driver usbhid
154 [    2.197849] usbhid: USB HID core driver
155 [    2.206738] NET: Registered protocol family 17
156 [    2.207505] Key type dns_resolver registered
157 [    2.272831] s3c-rtc 57000000.rtc: setting system clock to 2000-04-11 20:01:10 UTC (955483270)
158 [    2.305173] dm9000 20000000.ethernet eth0: link down
159 [    4.410138] dm9000 20000000.ethernet eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
160 [    4.412435] IP-Config: Complete:
161 [    4.415784]      device=eth0, hwaddr=00:00:de:ad:be:ef, ipaddr=192.168.1.6, mask=255.255.255.0, gw=192.168.1.1
162 [    4.425577]      host=192.168.1.6, domain=, nis-domain=(none)
163 [    4.431373]      bootserver=192.168.1.101, rootserver=192.168.1.101, rootpath=
164 [    4.439728] ALSA device list:
165 [    4.441430]   No soundcards found.
166 [    4.489327] VFS: Mounted root (nfs filesystem) on device 0:12.
167 [    4.491287] Freeing unused kernel memory: 204K (c0627000 - c065a000)
168 [    4.496048] This architecture does not have kernel memory protection.
169 Please press Enter to activate this console. 
170 [root@tq2440 ]# 
171 [root@tq2440 ]# 
172 [root@tq2440 ]# ls
173 bin      etc      lib      mnt      root     sys      usr
174 dev      include  linuxrc  proc     sbin     tmp      var
  • 测试1

1 [root@tq2440 ]# python3
2 Python 3.6.0 (default, Apr 19 2017, 20:20:18) 
3 [GCC 4.8.3 20140320 (prerelease)] on linux
4 Type "help", "copyright", "credits" or "license" for more information.
5 >>> print("Hello World")
6 Hello World
7 >>> import sqlite3
8 >>> 
  • 测试2

 1 [root@tq2440 ]# python3 /usr/lib/python3.6/test/test___all__.py 
 2 __phello__.foo
 3 _bootlocale
 4 _collections_abc
 5 _compat_pickle
 6 _compression
 7 _dummy_thread
 8 _markupbase
 9 _osx_support
10 ... ...
11 .
12 ----------------------------------------------------------------------
13 Ran 1 test in 97.391s
14 OK

 

转载于:https://www.cnblogs.com/pengdonglin137/p/6740164.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/283814.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

WinForm(六)组合布局属性

WinForm是基于控件的,不像codemark的架构,可以非常灵活的用mark来布局,它只能用控件布局属性和窗口控件来完成对UI的布局。容器控件有一组控件叫容器控件,对布局特别有作用,它们分别是:TableLayoutPanel&am…

Qt 网络编程

QT 网络编程 TCP 编程 模块引入 QT network 头文件 #include <QTcpServer> // TCP服务器端使用 #include <QTcpSocket> // TCP服务器和客户端都使用 编程流程 服务端 1&#xff09;实例化 QTcpServer 对象 -----------------------------> socket 2&#x…

日利率

2019独角兽企业重金招聘Python工程师标准>>> 利率计算 转载于:https://my.oschina.net/u/3342652/blog/1649028

Kafka 安装详解

注意&#xff1a;确保有JDK1.8版本及以上 官方文档&#xff1a;https://kafka.apache.org/quickstart 清华镜像下载&#xff1a;https://mirrors.tuna.tsinghua.edu.cn/apache/kafka/ 首先下载安装包&#xff0c;在linux及Windows都可以使用。 1. Centos 安装部署 1.1 下载 将下…

【Maui正式版】创建可跨平台的Maui程序,以及有关依赖注入、MVVM双向绑定的实现和演示...

前言&#xff1a;Maui终于在2022年8月9日推送出来了。今儿就迫不及待来把玩一下先。A、我本地已有VS2022&#xff0c;不过版本比较老&#xff0c;此处选择更新。工具 -> 获取功能和更新里面&#xff0c;可以获取到新版本更新。B、最新版本是17.3.0&#xff0c;我本地只有17.…

WebSQL存储

2019独角兽企业重金招聘Python工程师标准>>> WebSQL这种存储技术&#xff0c;相对于学过数据库的人来说&#xff0c;还是比较容易理解和上手的&#xff0c;主要就是它的存储风格和我们一般所学的SQL Server 和Oracle比较像&#xff0c;对于HTML5来说&#xff0c;当然…

抖音服务器带宽有多大,才能供上亿人同时刷?

最近看到一个有意思的提问&#xff1a;抖音服务器带宽有多大&#xff0c;为什么能够供那么多人同时刷&#xff1f;今天来给小伙伴们科普一下。 抖音&#xff0c;百度&#xff0c;阿里云&#xff0c;腾讯都是自建的数据中心&#xff0c;都是 T 级别出口带宽&#xff08;总出口带…

ASP.NET Core 5.0中的Host.CreateDefaultBuilder执行过程

通过Rider调试的方式看了下ASP.NET Core 5.0的Web API默认项目&#xff0c;重点关注Host.CreateDefaultBuilder(args)中的执行过程&#xff0c;主要包括主机配置、应用程序配置、日志配置和依赖注入配置这4个部分。由于水平和篇幅有限&#xff0c;先整体理解、建立框架&#xf…

404和302

为什么80%的码农都做不了架构师&#xff1f;>>> 404 php中用header()函数是可以为返回页面添加404的头信息的&#xff0c;从而提示浏览器该网页找不到了。 所以可以使用&#xff1a;header("HTTP/1.0 404 Not Found");或者&#xff1a;header("Stat…

oracle sqlplus使用

2019独角兽企业重金招聘Python工程师标准>>> 1、常用连接方式 sqlplus / as sysdba 无需数据库进入可用状态&#xff0c;就可用用该命令登录&#xff0c;运行startup来启动。 sqlplus username/pwdhost/service_name&#xff0c;如&#xff1a; sqlplus tiger/scott…

20款IDEA 神级插件 效率提升 30 倍,写代码必备

插件目录 1. Alibaba Java Coding Guidelines 2.GsonFormat 3.A8Translation 4.Maven Helper 5.Free Mybatis plugin 6.Grep Console 7.Lombok 8.Nyan progress bar 9.FindBugs-IDEA 10.Key Promoter X 11.JavaDoc 12.ignore 13.RainbowBrackets 14.Activate-power-mode 15.C…

【温故知新】C# Linq中 Where使用技巧

微信公众号&#xff1a;趣编程ACE关注可了解更多的.NET日常实战开发技巧&#xff0c;如需源码 后台回复 源码 即可;如果觉得对你有帮助&#xff0c;欢迎关注C# Linq中 Where使用技巧hello 大家好&#xff0c;很开心又能重新分享C#编程开发技巧了&#xff0c;之前因为工作和生活…

分布式id解决方案

文章目录 1.分布式id实现方案 1.1.uuid1.2 数据库主键自增1.3 Redis自增1.4 号段模式1.5 雪花算法&#xff08;snowflake&#xff09; 1.5.1 百度&#xff08;uid-generator&#xff09;1.5.2 美团&#xff08;Leaf&#xff09;所谓id就是能够用作唯一标识的记号。 在我们日常的…

我和大象的十年往事 - 感恩、感谢、加油、腾飞

背景 http://www.idcquan.com/Special/OSCAR2018/index.html 由中国信息通信研究院主办、中国通信标准化协会支持的"OSCAR云计算开源产业大会"于2018年3月21日&#xff0d;22日在国家会议中心举行。 非常有幸获得了“OSCAR尖峰开源人物”奖项。 奖项不敢自居&#xf…

4种分布式session解决方案

cookie和session的区别和联系 cookie是本地客户端用来存储少量数据信息的&#xff0c;保存在客户端&#xff0c;用户能够很容易的获取&#xff0c;安全性不高&#xff0c;存储的数据量小 session是服务器用来存储部分数据信息&#xff0c;保存在服务器&#xff0c;用户不容易获…

Blazor University (43)JavaScript 互操作 —— 类型安全

原文链接&#xff1a;https://blazor-university.com/javascript-interop/calling-dotnet-from-javascript/type-safety/类型安全在从 JavaScript 调用 .NET[1] 部分中&#xff0c;您可能已经注意到我们的 JavaScript 的第 6 行在将随机生成的数字传递给 .NET 之前调用了 toStr…

分享 60 个神级 VS Code 插件

文章来源&#xff1a;juejin.cn/post/6994327298740600839 本文不做任何编辑器的比较&#xff0c;只是我本人日常使用 vscode 进行开发&#xff0c;并且比较喜欢折腾 vscode &#xff0c;会到处找这一些好玩的插件&#xff0c;于是越攒越多&#xff0c;今天给大家推荐一下我收…

PHP 基础篇 - PHP 中 DES 加解密详解

2019独角兽企业重金招聘Python工程师标准>>> 一、简介 DES 是对称性加密里面常见一种&#xff0c;全称为 Data Encryption Standard&#xff0c;即数据加密标准&#xff0c;是一种使用密钥加密的块算法。密钥长度是64位(bit)&#xff0c;超过位数密钥被忽略。所谓对…

PerfView专题 (第一篇): 如何寻找热点函数

一&#xff1a;背景 准备开个系列来聊一下 PerfView 这款工具&#xff0c;熟悉我的朋友都知道我喜欢用 WinDbg&#xff0c;这东西虽然很牛&#xff0c;但也不是万能的&#xff0c;也有一些场景他解决不了或者很难解决&#xff0c;这时候借助一些其他的工具来辅助&#xff0c;是…

Centos7设置IP为固定值

1.进入到系统的IP地址保存文件所在目录 [rootlocalhost ~]# cd /etc/sysconfig/network-scripts 2.修改保存IP信息的文件 [rootlocalhost ~]# vim ifcfg-eth0 &#xff08;你机器上的名字有可能不是这个&#xff0c;但是是以ifcfg-eth开头的文件&#xff09; 保存后退出 3.重启…