2020年5月28日 星期四

SD Card 整合

SD Card 整合 #1
2020/05/29



整合至 sdcard.img #1

截至目前為止,我們已經完成了底下事項:
1. rootfs -> OK
2. linux kernel -> OK
3. boot loader (u-boot) -> OK
4. SD card image -> OK

現在要開始進行整合的步驟:
1+2+3 -> SD card -> qemu


1. 複製 Linux 核心至 /mnt/sdcard1

~eecs/virtualarm/kernel/linux-3.16.81/arch/arm/boot# cp uImage /mnt/sdcard1

2. 複製 u-boot 檔案至 /mnt/sdcard1

u-boot
u-boot.bin

~eecs/virtualarm/bootloader/u-boot-2016.09# cp u-boot /mnt/sdcard1
~eecs/virtualarm/bootloader/u-boot-2016.09# cp u-boot.bin /mnt/sdcard1

3. 複製 rootfs 目錄至 /mnt/sdcard2

~eecs/virtualarm# rsync -av rootfs/ /mnt/sdcard2

作完之後,我們先解除掛載,然後用 qemu 來開機。


4. 測試開機

~/virtualarm$ ~/virtualarm$ qemu-system-arm -machine vexpress-a9 -m 256 -nographic -kernel u-boot -drive file=../../sd_test.img,if=sd,format=raw,index=0


U-Boot 2016.09 (May 22 2020 - 09:58:23 +0800)

DRAM:  256 MiB
WARNING: Caches not enabled
Flash: 128 MiB
MMC:   MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   smc911x-0
Hit any key to stop autoboot:  0
=> fatload mmc 0:1 0x60000000 uimage

=> setenv bootargs console=ttyAMA0,38400n8 root=/dev/mmcblk0p2

=> bootm 0x60000000

此時即可開機,並以 root 或是 leenix 帳號登錄。

5. 與 br10 連接在一起

請將底下內容另存為  runsd.sh,再來執行即可。

MACHINE=vexpress-a9
#SD_IMAGE=sdcard.img
SD_IMAGE=sd_test.img
#SD_IMAGE=sd_512M.img

#FLASH_IMG=flash.img

KERNEL_VERSION=3.16.81
UBOOT_VERSION=2016.09

MAC="52:54:12:34:00:A0"
BRIDGE=br10


MEMORY=256
#MEMORY=1024

qemu-system-arm -machine $MACHINE -m $MEMORY \
  -serial stdio \
  -drive file=./$SD_IMAGE,if=sd,format=raw,index=0 \
  -kernel ./bootloader/u-boot-$UBOOT_VERSION/u-boot \
  -net nic,macaddr=$MAC -net bridge,br=$BRIDGE




2020年5月27日 星期三

安裝 Cadence INNOVUS

安裝 Cadence INNOVUS

2020/05/28 初版

Cadence INNOVUS 是 Cadence 所發表的 P&R 工具,可針對 16 nm 以下先進製程進行 placement, routing 以及 clocking 等操作。由於我們沒有 Standard Cell Library,因此這個工具安裝完畢後只能打開來看一看,無法進行操作。底下說明安裝流程:


1. 下載

請至 TSRI 下載 INNOVUS 的壓縮檔,以目前 (2020/05/28) 為例,其檔案如下所示:

INNOVUS_19.12.000_linux_1of3.tgz
INNOVUS_19.12.000_linux_2of3.tgz
INNOVUS_19.12.000_linux_3of3.tgz


2. 解壓縮/安裝

# tar xfva INNOVUS_19.12.000_linux_1of3.tgz -C /opt/EDA
# tar xfva INNOVUS_19.12.000_linux_2of3.tgz -C /opt/EDA
# tar xfva INNOVUS_19.12.000_linux_3of3.tgz -C /opt/EDA

3. 設定

====================
在 bashrc 中設定

Innovus_bin="/opt/EDA/INNOVUS/cur/tools/bin"

export PATH=$PATH:$Innovus_bin

====================
設定 OA_HOME

在 innovus 底下有一個 oa_v22.60.024 目錄,其完整路徑是:

