国产精品久久久aaaa,日日干夜夜操天天插,亚洲乱熟女香蕉一区二区三区少妇,99精品国产高清一区二区三区,国产成人精品一区二区色戒,久久久国产精品成人免费,亚洲精品毛片久久久久,99久久婷婷国产综合精品电影,国产一区二区三区任你鲁

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

在ZYNQ上完成linux系統(tǒng)移植

工程師鄧生 ? 來源:CSDN ? 作者:long_fly ? 2022-09-06 09:34 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

移植linux之傳統(tǒng)方式

在ZYNQ開發(fā)時,有些情況下,為了降低開發(fā)的復(fù)雜性,或是提升系統(tǒng)運行的性能,在ARM上跑一個linux系統(tǒng)往往是一個不錯的選擇,而且linux系統(tǒng)一般集成了一些常用的成熟驅(qū)動,可以減少開發(fā)周期。本章將通過傳統(tǒng)u-boot、kernel方式,完成移植。該方式雖然繁瑣復(fù)雜,但是畢竟是一種通用的移植方式。

一、搭建硬件環(huán)境

1.新建工程,并新建一個 BD 文件,然后添加一個ZYNQ Processing system的IP核,并設(shè)置好與硬件相符合的PS和PL時鐘以及DDR型號

poYBAGMWo-GAQpA6AAG9LK2hs14381.jpg
poYBAGMWo-qACxJXAAH_4tfMD5M551.jpg

2.添加一些必要外設(shè)

poYBAGMWpAWAN3AgAAIR8BpHCY0567.jpg


為了看到linux啟動的實驗現(xiàn)象,下面的外設(shè)是必備的:

SD:SD卡(用于從SD卡啟動u-boot、kernel、PL以及文件系統(tǒng))

UART:用于打印調(diào)試信息的串口

3.右鍵單擊 Block 文件,文件選擇 Generate the Output Products

4.右鍵單擊 Block 文件,選擇 Create a HDL wrapper,根據(jù) Block 文件內(nèi)容產(chǎn)生一個 HDL 的頂層文件,并選擇讓 vivado 自動完成

5.并綜合實現(xiàn)、生產(chǎn).bit文件

6.導(dǎo)出硬件(包含.bit),待啟動SDK

二、ARM上運行l(wèi)inux前的準(zhǔn)備工作

-1.電腦上安裝linux環(huán)境

0.更新apt-get(可選,加速用)在linux系統(tǒng)中打開/etc/apt目錄下找到sources.list文件將文件內(nèi)容替換為

deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties 
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted 
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties 
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted 
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties 
deb http://mirrors.aliyun.com/ubuntu/ xenial universe 
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe 
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse 
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse 
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties 
deb http://archive.canonical.com/ubuntu xenial partner 
deb-src http://archive.canonical.com/ubuntu xenial partner 
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted 
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties 
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe 
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse 1234567891011121314151617

打開命令行執(zhí)行apt-get update刷新列表

1.安裝相應(yīng)環(huán)境

#安裝32位依賴庫
apt-get install lib32z1 lib32ncurses5 lib32stdc++6 libbz2-1.0:i386
#安裝 Openssl 庫,實現(xiàn)網(wǎng)絡(luò)的保密性和可靠性的數(shù)據(jù)傳輸,在編譯u-boot時會用到
apt-get install libssl-dev
#安裝設(shè)備樹編譯器工具
apt-get install device-tree-compiler
#安裝此庫,否則內(nèi)核編譯時make menuconfig等會報錯
apt-get install libncurses5-dev 
#安裝此庫,否則內(nèi)核編譯報錯
sudo apt-get install u-boot-tools 12345678910

2.安裝vivado

從官網(wǎng)下載WEB版的VIVADO Xilinx_Vivado_SDK_2017.1_0415_1_Lin64.bin(我已上傳到:Xilinx_Vivado_SDK_2017.1_0415_1_Lin64.bin)

執(zhí)行該.bin,安裝方法以及界面都同WINDOWS版的VIVADO安裝一樣,運行該文件后首先通過GUI對安裝進(jìn)行配置

