ZedBoard Linux (3) [FPGA]
FPGAをカスタマイズしてみます。
…じゃなくて、標準デザインで色々付いてるPLのハードウェアを全部無くして、PSブロックだけで動作させます。自分のロジックを足すときのベースになります。だいたいZynqのチュートリアルに出てる手順です。
標準デザインではProject NavigatorやPlanAheadを使わず、XPSだけでFPGAを作っています。あまり一般的では無いと思います。XPSで扱える形式(pcore)でしか作れず、階層化も困難です。マイコン形式のプロセッサを中心としたシステムがトップデザインになる場合は便利なのでしょう(Suzakuもこの形式だったと記憶してます)。自分としてはあまり便利と思わないのですが…
XPSもプロセッサをただの部品として扱い、接続することをメインに考えたツールになれば良いのになぁと思います。その点AlteraのQsys、SOPC Builderは好みです。
ということで、プロジェクトのトップはPlanAheadで作成します。
テンプレートで入ってるZedBoardをターゲットにして空のプロジェクトを作ります。Add Sources → Add or Create Embedded Sources → Create Sub-Design、「ps_module」とか名前付けてFinishするとXPSが立ち上がります。「PSを追加するか?」というダイアログが出てくるので、ここではYesです。
ボードやLinuxへのインパクトは少なくしたいので、PSの設定は標準のデザインと同じにしたいところです。標準の設定をImportするのが一番簡単ですかね。色々な設定を忘れずにすみます。
「Import」アイコンを押すとこんな画面が出てきます。
「User Template」の所に標準デザインのxmlを足します。これを選んでOKすると設定が反映されます。「System Template」の「ZedBoard Development Board Template」もだいたい同じ内容でした。
ちょっと変更します。EMIO GPIOをFPGA内部で使えるようにします。
EMIO GPIOを有効にして本数を指定します。
外部ポートに出します。このときI/Oを出した場合はFPGAのI/Oピンに接続することになります。内部で使う場合は_I、_O、_Tをそれぞれ出します。_Iは入力、_Oは出力、_Tも出力として使えます。
アドレスは標準のまま。
PLに渡すクロックは適当に設定します。外部の33.333MHzを基準にした周波数が作れます。
XPSを閉じるとPlanAheadに戻ります。
できた「Design Sources」の「ps_module」を右クリックして「Create Top HDL」を選びます。「ps_module_stub.v(vhd)」ができあがります。これをそのままトップとして使ってもかまいませんし、別途top.vを作ってもかまいません。_stubはPSを変更して「Create Top HDL」を行うたびに上書きされてしまうので、別途トップを作り、コピペすることにします。
このままインプリします。ハードマクロ側のピンや制約は自動生成されます。というかピンは固定なので動きませんが。
なんとまぁ、これだけでCritical Warningが6個も出ます。PORBとSRSTBとCLKにIBUFが入らないよ~というワーニング。ハードマクロ側のピンなので手が出ません。Xilinxのアンサーでは「無視してくれ」とのこと。昔から似たようなバグがあり続けて一向に直る気配が無いんですが…
こういう、誰もが必ず当たるところにバグがあるから「Xilinxってまともに検証してないでしょ?他の所もバグだらけなんじゃね?」って疑ってしまうんですよ~実際あちらこちらにバグあるし。
CriticalでもWarningなので、そのままインプリは進みます。PLが空なので、実はビットストリームいりません。Zynqはハードマクロだけで動けます。
できあがったら、File → Export → Export Hardware for SDKを選びます。デフォルトでは「プロジェクト名.sdk\SDK\SDK_Export」にSDKのワークスペースができます。後はこれを元に(1)と同じ手順でFSBL~BOOT.BINを作ります。
今度は試しにWindows上のSDKで作ってみます。u-boot.elfはLinuxで作ったのをコピーしておきます。
操作は全く同じ。「.\FSBL\bootimage\u-boot.bin」ができるのでこれをBOOT.BINにします。
DeviceTreeの編集。
やっぱりまだよくわからない点が多いので、標準の「devicetree.dts」を編集します。といってもハードマクロに載ってるペリフェラル以外を削除していくだけです。「ps7_ddr_0」や「ps7_axi_interconnect_0」など、「ps7_」で始まってるのはハードマクロのペリフェラルです。アドレスも決まってるので変更する必要ないです。それ以外のエントリー「axi_vdma_0」「axi_iic_hdmi」などを削除します。
これで必要なファイルがそろったので、SDカードにコピーします。zImageとramdiskは前のままです。
まぁ、色々謎のままですが、これでPLが空っぽのLinux環境ができたので、自分の回路を足していくことになります。
…じゃなくて、標準デザインで色々付いてるPLのハードウェアを全部無くして、PSブロックだけで動作させます。自分のロジックを足すときのベースになります。だいたいZynqのチュートリアルに出てる手順です。
標準デザインではProject NavigatorやPlanAheadを使わず、XPSだけでFPGAを作っています。あまり一般的では無いと思います。XPSで扱える形式(pcore)でしか作れず、階層化も困難です。マイコン形式のプロセッサを中心としたシステムがトップデザインになる場合は便利なのでしょう(Suzakuもこの形式だったと記憶してます)。自分としてはあまり便利と思わないのですが…
XPSもプロセッサをただの部品として扱い、接続することをメインに考えたツールになれば良いのになぁと思います。その点AlteraのQsys、SOPC Builderは好みです。
ということで、プロジェクトのトップはPlanAheadで作成します。
テンプレートで入ってるZedBoardをターゲットにして空のプロジェクトを作ります。Add Sources → Add or Create Embedded Sources → Create Sub-Design、「ps_module」とか名前付けてFinishするとXPSが立ち上がります。「PSを追加するか?」というダイアログが出てくるので、ここではYesです。
ボードやLinuxへのインパクトは少なくしたいので、PSの設定は標準のデザインと同じにしたいところです。標準の設定をImportするのが一番簡単ですかね。色々な設定を忘れずにすみます。
「Import」アイコンを押すとこんな画面が出てきます。
「User Template」の所に標準デザインのxmlを足します。これを選んでOKすると設定が反映されます。「System Template」の「ZedBoard Development Board Template」もだいたい同じ内容でした。
ちょっと変更します。EMIO GPIOをFPGA内部で使えるようにします。
EMIO GPIOを有効にして本数を指定します。
外部ポートに出します。このときI/Oを出した場合はFPGAのI/Oピンに接続することになります。内部で使う場合は_I、_O、_Tをそれぞれ出します。_Iは入力、_Oは出力、_Tも出力として使えます。
アドレスは標準のまま。
PLに渡すクロックは適当に設定します。外部の33.333MHzを基準にした周波数が作れます。
XPSを閉じるとPlanAheadに戻ります。
できた「Design Sources」の「ps_module」を右クリックして「Create Top HDL」を選びます。「ps_module_stub.v(vhd)」ができあがります。これをそのままトップとして使ってもかまいませんし、別途top.vを作ってもかまいません。_stubはPSを変更して「Create Top HDL」を行うたびに上書きされてしまうので、別途トップを作り、コピペすることにします。
module top ( inout wire [53:0] MIO, input wire PS_SRSTB, input wire PS_CLK, input wire PS_PORB, inout wire DDR_Clk, inout wire DDR_Clk_n, inout wire DDR_CKE, inout wire DDR_CS_n, inout wire DDR_RAS_n, inout wire DDR_CAS_n, output wire DDR_WEB, inout wire [2:0] DDR_BankAddr, inout wire [14:0] DDR_Addr, inout wire DDR_ODT, inout wire DDR_DRSTB, inout wire [31:0] DDR_DQ, inout wire [3:0] DDR_DM, inout wire [3:0] DDR_DQS, inout wire [3:0] DDR_DQS_n, inout wire DDR_VRN, inout wire DDR_VRP ); wire [63:0] EMIO_GPIO_I; wire [63:0] EMIO_GPIO_O; wire [63:0] EMIO_GPIO_T; wire FCLK_CLK0; wire FCLK_CLK1; wire FCLK_CLK2; wire FCLK_CLK3; (* BOX_TYPE = "user_black_box" *) ps_module ps_module_i ( .processing_system7_0_MIO (MIO ), .processing_system7_0_PS_SRSTB_pin (PS_SRSTB ), .processing_system7_0_PS_CLK_pin (PS_CLK ), .processing_system7_0_PS_PORB_pin (PS_PORB ), .processing_system7_0_DDR_Clk (DDR_Clk ), .processing_system7_0_DDR_Clk_n (DDR_Clk_n ), .processing_system7_0_DDR_CKE (DDR_CKE ), .processing_system7_0_DDR_CS_n (DDR_CS_n ), .processing_system7_0_DDR_RAS_n (DDR_RAS_n ), .processing_system7_0_DDR_CAS_n (DDR_CAS_n ), .processing_system7_0_DDR_WEB_pin (DDR_WEB ), .processing_system7_0_DDR_BankAddr (DDR_BankAddr ), .processing_system7_0_DDR_Addr (DDR_Addr ), .processing_system7_0_DDR_ODT (DDR_ODT ), .processing_system7_0_DDR_DRSTB (DDR_DRSTB ), .processing_system7_0_DDR_DQ (DDR_DQ ), .processing_system7_0_DDR_DM (DDR_DM ), .processing_system7_0_DDR_DQS (DDR_DQS ), .processing_system7_0_DDR_DQS_n (DDR_DQS_n ), .processing_system7_0_DDR_VRN (DDR_VRN ), .processing_system7_0_DDR_VRP (DDR_VRP ), .processing_system7_0_GPIO_I_pin (EMIO_GPIO_I ), .processing_system7_0_GPIO_O_pin (EMIO_GPIO_O ), .processing_system7_0_GPIO_T_pin (EMIO_GPIO_T ), .processing_system7_0_FCLK_CLK0_pin (FCLK_CLK0 ), .processing_system7_0_FCLK_CLK1_pin (FCLK_CLK1 ), .processing_system7_0_FCLK_CLK2_pin (FCLK_CLK2 ), .processing_system7_0_FCLK_CLK3_pin (FCLK_CLK3 ) ); endmodulePL内部ではなにもしていません。ハードマクロ側のピン名はどうでも良いみたいですw。
このままインプリします。ハードマクロ側のピンや制約は自動生成されます。というかピンは固定なので動きませんが。
なんとまぁ、これだけでCritical Warningが6個も出ます。PORBとSRSTBとCLKにIBUFが入らないよ~というワーニング。ハードマクロ側のピンなので手が出ません。Xilinxのアンサーでは「無視してくれ」とのこと。昔から似たようなバグがあり続けて一向に直る気配が無いんですが…
こういう、誰もが必ず当たるところにバグがあるから「Xilinxってまともに検証してないでしょ?他の所もバグだらけなんじゃね?」って疑ってしまうんですよ~実際あちらこちらにバグあるし。
CriticalでもWarningなので、そのままインプリは進みます。PLが空なので、実はビットストリームいりません。Zynqはハードマクロだけで動けます。
できあがったら、File → Export → Export Hardware for SDKを選びます。デフォルトでは「プロジェクト名.sdk\SDK\SDK_Export」にSDKのワークスペースができます。後はこれを元に(1)と同じ手順でFSBL~BOOT.BINを作ります。
今度は試しにWindows上のSDKで作ってみます。u-boot.elfはLinuxで作ったのをコピーしておきます。
操作は全く同じ。「.\FSBL\bootimage\u-boot.bin」ができるのでこれをBOOT.BINにします。
DeviceTreeの編集。
やっぱりまだよくわからない点が多いので、標準の「devicetree.dts」を編集します。といってもハードマクロに載ってるペリフェラル以外を削除していくだけです。「ps7_ddr_0」や「ps7_axi_interconnect_0」など、「ps7_」で始まってるのはハードマクロのペリフェラルです。アドレスも決まってるので変更する必要ないです。それ以外のエントリー「axi_vdma_0」「axi_iic_hdmi」などを削除します。
/* * digilent-zed.dts - Default Device Tree for ZedBoard * * (C) Copyright 2012 Digilent, Inc. * * Code based on Device Tree Generator version: 1.1 * * (C) Copyright 2007-2012 Xilinx, Inc. * (C) Copyright 2007-2012 Michal Simek * (C) Copyright 2007-2012 PetaLogix Qld Pty Ltd * * Michal SIMEK以前と同様に* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * CAUTION: This file is automatically generated by libgen. * Version: Xilinx EDK 14.4 EDK_P.49d * Today is: Wednesday, the 26 of December, 2012; 15:18:18 * * XPS project directory: device-tree_bsp_0 */ /dts-v1/; / { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,zynq-zed"; model = "Xilinx Zynq ZED"; aliases { ethernet0 = &ps7_ethernet_0; serial0 = &ps7_uart_1; }; chosen { /*bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1";*/ bootargs = "console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M earlyprintk rootwait devtmpfs.mount=1"; linux,stdout-path = "/axi@0/serial@e0001000"; }; cpus { #address-cells = <1>; #cpus = <0x2>; #size-cells = <0>; ps7_cortexa9_0: cpu@0 { clock-frequency = <666666687>; compatible = "xlnx,ps7-cortexa9-1.00.a"; d-cache-line-size = <0x20>; d-cache-size = <0x8000>; device_type = "cpu"; i-cache-line-size = <0x20>; i-cache-size = <0x8000>; model = "ps7_cortexa9,1.00.a"; reg = <0>; timebase-frequency = <333333343>; xlnx,cpu-1x-clk-freq-hz = <0x69f6bcb>; xlnx,cpu-clk-freq-hz = <0x27bc86bf>; }; ps7_cortexa9_1: cpu@1 { clock-frequency = <666666687>; compatible = "xlnx,ps7-cortexa9-1.00.a"; d-cache-line-size = <0x20>; d-cache-size = <0x8000>; device_type = "cpu"; i-cache-line-size = <0x20>; i-cache-size = <0x8000>; model = "ps7_cortexa9,1.00.a"; reg = <1>; timebase-frequency = <333333343>; xlnx,cpu-1x-clk-freq-hz = <0x69f6bcb>; xlnx,cpu-clk-freq-hz = <0x27bc86bf>; }; }; ps7_ddr_0: memory@0 { device_type = "memory"; reg = < 0x0 0x20000000 >; }; ps7_axi_interconnect_0: axi@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,ps7-axi-interconnect-1.00.a", "simple-bus"; ranges; /* PS system internal devices */ ps7_afi_0: ps7-afi@f8008000 { compatible = "xlnx,ps7-afi-1.00.a"; reg = < 0xf8008000 0x1000 >; }; ps7_afi_1: ps7-afi@f8009000 { compatible = "xlnx,ps7-afi-1.00.a"; reg = < 0xf8009000 0x1000 >; }; ps7_afi_2: ps7-afi@f800a000 { compatible = "xlnx,ps7-afi-1.00.a"; reg = < 0xf800a000 0x1000 >; }; ps7_afi_3: ps7-afi@f800b000 { compatible = "xlnx,ps7-afi-1.00.a"; reg = < 0xf800b000 0x1000 >; }; ps7_ddrc_0: ps7-ddrc@f8006000 { compatible = "xlnx,ps7-ddrc-1.00.a"; reg = < 0xf8006000 0x1000 >; xlnx,has-ecc = <0x0>; }; ps7_dev_cfg_0: ps7-dev-cfg@f8007000 { compatible = "xlnx,ps7-dev-cfg-1.00.a"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 8 4 >; reg = < 0xf8007000 0x1000 >; }; ps7_dma_ns: ps7-dma@f8004000 { compatible = "xlnx,ps7-dma-1.00.a", "arm,pl330"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 13 4 0 14 4 0 15 4 0 16 4 0 17 4 0 40 4 0 41 4 0 42 4 0 43 4 >; reg = < 0xf8004000 0x1000 >; }; ps7_dma_s: ps7-dma@f8003000 { compatible = "xlnx,ps7-dma-1.00.a", "arm,pl330"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 13 4 0 14 4 0 15 4 0 16 4 0 17 4 0 40 4 0 41 4 0 42 4 0 43 4 >; reg = < 0xf8003000 0x1000 >; }; ps7_ethernet_0: ps7-ethernet@e000b000 { #address-cells = <1>; #size-cells = <0>; compatible = "xlnx,ps7-ethernet-1.00.a"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 22 4 >; local-mac-address = [ 00 0a 35 00 00 00 ]; phy-handle = <&phy0>; reg = < 0xe000b000 0x1000 >; xlnx,enet-clk-freq-hz = <0x7735940>; xlnx,enet-reset = <0xffffffff>; xlnx,enet-slcr-1000mbps-div0 = <0x8>; xlnx,enet-slcr-1000mbps-div1 = <0x1>; xlnx,enet-slcr-100mbps-div0 = <0x8>; xlnx,enet-slcr-100mbps-div1 = <0x5>; xlnx,enet-slcr-10mbps-div0 = <0x8>; xlnx,enet-slcr-10mbps-div1 = <0x32>; xlnx,eth-mode = <0x1>; xlnx,has-mdio = <0x1>; xlnx,ptp-enet-clock = <111111115>; mdio { #address-cells = <1>; #size-cells = <0>; phy0: phy@0 { compatible = "marvell,88e1510"; device_type = "ethernet-phy"; reg = <0>; marvell,reg-init = <0x3 0x10 0xff00 0x1e 0x3 0x11 0xfff0 0xa>; }; }; }; ps7_gpio_0: ps7-gpio@e000a000 { #gpio-cells = <2>; compatible = "xlnx,ps7-gpio-1.00.a"; emio-gpio-width = <60>; gpio-controller; gpio-mask-high = <0xc0000>; gpio-mask-low = <0xfe81>; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 20 4 >; reg = < 0xe000a000 0x1000 >; }; ps7_iop_bus_config_0: ps7-iop-bus-config@e0200000 { compatible = "xlnx,ps7-iop-bus-config-1.00.a"; reg = < 0xe0200000 0x1000 >; }; ps7_pl310_0: ps7-pl310@f8f02000 { arm,data-latency = < 3 2 2 >; arm,tag-latency = < 2 2 2 >; cache-level = < 2 >; cache-unified; compatible = "xlnx,ps7-pl310-1.00.a", "arm,pl310-cache"; reg = < 0xf8f02000 0x1000 >; }; ps7_qspi_0: ps7-qspi@e000d000 { bus-num = <0>; compatible = "xlnx,ps7-qspi-1.00.a"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 19 4 >; is-dual = <0>; num-chip-select = <1>; reg = < 0xe000d000 0x1000 >; speed-hz = <200000000>; xlnx,fb-clk = <0x1>; xlnx,qspi-clk-freq-hz = <0xbebc200>; xlnx,qspi-mode = <0x0>; }; ps7_qspi_linear_0: ps7-qspi-linear@fc000000 { compatible = "xlnx,ps7-qspi-linear-1.00.a"; reg = < 0xfc000000 0x1000000 >; xlnx,qspi-clk-freq-hz = <0xe4e1c0>; }; ps7_scugic_0: ps7-scugic@f8f01000 { #address-cells = < 2 >; #interrupt-cells = < 3 >; #size-cells = < 1 >; compatible = "xlnx,ps7-scugic-1.00.a", "arm,cortex-a9-gic", "arm,gic"; interrupt-controller; linux,phandle = < 0x1 >; phandle = < 0x1 >; reg = < 0xf8f01000 0x1000 0xf8f00100 0x100 >; }; ps7_scutimer_0: ps7-scutimer@f8f00600 { clock-frequency = <333333343>; compatible = "xlnx,ps7-scutimer-1.00.a", "arm,cortex-a9-twd-timer"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 1 13 769 >; reg = < 0xf8f00600 0x20 >; }; ps7_scuwdt_0: ps7-scuwdt@f8f00620 { clock-frequency = <333333343>; /* clock-frequency = <111111111>; */ compatible = "xlnx,ps7-scuwdt-1.00.a"; device_type = "watchdog"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 1 14 769 >; reg = < 0xf8f00620 0xe0 >; }; ps7_sd_0: ps7-sdio@e0100000 { clock-frequency = <50000000>; compatible = "xlnx,ps7-sdio-1.00.a", "generic-sdhci"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 24 4 >; reg = < 0xe0100000 0x1000 >; xlnx,has-cd = <0x1>; xlnx,has-power = <0x0>; xlnx,has-wp = <0x1>; xlnx,sdio-clk-freq-hz = <0x2faf080>; /* clock-frequency = <0x1fc9f08>; */ }; ps7_slcr_0: ps7-slcr@f8000000 { compatible = "xlnx,ps7-slcr-1.00.a"; reg = < 0xf8000000 0x1000 >; }; ps7_ttc_0: ps7-ttc@f8001000 { clock-frequency = <111111115>; clock-frequency-timer0 = <111111115>; clock-frequency-timer1 = <111111115>; clock-frequency-timer2 = <111111115>; compatible = "xlnx,ps7-ttc-1.00.a"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 10 4 0 11 4 0 12 4 >; reg = < 0xf8001000 0x1000 >; xlnx,ttc-clk0-clksrc = <0x0>; xlnx,ttc-clk0-freq-hz = <0x69f6bcb>; xlnx,ttc-clk1-clksrc = <0x0>; xlnx,ttc-clk1-freq-hz = <0x69f6bcb>; xlnx,ttc-clk2-clksrc = <0x0>; xlnx,ttc-clk2-freq-hz = <0x69f6bcb>; }; ps7_uart_1: serial@e0001000 { clock = <50000000>; clock-frequency = <50000000>; compatible = "xlnx,ps7-uart-1.00.a", "xlnx,xuartps"; current-speed = <115200>; device_type = "serial"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 50 4 >; port-number = <0>; reg = < 0xe0001000 0x1000 >; xlnx,has-modem = <0x0>; xlnx,uart-clk-freq-hz = <0x2faf080>; }; ps7_usb_0: ps7-usb@e0002000 { compatible = "xlnx,ps7-usb-1.00.a"; dr_mode = "host"; interrupt-parent = <&ps7_scugic_0>; interrupts = < 0 21 4 >; phy_type = "ulpi"; reg = < 0xe0002000 0x1000 >; xlnx,usb-reset = <0xffffffff>; }; ps7_xadc: ps7_xadc@f8007100 { compatible = "xlnx,ps7-xadc-1.00.a"; interrupts = < 0 7 4 >; reg = < 0xf8007100 0x20 >; }; }; };
~/linux-digilent/scripts/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dtsでdtbにコンパイル。
これで必要なファイルがそろったので、SDカードにコピーします。zImageとramdiskは前のままです。
U-Boot 2012.04.01 (Sep 25 2013 - 00:19:21) DRAM: 512 MiB WARNING: Caches not enabled MMC: SDHCI: 0 Using default environment In: serial Out: serial Err: serial Net: zynq_gem Hit any key to stop autoboot: 0 Copying Linux from SD to RAM... Device: SDHCI Manufacturer ID: 1d OEM: 4144 Name: SD Tran Speed: 25000000 Rd Block Len: 512 SD version 1.10 High Capacity: No Capacity: 1.9 GiB Bus Width: 4-bit reading zImage 2527040 bytes read reading devicetree.dtb 6481 bytes read reading ramdisk8M.image.gz 3698068 bytes read ## Starting application at 0x00008000 ... Uncompressing Linux... done, booting the kernel. [ 0.000000] Booting Linux on physical CPU 0 [ 0.000000] Linux version 3.6.0-digilent-13.01-00002-g06b3889 (develop@vm-ubuntu) (gcc version 4.7.2 (Sourcery CodeBench Lite 2012.09-104) ) #1 SMP PREEMPT Wed Sep 25 00:32:40 JST 2013 [ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZED [ 0.000000] Memory policy: ECC disabled, Data cache writealloc [ 0.000000] PERCPU: Embedded 7 pages/cpu @c1408000 s6976 r8192 d13504 u32768 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 [ 0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M earlyprintk rootwait devtmpfs.mount=1 [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Memory: 512MB = 512MB total [ 0.000000] Memory: 506432k/506432k available, 17856k reserved, 0K highmem [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] vmalloc : 0xe0800000 - 0xfd000000 ( 456 MB) [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc0473a60 (4527 kB) [ 0.000000] .init : 0xc0474000 - 0xc0499b40 ( 151 kB) [ 0.000000] .data : 0xc049a000 - 0xc04d4ae0 ( 235 kB) [ 0.000000] .bss : 0xc04d4b04 - 0xc04ee100 ( 102 kB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] Dump stacks of tasks blocking RCU-preempt GP. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. [ 0.000000] NR_IRQS:512 [ 0.000000] Zynq clock init [ 0.000000] xlnx,ps7-ttc-1.00.a #0 at 0xe0800000, irq=43 [ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms [ 0.000000] Console: colour dummy device 80x30 [ 0.090000] Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096) [ 0.090000] pid_max: default: 32768 minimum: 301 [ 0.090000] Mount-cache hash table entries: 512 [ 0.090000] CPU: Testing write buffer coherency: ok [ 0.090000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.090000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available [ 0.090000] Setting up static identity map for 0x32be88 - 0x32bebc [ 0.090000] L310 cache controller enabled [ 0.090000] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72360000, Cache size: 524288 B [ 0.130000] Map SLCR registers [ 0.130000] CPU1: Booted secondary processor [ 0.220000] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.220000] Brought up 2 CPUs [ 0.220000] SMP: Total of 2 processors activated (2664.03 BogoMIPS). [ 0.220000] devtmpfs: initialized [ 0.220000] NET: Registered protocol family 16 [ 0.220000] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.220000] xgpiops e000a000.ps7-gpio: gpio at 0xe000a000 mapped to 0xe084a000 [ 0.230000] registering platform device 'pl330' id 0 [ 0.230000] registering platform device 'arm-pmu' id 0 [ 0.230000] registering platform device 'zynq-dvfs' id 0 [ 0.230000] [ 0.230000] ############################################### [ 0.230000] # # [ 0.230000] # Board ZED Init # [ 0.230000] # # [ 0.230000] ############################################### [ 0.230000] [ 0.230000] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. [ 0.230000] hw-breakpoint: maximum watchpoint size is 4 bytes. [ 0.250000] xslcr xslcr.0: at 0xF8000000 mapped to 0xF8000000 [ 0.260000] bio: create slabなんか普通に立ち上がっちゃったので、逆に不安ですが…HDMIにペンギンマークも出ませんし、OLEDにロゴも出てこないので、変更後のハードウェアになってるみたいです。at 0 [ 0.270000] SCSI subsystem initialized [ 0.270000] usbcore: registered new interface driver usbfs [ 0.270000] usbcore: registered new interface driver hub [ 0.270000] usbcore: registered new device driver usb [ 0.270000] Advanced Linux Sound Architecture Driver Version 1.0.25. [ 0.270000] Switching to clocksource xttcpss_timer1 [ 0.280000] NET: Registered protocol family 2 [ 0.280000] TCP established hash table entries: 16384 (order: 5, 131072 bytes) [ 0.280000] TCP bind hash table entries: 16384 (order: 5, 131072 bytes) [ 0.280000] TCP: Hash tables configured (established 16384 bind 16384) [ 0.280000] TCP: reno registered [ 0.280000] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.280000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.280000] NET: Registered protocol family 1 [ 0.280000] RPC: Registered named UNIX socket transport module. [ 0.280000] RPC: Registered udp transport module. [ 0.280000] RPC: Registered tcp transport module. [ 0.280000] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.280000] Trying to unpack rootfs image as initramfs... [ 0.280000] rootfs image is not initramfs (no cpio magic); looks like an initrd [ 0.320000] Freeing initrd memory: 8192K [ 0.320000] pl330 dev 0 probe success [ 0.320000] msgmni has been set to 1005 [ 0.320000] io scheduler noop registered [ 0.320000] io scheduler deadline registered [ 0.320000] io scheduler cfq registered (default) [ 0.320000] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82) is a xuartps [ 0.830000] console [ttyPS0] enabled [ 0.840000] xdevcfg f8007000.ps7-dev-cfg: ioremap f8007000 to e0850000 with size 1000 [ 0.840000] [drm] Initialized drm 1.1.0 20060810 [ 0.860000] brd: module loaded [ 0.870000] loop: module loaded [ 0.870000] xqspips e000d000.ps7-qspi: master is unqueued, this is deprecated [ 0.880000] xqspips e000d000.ps7-qspi: at 0xE000D000 mapped to 0xE0852000, irq=51 [ 0.890000] libphy: XEMACPS mii bus: probed [ 0.900000] xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54 [ 0.900000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.910000] usb_hcd_xusbps_probe: No OTG assigned! [ 0.910000] usb_hcd_xusbps_probe: OTG now assigned! [ 0.920000] xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller [ 0.930000] xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1 [ 0.960000] xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000 [ 0.980000] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00 [ 0.980000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 0.990000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.000000] usb usb1: Product: Xilinx PS USB EHCI Host Controller [ 1.000000] usb usb1: Manufacturer: Linux 3.6.0-digilent-13.01-00002-g06b3889 ehci_hcd [ 1.010000] usb usb1: SerialNumber: xusbps-ehci.0 [ 1.010000] hub 1-0:1.0: USB hub found [ 1.020000] hub 1-0:1.0: 1 port detected [ 1.020000] Initializing USB Mass Storage driver... [ 1.030000] usbcore: registered new interface driver usb-storage [ 1.030000] USB Mass Storage support registered. [ 1.040000] mousedev: PS/2 mouse device common for all mice [ 1.040000] sdhci: Secure Digital Host Controller Interface driver [ 1.050000] sdhci: Copyright(c) Pierre Ossman [ 1.060000] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.060000] mmc0: Invalid maximum block size, assuming 512 bytes [ 1.110000] mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA [ 1.120000] usbcore: registered new interface driver usbhid [ 1.130000] usbhid: USB HID core driver [ 1.140000] TCP: cubic registered [ 1.150000] NET: Registered protocol family 17 [ 1.150000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 [ 1.160000] Registering SWP/SWPB emulation handler [ 1.160000] registered taskstats version 1 [ 1.170000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0) [ 1.170000] mmc0: SD Status: Invalid Allocation Unit size. [ 1.180000] mmc0: new high speed SD card at address b368 [ 1.180000] mmcblk0: mmc0:b368 SD 1.86 GiB [ 1.190000] ALSA device list: [ 1.190000] mmcblk0: p1 [ 1.190000] No soundcards found. [ 1.200000] RAMDISK: gzip image found at block 0 [ 1.510000] EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities [ 1.570000] EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem [ 1.570000] EXT4-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended [ 1.580000] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null) [ 1.590000] VFS: Mounted root (ext2 filesystem) on device 1:0. [ 1.590000] devtmpfs: mounted [ 1.600000] Freeing init memory: 148K Starting rcS... ++ Mounting filesystem ++ Setting up mdev ++ Configure static IP 192.168.1.10 ++ Starting telnet daemon ++ Starting http daemon ++ Starting ftp daemon ++ Starting dropbear (ssh) daemon ++ Starting OLED Display insmod: can't read '/lib/modules/3.6.0-digilent-13.01-00002-g06b3889/pmodoled-gpio.ko': No such file or directory ++ Exporting LEDs & SWs rcS Complete zynq> [ 6.820000] xemacps e000b000.ps7-ethernet: Set clk to 124999998 Hz [ 6.820000] xemacps e000b000.ps7-ethernet: link up (1000/FULL)
zynq> pwd /proc/device-tree/axi@0 zynq> ls -l total 0 -r--r--r-- 1 root 0 4 Jan 1 00:07 #address-cells -r--r--r-- 1 root 0 4 Jan 1 00:07 #size-cells -r--r--r-- 1 root 0 44 Jan 1 00:07 compatible -r--r--r-- 1 root 0 4 Jan 1 00:07 name dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-afi@f8008000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-afi@f8009000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-afi@f800a000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-afi@f800b000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-ddrc@f8006000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-dev-cfg@f8007000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-dma@f8003000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-dma@f8004000 dr-xr-xr-x 3 root 0 0 Jan 1 00:07 ps7-ethernet@e000b000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-gpio@e000a000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-iop-bus-config@e0200000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-pl310@f8f02000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-qspi-linear@fc000000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-qspi@e000d000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-scugic@f8f01000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-scutimer@f8f00600 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-scuwdt@f8f00620 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-sdio@e0100000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-slcr@f8000000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-ttc@f8001000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7-usb@e0002000 dr-xr-xr-x 2 root 0 0 Jan 1 00:07 ps7_xadc@f8007100 -r--r--r-- 1 root 0 0 Jan 1 00:07 ranges dr-xr-xr-x 2 root 0 0 Jan 1 00:07 serial@e0001000こう見るとハードマクロのペリフェラル以外が消えてますし、どうやら効いてるみたいです。
まぁ、色々謎のままですが、これでPLが空っぽのLinux環境ができたので、自分の回路を足していくことになります。