zoukankan      html  css  js  c++  java
  • 交叉编译Python-2.7.13到ARM(aarch32)平台

    作者:彭东林

    邮箱:pengdonglin137@163.com

    QQ:405728433

    环境

    主机: ubuntu14.04 64bit

    开发板: qemu + vexpress-a9 (参考: http://www.cnblogs.com/pengdonglin137/p/6442583.html

    工具链: arm-none-linux-gnueabi-gcc  (gcc version 4.8.3 20140320)

    Python版本: Python-2.7.13

    参考

    http://www.41443.com/HTML/Python/20151105/414154.html

    http://www.cnblogs.com/tolimit/p/4519838.html?utm_source=tuicool&utm_medium=referral

    正文

    1、下载解压python源码

    https://www.python.org/downloads/下载最新的python2系列的软件,这里我用的是Python-2.7.13

    1 #解压
    2 tar -xf Python-2.7.13.tar.xz
    3 
    4 #创建python2_7_13_for_x86_64
    5 mkdir python2_7_13_for_x86_64
    6 
    7 #创建python2_7_13_for_arm
    8 mkdir python2_7_13_for_arm

    2、编译x86_64版本的python软件

    我把编译过程写成了脚本, 进入python2_7_13_for_x86_64/目录,然后执行如下脚本:

    • 配置 mk1_conf.sh

    1 #!/bin/bash
    2 
    3 ../Python-2.7.13/configure --prefix=`pwd`
    • 编译mk2_make.sh

    1 #!/bin/bash
    2 
    3 make -j4
    • 安装 mk3_install.sh

    1 #!/bin/bash
    2 
    3 make install

    3、交叉编译

    交叉编译的第一步是为python源码打上交叉编译用的patch:Python-2.7.13-compile.patch.tar.gz

    1 cd Python-2.7.13/
    2 patch -p1 < ../python2_7_13_for_arm/Python-2.7.13-xcompile.patch

    我也把编译过程放到脚本,也分为三个:

    • 配置 mk1_conf.sh

    1 #!/bin/bash
    2 export PATH=/home/pengdonglin/src/qemu/aarch32/arm-2014.05/bin:$PATH
    3 ../Python-2.7.13/configure --prefix=`pwd` 
    4     --host=arm-none-linux-gnueabi 
    5     --build=x86_64-linux-gnu 
    6     --enable-ipv6 
    7     --enable-shared 
    8     ac_cv_file__dev_ptmx="yes" 
    9     ac_cv_file__dev_ptc="no"
    • 编译 mk2_make.sh

     1 #!/bin/bash
     2 export PATH=/home/pengdonglin/src/qemu/aarch32/arm-2014.05/bin:$PATH
     3 make HOSTPYTHON=../python2_7_13_for_x86_64/python 
     4     HOSTPGEN=../python2_7_13_for_x86_64/Parser/pgen 
     5     BLDSHARED="arm-none-linux-gnueabi-gcc -shared" 
     6     CROSS_COMPILE=arm-none-linux-gnueabi- 
     7     CROSS_COMPILE_TARGET=yes 
     8     HOSTARCH=arm-none-linux-gnueabi 
     9     BUILDARCH=x86_64-linux-gnu 
    10     -j4
    • 安装 mk3_install.sh

    1 #!/bin/bash
    2 export PATH=/home/pengdonglin/src/qemu/aarch32/arm-2014.05/bin:$PATH
    3 make install HOSTPYTHON=../python2_7_13_for_x86_64/python 
    4     BLDSHARED="arm-none-linux-gnueabi-gcc -shared" 
    5     CROSS_COMPILE=arm-none-linux-gnueabi- 
    6     CROSS_COMPILE_TARGET=yes 
    7     prefix=`pwd`

    4、重新制作ramdisk镜像

    参考博文:用Qemu搭建aarch32学习环境

    修改mk_ramdisk.sh如下:

     1 #!/bin/bash
     2 sudo rm -rf rootfs
     3 sudo rm -rf tmpfs
     4 sudo rm -rf ramdisk*
     5 sudo mkdir rootfs
     6 sudo cp ../busybox-1.24.2/_install/*  rootfs/ -raf
     7 sudo mkdir -p rootfs/proc/
     8 sudo mkdir -p rootfs/sys/
     9 sudo mkdir -p rootfs/tmp/
    10 sudo mkdir -p rootfs/root/
    11 sudo mkdir -p rootfs/var/
    12 sudo mkdir -p rootfs/mnt/
    13 sudo cp etc rootfs/ -arf
    14 sudo cp -arf ../arm-2014.05/arm-none-linux-gnueabi/libc/lib rootfs/
    15 sudo rm -rf rootfs/lib/*.a
    16 sudo /home/pengdonglin/src/qemu/aarch32/arm-2014.05/bin/arm-none-linux-gnueabi-strip rootfs/lib/*
    17 # 拷贝python相关的文件到根文件系统中
    18 sudo mkdir -p rootfs/usr
    19 pushd rootfs/usr
    20 sudo cp  -raf /home/pengdonglin/src/qemu/python_cross_compile/python2_7_13_for_arm/lib .
    21 sudo cp  -raf /home/pengdonglin/src/qemu/python_cross_compile/python2_7_13_for_arm/include .
    22 sudo cp  -raf /home/pengdonglin/src/qemu/python_cross_compile/python2_7_13_for_arm/bin .
    23 sudo cp  -raf /home/pengdonglin/src/qemu/python_cross_compile/python2_7_13_for_arm/share .
    24 sudo /home/pengdonglin/src/qemu/aarch32/arm-2014.05/bin/arm-none-linux-gnueabi-strip lib/python*
    25 popd
    26 sudo mkdir -p rootfs/dev/
    27 sudo mknod rootfs/dev/tty1 c 4 1
    28 sudo mknod rootfs/dev/tty2 c 4 2
    29 sudo mknod rootfs/dev/tty3 c 4 3
    30 sudo mknod rootfs/dev/tty4 c 4 4
    31 sudo mknod rootfs/dev/console c 5 1
    32 sudo mknod rootfs/dev/null c 1 3
    33 sudo mkdir -p rootfs/lib/modules/4.10.0+
    34 sudo mkdir -p rootfs/tools
    35 sudo cp ./other_tools/* rootfs/tools
    36 # 将ramdisk的大小扩展为100MB
    37 sudo dd if=/dev/zero of=ramdisk bs=1M count=100
    38 sudo mkfs.ext4 -F ramdisk
    39 sudo mkdir -p tmpfs
    40 sudo mount -t ext4 ramdisk ./tmpfs/  -o loop
    41 sudo cp -raf rootfs/*  tmpfs/
    42 sudo umount tmpfs
    43 sudo gzip --best -c ramdisk > ramdisk.gz
    44 sudo mkimage -n "ramdisk" -A arm -O linux -T ramdisk -C gzip -d ramdisk.gz ramdisk.img

    这里需要注意:

    1、将刚才交叉编译python所得的文件拷贝到rootfs/usr下面: bin、lib、include和share

    2、由于Python的lib目录占用了很大空间,有70MB左右,所以这里我们把ramdisk的大小设置为100MB

    3、此外,qemu-system-arm运行的,可以给-m设置较大的物理内存,这里我设置的是1GB

    5、修改kernel配置

    修改ramdisk的大小设置, 这里我设置的是100MB:

    1 Device Drivers  ---> 
    2 
    3         [*] Block devices  --->
    4 
    5                 (102400) Default RAM disk size (kbytes) 

    6、测试

    制作好ramdisk以及编译出新的kernel后,运行系统:

     1 sudo qemu-system-arm 
     2     -M vexpress-a9 
     3     -m 1024M 
     4     -smp 2 
     5     -kernel ./linux-4.10/out_aarch32/arch/arm/boot/zImage 
     6     -nographic 
     7     -append "root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc ignore_loglevel" 
     8     -initrd ./rootfs/ramdisk.img 
     9     -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 
    10     -dtb ./linux-4.10/out_aarch32/arch/arm/boot/dts/vexpress-v2p-ca9.dtb
    下面是启动log:
      1 $./run.sh 
      2 sudo tunctl -u root -t tap0
      3 TUNSETIFF: Device or resource busy
      4 sudo ifconfig tap0 0.0.0.0 promisc up
      5 sudo brctl addif br0 tap0
      6 brctl show
      7 bridge name    bridge id        STP enabled    interfaces
      8 br0        8000.480fcf3ace87    no        eth0
      9                             tap0
     10 docker0        8000.02423772cc85    no        
     11 [    0.000000] Booting Linux on physical CPU 0x0
     12 [    0.000000] Linux version 4.10.0+ (pengdonglin@pengdonglin-HP) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #10 SMP Mon Mar 20 11:31:00 CST 2017
     13 [    0.000000] CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
     14 [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
     15 [    0.000000] OF: fdt:Machine model: V2P-CA9
     16 [    0.000000] debug: ignoring loglevel setting.
     17 [    0.000000] Memory policy: Data cache writealloc
     18 [    0.000000] On node 0 totalpages: 262144
     19 [    0.000000] free_area_init_node: node 0, pgdat c0a637c0, node_mem_map ef7fa000
     20 [    0.000000]   Normal zone: 1536 pages used for memmap
     21 [    0.000000]   Normal zone: 0 pages reserved
     22 [    0.000000]   Normal zone: 196608 pages, LIFO batch:31
     23 [    0.000000]   HighMem zone: 65536 pages, LIFO batch:15
     24 [    0.000000] percpu: Embedded 14 pages/cpu @ef7b5000 s27648 r8192 d21504 u57344
     25 [    0.000000] pcpu-alloc: s27648 r8192 d21504 u57344 alloc=14*4096
     26 [    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
     27 [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608
     28 [    0.000000] Kernel command line: root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc ignore_loglevel
     29 [    0.000000] log_buf_len individual max cpu contribution: 4096 bytes
     30 [    0.000000] log_buf_len total cpu_extra contributions: 12288 bytes
     31 [    0.000000] log_buf_len min size: 16384 bytes
     32 [    0.000000] log_buf_len: 32768 bytes
     33 [    0.000000] early log buf free: 14860(90%)
     34 [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
     35 [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
     36 [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
     37 [    0.000000] Memory: 1007212K/1048576K available (6144K kernel code, 453K rwdata, 1440K rodata, 1024K init, 191K bss, 41364K reserved, 0K cma-reserved, 262144K highmem)
     38 [    0.000000] Virtual kernel memory layout:
     39 [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
     40 [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
     41 [    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
     42 [    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
     43 [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
     44 [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
     45 [    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
     46 [    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
     47 [    0.000000]       .data : 0xc0a00000 - 0xc0a71784   ( 454 kB)
     48 [    0.000000]        .bss : 0xc0a73000 - 0xc0aa2c4c   ( 192 kB)
     49 [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
     50 [    0.000000] Hierarchical RCU implementation.
     51 [    0.000000]     Build-time adjustment of leaf fanout to 32.
     52 [    0.000000]     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
     53 [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=4
     54 [    0.000000] NR_IRQS:16 nr_irqs:16 16
     55 [    0.000000] L2C: platform modifies aux control register: 0x02020000 -> 0x02420000
     56 [    0.000000] L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000
     57 [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
     58 [    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
     59 [    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
     60 [    0.000000] L2C-310 cache controller enabled, 8 ways, 128 kB
     61 [    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46420001
     62 [    0.000000] smp_twd: clock not found -2
     63 [    0.000206] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
     64 [    0.002899] clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
     65 [    0.003447] Failed to initialize '/smb@04000000/motherboard/iofpga@7,00000000/timer@12000': -22
     66 [    0.006792] Console: colour dummy device 80x30
     67 [    0.007168] Calibrating local timer... 94.56MHz.
     68 [    0.063191] Calibrating delay loop... 869.99 BogoMIPS (lpj=4349952)
     69 [    0.148244] pid_max: default: 32768 minimum: 301
     70 [    0.149235] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
     71 [    0.149279] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
     72 [    0.158258] CPU: Testing write buffer coherency: ok
     73 [    0.158718] ftrace: allocating 20771 entries in 61 pages
     74 [    0.580570] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
     75 [    0.584830] Setting up static identity map for 0x60100000 - 0x60100058
     76 [    0.591663] smp: Bringing up secondary CPUs ...
     77 [    0.677810] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
     78 [    1.623456] CPU2: failed to boot: -38
     79 [    2.569146] CPU3: failed to boot: -38
     80 [    2.569341] smp: Brought up 1 node, 2 CPUs
     81 [    2.569417] SMP: Total of 2 processors activated (1739.98 BogoMIPS).
     82 [    2.569500] CPU: All CPU(s) started in SVC mode.
     83 [    2.599822] devtmpfs: initialized
     84 [    2.617472] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
     85 [    2.631508] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
     86 [    2.632028] futex hash table entries: 1024 (order: 4, 65536 bytes)
     87 [    2.671232] NET: Registered protocol family 16
     88 [    2.675992] DMA: preallocated 256 KiB pool for atomic coherent allocations
     89 [    2.853307] cpuidle: using governor ladder
     90 [    2.853708] hw-breakpoint: debug architecture 0x4 unsupported.
     91 [    2.854172] Serial: AMBA PL011 UART driver
     92 [    2.860429] OF: amba_device_add() failed (-19) for /memory-controller@100e0000
     93 [    2.862876] OF: amba_device_add() failed (-19) for /memory-controller@100e1000
     94 [    2.863329] OF: amba_device_add() failed (-19) for /watchdog@100e5000
     95 [    2.865275] irq: type mismatch, failed to map hwirq-75 for /interrupt-controller@1e001000!
     96 [    2.877129] 10009000.uart: ttyAMA0 at MMIO 0x10009000 (irq = 38, base_baud = 0) is a PL011 rev1
     97 [    2.889012] console [ttyAMA0] enabled
     98 [    2.893012] 1000a000.uart: ttyAMA1 at MMIO 0x1000a000 (irq = 39, base_baud = 0) is a PL011 rev1
     99 [    2.895140] 1000b000.uart: ttyAMA2 at MMIO 0x1000b000 (irq = 40, base_baud = 0) is a PL011 rev1
    100 [    2.896620] 1000c000.uart: ttyAMA3 at MMIO 0x1000c000 (irq = 41, base_baud = 0) is a PL011 rev1
    101 [    2.897695] OF: amba_device_add() failed (-19) for /smb@04000000/motherboard/iofpga@7,00000000/wdt@0f000
    102 [    2.979213] SCSI subsystem initialized
    103 [    2.980067] libata version 3.00 loaded.
    104 [    2.981102] usbcore: registered new interface driver usbfs
    105 [    2.981415] usbcore: registered new interface driver hub
    106 [    2.981690] usbcore: registered new device driver usb
    107 [    2.988362] Advanced Linux Sound Architecture Driver Initialized.
    108 [    3.011566] clocksource: Switched to clocksource arm,sp804
    109 [    3.159190] NET: Registered protocol family 2
    110 [    3.164055] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    111 [    3.164307] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    112 [    3.164553] TCP: Hash tables configured (established 8192 bind 8192)
    113 [    3.166386] UDP hash table entries: 512 (order: 2, 16384 bytes)
    114 [    3.166801] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    115 [    3.167985] NET: Registered protocol family 1
    116 [    3.171676] RPC: Registered named UNIX socket transport module.
    117 [    3.171948] RPC: Registered udp transport module.
    118 [    3.172020] RPC: Registered tcp transport module.
    119 [    3.172115] RPC: Registered tcp NFSv4.1 backchannel transport module.
    120 [    3.177825] Trying to unpack rootfs image as initramfs...
    121 [    3.184610] rootfs image is not initramfs (no cpio magic); looks like an initrd
    122 [    3.416590] Freeing initrd memory: 22120K
    123 [    3.420686] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 1 counters available
    124 [    3.430377] workingset: timestamp_bits=30 max_order=18 bucket_order=0
    125 [    3.457911] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    126 [    3.463134] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    127 [    3.464581] 9p: Installing v9fs 9p2000 file system support
    128 [    3.470989] bounce: pool size: 64 pages
    129 [    3.471215] io scheduler noop registered (default)
    130 [    3.475569] clcd-pl11x 10020000.clcd: PL111 designer 41 rev2 at 0x10020000
    131 [    3.483346] clcd-pl11x 10020000.clcd: /clcd@10020000 hardware, 1024x768@59 display
    132 [    3.602322] Console: switching to colour frame buffer device 128x48
    133 [    3.617254] clcd-pl11x 1001f000.clcd: PL111 designer 41 rev2 at 0x1001f000
    134 [    3.619006] clcd-pl11x 1001f000.clcd: /smb@04000000/motherboard/iofpga@7,00000000/clcd@1f000 hardware, 640x480@59 display
    135 [    3.984710] brd: module loaded
    136 [    3.991353] 40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
    137 [    3.991791] Intel/Sharp Extended Query Table at 0x0031
    138 [    3.992447] Using buffer write method
    139 [    3.992792] erase region 0: offset=0x0,size=0x80000,blocks=128
    140 [    3.994929] 40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
    141 [    3.995125] Intel/Sharp Extended Query Table at 0x0031
    142 [    3.995600] Using buffer write method
    143 [    3.995708] erase region 0: offset=0x0,size=0x80000,blocks=128
    144 [    3.995876] Concatenating MTD devices:
    145 [    3.995986] (0): "40000000.flash"
    146 [    3.996076] (1): "40000000.flash"
    147 [    3.996153] into device "40000000.flash"
    148 [    4.011057] libphy: Fixed MDIO Bus: probed
    149 [    4.068484] libphy: smsc911x-mdio: probed
    150 [    4.071230] smsc911x 4e000000.ethernet eth0: MAC Address: 52:54:00:12:34:56
    151 [    4.179313] isp1760 4f000000.usb: bus  32, oc: digital
    152 [    4.181070] isp1760 4f000000.usb: NXP ISP1760 USB Host Controller
    153 [    4.181548] isp1760 4f000000.usb: new USB bus registered, assigned bus number 1
    154 [    4.182418] isp1760 4f000000.usb: Scratch test failed.
    155 [    4.182705] isp1760 4f000000.usb: can't setup: -19
    156 [    4.183183] isp1760 4f000000.usb: USB bus 1 deregistered
    157 [    4.185634] usbcore: registered new interface driver usb-storage
    158 [    4.192487] mousedev: PS/2 mouse device common for all mice
    159 [    4.201100] rtc-pl031 10017000.rtc: rtc core: registered pl031 as rtc0
    160 [    4.216680] mmci-pl18x 10005000.mmci: Got CD GPIO
    161 [    4.216979] mmci-pl18x 10005000.mmci: Got WP GPIO
    162 [    4.218707] mmci-pl18x 10005000.mmci: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 34,35 (pio)
    163 [    4.272360] ledtrig-cpu: registered to indicate activity on CPUs
    164 [    4.279939] usbcore: registered new interface driver usbhid
    165 [    4.280124] usbhid: USB HID core driver
    166 [    4.321426] input: AT Raw Set 2 keyboard as /devices/platform/smb@04000000/smb@04000000:motherboard/smb@04000000:motherboard:iofpga@7,00000000/10006000.kmi/serio0/input/input0
    167 [    4.326835] aaci-pl041 10004000.aaci: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 33
    168 [    4.326992] aaci-pl041 10004000.aaci: FIFO 512 entries
    169 [    4.327894] oprofile: using arm/armv7-ca9
    170 [    4.331342] NET: Registered protocol family 17
    171 [    4.331955] 9pnet: Installing 9P2000 support
    172 [    4.332582] Registering SWP/SWPB emulation handler
    173 [    4.348427] rtc-pl031 10017000.rtc: setting system clock to 2017-03-20 03:31:48 UTC (1489980708)
    174 [    4.349574] ALSA device list:
    175 [    4.349669]   #0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 33
    176 [    4.999294] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/smb@04000000/smb@04000000:motherboard/smb@04000000:motherboard:iofpga@7,00000000/10007000.kmi/serio1/input/input2
    177 [    5.014045] RAMDISK: gzip image found at block 0
    178 [   11.157823] EXT4-fs (ram0): mounted filesystem with ordered data mode. Opts: (null)
    179 [   11.158866] VFS: Mounted root (ext4 filesystem) on device 1:0.
    180 [   11.189561] Freeing unused kernel memory: 1024K
    181 [   12.209586] Generic PHY 4e000000.etherne:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4e000000.etherne:01, irq=-1)
    182 [   12.236870] smsc911x 4e000000.ethernet eth0: SMSC911x/921x identified at 0xf1420000, IRQ: 31
    183 Please press Enter to activate this console. 
    184 [root@vexpress ]# 
    185 [root@vexpress ]# [   31.810292] random: fast init done
    186 [root@vexpress ]# 
    187 [root@vexpress ]# 
    188 [root@vexpress ]# python
    189 Python 2.7.13 (default, Mar 20 2017, 11:20:45) 
    190 [GCC 4.8.3 20140320 (prerelease)] on linux2
    191 Type "help", "copyright", "credits" or "license" for more information.
    192 >>> for i in range(100): print "hello world"
    193 ... 
    194 hello world
    195 hello world
    196 hello world
    197 hello world
    198 hello world
    199 hello world
    200 hello world
    201 hello world
    202 hello world
    203 hello world
    204 hello world
    205 hello world
    206 hello world
    207 hello world
    208 hello world
    209 hello world
    210 hello world
    211 hello world
    212 hello world
    213 hello world
    214 hello world
    215 hello world
    216 hello world
    217 hello world
    218 hello world
    219 hello world
    220 hello world
    221 hello world
    222 hello world
    223 hello world
    224 hello world
    225 hello world
    226 hello world
    227 hello world
    228 hello world
    229 hello world
    230 hello world
    231 hello world
    232 hello world
    233 hello world
    234 hello world
    235 hello world
    236 hello world
    237 hello world
    238 hello world
    239 hello world
    240 hello world
    241 hello world
    242 hello world
    243 hello world
    244 hello world
    245 hello world
    246 hello world
    247 hello world
    248 hello world
    249 hello world
    250 hello world
    251 hello world
    252 hello world
    253 hello world
    254 hello world
    255 hello world
    256 hello world
    257 hello world
    258 hello world
    259 hello world
    260 hello world
    261 hello world
    262 hello world
    263 hello world
    264 hello world
    265 hello world
    266 hello world
    267 hello world
    268 hello world
    269 hello world
    270 hello world
    271 hello world
    272 hello world
    273 hello world
    274 hello world
    275 hello world
    276 hello world
    277 hello world
    278 hello world
    279 hello world
    280 hello world
    281 hello world
    282 hello world
    283 hello world
    284 hello world
    285 hello world
    286 hello world
    287 hello world
    288 hello world
    289 hello world
    290 hello world
    291 hello world
    292 hello world
    293 hello world
    294 >>> [  236.572628] random: crng init done

    完。

  • 相关阅读:
    eclipse中误删tomcat后,文件都报错,恢复server时无法选择tomcat7.0解决办法
    java web多组件协作实现用户登录验证
    设计模式--享元模式
    设计模式--中介者模式
    设计模式--职责链模式
    设计模式--观察者模式与命令模式
    设计模式--桥接模式
    设计模式--迭代器模式
    设计模式--组合模式
    设计模式--备忘录模式
  • 原文地址:https://www.cnblogs.com/pengdonglin137/p/6588253.html
Copyright © 2011-2022 走看看