配置到選擇器件支持時,盡可能將不需要的器件勾選掉(減少下載的大小)

配置完成后,等待下載,以及安裝,即可

3.下載,直接下載官方u-boot和kernel(linux-xlnx-master.zip、u-boot-xlnx-master.tar.gz)

4.編譯u-boot

定位編譯環(huán)境source /opt/Xilinx/SDK/2017.1/settings64.sh

進(jìn)入u-boot目錄cd /home/hlf/mnt/u-boot-xlnx-master

打開GUI配置u-bootmake menuconfig,但是這個GUI是空白的配置,所以要先載入一下xilinx的默認(rèn)配置,再做修改(如下)

在menu中,按方向鍵選擇load,回車,載入xinlinx默認(rèn)配置文件(輸入zynq_ax7010_defconfig的絕對路徑,我的是/home/hlf/mnt/u-boot-xlnx-master/configs/zynq_ax7010_defconfig)

pYYBAGMWpDaAef4EAAD8eIciiYk372.jpg

然后將改動好的配置(本章不改動),再save到該路徑,所需配置已保存到zynq_ax7010_defconfig文件里

針對剛剛的配置開始編譯u-boot:

make CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq_ax7010_defconfig#讀配置

make CROSS_COMPILE=arm-xilinx-linux-gnueabi-#編譯

#arm-xilinx-linux-gnueabi-objdump -h u-boot #查看 u-boot 文件的不同段的內(nèi)存分配情況

到這一步,把u-boot拷貝出來,并加后綴為u-boot.elf,待用

poYBAGMWpLCAahEAAAFGyVcdVmU287.jpg

5.生成BOOT.bin

啟動SDK,新建一個FSBL模板,并在文件中#define FSBL_DEGUG_INFO以便看到調(diào)試信息,然后編譯生成fsbl.elf
poYBAGMWpMeAS9VyAADw08cOM3I640.jpg

從SDK中將上述fsbl.elf、硬件的.bit文件、u-boot.elf打包成BOOT.bin

pYYBAGMWpTyABLjwAAIfX3ne4nA564.jpg
poYBAGMWpUSAWMO5AACc7Yjsd5I237.jpg

6.生成uImage

進(jìn)入目錄 cd /home/hlf/mnt/linux-xlnx-master

定位編譯環(huán)境 source /opt/Xilinx/SDK/2017.1/settings64.sh

打開GUI配置內(nèi)核 make ARCH=arm menuconfig

在GUI中l(wèi)oad一下xilinx的默認(rèn)配置,load的路徑為/home/hlf/mnt/linux-xlnx-master/arch/arm/configs/xilinx_zynq_defconfig

在GUI中進(jìn)行相關(guān)設(shè)置后(本章不改動),save到xilinx_zynq_defconfig里(也可以自己選擇)

make ARCH=arm xilinx_zynq_defconfig #讀配置

make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- uImage LOADADDR=0x00008000 #編譯內(nèi)核

編譯完成后,在linux-xlnx-master/arch/arm/boot目錄下可以發(fā)現(xiàn)uImage文件,待用

7.生成devicetree.dtb在linux-xlnx-master/arch/arm/boot/dts目錄內(nèi)新建或者找到zynq-7010.dts文件,內(nèi)容為(注意一下串口和主頻和硬件是否對應(yīng)):

/dts-v1/;
/include/ "zynq-7000.dtsi"

/ {
   model = "HLF";
   compatible = "ALINX,zynq", "xlnx,zynq-7000";

   aliases {
     ethernet0 = &gem0;
     serial0 = &uart1;
     spi0 = &qspi;
     mmc0 = &sdhci0;
   };

   memory@0 {
     device_type = "memory";
     reg = <0x0 0x20000000>;
   };

   chosen {
     bootargs = "";
     stdout-path = "serial0:115200n8";
   };

   usb_phy0: phy0 {
     compatible = "usb-nop-xceiv";
     #phy-cells = <0>;
     reset-gpios = <&gpio0 46 1>;
   };
};

&clkc {
   ps-clk-frequency = <50000000>;
};