/opt/EDA/INNOVUS/cur/oa_v22.60.024

如果你去看之前安裝的 IC618,其中也有一個 oa_v22.60.019 目錄,其完整路徑是:

/opt/EDA/cadence/IC/cur/oa_v22.60.019

假設我們在執行 innovus 要使用到 OA (Open Access Library) 的話,要使用其內建版本的 OA 目錄,不然會有版本不一致的問題。所以在這邊比較麻煩,要在 IC618 啟動 OpenAccess 要使用 IC618 內建的 OA 目錄設定,而要在 Innovus 中得切換過來,不然可能會有問題,通常是遇上了才知道。

要設定 innovus 的 OA 環境,請在 bashrc 中設定:

export OA_HOME=/opt/EDA/INNOVUS/cur/oa_v22.60.024

若是要設定 IC618 的 OA 環境,則要設定為:

export OA_HOME=/opt/EDA/cadence/IC/cur/oa_v22.60.019


4. 測試

$innovus

5. 故障排除

啟動 innovus 時會出現底下錯誤訊息:

$innovus
2020/05/28 11:14:24 Cannot parse the Release File for this OS.
 This OS might be unsupported.
 The content of the release file is below:
 Red Hat Enterprise Linux Server 7.3 (Maipo)

2020/05/28 11:14:24 WARNING This OS does not appear to be a Cadence supported Linux configuration.
2020/05/28 11:14:24 For more info, please run CheckSysConf in <cdsRoot/tools.lnx86/bin/checkSysConf <productId>
/opt/EDA/INNOVUS/cur/tools.lnx86/innovus/bin/64bit/innovus: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory


請安裝 libncurses5 套件即可,指令如下所示:

#apt-get install libncurses5

安裝 Cadence Incisive

2020/05/28 初版


Cadence Incisive 是 Cadence 新一代的 Simulator,原廠的定義是:

Multi-language simulation for testbench automation, metric-driven verification, and mixed-signal verification
(https://www.cadence.com/en_US/home/tools/system-design-and-verification/simulation-and-testbench-verification/incisive-enterprise-simulator.html)

簡單說它已經不再像以為的 Verilog XL 是以 Verilog 為主的 simulator,而是支援
多種不同的硬體描述語言。底下說明如何安裝此軟體:

1. 下載:

請至 TSRI 下載 Incisive 的壓縮檔,以目前 (2020/05/28) 為例,其檔案如下:

INCISIV_15.20.039_linux_1of6.tgz
INCISIV_15.20.039_linux_2of6.tgz
INCISIV_15.20.039_linux_3of6.tgz
INCISIV_15.20.039_linux_4of6.tgz
INCISIV_15.20.039_linux_5of6.tgz
INCISIV_15.20.039_linux_6of6.tgz


2. 解壓縮/安裝

# tar xfva INCISIV_15.20.039_linux_1of6.tgz -C /opt/EDA
# tar xfva INCISIV_15.20.039_linux_2of6.tgz -C /opt/EDA
# tar xfva INCISIV_15.20.039_linux_3of6.tgz -C /opt/EDA
# tar xfva INCISIV_15.20.039_linux_4of6.tgz -C /opt/EDA
# tar xfva INCISIV_15.20.039_linux_5of6.tgz -C /opt/EDA
# tar xfva INCISIV_15.20.039_linux_6of6.tgz -C /opt/EDA

3. 設定

在 bashrc 中設定

Incisiv_bin="/opt/EDA/INCISIV/cur/tools/bin"

export PATH=$PATH:$Incisiv_bin


####INCISIV####
export VRST_HOME=/opt/EDA/INCISIV/cur

sh $VRST_HOME/env.sh



4. 測試

Incisive 的執行檔很多,可以參考底下網址來進行測試:

https://en.wikipedia.org/wiki/NCSim


$ncverilog ha_gate.v test_ha.v

5. 故障排除

在執行 ncverilog 時會出現 timescale 的錯誤,原因是 ncverilog 比 gplcver
更嚴謹,它會檢查 timescale 語法,如果沒有在你的 verilog 程式中加上此語法的話會
顯示錯誤而不執行。

除此之外,ncverilog 在執行上沒有問題。

2020年5月13日 星期三

ModelSim 安裝流程

ModelSim 安裝流程
2020/05/14

ModelSim 是 Mentor Graphics 公司的產品,其主要功能是硬體描述語言模擬及除錯。目前 CIC 所提供的版本是 2020.1 版,下載完畢後會出現

modelsim_2020.1_linux_1of2.tgz
modelsim_2020.1_linux_1of2.tgz

這個檔案,請在 /opt/EDA 目錄中解開 modelsim 壓縮檔:

/opt/EDA_tools# tar xfva modelsim_2020.1_linux_1of2.tgz -C /opt/EDA
/opt/EDA_tools# tar xfva modelsim_2020.1_linux_2of2.tgz -C /opt/EDA

解開完畢後會出現底下目錄:

/opt/EDA/modelsim# ls -l
總計 4
drwxr-xr-x 4 root root 4096  5月 14 11:08 2020.1
lrwxrwxrwx 1 eecs eecs    7  4月 13 15:31 cur -> 2020.1/


設定 ModelSim

在 .bashrc 中新增底下設定:

Modelsimbin="/opt/EDA/modelsim/cur/modeltech/bin"

export PATH=$PATH:$Modelsimbin

export LM_LICENSE_FILE=1717@lsncku

啟動 Modelsim

打開一個新的終端機,然後執行:

$ vsim

看看有沒有出現 ModelSim 視窗。

故障排除

執行 vsim 時有底下錯誤:


$vsim
/opt/EDA/modelsim/cur/modeltech/bin/../linuxpe/vish: error while loading shared libraries: libXft.so.2: cannot open shared object file: No such file or directory

這個症狀是因為沒有 libXft.so.2 這個檔案,我們去 packages.debian.org 找的結果是這個檔案屬於 libxft2 的套件,現在問題來了,我們安裝 libxft2,然後再執行 vsim 有一模一樣的錯誤。

現在的問題出在 /opt/EDA/modelsim/cur/modeltech/bin/../linuxpe/vish,也就是
/opt/EDA/modelsim/cur/modeltech/linuxpe/vish

那麼 vish 這個檔案是什麼平台上面的 ? 請以 file 來看一下:

/opt/EDA/modelsim/cur/modeltech/linuxpe $ file vish
vish: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=778b94811c99e10e57a58de6050d652e40205fc2, stripped

我們可以看到這個檔案是 386 版,那它要配對的 libxft2 的套件是

libxft2:i386

因此請安裝 libxft2:i386 再試試看。


在 modelsim 的介面中開啟一個 verilog 檔案會出現底下訊息:

# couldn't load file "/opt/EDA/modelsim/2020.1/modeltech/linux/ScintillaTk/libScintillaTk1.14.so": libstdc++.so.6: cannot open shared object file: No such file or directory


原因是找不到 libstdc++.so.6:i386 這個檔案。

Synopsys VCS 安裝

(2020/05/14)

Synopsys VCS 是由 Synopsys 所推出的 verilog 模擬工具,目前 TSRI 所推出的最新版本為 2020.03,底下我們以此版本來進行安裝說明。

1. 下載

請下載底下檔案

vcs_2020.03_linux_1of3.tgz
vcs_2020.03_linux_2of3.tgz
vcs_2020.03_linux_3of3.tgz

2. 解壓縮/安裝

# tar xfva vcs_2020.03_linux_1of3.tgz -C /opt/EDA
# tar xfva vcs_2020.03_linux_2of3.tgz -C /opt/EDA
# tar xfva vcs_2020.03_linux_3of3.tgz -C /opt/EDA

3. 設定環境

VCS=/opt/EDA/vcs/cur/bin
export PATH=$PATH:$VCS

export LM_LICENSE_FILE=26585@lsncku
export VCS_HOME=/opt/EDA/vcs/cur
export VCS_ARCH_OVERRIDE=linux

4. 測試

$ vcs ha_gate.v test_ha.v
觀察其輸出有沒有錯誤訊息。



5. 故障排除

$ vcs ha_cont.v
/opt/EDA/vcs/cur/bin/vcs: 列 3833: dc:命令找不到
/opt/EDA/vcs/cur/bin/vcs: 列 11218: /usr/bin/time: 沒有此一檔案或目錄
/opt/EDA/vcs/cur/bin/vcs: 列 3833: dc:命令找不到

--> 安裝 dc、time 套件:apt-get install dc time

$ vcs
 ERROR : Cannot find 'vcsMsgReport' script in /bin
 Please make sure VCS_HOME is set correctly and continue..

--> 設定 VCS_HOME


$ vcs ha_cont.v
/opt/EDA/vcs/cur/bin/vcs: 列 11218: /usr/bin/time: 沒有此一檔案或目錄
CPU time: .033 seconds to compile

--> 安裝 time 套件:apt-get install time

$ vcs ha_gate.v test_ha.v
/opt/EDA/vcs/cur/linux/bin/vcs1: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
CPU time: .043 seconds to compile

--> 安裝 libelf1:i386

2020年5月7日 星期四

編譯 ARM HF Linux 核心

ARM 工具鏈說明 (2021/04/30 改版)

Debian 支援三個不同版本的 ARM 架構,分別是

armel - 沒有 FPU 的 ARM CPU
armhf - 有 FPU,可以硬體執行浮點運算的 ARM CPU
arm64 - 64 位元的 ARM CPU

以本學期的課程來說,我們以 armhf 架構為主來進行工具鏈 (toolchain) 的安裝,這些工具鏈一樣是用來編譯 ARM 版本的 Linux 核心以及其它應用程式,是建構嵌入式系統的基本工具。

1. 安裝

請以 root 權限安裝底下套件:

gcc-arm-linux-gnueabihf
cpp-arm-linux-gnueabihf
g++-arm-linux-gnueabihf

安裝完畢後可以測試這三個套件的可執行檔,指令如下:

$arm-linux-gnueabihf-gcc -v

$arm-linux-gnueabihf-cpp -v
$arm-linux-gnueabihf-g++ -v

上述的輸出有一個非常重要的重點在此:

Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/6/lto-wrapper
Target: arm-linux-gnueabihf

其中的 Target: arm-linux-gnueabihf 這行告訴我們這是針對 armhf 平台所開發的編譯器。如果你用之前教的 gcc -v 會看到其內容如下:

Target: x86_64-linux-gnu

這表示其編譯目標平台是 x86_64。

2. 測試 armhf 編譯器

2.1 建立 hello.c

請建立 hello.c,其內容如下:

#include <stdio.h>

void main(void)
{
 printf("Hello World\n");
}


2.2 編譯 hello.c 為 armhf 之可執行檔

$ arm-linux-gnueabihf-gcc hello.c -o hello.arm

此時會出現 hello.arm 這個可執行檔,其檔案資訊如下:

$ file hello.arm
hello.arm: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamicall
y linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha
1]=155090b58f9384c7e128b74e743a7993155658fc, not stripped

