1. 程式人生 > >ZYNQ跑系統 系列(二) petalinux方式移植linux

ZYNQ跑系統 系列(二) petalinux方式移植linux

移植linux之petalinux

之前一篇博文中,提到了一種通用的傳統移植方式,將linux移植到ZYNQ中的ARM晶片中。本文將針對xilinx的專用開發環境petalinux,進行入門和開發,本文petalinux的執行環境依然在虛擬機器的linux系統裡,即將體驗petalinux相對於傳統方式的便捷和強大之處

一、安裝petalinux

  • -1.安裝虛擬機器,在虛擬機器裡安裝linux系統(ubuntu16)

    • 虛擬機器裡磁碟儘量留大點,建議60G,我的是80G
    • sudo passwd命令,設定超級使用者su時的密碼
    • 建議安裝VMware Tools
    • 開發工具:vivado2017.1(Windows下) + petalinux 2017.1(Linux下)
  • 0.更新apt-get(可選,加速用,同傳統方式移植那篇文章的第二節)

  • 1.安裝petalinux的依賴環境
    安裝petalinux的必要依賴環境,直接複製貼上下面的命令列到shell中,系統自動下載安裝下面的工具:

    sudo apt-get install build-essential vim tofrodos \
    iproute2 gawk gcc git make net-tools zlib1g-dev \
    libssl-dev flex bison libselinux1 libncurses5-dev \
    tftpd lib32z1 lib32ncurses5 libbz2-1.0:i386 \
    lib32stdc++6 xvfb chrpath socat autoconf libtool

  • 2.修改/bin/sh
    shell中輸入:dpkg-reconfigure dash,在出現的介面中選擇‘否’

  • 3.下載petalinux
    去官網下載petalinux-v2017.1-final-installer.run(檔案8個G,上傳不了)

  • 4.安裝petalinux

    • 在一個使用者目錄下(我的是:home/hlf/mnt),用滑鼠右鍵,新建一個資料夾petalinux
    • 在普通使用者下(非root模式下,即命令列是:[email protected]:~/mnt$這樣的),shell中輸入命令:./petalinux-v2017.1-final-installer.run ./petalinux
    • 經過漫長的等待,安裝到一半的時候,提醒檢視許可,按回車檢視,按q退出,退出後輸入y,回車,如此重複三次,才開始正式安裝(這個步驟要很小心,如果沒有輸入y,就回車,就要重新了)
    • 安裝的時候提示,提示有幾個庫沒裝,不過沒關係,等petalinux安裝完之後,再補也不遲,靜候一直到安裝完畢
      這裡寫圖片描述
  • 5.補一些庫的安裝

    • 懶人直接只看這一點即可(可以跳過下面兩點),把下面命令貼上到shell中回車即可:

      apt-get install texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev zlib1g:i386 libncurses5 libncurses5-dev libc6:i386 libstdc++6:i386 zlib1g:i386 libssl-dev tftpd tftp openbsd-inetd

    • 先安裝剛剛安裝時,提示缺少的庫:

      apt-get install texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev zlib1g:i386

    • 安裝一些之後需要的庫,全都安裝了避免麻煩:

      • 在執行petalinux-config -c kernel會出現錯誤,需安裝:
        apt-get install libncurses5 libncurses5-dev
      • 編譯時可能會出現錯誤arm-xilinx-linux-gnueabi-gcc: Command not found,需安裝:
        apt-get install libc6:i386 libstdc++6:i386 zlib1g:i386
      • 提示缺少zlib和openssl,需安裝:
        apt-get install libssl-dev
      • 出現警告(警告而已,強迫症可以處理一下),提示No tftp server found - please refer to “PetaLinux SDK Installation Guide” for its impact and solution,需安裝:
        apt-get install tftpd tftp openbsd-inetd,安裝完成後,編輯一下/etc/inetd.conf裡的東西:
        直接shell中輸入gedit /etc/inetd.conf,打開了檔案,並在檔案最後一行增加:
        tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftproot 然後儲存並退出 ,之後再進行一些簡單操作:
        mkdir /tftproot
        chmod 777 /tftproot
        /etc/init.d/openbsd-inetd restart
        輸入netstat -an | more | grep udp命令,以確定成功(打印出udp 0 0 0.0.0.0:69 0.0.0.0:*
  • 6.驗證是否安裝成功
    source /home/hlf/mnt/petalinux/settings.sh
    成功定位不報錯的話,基本是成功了的
    echo $PETALINUX
    命令列會打印出安裝路徑/home/hlf/mnt/petalinux

二、搭建硬體環境

  • 1.新建工程,選擇對應的晶片型號,並新建一個 BD 原理圖檔案(命名為system),然後新增一個ZYNQ Processing system的IP核,並設定好與硬體相符合的PS和PL時鐘以及DDR型號
    這個步驟同傳統方式移植那篇文章

  • 2.為了使PetaLinux正常的執行,需要分配一些硬體外設資源

    1.TTC模組(必須) ,如果有多個,Linux核心將會使用第一個。
    2.外部32MB儲存空間(必須)
    3.UART模組(必須),控制檯列印資訊用,若用IP核的話,需中斷訊號連到PS
    4.非易失儲存器(可選),如:QSPI Flash,SD/MMC
    5.乙太網介面(可選),若用IP核或外部PHY的話,需中斷訊號連到PS

    本文硬體上,將在ZYNQ Processing system裡啟用TTC、UART、SD以及之後可能用到的USB、Ethernet(網口0在bank1,bank1電壓要選1.8V,否則報錯)
    這裡寫圖片描述
    這裡寫圖片描述

    預留好上述模組就可以了,
    這裡寫圖片描述
    然後右鍵單擊 Block 檔案,檔案選擇 Generate the Output Products,然後右鍵單擊 Block 檔案,選擇 Create a HDL wrapper,根據 Block 檔案內容產生一個 HDL 的頂層檔案,並選擇讓 vivado 自動完成

    經Vivado綜合,實現後,在Vivado中匯出硬體,輸出PetaLinux所需要的硬體描述檔案
    輸出的檔案就在“/(工程資料夾)/(工程名).sdk”這個資料夾下,這個資料夾下的system_wrapper.hdf待用

三、搭建petalinux工程

  • 0.定位目錄
    先在shell中找一個準備存放工程的地方,(我的是home/hlf/PRO),命令列cd home/hlf/PRO

  • 1.定位編譯鏈
    根據安裝petalinux的路徑:
    source /home/hlf/mnt/petalinux/settings.sh

  • 2.建立petalinux工程
    將在PRO目錄下面,建立一個工程:
    petalinux-create --type project --template zynq --name h1_petalinux_test
    h1_petalinux_test是工程名,該命令會自動在PRO資料夾裡建立h1_petalinux_test資料夾

  • 3.引用剛才輸出的硬體描述檔案
    把之前匯出的硬體描述檔案system_wrapper.hdf拷貝到虛擬機器中的h1_petalinux_test工程資料夾下,然後:
    petalinux-config --get-hw-description=/home/hlf/PRO/h1_petalinux_test
    會進入一個配置介面,在裡面我們可以配置一些系統引數,主要的配置包括:啟動方式,啟動儲存器分割槽表,啟動檔名稱等等,本文暫不對其修改(預設是從SD卡中啟動),然後等待其配置(時間較長)

  • 4.獲取資料夾許可權
    在上一步完成後,輸入命令sudo chmod -R 777 /home/hlf獲取資料夾許可權(工程資料夾和petalinux的安裝資料夾),否則編譯的時候,會發生錯誤

  • 目前為止,在shell中的命令既可以以超級使用者su的身份執行也可以以普通使用者的方式執行(建議全部都用普通使用者的方式,免得切換),但是等下編譯u-boot和kernel以及rootfs的時候,必須普通使用者的身份執行命令列,否則會報錯的

  • 5.編譯u-boot
    注意:到此處的時候,不能再用超級使用者了,要切換到普通使用者下,之後的所有操作都在普通使用者下
    普通使用者的shell中輸入petalinux-config -c u-boot(依然要事先輸入source /home/hlf/mnt/petalinux/settings.sh命令),然後等待GUI出來,這裡暫時不改動啥,直接save(save為u-boot.config,名字隨便取但不要留空),然後繼續等(新建工程要等的時間還是比較長的,後來就會好的)
    這裡寫圖片描述

  • 6.編譯kernel
    命令petalinux-config -c kernel,操作同上(save為kernel.config

  • 7.編譯rootfs
    命令petalinux-config -c rootfs,操作同上(save為預設即可)

  • 8.裝置樹配置
    若要修改,直接在工程資料夾下,Ctr+F搜尋.dts就可以找到相關檔案,做出相應修改”
    暫時預設吧,不修改,按照它自動生成的裝置樹

  • 9.編譯工程
    輸入命令petalinux-build,等待即可,最後生成的檔案在 image/linux

  • 10.生成BOOT.BIN
    把shell定位到image/linux目錄下,執行命令
    petalinux-package --boot --format BIN --fsbl zynq_fsbl.elf --fpga system_wrapper.bit --u-boot,在資料夾下就可以發現,多了一個BOOT.BIN

  • 11.將如下檔案拷入SD卡
    這裡寫圖片描述

  • 12.開機
    將SD卡,插回,開機,串列埠列印資訊為:

U-Boot 2017.01 (Dec 06 2017 - 20:05:03 +0800)

Board: Xilinx Zynq
DRAM:  ECC disabled 1 GiB
MMC:   [email protected]: 0 (SD)
Using default environment

## Error: flags type check failure for "serverip" <= "AUTO" (type: i)
himport_r: can't insert "serverip=AUTO" into hash table
In:    serial
Out:   serial
Err:   serial
Net:   ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
PHY is not detected
GEM PHY init failed
No ethernet found.
U-BOOT for h1_petalinux_test

ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
No ethernet found.
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
Hit any key to stop autoboot:  0
Device: [email protected]
Manufacturer ID: 41
OEM: 3432
Name: SD16G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
9470752 bytes read in 539 ms (16.8 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using '[email protected]1' configuration
   Verifying Hash Integrity ... OK
   Trying '[email protected]0' kernel subimage
     Description:  Linux Kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000d4
     Data Size:    3740448 Bytes = 3.6 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   0ea332944f4f3a57b6148e243370717e68305f55
   Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 10000000 ...
   Using '[email protected]1' configuration
   Trying '[email protected]0' ramdisk subimage
     Description:  ramdisk
     Type:         RAMDisk Image
     Compression:  uncompressed
     Data Start:   0x10394960
     Data Size:    5715407 Bytes = 5.5 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha1
     Hash value:   ea6447a1589e48aa270804e584288cce35a013d5
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using '[email protected]1' configuration
   Trying '[email protected]0' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x103914e8
     Data Size:    13254 Bytes = 12.9 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   891d21220292064a5c6f8b11f8932ff240df21c0
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x103914e8
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
   Loading Kernel Image ... OK
   Loading Ramdisk to 07a8c000, end 07fff5cf ... OK
   Loading Device Tree to 07a85000, end 07a8b3c5 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.9.0-xilinx-v2017.1 ([email protected]) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 SMP PREEMPT Wed Dec 6 18:14:40 CST 2017
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: xlnx,zynq-7000
bootconsole [earlycon0] enabled
cma: Reserved 16 MiB at 0x3f000000
Memory policy: Data cache writealloc
percpu: Embedded 14 pages/cpu @ef7d3000 s25932 r8192 d23220 u57344
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1007764K/1048576K available (6144K kernel code, 202K rwdata, 1456K rodata, 1024K init, 229K bss, 24428K reserved, 16384K cma-reserved, 245760K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0700000   (7136 kB)
      .init : 0xc0900000 - 0xc0a00000   (1024 kB)
      .data : 0xc0a00000 - 0xc0a32800   ( 202 kB)
       .bss : 0xc0a32800 - 0xc0a6be98   ( 230 kB)
Preemptible hierarchical RCU implementation.
        Build-time adjustment of leaf fanout to 32.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to f0802000
slcr mapped to f0804000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at f0804100
Zynq clock init
sched_clock: 64 bits at 325MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4af477f6aa, max_idle_ns: 440795207830 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 551318127 ns
timer #0 at f080c000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 650.00 BogoMIPS (lpj=3250000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (1300.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
fpga-region fpga-full: FPGA Region probed
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 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.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 5584K (c7a8c000 - c8000000)
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=30 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 143, base_baud = 6250000) is a xuartps
▒console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to f086d000
[drm] Initialized
brd: module loaded
loop: module loaded
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 144 (00:0a:35:00:1e:53)
Generic PHY e000b000.etherne:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
mmc0: Problem switching card into high-speed mode!
mmc0: new SDHC card at address 0001
can: broadcast manager protocol (rev 20161123 t)
mmcblk0: mmc0:0001 SD16G 7.50 GiB
 mmcblk0: p1 p2
can: netlink gateway (rev 20130117) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
ALSA device list:
  No soundcards found.
Freeing unused kernel memory: 1024K (c0900000 - c0a00000)
INIT: version 2.88 booting
Starting udev
udevd[755]: starting version 3.2
random: udevd: uninitialized urandom read (16 bytes read)
random: udevd: uninitialized urandom read (16 bytes read)
random: udevd: uninitialized urandom read (16 bytes read)
udevd[756]: starting eudev-3.2
random: udevd: uninitialized urandom read (16 bytes read)
Populating dev cache
random: dd: uninitialized urandom read (512 bytes read)
hwclock: can't open '/dev/misc/rtc': No such file or directory
Wed Dec  6 10:24:47 UTC 2017
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting internet superserver: inetd.
INIT: Entering runlevel: 5
Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Starting Dropbear SSH server: random: dropbearkey: uninitialized urandom read (32 bytes read)
Generating key, this may take a while...
random: dropbearkey: uninitialized urandom read (32 bytes read)
random: dropbearkey: uninitialized urandom read (32 bytes read)
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZcPRl7kGwAEL4U/yLvEVXBnbmVx8kgBHJpleEmJnE5bxZNrt5uUgRcuwEVhb/RZYNcq+random: dropbear: uninitialized urandom read (32 bytes read)
OyiJ6e0M+e3FZDixMSUSsCjBxj2zi142fu0ssLdhmzd6TWi79AtkJCRxIFOE5VTPyaVq5tPvEdrzy6je+ukN4rvXTH+22+Kj4LwRC7xu41XpbXWpzK7oo2IHgP0KRcyPAXyI9x2QWPNsLbYj/wDta3n7GWjbnVxqrDbN8E/VejGxjL96zeKhclyvj6T2arkvfvsB3XYKfZlOMI7ozCtOyUfNhbjaFMVvqDq8hR63b2bCfjYmCwffkPJvh3hMElNGqQtl1V0gouF+oTy7D [email protected]_arm
Fingerprint: md5 0c:53:86:51:85:23:31:f3:26:ed:92:fa:6e:b3:c0:7b
dropbear.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
Starting tcf-agent: random: tcf-agent: uninitialized urandom read (16 bytes read)
OK

PetaLinux 2017.1 plnx_arm /dev/ttyPS0

plnx_arm login: root
Password:
[email protected]_arm:~# cd ..
[email protected]_arm:/home# ls
root
[email protected]_arm:/home# cd ..
[email protected]_arm:/# ls
bin    dev    home   lib    mnt    root   sbin   tmp    var
boot   etc    init   media  proc   run    sys    usr
[email protected]_arm:/# echo "hello"
hello
[email protected]_arm:/#

開機時登入的使用者名稱和密碼都是root
可以看到正常開機了,連SD卡的檔案系統都不需要自己做了,但是不自帶python了

這種基於petalinux方式移植linux的方法,到此流程也就走完了,至於更深的操作,還要在實踐中,不斷學習,至少現在看來,比傳統方式移植方便了一些,而且移植的流程petalinux也都集成了的,好處還是挺多的,慢慢發掘他的強大之處

相關推薦

ZYNQ系統 系列 petalinux方式移植linux

移植linux之petalinux 之前一篇博文中,提到了一種通用的傳統移植方式,將linux移植到ZYNQ中的ARM晶片中。本文將針對xilinx的專用開發環境petalinux,進行入門和開發,本文petalinux的執行環境依然在虛擬機器的linux系統

ZYNQ系統系列 傳統方式移植linux

更多精彩內容,請微信搜尋“FPGAer俱樂部”關注我們。           移植linux之傳統方式 在ZYNQ開發時,有些情況下,為了降低開發的複雜性,或是提升系統執行的效能,在ARM上跑一個linux系統往往是一個不錯的選擇,而且linux系統一般集成了一些常用的

ZYNQ系統 系列 傳統方式移植linux

移植linux之傳統方式 在ZYNQ開發時,有些情況下,為了降低開發的複雜性,或是提升系統執行的效能,在ARM上跑一個linux系統往往是一個不錯的選擇,而且linux系統一般集成了一些常用的成熟驅動,可以減少開發週期。本章將通過傳統u-boot、kern

Linux系統運維常見面試簡答題系列14題

local 企業 nginx服務 簡答題 ip協議 php out gin 報錯 1. /var/log/messages日誌出現kernel:nf_conntrack:tablefull,dropping packet,請問是什麽原因導致的,如何解決? 此報錯為iptab

STM32開發筆記48:STM32F4+DP83848乙太網通訊指南系列系統時鐘

本章為系列指南第二章,主要是介紹一下STM32F4的時鐘配置。時鐘是一個嵌入式產品從零開始開發的基石,一切邏輯都在時鐘的節奏中安靜地彈奏著,時鐘為整個電路帶來了歡快的「心跳」。開發者如果對時鐘沒有控制能力,就會把脈不準整個旋律的節奏,從而導致諸如通訊波特率、通訊時序、延時操作等關鍵功能全都紊亂,系統

CentOS 7 系列系統服務配置--單元Unit

設定單元的啟動頻率限制。 預設情況下,一個單元在10秒內最多允許啟動5次。 StartLimitIntervalSec= 用於設定時長, 預設值等於 DefaultStartLimitIntervalSec= 的值(預設為10秒),設為 0 表示不作限制。 StartLimitBurst= 用於設定在一段給

HBase 系列—— HBase 系統架構及資料結構

一、基本概念 一個典型的 Hbase Table 表如下: 1.1 Row Key (行鍵) Row Key 是用來檢索記錄的主鍵。想要訪問 HBase Table 中的資料,只有以下三種方式: 通過指定的 Row Key 進行訪問; 通過 Row Key 的 range 進行訪問,即訪問指定範圍內

Mysql系列—— 系統變數與狀態變數

系統變數的分類 GLOBAL:全域性變數,影響伺服器的整體操作。 SESSION:會話變數,影響某個客戶端連線的操作。(注:SESSION有個別名叫LOCAL) 注: 在伺服器啟動時,會將每個全域性變數初始化為其預設值(可以通過命令列或選項檔案中指定的選項更改這些預設值)。然後伺服器還為每個連線的客戶

雪飲者 決策樹系列決策樹應用

ssi 字符串長度 mes pla 選擇 font com vector nac   本篇以信息增益最大作為最優化策略來詳細介紹決策樹的決策流程。   首先給定數據集,見下圖    註:本數據來源於網絡 本篇將以這些數據作為訓練數據(雖然少,但足以介紹清楚原理!),下圖是決

數據結構系列算法

nal log 如何 空間復雜度 計算 youdao 最好 時間 bsp 高斯求和 計算1+2+...+100 算法的概念就不多說了 強調一點就是,沒有通用的算法,就像永遠沒有銀彈,所有的算法都有自己的適用領域 評判算法好壞的方法 復雜度用大O表示,又分為時間復雜度

Linux系統管理網絡服務

網絡服務 linux redhat 紅帽 點擊下載:Linux系統管理(二)(網絡服務)本文出自 “飛奔的魚兒” 博客,請務必保留此出處http://feiyuer.blog.51cto.com/6967044/1931978Linux系統管理(二)(網絡服務)

【原創】源碼角度分析Android的消息機制系列——ThreadLocal的工作過程

機制 simple hand 這就是 數據存儲 read etc lena 並且 ι 版權聲明:本文為博主原創文章,未經博主允許不得轉載。 在上一篇文章中,我們已經提到了ThreadLocal,它並非線程,而是在線程中存儲數據用的。數據存儲以後,只能在指定的線程中獲取到數據

ext2文件系統學習—— 目錄磁盤結構

echo free 文件格式 htm file 目錄結構 bitmap 點號 name 創建鏡像、mount等操作和上一篇一樣,測試目錄結構如下: 一些文件系統信息如下: Block size: 1024 Inodes per group: 1

MySQL系列

sql read 註意 出現 back 總結 lba 區別 不同 MySql 事務 目錄 MySQL系列(一):基礎知識大總結 MySQL系列(二):MySQL事務 MySQL系列(三):索引 什麽是事務(transaction) 保證成批操作要麽完全執行,要麽完全不

Android sensor 系統框架

port amp cap 錯誤 str 註釋 hardware war cas 連載上一篇http://www.cnblogs.com/hackfun/p/7327320.html (D) 如何加載訪問.so庫 在前一篇博客http://www.cnblogs.co

Android入門之文件系統操作文件操作相關指令

-h tools strong abc his art 為什麽 重命名 path (一)獲取總根 [java] view plain copy File[] fileList=File.listRoots(); //返回fileList.length為1 /

Linux VPS/服務器建站系列- 常見的國內雲服務器商家

數據中心 log 中心 相互 網站 能說 之前 體積 選擇 繼續接"Linux VPS/服務器建站系列(一)- 哪些人需要用服務器建站"文章,既然我們開始決定選擇VPS、服務器作為項目用途。在準備實際的操作之前,筆者先準備羅列國內和國外的常見雲服務器商家。因為服務器商家和方

SpringMVC系列: 註解@RequestMapping、@PathVariable

ann handler -- back 聯合 ppi 根目錄 處理方法 ati 一、@RequestMapping 1.@RequestMapping除了能修飾方法,還能修飾類(1)修飾類:提供初步的請求映射信息,相對於web請求的根目錄(2)修飾方法:提供進一步的細分映射

Docker系列鏡像管理

nginx orm lda cast anaconda rip search fff spa 2.1 查看鏡像 [root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE docke

JDBC詳解系列之加載驅動

red mar mys ons try path 替換 host man ---[來自我的CSDN博客](http://blog.csdn.net/weixin_37139197/article/details/78838091)--- ??在JDBC詳解系列(一)之流程中