&gem0 {
   status = "okay";
   phy-mode = "rgmii-id";
   phy-handle = <ðernet_phy>;

   ethernet_phy: ethernet-phy@0 {
     reg = <0>;
   };
};

&qspi {
   u-boot,dm-pre-reloc;
   status = "okay";
};12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849

繼續(xù)在linux-xlnx-master目錄下運行命令:./scripts/dtc/dtc -I dts -O dtb -o ./arch/arm/boot/devicetree.dtb ./arch/arm/boot/dts/zynq-7010.dts然后在linux-xlnx-master/arch/arm/boot/目錄下即可發(fā)現(xiàn)devicetree.dtb文件

8.在SD中,建立文件系統(tǒng)

下載linaro桌面文件系統(tǒng)(http://www.linaro.org/),我下載的是linaro-precise-ubuntu-desktop-20120923-436.tar.gz(文件500多M太大,我無法上傳,所以自己去官網(wǎng)尋覓吧)

將SD卡格式化分區(qū),2G的FAT分區(qū)(分區(qū)命名為FAT),用于存放BOOT.bin 等文件,其余分區(qū)設(shè)為EXT4分區(qū)(分區(qū)命名為EXT),用于放置文件系統(tǒng)

將下載的linaro解壓到EXT分區(qū)中

cd ./binary/boot/filesystem.dir #到此目錄下

rsync -av ./ /media/hlf/EXT #同步文件夾(路徑根據(jù)實際情況)

9.新建uEnv.txt此文件是為了寫入環(huán)境變量bootargs在txt文件中寫入bootargs=console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw noinitrd rootfstype=ext4 rootwait

三、運行l(wèi)inux

1.將FPGA設(shè)置為SD卡啟動

2.將devicetree.dtb、BOOT.bin、uEnv.txt、uImage等文件,拷貝到內(nèi)存卡的FAT分區(qū)中

3.FPGA上電,并插上串口,運行putty,設(shè)置好串口參數(shù),工作正常時,打印出如下信息:

U-Boot 2016.07 (Aug 23 2017 - 1548 +0800)

Model: Zynq ZYBO Development Board
Board: Xilinx Zynq
I2C:  ready
DRAM:  ECC disabled 512 MiB
MMC:  sdhci@e0100000: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
In:   serial@e0001000
Out:  serial@e0001000
Err:  serial@e0001000
Model: Zynq ZYBO Development Board
Board: Xilinx Zynq
Net:  ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
I2C EEPROM MAC address read failed
eth0: ethernet@e000b000
reading uEnv.txt
93 bytes read in 13 ms (6.8 KiB/s)
Importing environment from SD ...
Hit any key to stop autoboot:  0
Device: sdhci@e0100000
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 uEnv.txt
93 bytes read in 13 ms (6.8 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Copying Linux from SD to RAM...
reading uImage
3847608 bytes read in 229 ms (16 MiB/s)
reading devicetree.dtb
10471 bytes read in 23 ms (444.3 KiB/s)
## Booting kernel from Legacy Image at 02080000 ...
  Image Name:  Linux-4.6.0-xilinx
  Image Type:  ARM Linux Kernel Image (uncompressed)
  Data Size:   3847544 Bytes = 3.7 MiB
  Load Address: 00008000
  Entry Point:  00008000
  Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
  Booting using the fdt blob at 0x2000000
  Loading Kernel Image ... OK
  Loading Device Tree to 1eb0c000, end 1eb118e6 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx (root@osrc-virtual-machine) (gcc version 4.9.2 (Sourcery CodeBench Lite 2015.05-17) ) #8 SMP PREEMPT Wed Aug 23 1517 CST 2017
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Zynq Miz702n Development Board
cma: Reserved 16 MiB at 0x1f000000
Memory policy: Data cache writealloc
percpu: Embedded 12 pages/cpu @debcd000 s19776 r8192 d21184 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line:  console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw noinitrd rootfstype=ext4 rootwait
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 494528K/524288K available (5304K kernel code, 231K rwdata, 1844K rodata, 1024K init, 222K bss, 13376K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
   vector  : 0xffff0000 - 0xffff1000  (  4 kB)
   fixmap  : 0xffc00000 - 0xfff00000  (3072 kB)
   vmalloc : 0xe0800000 - 0xff800000  ( 496 MB)
   lowmem  : 0xc0000000 - 0xe0000000  ( 512 MB)
   pkmap  : 0xbfe00000 - 0xc0000000  (  2 MB)
   modules : 0xbf000000 - 0xbfe00000  (  14 MB)
    .text : 0xc0008000 - 0xc07fb004  (8141 kB)
    .init : 0xc0800000 - 0xc0900000  (1024 kB)
    .data : 0xc0900000 - 0xc0939da0  ( 232 kB)
    .bss : 0xc0939da0 - 0xc09716e8  ( 223 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 e0800000
slcr mapped to e0802000
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 e0802100
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 e080a000, 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: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 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 @ 0xe0880000
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 
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  ? 2001-2006 Red Hat, Inc.
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
xilinx-vdma 43000000.dma: Xilinx AXI VDMA Engine Driver Probed!!
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 143, base_baud = 6250000) is a xuartps
console [ttyPS0] enabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e086e000
[drm] Initialized drm 1.1.0 20060810
Console: switching to colour frame buffer device 128x37
brd: module loaded
loop: module loaded
m25p80 spi0.0: found s25fl256s1, expected n25q128a11
m25p80 spi0.0: s25fl256s1 (32768 Kbytes)
5 ofpart partitions found on MTD device spi0.0
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000100000 : "qspi-fsbl-uboot"
0x000000100000-0x000000600000 : "qspi-linux"
0x000000600000-0x000000620000 : "qspi-device-tree"
0x000000620000-0x000000c00000 : "qspi-rootfs"
0x000000c00000-0x000001000000 : "qspi-bitstream"
CAN device driver interface
gpiod_set_value: invalid GPIO
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (003501:22)
RTL8211E Gigabit Ethernet e000b000.etherne attached PHY driver [RTL8211E Gigabit Ethernet] (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
e0002000.usb supply vbus not found, using dummy regulator
ULPI transceiver vendor/product ID 0x0451/0x1507
Found TI TUSB1210 ULPI transceiver.
ULPI integrity check: passed.
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0 USB hub found
hub 1-0 1 port detected
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
mmc0: Problem switching card into high-speed mode!
mmc1: SDHCI controller on e0101000.sdhci [e0101000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
mmc0: new SDHC card at address 0001
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
mmcblk0: mmc0:0001 SD16G 7.50 GiB
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
ALSA device list:
  No soundcards found.
 mmcblk0: p1 p2
mmc1: new high speed MMC card at address 0001
mmcblk1: mmc1:0001 P1XXXX 7.20 GiB
EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
mmcblk1boot0: mmc1:0001 P1XXXX partition 1 2.00 MiB
VFS: Mounted root (ext4 filesystem) on device 179:2.
mmcblk1boot1: mmc1:0001 P1XXXX partition 2 2.00 MiB
mmcblk1rpmb: mmc1:0001 P1XXXX partition 3 128 KiB
devtmpfs: mounted
Freeing unused kernel memory: 1024K (c0800000 - c0900000)
init: hwclock main process (706) terminated with status 1e
init: ureadahead main process (707) terminated with status 5
modprobe: FATAL: Could not load /lib/modules/4.6.0-xilinx/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/4.6.0-xilinx/modules.dep: No such file or directory

 * Starting mDNS/DNS-SD daemon                      [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Starting configure network device security               [ OK ]
 * Starting configure network device security               [ OK ]
 * Starting configure network device security               [ OK ]
 * Starting Mount network filesystems                   [ OK ]
 * Starting Upstart job to start rpcbind on boot only           [ OK ]
 * Starting configure network device                   [ OK ]
 * Starting configure network device                   [ OK ]
 * Starting Failsafe Boot Delay                      [ OK ]
 * Stopping Upstart job to start rpcbind on boot only           [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Stopping Mount network filesystems                   [ OK ]
 * Starting NFSv4 id <-> name mapper                   [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Starting Bridge socket events into upstart               [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Stopping cold plug devices                       [ OK ]
 * Stopping log initial device creation                  [ OK ]
 * Starting configure network device security               [ OK ]
 * Starting configure virtual network devices               [ OK ]
 * Starting save udev log and update rules                [ OK ]
 * Stopping save udev log and update rules                [ OK ]
 * Starting RPC portmapper replacement                  [ OK ]
 * Stopping configure virtual network devices               [ OK ]
 * Starting NFSv4 id <-> name mapper                   [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Starting Start this job to wait until rpcbind is started or fails to s[ OK ]
 * Stopping rpcsec_gss daemon                       [ OK ]
 * Stopping Start this job to wait until rpcbind is started or fails to s[ OK ]
 * Starting NFSv4 id <-> name mapper                   [ OK ]
 * Starting CUPS printing spooler/server                 [ OK ]
 * Starting NSM status monitor                      [ OK ]
 * Starting configure network device                   [ OK ]
 * Stopping Failsafe Boot Delay                      [ OK ]
 * Starting System V initialisation compatibility             [ OK ]
 * Starting modem connection manager                   [ OK ]
 * Starting configure network device security               [ OK ]
 * Starting NFSv4 id <-> name mapper                   [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Starting bluetooth daemon                       [ OK ]
speech-dispatcher disabled; edit /etc/default/speech-dispatcher

saned disabled; edit /etc/default/saned
 * Stopping System V initialisation compatibility             [ OK ]
 * Starting network connection manager                  [ OK ]
 * Starting bluetooth daemon                       [ OK ]
 * Starting bluetooth daemon                       [fail]
 * Starting automatic crash report generation               [ OK ]
 * Starting LightDM Display Manager                    [ OK ]
 * Starting anac(h)ronistic cron                     [ OK ]
 * Starting save kernel messages                     [ OK ]
 * Starting regular background program processing daemon         [ OK ]
 * Stopping bluetooth daemon                       [ OK ]
 * Stopping System PulseAudio sound server                [ OK ]
 * Starting NFSv4 id <-> name mapper                   [ OK ]
 * Starting crash report submission daemon                [ OK ]
Last login: Thu Jan  1 0010 UTC 1970 on tty1
 * Stopping save kernel messages                     [ OK ]
 * Starting NFSv4 id <-> name mapper                   [ OK ]
cat: /var/lib/update-notifier/fsck-at-reboot: No such file or directory
run-parts: /etc/update-motd.d/98-fsck-at-reboot exited with return code 1
Welcome to Linaro 12.09 (GNU/Linux 4.6.0-xilinx armv7l)

 * Documentation:  https://wiki.linaro.org/

568 packages can be updated.
325 updates are security updates.

root@linaro-ubuntu-desktop:~#123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310

4.就可以在putty中,對linux系統(tǒng)進(jìn)行操作了一些基礎(chǔ)的linux操作,都可以在命令行里運行了,例如:瀏覽命令ls、網(wǎng)絡(luò)測試命令ping,甚至如果前期加了網(wǎng)絡(luò)外設(shè)的話,可以直接插網(wǎng)線運行apt-get,linaro文件系統(tǒng)中自帶了python,在命令行里,輸入python即可體驗

傳統(tǒng)方法在ZYNQ上移植linux到此就算初步完成了,之后會體驗xilinx的專用開發(fā)環(huán)境petalinux的強大效果

5.當(dāng)然還是要體驗一把helloworld了在電腦linux環(huán)境中,創(chuàng)建一個hello.c:

#include 
int main()
{
  printf("hello hlf
");
  return 0;
}123456

在hello.c路徑下,生成可執(zhí)行文件:

cd /home/hlf/mnt/zynq_pro #hello.c所在目錄
source /opt/Xilinx/SDK/2017.1/settings64.sh #定位
arm-xilinx-linux-gnueabi-gcc hello.c -o hello -static #生成執(zhí)行文件123

將ZYNQ關(guān)機(jī),取出SD卡將生成的hello執(zhí)行文件,拷貝到SD的EXT分區(qū)下插上SD卡,重新對ZYNQ的linux開機(jī)后找到剛剛拷貝的hello文件,并執(zhí)行,可以在putty中看到相應(yīng)的結(jié)果

這種通用的傳統(tǒng)方法在ZYNQ上移植linux完成,即可在此基礎(chǔ)上對linux進(jìn)行使用了。




審核編輯:劉清

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • ARM
    ARM
    +關(guān)注

    關(guān)注

    135

    文章

    9554

    瀏覽量

    392033
  • DDR
    DDR
    +關(guān)注

    關(guān)注

    11

    文章

    755

    瀏覽量

    69145
  • Linux
    +關(guān)注

    關(guān)注

    88

    文章

    11763

    瀏覽量

    219079
  • Zynq
    +關(guān)注

    關(guān)注

    10

    文章

    630

    瀏覽量

    49463
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關(guān)推薦
    熱點推薦

    如何在Zynq UltraScale+ MPSoC平臺上通過JTAG啟動嵌入式Linux鏡像

    之前文章中,我們介紹了如何使用 XSCT 工具通過 JTAG Zynq SoC 啟動嵌入式 Linux 鏡像(從 JTAG 啟動
    的頭像 發(fā)表于 01-13 11:45 ?4528次閱讀

    Zynq全可編程片系統(tǒng)詳解

    Zynq 是由賽靈思(Xilinx,現(xiàn)為 AMD 的一部分)推出的一系列全可編程片系統(tǒng)。它的革命性創(chuàng)新在于,它不是傳統(tǒng)的 FPGA,也不是傳統(tǒng)的處理器,而是將高性能的 ARM Cortex-A 系列處理器與傳統(tǒng)的 FPGA 可
    的頭像 發(fā)表于 01-13 11:41 ?1872次閱讀
    <b class='flag-5'>Zynq</b>全可編程片<b class='flag-5'>上</b><b class='flag-5'>系統(tǒng)</b>詳解

    意法半導(dǎo)體LSM6DSV320X IMU傳感器Linux平臺的驅(qū)動移植與姿態(tài)感知應(yīng)用實現(xiàn)

    本期我們聚焦論壇網(wǎng)友短笛君的實測體驗。他首先分享了MEMS上位機(jī)體驗并進(jìn)行MLC數(shù)據(jù)預(yù)采集,隨后實現(xiàn)了LSM6DSV320X IMU傳感器Linux平臺的驅(qū)動移植,并開發(fā)具備四元數(shù)和歐拉角解算的完整姿態(tài)感知應(yīng)用,最后講解了如何
    的頭像 發(fā)表于 12-11 14:31 ?7144次閱讀
    意法半導(dǎo)體LSM6DSV320X IMU傳感器<b class='flag-5'>在</b><b class='flag-5'>Linux</b>平臺的驅(qū)動<b class='flag-5'>移植</b>與姿態(tài)感知應(yīng)用實現(xiàn)

    ALINX教程分享_Zynq UltraScale+ MPSoC PYNQ3.1.2移植

    本教程 Ubuntu22.04.1 虛擬機(jī)中安裝了 Xilinx 2024.1 的開發(fā)環(huán)境,基于該環(huán)境從源碼編譯 PYNQ 3.1.2 工程,生成能夠 ALINX AXU15EGB 開發(fā)板運行的 PYNQ
    的頭像 發(fā)表于 11-30 16:06 ?5994次閱讀
    ALINX教程分享_<b class='flag-5'>Zynq</b> UltraScale+ MPSoC PYNQ3.1.2<b class='flag-5'>移植</b>

    移植蜂鳥需要在Linux環(huán)境下嗎?

    《手把手教你設(shè)計CPU》書上運行Verilog仿真測試那章說為了重現(xiàn)仿真環(huán)境,最好在Linux環(huán)境下。不知道移植蜂鳥是否需要在Linux環(huán)境下,直接在Windows操作系統(tǒng)可否
    發(fā)表于 11-10 07:42

    Windows和Linux環(huán)境下分別使用Olimex和蜂鳥調(diào)試器下載程序

    本隊伍編號CICC3042,本篇文章介紹Windows和Linux環(huán)境下分別使用Olimex和蜂鳥調(diào)試器下載程序,和一篇Hbirdv2的移植配合使用。 使用過第一版蜂鳥的同學(xué)
    發(fā)表于 10-31 08:26

    無開發(fā)板Linux系統(tǒng)下進(jìn)行E203內(nèi)核指令集測試以及跑分程序的測試

    本文為描述沒有開發(fā)板的前提下如何在Linux系統(tǒng)進(jìn)行指令集測試。 不同的開發(fā)板移植蜂鳥E2
    發(fā)表于 10-24 11:43

    ZYNQ PS與PL數(shù)據(jù)交互方式

    ZYNQ SoC 的 PS (Processing System) 和 PL (Programmable Logic) 之間的數(shù)據(jù)交互是系統(tǒng)設(shè)計的核心。
    的頭像 發(fā)表于 10-15 10:33 ?1053次閱讀
    <b class='flag-5'>ZYNQ</b> PS與PL數(shù)據(jù)交互方式

    Zynq7100 BSP移植,MSH終端不能正確顯示是為什么?

    由于新版本的RT Thread的BSP不再提供Zynq7000的支持。所以同事從RT Thread(4.0.3)中的Zynq7000移植了一份Zynq 7100的BSP。但是MSH終
    發(fā)表于 09-19 06:26

    如何在K230移植mipi sensor,然后讀取mipi接口的raw數(shù)據(jù)?

    問題描述 我想在K230移植一個 1通道 的 mipi 攝像頭,這個攝像頭輸出的不是幀圖像數(shù)據(jù),而是一個事件流,所以需要通過 mipi 讀取它的 RAW 數(shù)據(jù)自己解碼使用,如何實現(xiàn)這個過程?有人
    發(fā)表于 06-17 06:22

    求助,關(guān)于K230 linux SENSOR 移植讀取CIF的RAW數(shù)據(jù)的疑問?

    K230 linux SENSOR 移植指南中給出了K230移植普通攝像頭的教程,mipi讀取的時ISP后的數(shù)據(jù),但如果我想在k230里面移植
    發(fā)表于 06-16 06:56

    開源系統(tǒng)適配:聚徽分享國產(chǎn)工控平板 Linux / 鴻蒙系統(tǒng)下的技術(shù)優(yōu)化

    工業(yè)自動化與智能化加速推進(jìn)的當(dāng)下,國產(chǎn)工控平板的系統(tǒng)適配成為提升設(shè)備性能與競爭力的關(guān)鍵環(huán)節(jié)。Linux 和鴻蒙作為開源系統(tǒng),憑借其高度的開放性與可定制性,為國產(chǎn)工控平板帶來新的發(fā)展機(jī)
    的頭像 發(fā)表于 06-13 16:29 ?1070次閱讀

    不借助Linux系統(tǒng)Windows下如何搭建ZMC900E交叉編譯環(huán)境

    不需要依賴笨重的虛擬機(jī),也不需要安裝雙系統(tǒng)。拋開繁瑣的環(huán)境準(zhǔn)備,Windows輕松搭建交叉編譯環(huán)境。本文將介紹如何在Windows搭建交叉編譯環(huán)境,不借助
    的頭像 發(fā)表于 05-21 11:34 ?937次閱讀
    不借助<b class='flag-5'>Linux</b><b class='flag-5'>系統(tǒng)</b>,<b class='flag-5'>在</b>Windows下如何搭建ZMC900E交叉編譯環(huán)境

    如何在i.MX 8XDXL EVK的A35運行Yocto LinuxM4運行FreeRTOS?

    方法是什么?具體說來: 1. 我應(yīng)該如何正確啟動兩個作系統(tǒng)? 2. 當(dāng) Linux A35 運行時, M4
    發(fā)表于 04-04 06:02

    從零開始馴服Linux(一):ZYNQ-Linux啟動文件構(gòu)建全解析

    和FPGA(可編程邏輯單元),正是因為由于ARM處理器的存在,所以我們可以ZYNQ系列芯片上面運行Linux系統(tǒng)
    發(fā)表于 03-20 16:48