這個可執行檔是 arm 32 位元版本的可執行檔,從 X86 平台編譯出 ARM 平台可執行檔的流程稱為 cross compile (交叉編譯器)。

此時如果我們要執行 hello.arm 這個程式的話,我們會看到底下輸出:

$ ./hello.arm
bash: ./hello.arm: 無法執行二進位檔案: 可執行檔格式錯誤

(或是英文顯示)

./hello.arm
bash: ./hello.arm: cannot execute binary file: Exec format error

這表示我們的平台目前沒有支援 ARM 32 的可執行檔,必須另外再進行處理才可以支援。

2.3 將 Debian 新增 armhf 架構

Debian 支援硬體架構:

https://wiki.debian.org/SupportedArchitectures

首先我們要觀察目前系統所支援的外掛架構 (非原生 x86_64 架構) 有哪些,請執行:

# dpkg --print-foreign-architectures

理論上不會有任何輸出,因為我們還沒加入 armhf 架構的支援。在大一 Linux 課程中有教大家如何加入 i386 架構的支援,其說明在 157 頁第六章。

要新增 armhf 架構的話,請以 root 權限執行:

# dpkg --add-architecture armhf

此時再執行 dpkg --print-foreign-architectures 指令時會看到有新增一個 armhf
架構,如底下所示:

# dpkg --print-foreign-architectures
armhf

接下來要安裝支援的軟體,請執行

# apt-get update
# apt-get upgrade
# apt install qemu-system:armhf qemu-user:armhf qemu-user-static

安裝所需要的軟體,然後就可以準備執行 hello.arm 這個可執行檔。


2.4 測試 armhf 可執行檔

要在 X86_64 系統中執行 arm 的可執行檔,請執行底下指令:

$ qemu-arm ./hello.arm
Hello World

3. 編 ARM 版 Linux 核心


3.1 下載
請在家目錄建立 ~/qemu_image/arm 目錄,然後在底下建立 kernel 目錄並將 linux-4.4.268.tar.xz 這個檔案解壓縮並放入此目錄,指令如下:

$ mkdir -p ~/qemu_image/arm/kenel
$ tar xfva linux-4.4.268.tar.xz  -C ~/qemu_image/arm/kenel

3.2 解壓縮

$ cd ~/qemu_image/arm/kernel
~/qemu_image/arm/kernel $ tar xfva linux-3.18.123.tar.xz

此時會出現一個 linux-4.4.268 目錄,接下來要設定編譯參數。

3.3 設定核心編譯參數 (依照預設值即可)

3.3.1 虛擬 ARM 平台介紹

核心編譯與 ARM 平台有密切的關係,如果沒有編對平台則無法開機,我們這學期所使用的虛擬 ARM 平台為 qemu-system-arm 已支援的平台,要查詢支援平台的指令如下:

$ qemu-system-arm -M ?

其輸出中有一行:

vexpress-a9

這是指 Versatile Express 平台,其 CPU 為 Cortex A9。

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.boards.express/index.html

我們這學期以此虛擬平台作為上課使用的開發平台。

3.3.2 設定核心編譯參數

請切換至 linux-3.18.123 目錄,然後執行:

~/qemu_image/arm/kernel/linux-3.18.123 $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- vexpress_defconfig

其輸出如下:

ROSS_COMPILE=arm-linux-gnueabihf- vexpress_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#

接著要手動執行核心編譯參數設定

~/qemu_image/arm/kernel/linux-3.18.123 $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig

請執行底下修改,否則之後無法開機:

    General setup  --->
        [*] open by fhandle syscalls

    System Type  --->
        [ ] Enable the L2x0 outer cache controller

-*- Enable the block layer  --->
        [*]   Support for large (2TB+) block devices and files


接著離開核心編譯環境,並儲存參數設定。

3.4 編譯核心

請執行:

~/qemu_image/arm/kernel/linux-4.4.268 $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage LOADADDR=0x60000000 -j 8

~/qemu_image/arm/kernel/linux-4.4.268 $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs modules -j 8

** 如果嫌每次都要打 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 這串指令太長的話,也可以把這串指令設定在 .bashrc 中,請在 .bashrc 中新增底下設定:

alias makearmhf='make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-'

之後,我們只要打 makearmhf 就等於 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 這串指令。

=============================================================================
故障排除:

如果在編譯核心時遇上以下錯誤:

"mkimage" command not found - U-Boot images will not be built
arch/arm/boot/Makefile:79: recipe for target 'arch/arm/boot/uImage' failed
make[1]: *** [arch/arm/boot/uImage] Error 1
arch/arm/Makefile:314: recipe for target 'uImage' failed
make: *** [uImage] Error 2

這是因為沒有 mkimage 這個指令,請上 packages.debian.org 查詢此指令的套件並安裝,安裝完畢後再執行一次 make uImage 指令。

# apt-get install u-boot-tools

=============================================================================
成果驗收:

1. 核心編譯完畢後會出現底下訊息:

Image Name:   Linux-4.4.268
Created:      Fri Apr 30 11:29:49 2021
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3512976 Bytes = 3430.64 KiB = 3.35 MiB
Load Address: 60000000
Entry Point:  60000000
  Image arch/arm/boot/uImage is ready


我們可以驗收一下 uImage 這個檔案,指令如下:

~/qemu_image/arm/kernel/linux-4.4.268 $ file arch/arm/boot/uImage
arch/arm/boot/uImage: u-boot legacy uImage, Linux-4.4.268, Linux/ARM, OS Kernel Image (Not compressed), 3512976 bytes, Fri Apr 30 03:29:49 2021, Load Address: 0x60000000, Entry Point: 0x60000000, Header CRC: 0x45384E4C, Data CRC: 0x07228E4B


從上面的檔案可以看到這是一個 Linux/ARM 的 OS 核心,版本為 4.4.268

**** 請注意,核心編好 !===== 核心可以用,我們之後會驗證這個核心能不能開機 ****

3.5 編譯核心模組

核心要正常工作必須要有相對應的核心模組,否則無法載入驅動程式,

# Compile Kernel Modules
time make -s ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules -j $CPU_CORE

# Install Kernel Modules
time make -s ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=../modules/ -j $CPU_CORE

cd ../modules
time tar cfa ../modules-$KERNEL_VERSION.tar.xz lib

編譯完成後我們會有一個名為 modules-核心編號.tar.xz 的檔案,此檔案可以用來取代原始 rootfs 中 /lib/modules 目錄中舊版的驅動核心模組。因此我們必須將舊版驅動核心模組移除,再放入我們剛剛編完之驅動核心模組。


3.6 測試編好的 Linux 核心模組能否開機

請切換到 linux-KERNEL_VERSION/arch/arm/boot 底下,然後執行:

$ qemu-system-arm -M vexpress-a9 -m 256 -nographic -kernel zImage

$ qemu-system-arm -M vexpress-a9 -m 256M -dtb dts/vexpress-v2p-ca9.dtb -nographic -kernel zImage -append "console=ttyAMA0"


此時會出現開機畫面,然後當掉,如底下所示:

pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Linux version 4.4.268 (herman@120-117-72-71) (gcc version 8.3.0 (Debian 8.3.0-2) ) #1 SMP Fri Apr 30 11:24:29 CST 2021
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine model: V2P-CA9
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
PERCPU: Embedded 11 pages/cpu @8fdc1000 s13964 r8192 d22900 u45056
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: console=ttyAMA0

..


ALSA device list:
  #0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 33
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/smb/smb:motherboard/smb:motherboard:iofpga@7,00000000/10007000.kmi/serio1/input/input2
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
1f00          131072 mtdblock0  (driver?)
1f01           32768 mtdblock1  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.268 #1
Hardware name: ARM-Versatile Express
[<80015ab0>] (unwind_backtrace) from [<80012604>] (show_stack+0x10/0x14)
[<80012604>] (show_stack) from [<804b4510>] (dump_stack+0x94/0xa8)
[<804b4510>] (dump_stack) from [<804b0624>] (panic+0x9c/0x1f4)
[<804b0624>] (panic) from [<8063e2b4>] (mount_block_root+0x1c0/0x250)
[<8063e2b4>] (mount_block_root) from [<8063e444>] (mount_root+0x100/0x108)
[<8063e444>] (mount_root) from [<8063e59c>] (prepare_namespace+0x150/0x198)
[<8063e59c>] (prepare_namespace) from [<8063deac>] (kernel_init_freeable+0x24c/0x25c)
[<8063deac>] (kernel_init_freeable) from [<804b60f8>] (kernel_init+0x8/0xe4)
[<804b60f8>] (kernel_init) from [<8000f390>] (ret_from_fork+0x14/0x24)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

此時表示 kernel 可以開機,但是因為還沒有跟整個系統整合在一起,所以會當機,我們按 Ctrl-a 再按 x 即可退出。


4. 放到你的「虛擬」嵌入式 ARM 平台,並使其開機

待續