FC2カウンター FPGAの部屋 2018年09月
fc2ブログ

FPGAやCPLDの話題やFPGA用のツールの話題などです。 マニアックです。 日記も書きます。

FPGAの部屋

FPGAの部屋の有用と思われるコンテンツのまとめサイトを作りました。Xilinx ISEの初心者の方には、FPGAリテラシーおよびチュートリアルのページをお勧めいたします。

ZYBOt のコースをKeras で学習した

ZYBOt のテスト用画像ファイルの作成(テスト・ファイルとラベル・ファイル)”の続き。

今まで作ってきたトレーニング・ファイルやラベル・ファイル、テスト・ファイルやラベル・ファイルを使用して、Keras で学習させた。

(2018/10/06 : 修正)画像を増やすスクリプトが間違っていたので、間違いを修正して学習をやり直しました。

まずは、course_line というディレクトリを作成し、その下にJupyter Notebook のファイルが入る course_nn2_line ディレクトリを作成した。そして、 train_course_run_image と train_course_run_label 、test_course_run_image と test_course_run_label と画像ファイルをロードする「ゼロから作るDeep Learning」のPython ファイルを使用した course_dataset.py が入っている dataset_course ディレクトリを作成した。
ZYBOt_Keras_21_180930

今までと同じネットワークで学習した。
ZYBOt_Keras_40_181006

学習画像での精度は 99.0 % だが、テスト画像での精度は 92.1 % だった。かなり離れてしまっている。

Train on 55350 samples, validate on 55800 samples
Epoch 1/3
55350/55350 [==============================] - 7s 134us/step - loss: 0.4229 - acc: 0.8291 - val_loss: 0.3622 - val_acc: 0.9065
Epoch 2/3
55350/55350 [==============================] - 7s 133us/step - loss: 0.0917 - acc: 0.9723 - val_loss: 0.4185 - val_acc: 0.9184
Epoch 3/3
55350/55350 [==============================] - 7s 135us/step - loss: 0.0459 - acc: 0.9871 - val_loss: 0.4027 - val_acc: 0.9240



グラフを示す。
ZYBOt_Keras_41_181006

モデルのサーマリを示す。

_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
conv2d_1 (Conv2D)            (None, 6, 52, 2)          52        
_________________________________________________________________
activation_1 (Activation)    (None, 6, 52, 2)          0         
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 3, 26, 2)          0         
_________________________________________________________________
flatten_1 (Flatten)          (None, 156)               0         
_________________________________________________________________
dense_1 (Dense)              (None, 100)               15700     
_________________________________________________________________
activation_2 (Activation)    (None, 100)               0         
_________________________________________________________________
dense_2 (Dense)              (None, 3)                 303       
_________________________________________________________________
activation_3 (Activation)    (None, 3)                 0         
=================================================================
Total params: 16,055
Trainable params: 16,055
Non-trainable params: 0


畳み込み層の統計情報を示す。

conv_layer_bias = [-0.47363704 -0.1307075 ]
np.max(conv_layer_weight) = 0.5713015794754028
np.min(conv_layer_weight) = -0.42728084325790405
np.max(abs_conv_layer_weight) = 0.5713015794754028
np.min(abs_conv_layer_weight) = 0.0053939069621264935
np.max(conv_layer_bias) = -0.1307075023651123
np.min(conv_layer_bias) = -0.47363704442977905
np.max(abs_conv_layer_bias) = 0.47363704442977905
np.min(abs_conv_layer_bias) = 0.1307075023651123
conv_output = (55800, 6, 52, 2)
np.std(conv_output) = 0.8600595593452454
np.max(conv_output) = 3.77016544342041
np.min(conv_output) = -2.09549617767334
np.max(abs_conv) = 3.77016544342041
np.min(abs_conv) = 6.556510925292969e-07


畳み込み層の重みとバイアスのグラフを示す。
ZYBOt_Keras_42_181006

全結合層1層目の統計情報を示す。

np.max(dence_layer1_weight) = 0.4407622218132019
np.min(dence_layer1_weight) = -0.46452072262763977
np.max(abs_dence_layer1_weight) = 0.46452072262763977
np.min(abs_dence_layer1_weight) = 2.4440741981379688e-06
np.max(dence_layer1_bias) = 0.2699412703514099
np.min(dence_layer1_bias) = -0.16888734698295593
np.max(abs_dence_layer1_bias) = 0.2699412703514099
np.min(abs_dence_layer1_bias) = 0.00015306042041629553
dence_layer1_output = (55800, 100)
np.std(dence_layer1_output) = 1.624572515487671
np.max(dence_layer1_output) = 10.883496284484863
np.min(dence_layer1_output) = -11.47065258026123
np.max(abs_dence_layer1_output) = 11.47065258026123
np.min(abs_dence_layer1_output) = 1.2665987014770508e-07


全結合層1層目の重みとバイアスのグラフを示す。
ZYBOt_Keras_43_181006

全結合2層目の統計情報を示す。

dence_layer2_bias = [ 0.04589511 -0.04674032 0.02472589]
np.max(dence_layer2_weight) = 0.995283305644989
np.min(dence_layer2_weight) = -1.0141152143478394
np.max(abs_dence_layer2_weight) = 1.0141152143478394
np.min(abs_dence_layer2_weight) = 0.0014004269614815712
np.max(dence_layer2_bias) = 0.04589511454105377
np.min(dence_layer2_bias) = -0.046740319579839706
np.max(abs_dence_layer2_bias) = 0.046740319579839706
np.min(abs_dence_layer2_bias) = 0.024725893512368202
dence_layer2_output = (55800, 3)
np.std(dence_layer2_output) = 7.085215091705322
np.max(dence_layer2_output) = 31.220308303833008
np.min(dence_layer2_output) = -24.410385131835938
np.max(abs_dence_layer2_output) = 31.220308303833008
np.min(abs_dence_layer2_output) = 1.2490898370742798e-05


全結合2層目の重みとバイアスのグラフを示す。
ZYBOt_Keras_44_181006

各層の重みやバイアスの C ヘッダ・ファイルを出力し、1000個のテスト画像を出力した C ヘッダ・ファイル course_line_data.h を出力した。
ZYBOt_Keras_27_180930
  1. 2018年09月30日 04:46 |
  2. Zybot
  3. | トラックバック:0
  4. | コメント:0

Ubuntu 18.04 にAnaconda をインストール

icrawler で学習用画像を収集する”で icrawler はなんとか pip でインストール出来たのだが、ZYBOt のKeras での学習が出来なかったので、仕方が無いので Anaconda をインストールすることにした。

Ubuntuを初めて触るド素人がAnacondaを入れてみた”を参考にして、Anaconda のサイトから Anaconda3-5.2.0-Linux-x86_64.sh をダウンロードしてインストールした。
Anaconda_1_180929.png

インストール後に .bashrc を反映した。
source .bashrc

Anaconda に keras をインストールした。
conda install -c conda-forge keras
Anaconda_2_180929.png

Anaconda に icrawler をインストールした。
conda install -c hellock icrawler
Anaconda_3_180929.png

jupyter notebook &
でJupyter Notebook を立ち上げた。

icrawler が動作した。
Anaconda_4_180929.png

Keras の学習も問題ない。
Anaconda_5_180929.png
  1. 2018年09月29日 16:06 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

icrawler で学習用画像を収集する

機械学習用の画像を集めるのにicrawlerが便利だった”で icrawler を使って学習用画像を収集していたが、なかなかうまく行かなかったので、顛末を書く。

icrawler のインストールはAnaconda の場合は、conda でインストール出来て、そちらはWindows だったが、動作して問題なかった。
pip の場合は、
pip install icrawler
でインストールを行った。
cralwer_1_180929.png
cralwer_2_180929.png

機械学習用の画像を集めるのにicrawlerが便利だった”のコードを少し変えて試してみたが、"Couldn't find a tree builder with the features you requested: lxml."というエラーだった。
cralwer_3_180929.png

色々と調べたところ、”BeautifulSoup4でlxmlが使えない”で、

lxmlのバージョンを3.7.3まで下げるとエラーは消えます。(3.8.0だとNG)

ということだったので、lxml の 3.7.3 をインストールした。
sudo pip install 'lxml==3.7.3'
cralwer_5_180929.png

cralwer_6_180929.png

これで、icrawler を動作させると動いた。
cralwer_4_180929.png

もう一度、
sudo pip install 'lxml==4.2.5'
で戻しても動作したのはなぜだろうか?

icrawler でグーグルを使って収集した猫の写真を示す。
cralwer_7_180929.png
  1. 2018年09月29日 11:40 |
  2. DNN
  3. | トラックバック:0
  4. | コメント:0

ZYBOt のテスト用画像ファイルの作成(テスト・ファイルとラベル・ファイル)

ZYBOt の学習用画像のトレーニング・ファイルのチェック”の続き。

前回までで学習用画像ファイルの用意が出来たので、今回は、テスト用画像ファイルのテスト・ファイルとラベル・ファイルを作成する。

テスト・ファイルの名前は、test_course_run_image で、ラベル・ファイルの名前は、test_course_run_label とした。
Vivado 2018.2 の course_test_dataset プロジェクトを作成し、course_test_dataset.cpp を作成した。
ZYBOt_Keras_16_180929

C シミュレーションを行った。
ZYBOt_Keras_17_180929

test_course_run_image と test_course_run_label が出来ている。
course_test_dataset/solution1/csim/build/ ディレクトリを見ると test_course_run_image が 31.2 MB で test_course_run_label が 55.8 kB だった。

test_course_run_image をバイナリ・エディタの GHex で開いた。
ZYBOt_Keras_19_180929

データ数が 0xD9F8 = 55800 個であることが分かる。

test_course_run_label をバイナリ・エディタの GHex で開いた。
ZYBOt_Keras_20_180929

こちらのデータ数も 0xD9F8 = 55800 個であることが分かった。

最後に course_test_dataset.cpp を示す。

// course_test_dataset.cpp
// 2018/09/29 by marsee
//

#include <iostream>
#include "hls_opencv.h"
#include <arpa/inet.h>
#include <stdio.h>
#include <dirent.h>
#include "hls_video.h"

#define BMP_HEIGHT    600
#define BMP_WIDTH    800

#define REDUCTION_RATIO 0.075   // 1/13.3333... 60x45

#define DATASET_HEIGHT  10
#define DATASET_WIDTH   56

const char LEFT_PIC_DIR[] = "test/left_test";
const char RIGHT_PIC_DIR[] = "test/right_test";
const char STRAIGHT_PIC_DIR[] = "test/straight_test";
const char CUR_DIR[] = ".";
const char PAR_DIR[] = "..";

int data_write(char *bmp_file, uint8_t label, FILE *ftin, FILE *ftln){
    uint8_t bufchar[100];

    cv::Mat pict_img = cv::imread(bmp_file,1);
    if(pict_img.empty()){
        fprintf(stderr,"Error: %s\n", bmp_file);
        return(-1);
    }
    cv::Mat reduct_img(pict_img.rows*0.075, pict_img.cols*0.075, pict_img.type());
    cv::resize(pict_img, reduct_img, reduct_img.size(), cv::INTER_LINEAR);
    cv::Mat gray_img;
    cv::cvtColor(reduct_img, gray_img, CV_BGR2GRAY);

    //sprintf(bmp_file, "%s_RED%d.bmp", straight_fn, i);
    //cv::imwrite(bmp_file, gray_img);

    for(int y=0; y<5; y++){
        for(int x=0; x<5; x++){
            cv::Rect rect_center(x, 30+y, 56, 10);
            cv::Mat img_rect(gray_img, rect_center);
            //sprintf(bmp_file, "%s_RED_rect%d_%d%d.bmp", straight_fn, i, y, x);
            //cv::imwrite(bmp_file, img_rect);

            for(int iy=0; iy<img_rect.rows; iy++){
                for(int ix=0; ix<img_rect.cols; ix++){
                    bufchar[ix] = img_rect.at<uchar>(iy, ix);
                }
                fwrite(bufchar, sizeof(uint8_t), img_rect.cols, ftin); // image write
            }
            bufchar[0] = label;
            fwrite(bufchar, sizeof(uint8_t), 1, ftln); // label write
        }
    }
    return(0);
}

int main(){
    char bmp_file[256];
    FILE *ftin, *ftln;
    char train_image_name[] = "test_course_run_image";
    char train_label_name[] = "test_course_run_label";
    uint32_t buf[5];

    DIR *ldir, *rdir, *sdir;
    struct dirent *ldp, *rdp, *sdp;
    int lnum=0, rnum=0, snum=0;
    int max_num;
    int lcnt=0, rcnt=0, scnt=0;

    // Open a train file and a test file
    if ((ftin = fopen(train_image_name, "wb")) == NULL){
        fprintf(stderr, "Can't open %s\n", train_image_name);
        exit(1);
    }
    if ((ftln = fopen(train_label_name, "wb")) == NULL){
        fprintf(stderr, "Can't open %s\n", train_label_name);
        exit(1);
    }

    // Open folder of each files
    if((ldir=opendir(LEFT_PIC_DIR)) == NULL){
        fprintf(stderr, "LEFT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((rdir=opendir(RIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "RIGHT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((sdir=opendir(STRAIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "STRAIGHT Open Error\n");
        exit(1);
    }

    // Count the number of files in each folder
    for(ldp=readdir(ldir); ldp != NULL; ldp=readdir(ldir)){
        lnum++;
    }
    for(rdp=readdir(rdir); rdp != NULL; rdp=readdir(rdir)){
        rnum++;
    }
    for(sdp=readdir(sdir); sdp != NULL; sdp=readdir(sdir)){
        snum++;
    }

    // Find the maximum value
    if(lnum > rnum && lnum > snum)
        max_num = lnum;
    else if(rnum > lnum && rnum > snum)
        max_num = rnum;
    else
        max_num = snum;

    printf("lnum = %d, rnum = %d, snum = %d, max_num = %d\n", lnum, rnum, snum, max_num);

    // Close
    closedir(ldir);
    closedir(rdir);
    closedir(sdir);

    // Writed header
    buf[0] = htonl(0x803); // magic number
    buf[1] = htonl((lnum-2+rnum-2+snum-2)*25); // number of image
    buf[2] = htonl(10); // number of rows (10)
    buf[3] = htonl(56); // number of columns (56)
    fwrite(buf, sizeof(uint32_t), 4, ftin);

    buf[0] = htonl(0x801); // magic number
    buf[1] = htonl((lnum-2+rnum-2+snum-2)*25); // number of image
    fwrite(buf, sizeof(uint32_t), 2, ftln);

    // refereed to http://opencv.jp/cookbook/opencv_img.html
    // Reopen folder of each file
    if((ldir=opendir(LEFT_PIC_DIR)) == NULL){
        fprintf(stderr, "LEFT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((rdir=opendir(RIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "RIGHT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((sdir=opendir(STRAIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "STRAIGHT Open Error\n");
        exit(1);
    }

    // read file name and write image data
    for(int i=1; i <= max_num; i++){
        if(i <= lnum){
            ldp = readdir(ldir);
            if(strcmp(CUR_DIR, ldp->d_name)!=0 && strcmp(PAR_DIR, ldp->d_name)!=0){
                sprintf(bmp_file, "%s/%s", LEFT_PIC_DIR, ldp->d_name);
                data_write(bmp_file, 0, ftin, ftln);
            }
        }
        if(i <= rnum){
            rdp = readdir(rdir);
            if(strcmp(CUR_DIR, rdp->d_name)!=0 && strcmp(PAR_DIR, rdp->d_name)!=0){
                sprintf(bmp_file, "%s/%s", RIGHT_PIC_DIR, rdp->d_name);
                data_write(bmp_file, 0x2, ftin, ftln);
            }
        }
        if(i <= snum){
            sdp = readdir(sdir);
            if(strcmp(CUR_DIR, sdp->d_name)!=0 && strcmp(PAR_DIR, sdp->d_name)!=0){
                sprintf(bmp_file, "%s/%s", STRAIGHT_PIC_DIR, sdp->d_name);
                data_write(bmp_file, 0x1, ftin, ftln);
            }
        }
    }
    fclose(ftin);
    fclose(ftln);

    return(0);
}

  1. 2018年09月29日 05:16 |
  2. Zybot
  3. | トラックバック:0
  4. | コメント:0

ZYBOt の学習用画像のトレーニング・ファイルのチェック

ZYBOt の学習用画像ファイルの作成(トレーニング・ファイルとラベル・ファイル)”の続き。

前回は、学習用画像ファイルを使用して、MNISTデータセットと同じフォーマットでトレーニング・ファイルとラベル・ファイルを生成した。今回は、その内のトレーニング・ファイルが正しいかどうか?を確かめてみよう。

元ネタのFPGAの部屋のブログの記事は、”白線追従走行用畳み込みニューラルネットワークの製作4(トレーニング・ファイルのチェック)

Vivado HLS 2018.2 の course_dataset_check プロジェクトを作成して、トレーニング・ファイルを読み出して、画像ファイルに変換するソフトウェアのcourse_dataset_check.cpp を作成した。
ZYBOt_Keras_12_180928

C シミュレーションを行った。
ZYBOt_Keras_13_180928

course_data_check/solution1/csim/build に output25.png から output99.png ファイルが生成された。
ZYBOt_Keras_14_180928

output25.png から output49.png までは右旋回の学習用画像となっている。横 5 ピクセルずらして、また縦 5 ピクセルづつずらして学習用画像を作成しているので、下の図の様になる。output50.png から 25 枚は直進の学習用画像となる。
ZYBOt_Keras_15_180928

問題なくトレーニング・ファイルが作成されているようだ。
最後に、course_dataset_check.cpp を貼っておく。

// course_dataset_check.cpp
// 2018/09/27 by marsee
//

#include <iostream>
#include "hls_opencv.h"

#define DATASET_HEIGHT  10
#define DATASET_WIDTH   56

#define IMAGE_START_NUMBER  25
#define IMAGE_DISP_LENGTH   75

int main(){
    FILE *ftin, *ftln;
    char train_image_name[] = "train_course_run_image";
    uint8_t buf[600];
    char png_file[100];

    if ((ftin = fopen(train_image_name, "rb")) == NULL){
        fprintf(stderr, "Can't open %s\n", train_image_name);
        exit(1);
    }

    fread(buf, sizeof(uint32_t), 4, ftin); // header read

    for(int i=0; i<IMAGE_START_NUMBER; i++){
        fread(buf, sizeof(uint8_t), DATASET_HEIGHT*DATASET_WIDTH, ftin);
    }

    cv::Mat wlt_img(cv::Size(56, 10), CV_8UC1);

    for (int i=0; i<IMAGE_DISP_LENGTH; i++){
        fread(buf, sizeof(uint8_t), DATASET_HEIGHT*DATASET_WIDTH, ftin);

        for (int y = 0; y < wlt_img.rows; y++) {
            for (int x = 0; x < wlt_img.cols; x++) {
                wlt_img.at<uchar>(y, x) = buf[y*DATASET_WIDTH+x];
            }
        }
        sprintf(png_file, "output%d.png", i+IMAGE_START_NUMBER);
        cv::imwrite(png_file, wlt_img);
    }

    fclose(ftin);

    return(0);
}

  1. 2018年09月28日 04:45 |
  2. Zybot
  3. | トラックバック:0
  4. | コメント:0

ZYBOt の学習用画像ファイルの作成(トレーニング・ファイルとラベル・ファイル)

ZYBOt の学習用画像を増やす”で学習用画像ファイルとテスト用画像ファイルを増やした。今回は、その学習用画像ファイルを使用して、MNISTデータセットと同じフォーマットでトレーニング・ファイルとラベル・ファイルを生成しよう。

MNIST手書き数字のデータフォーマットについては、”MNIST手書き数字のデータフォーマット”を見て欲しい。
後、参考にしたのは、”白線追従走行用畳み込みニューラルネットワークの製作3(トレーニング、ラベル・ファイルの作成)”。
やることは、800 x 600 ピクセルの元画像を 60 x 45 に縮小してから、白黒変換し、56 x 10 ピクセルの白線の画像を切り出して、画像のデータをtrain_course_run_image に書き込み、ラベルを train_course_run_label にバイナリで書き込む。

Vivado HLS 2018.2 の course_dataset_bmp プロジェクトを示す。
ZYBOt_Keras_7_180927

C シミュレーションを行った。
ZYBOt_Keras_8_180927

train_course_run_image と train_course_run_label が出来た。
ZYBOt_Keras_9_180927

train_course_run_image をGHex で見た。
画像ファイルの個数は D836 なので、10進数に直すと、55350 個で、”ZYBOt の学習用画像を増やす”の計算とぴったり合っている。
ZYBOt_Keras_10_180927

画像の縦は 0xA = 10 ピクセルで、横が 0x38 = 56 ピクセルということがわかる。

train_course_run_label をGHex で見た。
同様に、ラベルの個数は D836 なので、10進数に直すと、55350 個だった。
ZYBOt_Keras_11_180927

course_dataset_bmp.cppを示す。

// course_dataset_bmp.cpp
// 2018/09/24 by marsee
//

#include <iostream>
#include "hls_opencv.h"
#include <arpa/inet.h>
#include <stdio.h>
#include <dirent.h>
#include "hls_video.h"

#define BMP_HEIGHT    600
#define BMP_WIDTH    800

#define REDUCTION_RATIO 0.075   // 1/13.3333... 60x45

#define DATASET_HEIGHT  10
#define DATASET_WIDTH   56

typedef hls::Scalar<3, unsigned char> RGB_PIXEL;
typedef hls::Mat<BMP_HEIGHT, BMP_WIDTH, HLS_8UC3> RGB_IMAGE;
typedef hls::Mat<BMP_HEIGHT, BMP_WIDTH, HLS_8UC1> GRAY_IMAGE;

const char LEFT_PIC_DIR[] = "train/left";
const char RIGHT_PIC_DIR[] = "train/right";
const char STRAIGHT_PIC_DIR[] = "train/straight";
const char CUR_DIR[] = ".";
const char PAR_DIR[] = "..";

int data_write(char *bmp_file, uint8_t label, FILE *ftin, FILE *ftln){
    uint8_t bufchar[100];

    cv::Mat pict_img = cv::imread(bmp_file,1);
    if(pict_img.empty()){
        fprintf(stderr,"Error: %s\n", bmp_file);
        return(-1);
    }
    cv::Mat reduct_img(pict_img.rows*0.075, pict_img.cols*0.075, pict_img.type());
    cv::resize(pict_img, reduct_img, reduct_img.size(), cv::INTER_LINEAR);
    cv::Mat gray_img;
    cv::cvtColor(reduct_img, gray_img, CV_BGR2GRAY);

    //sprintf(bmp_file, "%s_RED%d.bmp", straight_fn, i);
    //cv::imwrite(bmp_file, gray_img);

    for(int y=0; y<5; y++){
        for(int x=0; x<5; x++){
            cv::Rect rect_center(x, 30+y, 56, 10);
            cv::Mat img_rect(gray_img, rect_center);
            //sprintf(bmp_file, "%s_RED_rect%d_%d%d.bmp", straight_fn, i, y, x);
            //cv::imwrite(bmp_file, img_rect);

            for(int iy=0; iy<img_rect.rows; iy++){
                for(int ix=0; ix<img_rect.cols; ix++){
                    bufchar[ix] = img_rect.at<uchar>(iy, ix);
                }
                fwrite(bufchar, sizeof(uint8_t), img_rect.cols, ftin); // image write
            }
            bufchar[0] = label;
            fwrite(bufchar, sizeof(uint8_t), 1, ftln); // label write
        }
    }
    return(0);
}

int main(){
    char bmp_file[256];
    FILE *ftin, *ftln;
    char train_image_name[] = "train_course_run_image";
    char train_label_name[] = "train_course_run_label";
    uint32_t buf[5];

    DIR *ldir, *rdir, *sdir;
    struct dirent *ldp, *rdp, *sdp;
    int lnum=0, rnum=0, snum=0;
    int max_num;
    int lcnt=0, rcnt=0, scnt=0;

    // Open a train file and a test file
    if ((ftin = fopen(train_image_name, "wb")) == NULL){
        fprintf(stderr, "Can't open %s\n", train_image_name);
        exit(1);
    }
    if ((ftln = fopen(train_label_name, "wb")) == NULL){
        fprintf(stderr, "Can't open %s\n", train_label_name);
        exit(1);
    }

    // Open folder of each files
    if((ldir=opendir(LEFT_PIC_DIR)) == NULL){
        fprintf(stderr, "LEFT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((rdir=opendir(RIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "RIGHT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((sdir=opendir(STRAIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "STRAIGHT Open Error\n");
        exit(1);
    }

    // Count the number of files in each folder
    for(ldp=readdir(ldir); ldp != NULL; ldp=readdir(ldir)){
        lnum++;
    }
    for(rdp=readdir(rdir); rdp != NULL; rdp=readdir(rdir)){
        rnum++;
    }
    for(sdp=readdir(sdir); sdp != NULL; sdp=readdir(sdir)){
        snum++;
    }

    // Find the maximum value
    if(lnum > rnum && lnum > snum)
        max_num = lnum;
    else if(rnum > lnum && rnum > snum)
        max_num = rnum;
    else
        max_num = snum;

    printf("lnum = %d, rnum = %d, snum = %d, max_num = %d\n", lnum, rnum, snum, max_num);

    // Close
    closedir(ldir);
    closedir(rdir);
    closedir(sdir);

    // Writed header
    buf[0] = htonl(0x803); // magic number
    buf[1] = htonl((lnum-2+rnum-2+snum-2)*25); // number of image
    buf[2] = htonl(10); // number of rows (10)
    buf[3] = htonl(56); // number of columns (56)
    fwrite(buf, sizeof(uint32_t), 4, ftin);

    buf[0] = htonl(0x801); // magic number
    buf[1] = htonl((lnum-2+rnum-2+snum-2)*25); // number of image
    fwrite(buf, sizeof(uint32_t), 2, ftln);

    // refereed to http://opencv.jp/cookbook/opencv_img.html
    // Reopen folder of each file
    if((ldir=opendir(LEFT_PIC_DIR)) == NULL){
        fprintf(stderr, "LEFT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((rdir=opendir(RIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "RIGHT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((sdir=opendir(STRAIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "STRAIGHT Open Error\n");
        exit(1);
    }

    // read file name and write image data
    for(int i=1; i <= max_num; i++){
        if(i <= lnum){
            ldp = readdir(ldir);
            if(strcmp(CUR_DIR, ldp->d_name)!=0 && strcmp(PAR_DIR, ldp->d_name)!=0){
                sprintf(bmp_file, "%s/%s", LEFT_PIC_DIR, ldp->d_name);
                data_write(bmp_file, 0, ftin, ftln);
            }
        }
        if(i <= rnum){
            rdp = readdir(rdir);
            if(strcmp(CUR_DIR, rdp->d_name)!=0 && strcmp(PAR_DIR, rdp->d_name)!=0){
                sprintf(bmp_file, "%s/%s", RIGHT_PIC_DIR, rdp->d_name);
                data_write(bmp_file, 0x2, ftin, ftln);
            }
        }
        if(i <= snum){
            sdp = readdir(sdir);
            if(strcmp(CUR_DIR, sdp->d_name)!=0 && strcmp(PAR_DIR, sdp->d_name)!=0){
                sprintf(bmp_file, "%s/%s", STRAIGHT_PIC_DIR, sdp->d_name);
                data_write(bmp_file, 0x1, ftin, ftln);
            }
        }
    }
    fclose(ftin);
    fclose(ftln);

    return(0);
}

  1. 2018年09月27日 04:38 |
  2. Zybot
  3. | トラックバック:0
  4. | コメント:0

Ubuntu 18.04 上でVivado HLS 2018.2 でOpenCV を使用したとき?のエラー

Ubuntu 18.04 上でVivado HLS 2018.2 を使用して(サポート外なので、エラーが出てもしかたなくはあるのですが)、OpenCV のソフトウェアを作っていたときに、C シミュレーションをすると、libpng12.so.0 が無いとエラーが出て困っていました。しかし、その解消方法もわかったので、ブログに書いておきます。

libpng なので、画像(imread()?)を読み込むところでしょうか?でエラーが出ています。Vivado HLS 2018.2 の画面を示します。
ZYBOt_Keras_4_180926

エラー内容の全文です。

Makefile.rules:399: recipe for target 'csim.exe' failed
/opt/Xilinx/Vivado/2018.2/tps/lnx64/binutils-2.26/bin/ld: warning: libpng12.so.0, needed by /opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_read_info@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_packing@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_IHDR@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_read_update_info@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_write_fn@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_write_end@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_create_read_struct@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_read_image@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_strip_alpha@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_gray_to_rgb@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_get_IHDR@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_strip_16@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_create_write_struct@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_init_io@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_swap@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_compression_strategy@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_write_info@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_destroy_write_struct@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_get_io_ptr@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_palette_to_rgb@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_compression_level@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_destroy_read_struct@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_read_end@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_rgb_to_gray@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_error@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_write_image@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_read_fn@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_create_info_struct@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_expand_gray_1_2_4_to_8@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_filter@PNG12_0' に対する定義されていない参照です
/opt/Xilinx/Vivado/2018.2/lnx64/tools/opencv/opencv_gcc/libopencv_highgui.so: `png_set_bgr@PNG12_0' に対する定義されていない参照です
collect2: エラー: ld はステータス 1 で終了しました
make: *** [csim.exe] Error 1
ERROR: [SIM 211-100] 'csim_design' failed: compilation error(s).
INFO: [SIM 211-3] *************** CSIM finish ***************


とりあえず、解決方法をググったところ、”Ubuntu 17.04 libpng12.so.0: cannot open shared object file #95”がヒットしました。その内のolalonde さんの解決策

wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \
&& sudo dpkg -i /tmp/libpng12.deb \
&& rm /tmp/libpng12.deb

を実行したところ解決できました。(ただし、dpkg の前に sudo を追加しました)
ZYBOt_Keras_5_180926

その後、C シミュレーションもうまく行きました。
ZYBOt_Keras_6_180926

(2020/01/05:追記)
上記の解決策でダメだったので、Web を検索したところ”Vivado HLS 2013.2 fails on ubuntu due to missing libtiff3”を見つけた。
そこに書いてあった
sudo apt-get install libjpeg62-dev
を実行したら解決した。
  1. 2018年09月27日 03:39 |
  2. Vivado HLS
  3. | トラックバック:0
  4. | コメント:0

ZYBOt の学習用画像を増やす

ZYBOt の学習用写真を取った(右回りコース)”の続き。

前回、ZYBOt の学習用画像が取れたが、それでは枚数が足りないため、 imagemagic を使ってバッチ・ファイルを起動して、画像を増やしていて、18倍に増やす。
コントラストを強めたり、弱めたり、ぼかしたり、画像のガンマ値を変更したり、ノイズを加えたりして増やしている。

元ネタは、”カーブ、直線用白線間走行用畳み込みニューラルネットワーク6(テスト用画像を増やす)”だが、今回は、ファイル名が連続していないので、どうしようか考えた。そしてテストしてみたところ、ファイル名が無くてもエラーを表示するだけで、処理は続くということがわかったので、エラーは /dev/null にリダイレクトすることにした。
そして、トレーニング・データ用の increase_image2_train とテスト・データ用の incrase_image2_test のスクリプトを作成した。

もとの学習用画像を示す。
ZYBOt_Keras_1_180924

トレーニング・データ用の increase_image2_train とテスト・データ用の incrase_image2_test のスクリプトを起動した。
ZYBOt_Keras_2_180924

学習用画像を増やした後のディレクトリを示す。
ZYBOt_Keras_3_180924

train の left ディレクトリを見ると、スクリプト・ファイル実行前のファイル数が 42 個だったが、スクリプト・ファイルの実行後は 756 個に増えた。756 / 42 = 18 倍に増えていることがわかる。
train 画像は、756 + 774 + 684 = 2214 個に増えた。学習用データを作成する際には 25 倍に増やすので、55350 個になる予定だ。
test 画像は、720 + 828 + 684 = 2232 個に増えた。テスト用データを作成する際には 25 倍に増やすので、55800 個になる予定だ。

increase_image2_train を示す。(2018/10/05:バグフィックス)

#!/bin/bash
# increase_images2_train

pict_max=250

# contrast
for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -contrast train/straight/bmp_file$(expr $i + $pict_max).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -contrast train/left/bmp_file$(expr $i + $pict_max).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -contrast train/right/bmp_file$(expr $i + $pict_max).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -contrast -contrast train/straight/bmp_file$(expr $i + $pict_max \* 2).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -contrast -contrast train/left/bmp_file$(expr $i + $pict_max \* 2).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -contrast -contrast train/right/bmp_file$(expr $i + $pict_max \* 2).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -contrast -contrast -contrast train/straight/bmp_file$(expr $i + $pict_max \* 3).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -contrast -contrast -contrast train/left/bmp_file$(expr $i + $pict_max \* 3).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -contrast -contrast -contrast train/right/bmp_file$(expr $i + $pict_max \* 3).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp +contrast train/straight/bmp_file$(expr $i + $pict_max \* 4).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp +contrast train/left/bmp_file$(expr $i + $pict_max \* 4).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp +contrast train/right/bmp_file$(expr $i + $pict_max \* 4).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp +contrast +contrast train/straight/bmp_file$(expr $i + $pict_max \* 5).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp +contrast +contrast train/left/bmp_file$(expr $i + $pict_max \* 5).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp +contrast +contrast train/right/bmp_file$(expr $i + $pict_max \* 5).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp +contrast +contrast +contrast train/straight/bmp_file$(expr $i + $pict_max \* 6).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp +contrast +contrast +contrast train/left/bmp_file$(expr $i + $pict_max \* 6).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp +contrast +contrast +contrast train/right/bmp_file$(expr $i + $pict_max \* 6).bmp &> /dev/null
done

# blur
for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -blur 10x1.5 train/straight/bmp_file$(expr $i + $pict_max \* 7).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -blur 10x1.5 train/left/bmp_file$(expr $i + $pict_max \* 7).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -blur 10x1.5 train/right/bmp_file$(expr $i + $pict_max \* 7).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -blur 10x2 train/straight/bmp_file$(expr $i + $pict_max \* 8).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -blur 10x2 train/left/bmp_file$(expr $i + $pict_max \* 8).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -blur 10x2 train/right/bmp_file$(expr $i + $pict_max \* 8).bmp &> /dev/null
done

# gaussian-blur
for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -gaussian-blur 10x1.5 train/straight/bmp_file$(expr $i + $pict_max \* 9).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -gaussian-blur 10x1.5 train/left/bmp_file$(expr $i + $pict_max \* 9).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -gaussian-blur 10x1.5 train/right/bmp_file$(expr $i + $pict_max \* 9).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -gaussian-blur 10x2 train/straight/bmp_file$(expr $i + $pict_max \* 10).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -gaussian-blur 10x2 train/left/bmp_file$(expr $i + $pict_max \* 10).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -gaussian-blur 10x2 train/right/bmp_file$(expr $i + $pict_max \* 10).bmp &> /dev/null
done

#gamma
for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -gamma 1.5 train/straight/bmp_file$(expr $i + $pict_max \* 11).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -gamma 1.5 train/left/bmp_file$(expr $i + $pict_max \* 11).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -gamma 1.5 train/right/bmp_file$(expr $i + $pict_max \* 11).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp -gamma 0.75 train/straight/bmp_file$(expr $i + $pict_max \* 12).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp -gamma 0.75 train/left/bmp_file$(expr $i + $pict_max \* 12).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp -gamma 0.75 train/right/bmp_file$(expr $i + $pict_max \* 12).bmp &> /dev/null
done

#noise
for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp +noise Gaussian train/straight/bmp_file$(expr $i + $pict_max \* 13).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp +noise Gaussian train/left/bmp_file$(expr $i + $pict_max \* 13).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp +noise Gaussian train/right/bmp_file$(expr $i + $pict_max \* 13).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp +noise Impulse train/straight/bmp_file$(expr $i + $pict_max \* 14).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp +noise Impulse train/left/bmp_file$(expr $i + $pict_max \* 14).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp +noise Impulse train/right/bmp_file$(expr $i + $pict_max \* 14).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp +noise Gaussian train/straight/bmp_file$(expr $i + $pict_max \* 15).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp +noise Gaussian train/left/bmp_file$(expr $i + $pict_max \* 15).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp +noise Gaussian train/right/bmp_file$(expr $i + $pict_max \* 15).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp +noise Impulse train/straight/bmp_file$(expr $i + $pict_max \* 16).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp +noise Impulse train/left/bmp_file$(expr $i + $pict_max \* 16).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp +noise Impulse train/right/bmp_file$(expr $i + $pict_max \* 16).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert train/straight/bmp_file$i.bmp +noise Laplacian train/straight/bmp_file$(expr $i + $pict_max \* 17).bmp &> /dev/null
    convert train/left/bmp_file$i.bmp +noise Laplacian train/left/bmp_file$(expr $i + $pict_max \* 17).bmp &> /dev/null
    convert train/right/bmp_file$i.bmp +noise Laplacian train/right/bmp_file$(expr $i + $pict_max \* 17).bmp &> /dev/null
done


incrase_image2_test を示す。(2018/10/05:バグフィックス)

#!/bin/bash
# increase_images2_test

pict_max=250

# contrast
for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -contrast test/straight_test/bmp_file$(expr $i + $pict_max).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -contrast test/left_test/bmp_file$(expr $i + $pict_max).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -contrast test/right_test/bmp_file$(expr $i + $pict_max).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -contrast -contrast test/straight_test/bmp_file$(expr $i + $pict_max \* 2).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -contrast -contrast test/left_test/bmp_file$(expr $i + $pict_max \* 2).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -contrast -contrast test/right_test/bmp_file$(expr $i + $pict_max \* 2).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -contrast -contrast -contrast test/straight_test/bmp_file$(expr $i + $pict_max \* 3).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -contrast -contrast -contrast test/left_test/bmp_file$(expr $i + $pict_max \* 3).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -contrast -contrast -contrast test/right_test/bmp_file$(expr $i + $pict_max \* 3).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp +contrast test/straight_test/bmp_file$(expr $i + $pict_max \* 4).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp +contrast test/left_test/bmp_file$(expr $i + $pict_max \* 4).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp +contrast test/right_test/bmp_file$(expr $i + $pict_max \* 4).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp +contrast +contrast test/straight_test/bmp_file$(expr $i + $pict_max \* 5).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp +contrast +contrast test/left_test/bmp_file$(expr $i + $pict_max \* 5).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp +contrast +contrast test/right_test/bmp_file$(expr $i + $pict_max \* 5).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp +contrast +contrast +contrast test/straight_test/bmp_file$(expr $i + $pict_max \* 6).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp +contrast +contrast +contrast test/left_test/bmp_file$(expr $i + $pict_max \* 6).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp +contrast +contrast +contrast test/right_test/bmp_file$(expr $i + $pict_max \* 6).bmp &> /dev/null
done

# blur
for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -blur 10x1.5 test/straight_test/bmp_file$(expr $i + $pict_max \* 7).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -blur 10x1.5 test/left_test/bmp_file$(expr $i + $pict_max \* 7).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -blur 10x1.5 test/right_test/bmp_file$(expr $i + $pict_max \* 7).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -blur 10x2 test/straight_test/bmp_file$(expr $i + $pict_max \* 8).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -blur 10x2 test/left_test/bmp_file$(expr $i + $pict_max \* 8).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -blur 10x2 test/right_test/bmp_file$(expr $i + $pict_max \* 8).bmp &> /dev/null
done

# gaussian-blur
for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -gaussian-blur 10x1.5 test/straight_test/bmp_file$(expr $i + $pict_max \* 9).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -gaussian-blur 10x1.5 test/left_test/bmp_file$(expr $i + $pict_max \* 9).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -gaussian-blur 10x1.5 test/right_test/bmp_file$(expr $i + $pict_max \* 9).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -gaussian-blur 10x2 test/straight_test/bmp_file$(expr $i + $pict_max \* 10).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -gaussian-blur 10x2 test/left_test/bmp_file$(expr $i + $pict_max \* 10).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -gaussian-blur 10x2 test/right_test/bmp_file$(expr $i + $pict_max \* 10).bmp &> /dev/null
done

#gamma
for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -gamma 1.5 test/straight_test/bmp_file$(expr $i + $pict_max \* 11).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -gamma 1.5 test/left_test/bmp_file$(expr $i + $pict_max \* 11).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -gamma 1.5 test/right_test/bmp_file$(expr $i + $pict_max \* 11).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp -gamma 0.75 test/straight_test/bmp_file$(expr $i + $pict_max \* 12).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp -gamma 0.75 test/left_test/bmp_file$(expr $i + $pict_max \* 12).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp -gamma 0.75 test/right_test/bmp_file$(expr $i + $pict_max \* 12).bmp &> /dev/null
done

#noise
for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp +noise Gaussian test/straight_test/bmp_file$(expr $i + $pict_max \* 13).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp +noise Gaussian test/left_test/bmp_file$(expr $i + $pict_max \* 13).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp +noise Gaussian test/right_test/bmp_file$(expr $i + $pict_max \* 13).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp +noise Impulse test/straight_test/bmp_file$(expr $i + $pict_max \* 14).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp +noise Impulse test/left_test/bmp_file$(expr $i + $pict_max \* 14).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp +noise Impulse test/right_test/bmp_file$(expr $i + $pict_max \* 14).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp +noise Gaussian test/straight_test/bmp_file$(expr $i + $pict_max \* 15).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp +noise Gaussian test/left_test/bmp_file$(expr $i + $pict_max \* 15).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp +noise Gaussian test/right_test/bmp_file$(expr $i + $pict_max \* 15).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp +noise Impulse test/straight_test/bmp_file$(expr $i + $pict_max \* 16).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp +noise Impulse test/left_test/bmp_file$(expr $i + $pict_max \* 16).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp +noise Impulse test/right_test/bmp_file$(expr $i + $pict_max \* 16).bmp &> /dev/null
done

for ((i=0; i < $pict_max; i++)); do
    convert test/straight_test/bmp_file$i.bmp +noise Laplacian test/straight_test/bmp_file$(expr $i + $pict_max \* 17).bmp &> /dev/null
    convert test/left_test/bmp_file$i.bmp +noise Laplacian test/left_test/bmp_file$(expr $i + $pict_max \* 17).bmp &> /dev/null
    convert test/right_test/bmp_file$i.bmp +noise Laplacian test/right_test/bmp_file$(expr $i + $pict_max \* 17).bmp &> /dev/null
done

  1. 2018年09月25日 05:37 |
  2. Zybot
  3. | トラックバック:0
  4. | コメント:0

映画『響 -HIBIKI-』を見てきました

映画『響 -HIBIKI-』を見てきました。良かったです。
主演の平手 友梨奈さんって、欅坂46のセンターなんですね。響にピッタリでした。とても良かったので、小説と漫画を買ってしまいました。
  1. 2018年09月24日 21:42 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

Vivado HLS でディレクトリのファイル名を取得するソフトウェアを開発

学習画像をMNISTのデータ形式に変換するのに、今回は、ファイル名が連番ではないので、すべてのファイル名を取得する必要がある。
どうするか?考えたが、ググってみると、「コンピューター:C言語講座:ディレクトリ内容の読み出し」を見つけた。このコードを元にファイル名を取得するように書いてみた。

Vivado HLS 2018.2 で scan_file_name というプロジェクトを作った。
ファイルは scan_file_name.cpp と、この前撮影したZYBOt カメラから撮影したコースの写真だ。
scan_file_name_1_180924.png

C シミュレーションを行った。成功だ。ファイル名を取得することができた。
scan_file_name_2_180924.png

C シミュレーションの出力結果を示す。

INFO: [SIM 2] *************** CSIM start ***************
INFO: [SIM 4] CSIM will launch GCC as the compiler.
Compiling ../../../scan_file_name.cpp in debug mode
Generating csim.exe
bmp_file5.bmp
bmp_file30.bmp
bmp_file7.bmp
bmp_file3.bmp
bmp_file15.bmp
bmp_file38.bmp
bmp_file8.bmp
bmp_file55.bmp
bmp_file57.bmp
bmp_file156.bmp
bmp_file175.bmp
bmp_file4.bmp
bmp_file32.bmp
bmp_file140.bmp
bmp_file58.bmp
bmp_file0.bmp
bmp_file51.bmp
bmp_file160.bmp
bmp_file139.bmp
bmp_file22.bmp
bmp_file129.bmp
bmp_file60.bmp
bmp_file181.bmp
bmp_file170.bmp
bmp_file37.bmp
bmp_file165.bmp
bmp_file177.bmp
bmp_file59.bmp
bmp_file147.bmp
bmp_file10.bmp
bmp_file25.bmp
bmp_file133.bmp
bmp_file169.bmp
bmp_file49.bmp
bmp_file161.bmp
bmp_file176.bmp
bmp_file28.bmp
bmp_file144.bmp
bmp_file42.bmp
bmp_file16.bmp
bmp_file135.bmp
bmp_file2.bmp
bmp_file21.bmp
bmp_file166.bmp
bmp_file1.bmp
bmp_file48.bmp
bmp_file183.bmp
bmp_file6.bmp
bmp_file150.bmp
bmp_file154.bmp
bmp_file128.bmp
bmp_file19.bmp
bmp_file145.bmp
bmp_file53.bmp
bmp_file64.bmp
bmp_file178.bmp
bmp_file127.bmp
bmp_file39.bmp
bmp_file164.bmp
bmp_file126.bmp
bmp_file47.bmp
bmp_file148.bmp
bmp_file172.bmp
bmp_file17.bmp
bmp_file158.bmp
bmp_file44.bmp
bmp_file151.bmp
bmp_file138.bmp
bmp_file56.bmp
bmp_file61.bmp
bmp_file180.bmp
bmp_file141.bmp
bmp_file174.bmp
bmp_file155.bmp
bmp_file168.bmp
bmp_file62.bmp
bmp_file33.bmp
bmp_file54.bmp
bmp_file35.bmp
bmp_file179.bmp
bmp_file11.bmp
bmp_file20.bmp
bmp_file159.bmp
bmp_file52.bmp
bmp_file24.bmp
bmp_file146.bmp
bmp_file43.bmp
bmp_file18.bmp
bmp_file182.bmp
bmp_file45.bmp
bmp_file29.bmp
bmp_file31.bmp
bmp_file14.bmp
bmp_file152.bmp
bmp_file136.bmp
bmp_file130.bmp
bmp_file40.bmp
bmp_file131.bmp
bmp_file13.bmp
bmp_file46.bmp
bmp_file134.bmp
bmp_file41.bmp
bmp_file9.bmp
bmp_file163.bmp
bmp_file12.bmp
bmp_file23.bmp
bmp_file34.bmp
bmp_file143.bmp
bmp_file63.bmp
bmp_file137.bmp
bmp_file142.bmp
bmp_file27.bmp
bmp_file149.bmp
bmp_file171.bmp
bmp_file26.bmp
bmp_file157.bmp
bmp_file50.bmp
bmp_file173.bmp
bmp_file36.bmp
bmp_file153.bmp
bmp_file132.bmp
bmp_file162.bmp
bmp_file167.bmp
INFO: [SIM 1] CSim done with 0 errors.
INFO: [SIM 3] *************** CSIM finish ***************


train ディレクトリの下のleft, right, straight ディレクトリには、42 + 43 + 38 = 123 個のファイルがある。それらのファイル名をすべて表示することができた。
scan_file_name_3_180924.png

これで、学習画像をMNIST のデータ形式に変換することができる。

scan_file_name.cpp のソースコードを貼っておく。

// scan_file_name.cpp
// 2018/09/23 by marsee
//

#include <stdio.h>
#include <dirent.h>
#include "hls_opencv.h"

const char LEFT_PIC_DIR[] = "train/left";
const char RIGHT_PIC_DIR[] = "train/right";
const char STRAIGHT_PIC_DIR[] = "train/straight";
const char CUR_DIR[] = ".";
const char PAR_DIR[] = "..";

int main(){
    DIR *ldir, *rdir, *sdir;
    struct dirent *ldp, *rdp, *sdp;
    int lnum=0, rnum=0, snum=0;
    int max_num;
    int lcnt=0, rcnt=0, scnt=0;

    // Open folder of each file
    if((ldir=opendir(LEFT_PIC_DIR)) == NULL){
        fprintf(stderr, "LEFT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((rdir=opendir(RIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "RIGHT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((sdir=opendir(STRAIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "STRAIGHT Open Error\n");
        exit(1);
    }
    
    // Count the number of files in each folder
    for(ldp=readdir(ldir); ldp != NULL; ldp=readdir(ldir)){
        lnum++;
    }
    for(rdp=readdir(rdir); rdp != NULL; rdp=readdir(rdir)){
        rnum++;
    }
    for(sdp=readdir(sdir); sdp != NULL; sdp=readdir(sdir)){
        snum++;
    }
    
    // Find the maximum value
    if(lnum > rnum && lnum > snum)
        max_num = lnum;
    else if(rnum > lnum && rnum > snum)
        max_num = rnum;
    else
        max_num = snum;
    
    // Close
    closedir(ldir);
    closedir(rdir);
    closedir(sdir);
    
    // Reopen folder of each file
    if((ldir=opendir(LEFT_PIC_DIR)) == NULL){
        fprintf(stderr, "LEFT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((rdir=opendir(RIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "RIGHT_PIC_DIR Open Error\n");
        exit(1);
    }
    if((sdir=opendir(STRAIGHT_PIC_DIR)) == NULL){
        fprintf(stderr, "STRAIGHT Open Error\n");
        exit(1);
    }
    
    // Display file name
    for(int i=1; i <= max_num; i++){
        if(i <= lnum){
            ldp = readdir(ldir);
            if(strcmp(CUR_DIR, ldp->d_name)!=0 && strcmp(PAR_DIR, ldp->d_name)!=0){
                std::cout << ldp->d_name << std::endl;
            }
        }
        if(i <= rnum){
            rdp = readdir(rdir);
            if(strcmp(CUR_DIR, rdp->d_name)!=0 && strcmp(PAR_DIR, rdp->d_name)!=0){
                std::cout << rdp->d_name << std::endl;
            }
        }
        if(i <= snum){
            sdp = readdir(sdir);
            if(strcmp(CUR_DIR, sdp->d_name)!=0 && strcmp(PAR_DIR, sdp->d_name)!=0){
                std::cout << sdp->d_name << std::endl;
            }
        }
    }
    
    return(0);
}

  1. 2018年09月24日 04:03 |
  2. Vivado HLS
  3. | トラックバック:0
  4. | コメント:0

「プーと大人になった僕」(映画)を見てきました

昨日奥さんと「プーと大人になった僕」(映画)を見てきました。プーさんは子供の付き合いで見させられていたので、エピソードも良く分かり、懐かしい思いで見てきました。良かったですよ。
  1. 2018年09月23日 12:38 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

Ultra96用Yocto Linuxのビルドの続き7(WLANの設定2)

Ultra96用Yocto Linuxのビルドの続き6(WLANの設定)”の続き。

前回は、無線LAN の設定をしたのだが、動作しなかった。今回は、石原ひでみさんの「超苦労したFPGAの薄い本」Yocto Project と立ち上げ編を参照して、無線LANとBluetooth のファームウェアをインストールしてみよう。

まずは、無線LANのファームウェアをgit clone する。
git clone git://git.ti.com/wilink8-wlan/wl18xx_fw.git
ls
cd wl18xx_fw
ls

で、wl18xx-fw-4.bin がダウンロードできたのが分かった。
cd .. で元のディレクトリに戻る。
Ultra96_Yocto_60_180921.png

次に Bluetooth のファームウェアを git clone する。これは、本の通りではできなかった。そこで、これでダウンロードした。
git clone git://git.ti.com/wilink8-bt/ti-bt-firmware.git
ls
cd ti-bt-framware/
ls

でTIInit_11.8.32.bts が見えた。
Ultra96_Yocto_61_180921.png

Micro SD カードをマウントして、ダウンロードしてきたファームウェアを書き込む。途中間違えているが愛嬌だと思ってほしい。。。
ROOT_FS/lib/firmware/ に ti-connectivity ディレクトリを作成して、無線LANと Bluetooth のファームウェアをコピーした。
cd /media/masaaki/ROOT_FS/lib/firmware/
sudo mkdir ti-connectivity
sudo cp ~/Ultra96/wl18xx_fw/wl18xx-fw-4.bin ./ti-connectivity/
sudo cp ~/Ultra96/ti-bt-firmware/TIInit_11.8.32.bts ./ti-connectivity/
ls ./ti-connectivity/

Ultra96_Yocto_62_180921.png

Micro SD カードをUltra96 に入れて電源ON。
ログインして ip addr show してみると wlan0 に IPアドレスが割り振られている。良かった。無線LANがつながった。
早速 sudo apt update した。
Ultra96_Yocto_63_180921.png
Ultra96_Yocto_64_180921.png

次に、sudo apt upgrade したが、成功した。
Ultra96_Yocto_65_180921.png
Ultra96_Yocto_66_180921.png

良かった。無線LANに接続出来たら ssh で入ることもできる。
最後に reboot したときのメッセージを貼っておく。

PMUFW:  v1.0


U-Boot 2018.01 (Sep 14 2018 - 20:02:18 +0900) Xilinx ZynqMP ZCU100 RevC

I2C:   ready
DRAM:  2 GiB
EL Level:       EL2
Chip ID:        zu3eg
MMC:   sdhci@ff160000: 0 (SD), sdhci@ff170000: 1
Using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Bootmode: SD_MODE
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Device: sdhci@ff160000
Manufacturer ID: 3
OEM: 5344
Name: SL08G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
456 bytes read in 9 ms (48.8 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Running uenvcmd ...
reading Image
14281216 bytes read in 1033 ms (13.2 MiB/s)
** No boot file defined **
reading system.dtb
33477 bytes read in 16 ms (2 MiB/s)
reading Image
14281216 bytes read in 1033 ms (13.2 MiB/s)
## Flattened Device Tree blob at 04000000
   Booting using the fdt blob at 0x4000000
   Loading Device Tree to 000000000fff4000, end 000000000ffff2c4 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0 (masaaki@masaaki-H110M4-M01) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #1 SMP Sun Sep 16 14:17:46 JST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x0000000070000000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc06ff71000 s45080 r8192 d32744 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 517120
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1786500K/2097152K available (9660K kernel code, 634K rwdata, 3072K rodata, 512K init, 2158K bss, 48508K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff80089f0000   (  9664 KB)
[    0.000000]     .rodata : 0xffffff80089f0000 - 0xffffff8008d00000   (  3136 KB)
[    0.000000]       .init : 0xffffff8008d00000 - 0xffffff8008d80000   (   512 KB)
[    0.000000]       .data : 0xffffff8008d80000 - 0xffffff8008e1ea00   (   635 KB)
[    0.000000]        .bss : 0xffffff8008e1ea00 - 0xffffff800903a230   (  2159 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01c00000   (    28 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024ee1c, max_idle_ns: 440795203561 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008399] Console: colour dummy device 80x25
[    0.012653] console [tty0] enabled
[    0.016018] bootconsole [cdns0] disabled
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0 (masaaki@masaaki-H110M4-M01) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #1 SMP Sun Sep 16 14:17:46 JST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x0000000070000000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc06ff71000 s45080 r8192 d32744 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 517120
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1786500K/2097152K available (9660K kernel code, 634K rwdata, 3072K rodata, 512K init, 2158K bss, 48508K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff80089f0000   (  9664 KB)
[    0.000000]     .rodata : 0xffffff80089f0000 - 0xffffff8008d00000   (  3136 KB)
[    0.000000]       .init : 0xffffff8008d00000 - 0xffffff8008d80000   (   512 KB)
[    0.000000]       .data : 0xffffff8008d80000 - 0xffffff8008e1ea00   (   635 KB)
[    0.000000]        .bss : 0xffffff8008e1ea00 - 0xffffff800903a230   (  2159 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01c00000   (    28 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024ee1c, max_idle_ns: 440795203561 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008399] Console: colour dummy device 80x25
[    0.012653] console [tty0] enabled
[    0.016018] bootconsole [cdns0] disabled
[    0.019930] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.019944] pid_max: default: 32768 minimum: 301
[    0.020064] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020082] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020814] ASID allocator initialised with 65536 entries
[    0.020868] Hierarchical SRCU implementation.
[    0.021214] EFI services will not be available.
[    0.021251] zynqmp_plat_init Platform Management API v1.0
[    0.021259] zynqmp_plat_init Trustzone version v1.0
[    0.021369] smp: Bringing up secondary CPUs ...
[    0.021658] Detected VIPT I-cache on CPU1
[    0.021695] CPU1: Booted secondary processor [410fd034]
[    0.022000] Detected VIPT I-cache on CPU2
[    0.022018] CPU2: Booted secondary processor [410fd034]
[    0.022304] Detected VIPT I-cache on CPU3
[    0.022322] CPU3: Booted secondary processor [410fd034]
[    0.022366] smp: Brought up 1 node, 4 CPUs
[    0.022397] SMP: Total of 4 processors activated.
[    0.022405] CPU features: detected feature: 32-bit EL0 Support
[    0.022416] CPU: All CPU(s) started at EL2
[    0.022434] alternatives: patching kernel code
[    0.023439] devtmpfs: initialized
[    0.027840] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.027871] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.034053] xor: measuring software checksum speed
[    0.072031]    8regs     :  2303.000 MB/sec
[    0.112062]    8regs_prefetch:  2053.000 MB/sec
[    0.152094]    32regs    :  2831.000 MB/sec
[    0.192125]    32regs_prefetch:  2379.000 MB/sec
[    0.192132] xor: using function: 32regs (2831.000 MB/sec)
[    0.192231] pinctrl core: initialized pinctrl subsystem
[    0.192954] NET: Registered protocol family 16
[    0.193933] cpuidle: using governor menu
[    0.194554] vdso: 2 pages (1 code @ ffffff80089f6000, 1 data @ ffffff8008d84000)
[    0.194572] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.195196] DMA: preallocated 256 KiB pool for atomic allocations
[    0.227002] zynqmp-pinctrl pinctrl: zynqmp pinctrl initialized
[    0.227894] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.228423] ARM CCI_400_r1 PMU driver probed
[    0.238104] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.304408] raid6: int64x1  gen()   452 MB/s
[    0.372362] raid6: int64x1  xor()   433 MB/s
[    0.440411] raid6: int64x2  gen()   678 MB/s
[    0.508463] raid6: int64x2  xor()   595 MB/s
[    0.576511] raid6: int64x4  gen()  1033 MB/s
[    0.644559] raid6: int64x4  xor()   757 MB/s
[    0.712613] raid6: int64x8  gen()   978 MB/s
[    0.780686] raid6: int64x8  xor()   748 MB/s
[    0.848723] raid6: neonx1   gen()   716 MB/s
[    0.916777] raid6: neonx1   xor()   832 MB/s
[    0.984828] raid6: neonx2   gen()  1156 MB/s
[    1.052894] raid6: neonx2   xor()  1187 MB/s
[    1.120940] raid6: neonx4   gen()  1497 MB/s
[    1.189014] raid6: neonx4   xor()  1428 MB/s
[    1.257059] raid6: neonx8   gen()  1659 MB/s
[    1.325123] raid6: neonx8   xor()  1526 MB/s
[    1.325131] raid6: using algorithm neonx8 gen() 1659 MB/s
[    1.325139] raid6: .... xor() 1526 MB/s, rmw enabled
[    1.325147] raid6: using neon recovery algorithm
[    1.326289] SCSI subsystem initialized
[    1.326509] usbcore: registered new interface driver usbfs
[    1.326547] usbcore: registered new interface driver hub
[    1.326589] usbcore: registered new device driver usb
[    1.326666] media: Linux media interface: v0.10
[    1.326694] Linux video capture interface: v2.00
[    1.326739] pps_core: LinuxPPS API ver. 1 registered
[    1.326747] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.326770] PTP clock support registered
[    1.326798] EDAC MC: Ver: 3.0.0
[    1.327181] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.327312] FPGA manager framework
[    1.327426] fpga-region fpga-full: FPGA Region probed
[    1.327515] Advanced Linux Sound Architecture Driver Initialized.
[    1.327832] Bluetooth: Core ver 2.22
[    1.327858] NET: Registered protocol family 31
[    1.327866] Bluetooth: HCI device and connection manager initialized
[    1.327879] Bluetooth: HCI socket layer initialized
[    1.327889] Bluetooth: L2CAP socket layer initialized
[    1.327916] Bluetooth: SCO socket layer initialized
[    1.328608] clocksource: Switched to clocksource arch_sys_counter
[    1.328699] VFS: Disk quotas dquot_6.6.0
[    1.328749] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.333137] NET: Registered protocol family 2
[    1.333503] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.333618] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.333950] TCP: Hash tables configured (established 16384 bind 16384)
[    1.334053] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.334097] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.334237] NET: Registered protocol family 1
[    1.334451] RPC: Registered named UNIX socket transport module.
[    1.334461] RPC: Registered udp transport module.
[    1.334467] RPC: Registered tcp transport module.
[    1.334474] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.335067] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.335238] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.335951] audit: initializing netlink subsys (disabled)
[    1.336351] audit: type=2000 audit(1.316:1): state=initialized audit_enabled=0 res=1
[    1.336396] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.337233] NFS: Registering the id_resolver key type
[    1.337258] Key type id_resolver registered
[    1.337265] Key type id_legacy registered
[    1.337279] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.337303] jffs2: version 2.2. (NAND) (SUMMARY)  c 2001-2006 Red Hat, Inc.
[    1.361602] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.361626] io scheduler noop registered
[    1.361635] io scheduler deadline registered
[    1.361656] io scheduler cfq registered (default)
[    1.361665] io scheduler mq-deadline registered
[    1.361673] io scheduler kyber registered
[    1.364444] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.391876] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.395130] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.399759] brd: module loaded
[    1.403896] loop: module loaded
[    1.404710] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.407325] libphy: Fixed MDIO Bus: probed
[    1.408425] tun: Universal TUN/TAP device driver, 1.6
[    1.408741] CAN device driver interface
[    1.409499] usbcore: registered new interface driver asix
[    1.409566] usbcore: registered new interface driver ax88179_178a
[    1.409597] usbcore: registered new interface driver cdc_ether
[    1.409630] usbcore: registered new interface driver net1080
[    1.409660] usbcore: registered new interface driver cdc_subset
[    1.409691] usbcore: registered new interface driver zaurus
[    1.409735] usbcore: registered new interface driver cdc_ncm
[    1.410106] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    1.412252] usbcore: registered new interface driver uas
[    1.412293] usbcore: registered new interface driver usb-storage
[    1.412884] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    1.412949] i2c /dev entries driver
[    1.413604] IR NEC protocol handler initialized
[    1.413613] IR RC5(x/sz) protocol handler initialized
[    1.413621] IR RC6 protocol handler initialized
[    1.413628] IR JVC protocol handler initialized
[    1.413635] IR Sony protocol handler initialized
[    1.413642] IR SANYO protocol handler initialized
[    1.413649] IR Sharp protocol handler initialized
[    1.413656] IR MCE Keyboard/mouse protocol handler initialized
[    1.413664] IR XMP protocol handler initialized
[    1.414528] usbcore: registered new interface driver uvcvideo
[    1.414537] USB Video Class driver (1.1.1)
[    1.414602] ltc2952-poweroff ltc2954: pm_power_off already registered
[    1.414616] ltc2952-poweroff: probe of ltc2954 failed with error -16
[    1.415554] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff8009045000 with timeout 10s
[    1.415727] Bluetooth: HCI UART driver ver 2.3
[    1.415738] Bluetooth: HCI UART protocol H4 registered
[    1.415746] Bluetooth: HCI UART protocol BCSP registered
[    1.415775] Bluetooth: HCI UART protocol LL registered
[    1.415783] Bluetooth: HCI UART protocol ATH3K registered
[    1.415791] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    1.415831] Bluetooth: HCI UART protocol Intel registered
[    1.415839] Bluetooth: HCI UART protocol QCA registered
[    1.415881] usbcore: registered new interface driver bcm203x
[    1.415919] usbcore: registered new interface driver bpa10x
[    1.415957] usbcore: registered new interface driver bfusb
[    1.415993] usbcore: registered new interface driver btusb
[    1.416001] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    1.416057] usbcore: registered new interface driver ath3k
[    1.416179] EDAC MC: ECC not enabled
[    1.416384] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    1.417481] sdhci: Secure Digital Host Controller Interface driver
[    1.417493] sdhci: Copyright(c) Pierre Ossman
[    1.417500] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.418843] ledtrig-cpu: registered to indicate activity on CPUs
[    1.419007] usbcore: registered new interface driver usbhid
[    1.419015] usbhid: USB HID core driver
[    1.420417] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    1.421177] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    1.421466] Netfilter messages via NETLINK v0.30.
[    1.421609] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.421764] Initializing XFRM netlink socket
[    1.421850] NET: Registered protocol family 10
[    1.422279] Segment Routing with IPv6
[    1.422329] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    1.422462] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.422824] NET: Registered protocol family 17
[    1.422841] NET: Registered protocol family 15
[    1.422864] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.422878] Ebtables v2.0 registered
[    1.422969] can: controller area network core (rev 20170425 abi 9)
[    1.423012] NET: Registered protocol family 29
[    1.423021] can: raw protocol (rev 20170425)
[    1.423029] can: broadcast manager protocol (rev 20170425 t)
[    1.423041] can: netlink gateway (rev 20170425) max_hops=1
[    1.423314] Bluetooth: RFCOMM TTY layer initialized
[    1.423328] Bluetooth: RFCOMM socket layer initialized
[    1.423345] Bluetooth: RFCOMM ver 1.11
[    1.423361] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    1.423369] Bluetooth: BNEP filters: protocol multicast
[    1.423379] Bluetooth: BNEP socket layer initialized
[    1.423387] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.423397] Bluetooth: HIDP socket layer initialized
[    1.423518] 9pnet: Installing 9P2000 support
[    1.423543] Key type dns_resolver registered
[    1.424009] registered taskstats version 1
[    1.424368] Btrfs loaded, crc32c=crc32c-generic
[    1.431388] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 24, base_baud = 6249999) is a xuartps
[    1.431606] serial serial0: tty port ttyPS1 registered
[    1.431979] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 25, base_baud = 6249999) is a xuartps
[    2.798016] console [ttyPS0] enabled
[    2.803273] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    2.811459] PLL: shutdown
[    2.814145] PLL: shutdown
[    2.817142] PLL: enable
[    2.819628] PLL: shutdown
[    2.823266] PLL: enable
[    2.825744] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    2.836354] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    2.844321] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    2.852675] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.865038] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.877660] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    2.887776] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    2.894735] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.901278] [drm] No driver support for vblank timestamp query.
[    2.907263] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008aa5fa8)
[    3.009366] PLL: enable
[    3.137515] Console: switching to colour frame buffer device 240x67
[    3.162876] zynqmp-display fd4a0000.zynqmp-display: fb0:  frame buffer device
[    3.170220] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    3.178326] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    3.189055] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locked:yes
[    3.199416] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:1 protocol:3 pll_locked:yes
[    3.207502] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.212984] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.220889] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.229625] xhci-hcd xhci-hcd.0.auto: irq 33, io mem 0xfe300000
[    3.235651] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.242427] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.249632] usb usb1: Product: xHCI Host Controller
[    3.254470] usb usb1: Manufacturer: Linux 4.14.0 xhci-hcd
[    3.259855] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.265045] hub 1-0:1.0: USB hub found
[    3.268774] hub 1-0:1.0: 1 port detected
[    3.272852] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.278313] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.286008] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.294166] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    3.300935] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.308143] usb usb2: Product: xHCI Host Controller
[    3.312982] usb usb2: Manufacturer: Linux 4.14.0 xhci-hcd
[    3.318367] usb usb2: SerialNumber: xhci-hcd.0.auto
[    3.323466] hub 2-0:1.0: USB hub found
[    3.327201] hub 2-0:1.0: 1 port detected
[    3.332789] i2c i2c-0: Added multiplexed i2c bus 2
[    3.337680] i2c i2c-0: Added multiplexed i2c bus 3
[    3.342563] i2c i2c-0: Added multiplexed i2c bus 4
[    3.347454] i2c i2c-0: Added multiplexed i2c bus 5
[    3.353190] tps65086 6-005e: Device: TPS650864, OTP: C, Rev: 0
[    3.365509] i2c i2c-0: Added multiplexed i2c bus 6
[    3.371622] ina2xx 7-0040: power monitor ina226 (Rshunt = 10000 uOhm)
[    3.378072] i2c i2c-0: Added multiplexed i2c bus 7
[    3.382969] i2c i2c-0: Added multiplexed i2c bus 8
[    3.387860] i2c i2c-0: Added multiplexed i2c bus 9
[    3.392623] pca954x 0-0075: registered 8 multiplexed busses for I2C switch pca9548
[    3.400215] cdns-i2c ff030000.i2c: 100 kHz mmio ff030000 irq 15
[    3.452618] mmc0: SDHCI controller on ff160000.sdhci [ff160000.sdhci] using ADMA 64-bit
[    3.467075] sdhci-arasan ff170000.sdhci: allocated mmc-pwrseq
[    3.513514] mmc0: new high speed SDHC card at address aaaa
[    3.522184] mmc1: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit
[    3.533325] mmcblk0: mmc0:aaaa SL08G 7.40 GiB
[    3.542675] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.553057] rtc_zynqmp ffa60000.rtc: setting system clock to 2018-09-21 12:40:53 UTC (1537533653)
[    3.565188] clk: Not disabling unused clocks
[    3.572655] ALSA device list:
[    3.578757]   #0: DisplayPort monitor
[    3.586036]  mmcblk0: p1 p2
[    3.596079] sdhci-arasan ff170000.sdhci: card claims to support voltages below defined range
[    3.596156] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    3.608416] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.608439] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.615561] devtmpfs: mounted
[    3.615815] Freeing unused kernel memory: 512K
[    3.652705] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    3.674632] mmc1: new high speed SDIO card at address 0001
[    3.699524] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[    3.713274] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[    3.727021] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[    3.738865] wlcore: WARNING falling back to default config
[    3.825159] usb 1-1: New USB device found, idVendor=0424, idProduct=2744
[    3.834978] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.845167] usb 1-1: Product: USB2744
[    3.851837] usb 1-1: Manufacturer: Microchip Tech
[    3.862154] hub 1-1:1.0: USB hub found
[    3.869001] hub 1-1:1.0: 4 ports detected
[    3.958347] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    3.960660] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    3.989514] systemd[1]: Detected architecture arm64.
[    3.992993] usb 2-1: New USB device found, idVendor=0424, idProduct=5744
[    3.992997] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    3.993001] usb 2-1: Product: USB5744
[    3.993004] usb 2-1: Manufacturer: Microchip Tech
[    4.006125] hub 2-1:1.0: USB hub found
[    4.006165] hub 2-1:1.0: 3 ports detected

Welcome to Debian GNU/Linux 9 (stretch)!

[    4.071995] systemd[1]: Set hostname to <debian-fpga>.
[    4.085076] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    4.087110] Bluetooth: hci0: change remote baud rate command in firmware
[    4.108248] wlcore: loaded
[    4.204649] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[    4.313629] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740
[    4.323732] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.334198] usb 1-1.4: Product: Hub Controller
[    4.341775] usb 1-1.4: Manufacturer: Microchip Tech
[    4.357374] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    4.376711] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[    4.392688] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    4.412828] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    4.432764] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[    4.460819] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[    4.488786] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-getty.slice.
         Starting Remount Root and Kernel File Systems...
         Mounting Debug File System...
         Starting Nameserver information manager...
         Mounting POSIX Message Queue File System...
         Starting Load Kernel Modules...
[  OK  ] Reached target Slices.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
         Starting Journal Service...
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Debug File System.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Nameserver information manager.
[  OK  ] Started Journal Service.
         Starting udev Kernel Device Manager...
         Mounting Configuration File System...
         Starting Apply Kernel Variables...
         Starting udev Coldplug all Devices...
         Starting Flush Journal to Persistent Storage...
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /config...
[  OK  ] Mounted Configuration File System.
[  OK  ] Mounted /config.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Load/Save Random Seed.
[    5.039420] systemd-journald[1716]: Received request to flush runtime journal from PID 1
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Reached target Sound Card.
[  OK  ] Reached target Bluetooth.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Found device /dev/ttyPS0.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Starting Load/Save RF Kill Switch Status...
[  OK  ] Started Load/Save RF Kill Switch Status.
[  OK  ] Found device /dev/mmcblk0p1.
         Mounting /mnt/boot...
[    5.889295] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[  OK  ] Mounted /mnt/boot.
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
         Starting Raise network interfaces...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Reached target System Time Synchronized.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started D-Bus System Message Bus.
         Starting Avahi mDNS/DNS-SD Stack...
         Starting System Logging Service...
         Starting Login Service...
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
[  OK  ] Started System Logging Service.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started Login Service.
[    6.902613] wlcore: PHY firmware version: Rev 8.2.0.0.242
[    7.002948] wlcore: firmware booted (Rev 8.9.0.0.79)
[    7.018155] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    8.556624] Bluetooth: hci0 command 0xff05 tx timeout
[   11.271647] wlan0: authenticate with 84:af:ec:c5:f2:20
[   11.282296] wlan0: send auth to 84:af:ec:c5:f2:20 (try 1/3)
[   11.311981] wlan0: authenticated
[   11.320618] wlan0: associate with 84:af:ec:c5:f2:20 (try 1/3)
[   11.333689] wlan0: RX AssocResp from 84:af:ec:c5:f2:20 (capab=0x411 status=0 aid=1)
[   11.349380] wlan0: associated
[   11.355788] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   11.381899] wlcore: Association completed.
[    **] A start job is running for Raise network interfaces (12s / 5min 1s)[   16.620624] Bluetooth: hci0: send command failed
[   16.628644] Bluetooth: hci0: download firmware failed, retrying...
[   ***] A start job is running for Raise network interfaces (12s / 5min 1s)[   17.167769] Bluetooth: hci0: change remote baud rate command in firmware
[***   ] A start job is running for Raise network interfaces (16s / 5min 1s)[   21.612624] Bluetooth: hci0 command 0xff05 tx timeout
[***   ] A start job is running for Raise network interfaces (25s / 5min 1s)[   29.676624] Bluetooth: hci0: send command failed
[   29.684538] Bluetooth: hci0: download firmware failed, retrying...
[   30.223727] Bluetooth: hci0: change remote baud rate command in firmware
         Starting Samba SMB Daemon...
[  OK  ] Started Samba SMB Daemon.
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
         Starting LSB: Start NTP daemon...
         Starting Samba NMB Daemon...
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyPS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started Samba NMB Daemon.
[   34.668628] Bluetooth: hci0 command 0xff05 tx timeout

Debian GNU/Linux 9 debian-fpga ttyPS0

debian-fpga login: [   42.732625] Bluetooth: hci0: send command failed
[   42.737249] Bluetooth: hci0: download firmware failed, retrying...
[   43.280309] Bluetooth: hci0: change remote baud rate command in firmware
[   47.726463] Bluetooth: hci0 command 0xff05 tx timeout
[   55.793793] Bluetooth: hci0: send command failed
[   55.798415] Bluetooth: hci0: download firmware failed, retrying...
[  208.559006] random: crng init done

Debian GNU/Linux 9 debian-fpga ttyPS0

debian-fpga login: fpga

  1. 2018年09月22日 05:30 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

Ultra96用Yocto Linuxのビルドの続き6(WLANの設定)

Ultra96用Yocto Linuxのビルドの続き5(Debian Root FS で起動)”の続き。

前回は、Yocto でビルドしたRoot FS の代わりに ikwzm さんのDebian Root FS でUltra96 のLinux が起動できた。今回は、無線LAN の設定を行う。

まずは、wpa_passphrase コマンドで無線LANのパスフレーズを暗号化する。
wpa_passphrase Buffalo-G-F220 パスフレーズ
を実行すると、psk に暗号化されたパスフレーズが出力された。
Ultra96_Yocto_57_180921.png

/etc/network/interfaces.d/ ディレクトリに wlan0 の設定ファイルを作成した。
sudo vi wlan0
Ultra96_Yocto_58_180921.png

セーブして終了して、リブートした。
sudo reboot
起動メッセージではエラーになっていた。ドライバが無いのかな?
Ultra96_Yocto_59_180921.png

エラーになった起動メッセージを示す。

[    6.880874] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2
[    6.895376] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2
[    7.196780] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2
[    7.211272] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2
[    7.512779] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2
[    7.527322] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2
[    7.540162] wlcore: ERROR firmware boot failed despite 3 retries
[    7.840795] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2
[    7.855411] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2
[    8.156781] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2
[    8.171480] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2
[    8.472778] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-fw-4.bin failed with error -2
[    8.487510] wlcore: ERROR could not get firmware ti-connectivity/wl18xx-fw-4.bin: -2
[    8.500562] wlcore: ERROR firmware boot failed despite 3 retries
[FAILED] Failed to start Raise network interfaces.



WLANのファームウェアをダウンロードしてRoot FS にコピーする必要があるようです。石原ひでみさんの「超苦労したFPGAの薄い本」Yocto Project と立ち上げ編の「6.13. Linux上でのWiFiの罠」に書いてあるので、やってみたいと思います。
  1. 2018年09月21日 05:08 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

Ultra96用Yocto Linuxのビルドの続き5(Debian Root FS で起動)

”Ultra96用Yocto Linuxのビルドの続き4(Micro SD カードの用意、Ultra96で動作確認)”の続き。

前回は、Micro SD カードに生成してきたファイルをコピーして、Ultra96に挿入して、Linux を起動することができた。今回は、Yocto でビルドしたRoot FS の代わりに ikwzm さんのDebian Root FS で起動できるかどうか?を確かめてみよう。

”FPGA+SoC+Linux+Device Tree Overlay+FPGA Region(ブートイメージの提供)”のZYBO 用の debian9-rootfs-vanilla.tgz : Debian9 Root File System (use Git LFS) があったので、それを使用した。

まずは、Micro SD カードをWindows 10 の VirtualBox 上にインストールした Ubuntu 16.04 にマウントして、/media/masaaki/ROOT_FS/ のディレクトリをすべて消去した。
cd /media/masaaki/ROOT_FS/
sudo rm -rf *


Debian Root FS を解凍して展開した。
sudo tar xfz /mnt/VBoxShared/debian9-rootfs-vanilla.tgz -C .
sync

Ultra96_Yocto_53_180919.png

Debian Root FS
Ultra96_Yocto_54_180919.png

これで、Micro SD カードをアンマウントして、Ultra96に挿入して、電源ON。
するとLinux をブートして、login 画面が表示された。成功だ。
IDは fpga パスワードも fpga でログインできた。
Ultra96_Yocto_55_180919.png

ip addr show を実行してみると、WLAN のエントリもあるようだ。WLAN が設定出来ればインターネットに接続できるだろう?
Ultra96_Yocto_56_180919.png

sudo reboot で再起動したときの起動メッセージを貼っておく。

[  247.804238] reboot: Restarting system
PMUFW:  v1.0


U-Boot 2018.01 (Sep 14 2018 - 20:02:18 +0900) Xilinx ZynqMP ZCU100 RevC

I2C:   ready
DRAM:  2 GiB
EL Level:       EL2
Chip ID:        zu3eg
MMC:   sdhci@ff160000: 0 (SD), sdhci@ff170000: 1
Using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Bootmode: SD_MODE
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Device: sdhci@ff160000
Manufacturer ID: 3
OEM: 5344
Name: SL08G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
456 bytes read in 8 ms (55.7 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Running uenvcmd ...
reading Image
14281216 bytes read in 1032 ms (13.2 MiB/s)
** No boot file defined **
reading system.dtb
33477 bytes read in 16 ms (2 MiB/s)
reading Image
14281216 bytes read in 1031 ms (13.2 MiB/s)
## Flattened Device Tree blob at 04000000
   Booting using the fdt blob at 0x4000000
   Loading Device Tree to 000000000fff4000, end 000000000ffff2c4 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0 (masaaki@masaaki-H110M4-M01) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #1 SMP Sun Sep 16 14:17:46 JST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x0000000070000000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc06ff71000 s45080 r8192 d32744 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 517120
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1786500K/2097152K available (9660K kernel code, 634K rwdata, 3072K rodata, 512K init, 2158K bss, 48508K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff80089f0000   (  9664 KB)
[    0.000000]     .rodata : 0xffffff80089f0000 - 0xffffff8008d00000   (  3136 KB)
[    0.000000]       .init : 0xffffff8008d00000 - 0xffffff8008d80000   (   512 KB)
[    0.000000]       .data : 0xffffff8008d80000 - 0xffffff8008e1ea00   (   635 KB)
[    0.000000]        .bss : 0xffffff8008e1ea00 - 0xffffff800903a230   (  2159 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01c00000   (    28 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024ee1c, max_idle_ns: 440795203561 ns
[    0.000003] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008399] Console: colour dummy device 80x25
[    0.012654] console [tty0] enabled
[    0.016019] bootconsole [cdns0] disabled
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0 (masaaki@masaaki-H110M4-M01) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #1 SMP Sun Sep 16 14:17:46 JST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x0000000070000000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc06ff71000 s45080 r8192 d32744 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 517120
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1786500K/2097152K available (9660K kernel code, 634K rwdata, 3072K rodata, 512K init, 2158K bss, 48508K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff80089f0000   (  9664 KB)
[    0.000000]     .rodata : 0xffffff80089f0000 - 0xffffff8008d00000   (  3136 KB)
[    0.000000]       .init : 0xffffff8008d00000 - 0xffffff8008d80000   (   512 KB)
[    0.000000]       .data : 0xffffff8008d80000 - 0xffffff8008e1ea00   (   635 KB)
[    0.000000]        .bss : 0xffffff8008e1ea00 - 0xffffff800903a230   (  2159 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01c00000   (    28 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024ee1c, max_idle_ns: 440795203561 ns
[    0.000003] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008399] Console: colour dummy device 80x25
[    0.012654] console [tty0] enabled
[    0.016019] bootconsole [cdns0] disabled
[    0.019930] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.019945] pid_max: default: 32768 minimum: 301
[    0.020066] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020084] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020818] ASID allocator initialised with 65536 entries
[    0.020873] Hierarchical SRCU implementation.
[    0.021222] EFI services will not be available.
[    0.021258] zynqmp_plat_init Platform Management API v1.0
[    0.021267] zynqmp_plat_init Trustzone version v1.0
[    0.021378] smp: Bringing up secondary CPUs ...
[    0.021664] Detected VIPT I-cache on CPU1
[    0.021701] CPU1: Booted secondary processor [410fd034]
[    0.022012] Detected VIPT I-cache on CPU2
[    0.022031] CPU2: Booted secondary processor [410fd034]
[    0.022316] Detected VIPT I-cache on CPU3
[    0.022334] CPU3: Booted secondary processor [410fd034]
[    0.022377] smp: Brought up 1 node, 4 CPUs
[    0.022409] SMP: Total of 4 processors activated.
[    0.022417] CPU features: detected feature: 32-bit EL0 Support
[    0.022428] CPU: All CPU(s) started at EL2
[    0.022446] alternatives: patching kernel code
[    0.023452] devtmpfs: initialized
[    0.027865] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.027895] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.034070] xor: measuring software checksum speed
[    0.072033]    8regs     :  2303.000 MB/sec
[    0.112063]    8regs_prefetch:  2053.000 MB/sec
[    0.152095]    32regs    :  2831.000 MB/sec
[    0.192126]    32regs_prefetch:  2379.000 MB/sec
[    0.192134] xor: using function: 32regs (2831.000 MB/sec)
[    0.192232] pinctrl core: initialized pinctrl subsystem
[    0.192951] NET: Registered protocol family 16
[    0.193728] cpuidle: using governor menu
[    0.194353] vdso: 2 pages (1 code @ ffffff80089f6000, 1 data @ ffffff8008d84000)
[    0.194373] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.194990] DMA: preallocated 256 KiB pool for atomic allocations
[    0.226795] zynqmp-pinctrl pinctrl: zynqmp pinctrl initialized
[    0.227690] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.228220] ARM CCI_400_r1 PMU driver probed
[    0.237994] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.304348] raid6: int64x1  gen()   452 MB/s
[    0.372344] raid6: int64x1  xor()   434 MB/s
[    0.440420] raid6: int64x2  gen()   678 MB/s
[    0.508433] raid6: int64x2  xor()   595 MB/s
[    0.576487] raid6: int64x4  gen()  1033 MB/s
[    0.644557] raid6: int64x4  xor()   757 MB/s
[    0.712578] raid6: int64x8  gen()   978 MB/s
[    0.780642] raid6: int64x8  xor()   748 MB/s
[    0.848671] raid6: neonx1   gen()   716 MB/s
[    0.916751] raid6: neonx1   xor()   832 MB/s
[    0.984791] raid6: neonx2   gen()  1156 MB/s
[    1.052835] raid6: neonx2   xor()  1187 MB/s
[    1.120894] raid6: neonx4   gen()  1497 MB/s
[    1.188920] raid6: neonx4   xor()  1428 MB/s
[    1.256986] raid6: neonx8   gen()  1659 MB/s
[    1.325018] raid6: neonx8   xor()  1526 MB/s
[    1.325026] raid6: using algorithm neonx8 gen() 1659 MB/s
[    1.325033] raid6: .... xor() 1526 MB/s, rmw enabled
[    1.325042] raid6: using neon recovery algorithm
[    1.326175] SCSI subsystem initialized
[    1.326393] usbcore: registered new interface driver usbfs
[    1.326434] usbcore: registered new interface driver hub
[    1.326477] usbcore: registered new device driver usb
[    1.326551] media: Linux media interface: v0.10
[    1.326581] Linux video capture interface: v2.00
[    1.326625] pps_core: LinuxPPS API ver. 1 registered
[    1.326633] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.326656] PTP clock support registered
[    1.326686] EDAC MC: Ver: 3.0.0
[    1.327068] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.327323] FPGA manager framework
[    1.327443] fpga-region fpga-full: FPGA Region probed
[    1.327532] Advanced Linux Sound Architecture Driver Initialized.
[    1.327848] Bluetooth: Core ver 2.22
[    1.327877] NET: Registered protocol family 31
[    1.327885] Bluetooth: HCI device and connection manager initialized
[    1.327898] Bluetooth: HCI socket layer initialized
[    1.327908] Bluetooth: L2CAP socket layer initialized
[    1.327934] Bluetooth: SCO socket layer initialized
[    1.328630] clocksource: Switched to clocksource arch_sys_counter
[    1.328722] VFS: Disk quotas dquot_6.6.0
[    1.328772] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.333120] NET: Registered protocol family 2
[    1.333504] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.333621] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.333951] TCP: Hash tables configured (established 16384 bind 16384)
[    1.334074] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.334120] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.334268] NET: Registered protocol family 1
[    1.334522] RPC: Registered named UNIX socket transport module.
[    1.334532] RPC: Registered udp transport module.
[    1.334539] RPC: Registered tcp transport module.
[    1.334546] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.335147] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.335315] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.336019] audit: initializing netlink subsys (disabled)
[    1.336473] audit: type=2000 audit(1.316:1): state=initialized audit_enabled=0 res=1
[    1.336517] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.337355] NFS: Registering the id_resolver key type
[    1.337381] Key type id_resolver registered
[    1.337388] Key type id_legacy registered
[    1.337401] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.337425] jffs2: version 2.2. (NAND) (SUMMARY)  c 2001-2006 Red Hat, Inc.
[    1.361519] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.361537] io scheduler noop registered
[    1.361545] io scheduler deadline registered
[    1.361565] io scheduler cfq registered (default)
[    1.361573] io scheduler mq-deadline registered
[    1.361581] io scheduler kyber registered
[    1.362828] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.390320] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.393393] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.398207] brd: module loaded
[    1.402464] loop: module loaded
[    1.403229] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.405790] libphy: Fixed MDIO Bus: probed
[    1.406836] tun: Universal TUN/TAP device driver, 1.6
[    1.409577] CAN device driver interface
[    1.410327] usbcore: registered new interface driver asix
[    1.410391] usbcore: registered new interface driver ax88179_178a
[    1.410422] usbcore: registered new interface driver cdc_ether
[    1.410453] usbcore: registered new interface driver net1080
[    1.410482] usbcore: registered new interface driver cdc_subset
[    1.410511] usbcore: registered new interface driver zaurus
[    1.410551] usbcore: registered new interface driver cdc_ncm
[    1.411505] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    1.413795] usbcore: registered new interface driver uas
[    1.413838] usbcore: registered new interface driver usb-storage
[    1.414410] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    1.414468] i2c /dev entries driver
[    1.415094] IR NEC protocol handler initialized
[    1.415103] IR RC5(x/sz) protocol handler initialized
[    1.415111] IR RC6 protocol handler initialized
[    1.415118] IR JVC protocol handler initialized
[    1.415124] IR Sony protocol handler initialized
[    1.415132] IR SANYO protocol handler initialized
[    1.415139] IR Sharp protocol handler initialized
[    1.415146] IR MCE Keyboard/mouse protocol handler initialized
[    1.415154] IR XMP protocol handler initialized
[    1.415979] usbcore: registered new interface driver uvcvideo
[    1.415987] USB Video Class driver (1.1.1)
[    1.416051] ltc2952-poweroff ltc2954: pm_power_off already registered
[    1.416065] ltc2952-poweroff: probe of ltc2954 failed with error -16
[    1.416962] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff8009045000 with timeout 10s
[    1.417137] Bluetooth: HCI UART driver ver 2.3
[    1.417149] Bluetooth: HCI UART protocol H4 registered
[    1.417157] Bluetooth: HCI UART protocol BCSP registered
[    1.417187] Bluetooth: HCI UART protocol LL registered
[    1.417195] Bluetooth: HCI UART protocol ATH3K registered
[    1.417203] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    1.417240] Bluetooth: HCI UART protocol Intel registered
[    1.417249] Bluetooth: HCI UART protocol QCA registered
[    1.417285] usbcore: registered new interface driver bcm203x
[    1.417321] usbcore: registered new interface driver bpa10x
[    1.417361] usbcore: registered new interface driver bfusb
[    1.417399] usbcore: registered new interface driver btusb
[    1.417408] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    1.417466] usbcore: registered new interface driver ath3k
[    1.417600] EDAC MC: ECC not enabled
[    1.417902] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    1.419002] sdhci: Secure Digital Host Controller Interface driver
[    1.419013] sdhci: Copyright(c) Pierre Ossman
[    1.419020] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.420297] ledtrig-cpu: registered to indicate activity on CPUs
[    1.420468] usbcore: registered new interface driver usbhid
[    1.420477] usbhid: USB HID core driver
[    1.422192] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    1.423006] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    1.423221] Netfilter messages via NETLINK v0.30.
[    1.423364] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.423524] Initializing XFRM netlink socket
[    1.423603] NET: Registered protocol family 10
[    1.424031] Segment Routing with IPv6
[    1.424081] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    1.424217] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.424570] NET: Registered protocol family 17
[    1.424588] NET: Registered protocol family 15
[    1.424612] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.424659] Ebtables v2.0 registered
[    1.424780] can: controller area network core (rev 20170425 abi 9)
[    1.424822] NET: Registered protocol family 29
[    1.424831] can: raw protocol (rev 20170425)
[    1.424840] can: broadcast manager protocol (rev 20170425 t)
[    1.424851] can: netlink gateway (rev 20170425) max_hops=1
[    1.424917] Bluetooth: RFCOMM TTY layer initialized
[    1.424931] Bluetooth: RFCOMM socket layer initialized
[    1.424953] Bluetooth: RFCOMM ver 1.11
[    1.424964] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    1.424972] Bluetooth: BNEP filters: protocol multicast
[    1.424982] Bluetooth: BNEP socket layer initialized
[    1.424990] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.425000] Bluetooth: HIDP socket layer initialized
[    1.425114] 9pnet: Installing 9P2000 support
[    1.425140] Key type dns_resolver registered
[    1.425736] registered taskstats version 1
[    1.426100] Btrfs loaded, crc32c=crc32c-generic
[    1.433662] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 24, base_baud = 6249999) is a xuartps
[    1.433872] serial serial0: tty port ttyPS1 registered
[    1.434262] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 25, base_baud = 6249999) is a xuartps
[    2.800586] console [ttyPS0] enabled
[    2.805680] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    2.813836] PLL: shutdown
[    2.816505] PLL: shutdown
[    2.819503] PLL: enable
[    2.822004] PLL: shutdown
[    2.825634] PLL: enable
[    2.828102] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    2.838716] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    2.846681] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    2.855019] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.867389] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.880050] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    2.890162] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    2.897116] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.903651] [drm] No driver support for vblank timestamp query.
[    2.909635] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008aa5fa8)
[    3.011723] PLL: enable
[    3.139891] Console: switching to colour frame buffer device 240x67
[    3.165136] zynqmp-display fd4a0000.zynqmp-display: fb0:  frame buffer device
[    3.172481] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    3.180594] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    3.191451] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locked:yes
[    3.201909] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:1 protocol:3 pll_locked:yes
[    3.209991] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.215478] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.223375] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.232126] xhci-hcd xhci-hcd.0.auto: irq 33, io mem 0xfe300000
[    3.238162] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.244936] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.252144] usb usb1: Product: xHCI Host Controller
[    3.256983] usb usb1: Manufacturer: Linux 4.14.0 xhci-hcd
[    3.262374] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.267546] hub 1-0:1.0: USB hub found
[    3.271268] hub 1-0:1.0: 1 port detected
[    3.275344] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.280813] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.288518] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.296694] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    3.303469] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.310673] usb usb2: Product: xHCI Host Controller
[    3.315518] usb usb2: Manufacturer: Linux 4.14.0 xhci-hcd
[    3.320899] usb usb2: SerialNumber: xhci-hcd.0.auto
[    3.325998] hub 2-0:1.0: USB hub found
[    3.329728] hub 2-0:1.0: 1 port detected
[    3.335329] i2c i2c-0: Added multiplexed i2c bus 2
[    3.340234] i2c i2c-0: Added multiplexed i2c bus 3
[    3.345136] i2c i2c-0: Added multiplexed i2c bus 4
[    3.350018] i2c i2c-0: Added multiplexed i2c bus 5
[    3.355755] tps65086 6-005e: Device: TPS650864, OTP: C, Rev: 0
[    3.368082] i2c i2c-0: Added multiplexed i2c bus 6
[    3.374190] ina2xx 7-0040: power monitor ina226 (Rshunt = 10000 uOhm)
[    3.380657] i2c i2c-0: Added multiplexed i2c bus 7
[    3.385547] i2c i2c-0: Added multiplexed i2c bus 8
[    3.390469] i2c i2c-0: Added multiplexed i2c bus 9
[    3.395237] pca954x 0-0075: registered 8 multiplexed busses for I2C switch pca9548
[    3.402823] cdns-i2c ff030000.i2c: 100 kHz mmio ff030000 irq 15
[    3.456639] mmc0: SDHCI controller on ff160000.sdhci [ff160000.sdhci] using ADMA 64-bit
[    3.471089] sdhci-arasan ff170000.sdhci: allocated mmc-pwrseq
[    3.517402] mmc0: new high speed SDHC card at address aaaa
[    3.526089] mmc1: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit
[    3.537231] mmcblk0: mmc0:aaaa SL08G 7.40 GiB
[    3.546552] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.556920] rtc_zynqmp ffa60000.rtc: setting system clock to 2016-11-03 17:20:58 UTC (1478193658)
[    3.569065] clk: Not disabling unused clocks
[    3.576528] ALSA device list:
[    3.582625]   #0: DisplayPort monitor
[    3.589972]  mmcblk0: p1 p2
[    3.600062] sdhci-arasan ff170000.sdhci: card claims to support voltages below defined range
[    3.611669] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    3.624137] mmc1: new high speed SDIO card at address 0001
[    3.633472] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[    3.647300] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[    3.661147] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[    3.673074] wlcore: WARNING falling back to default config
[    3.681693] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    3.696056] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.707294] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.723619] devtmpfs: mounted
[    3.729855] Freeing unused kernel memory: 512K
[    3.841181] usb 1-1: New USB device found, idVendor=0424, idProduct=2744
[    3.851025] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.861246] usb 1-1: Product: USB2744
[    3.867952] usb 1-1: Manufacturer: Microchip Tech
[    3.896673] hub 1-1:1.0: USB hub found
[    3.903513] hub 1-1:1.0: 4 ports detected
[    3.968689] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    3.978729] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    3.990921] wlcore: loaded
[    3.997041] usb 2-1: New USB device found, idVendor=0424, idProduct=5744
[    4.006749] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    4.016864] usb 2-1: Product: USB5744
[    4.023470] usb 2-1: Manufacturer: Microchip Tech
[    4.040633] hub 2-1:1.0: USB hub found
[    4.047365] hub 2-1:1.0: 3 ports detected
[    4.080349] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    4.093392] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    4.105599] Bluetooth: hci0: download firmware failed, retrying...
[    4.157427] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    4.178977] systemd[1]: Detected architecture arm64.

Welcome to Debian GNU/Linux 9 (stretch)!

[    4.197313] systemd[1]: Set hostname to <debian-fpga>.
[    4.225098] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[    4.337384] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740
[    4.347603] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.358136] usb 1-1.4: Product: Hub Controller
[    4.365761] usb 1-1.4: Manufacturer: Microchip Tech
[    4.497352] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[    4.524867] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[    4.544820] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[    4.564775] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[    4.592745] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    4.612941] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[    4.632861] systemd[1]: Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Started Dispatch Password Requests to Console[    4.655617] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
 Directory Watch.
[    4.672038] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    4.684648] Bluetooth: hci0: download firmware failed, retrying...
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Listening on Journal Socket.
         Starting Remount Root and Kernel File Systems...
         Starting Load Kernel Modules...
         Starting Nameserver information manager...
[  OK  ] Reached target Paths.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Reached target Swap.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Created slice system-getty.slice.
         Mounting Debug File System...
[  OK  ] Listening on Journal Socket (/dev/log).
         Starting Journal Service...
         Mounting POSIX Message Queue File System...
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Debug File System.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Nameserver information manager.
[  OK  ] Started Journal Service.
         Starting udev Kernel Device Manager...
         Starting Apply Kernel Variables...
         Mounting Configuration File System...
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /config...
[  OK  ] Mounted Configuration File System.
[  OK  ] Mounted /config.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Load/Save Random Seed.
[    5.193532] systemd-journald[1715]: Received request to flush runtime journal from PID 1
[  OK  ] Started Flush Journal to Persistent Storage.
[    5.235561] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    5.249262] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    5.262070] Bluetooth: hci0: download firmware failed, retrying...
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Found device /dev/ttyPS0.
[  OK  ] Reached target Bluetooth.
[  OK  ] Reached target Sound Card.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Starting Load/Save RF Kill Switch Status...
[  OK  ] Started Load/Save RF Kill Switch Status.
[    5.807560] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    5.821289] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    5.834165] Bluetooth: hci0: download firmware failed, retrying...
[  OK  ] Found device /dev/mmcblk0p1.
         Mounting /mnt/boot...
[    6.084597] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[  OK  ] Mounted /mnt/boot.
[  OK  ] Reached target Local File Systems.
         Starting Raise network interfaces...
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Reached target System Time Synchronized.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Regular background program processing daemon.
         Starting Login Service...
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started Daily apt download activities.
         Starting System Logging Service...
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Started System Logging Service.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started Login Service.
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
         Starting Samba NMB Daemon...
         Starting LSB: Start NTP daemon...
         Starting Permit User Sessions...
         Starting OpenBSD Secure Shell server...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyPS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started LSB: Start NTP daemon.
[  OK  ] Started OpenBSD Secure Shell server.

Debian GNU/Linux 9 debian-fpga ttyPS0

debian-fpga login: [   78.427956] random: crng init done

Debian GNU/Linux 9 debian-fpga ttyPS0

debian-fpga login:

  1. 2018年09月20日 04:30 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

Ultra96用Yocto Linuxのビルドの続き4(Micro SD カードの用意、Ultra96で動作確認)

Ultra96用Yocto Linuxのビルドの続き3(boot.binの生成、Linux Kernel のビルド)”の続き。

前回は、boot.bin を生成して、Linux Kernel のビルドを行った。今回は、Micro SD カードに生成してきたファイルをコピーして、Ultra96に挿入して、Linux を起動した。

なお、ここでやっていることは、石原ひでみさんの「超苦労したFPGAの薄い本」Yocto Project と立ち上げ編を参照しています。

まずは、Micro SD カードの第1パーティションのULTRA96_BOO に Image, boot,bin, system.dtb, uEnv.txt をコピーした。
system.dtb は linux-xlnx/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dtb をリネームした dtb ファイルだ。この名前にしないとデバイスツリーを読み込まなかった。
Ultra96_Yocto_50_180917.png

次に、Yocto をビルドしたときの core-image-minimal-zcu102-zynqmp-20180831230734.rootfs.tar.gz をMicro SD カードの第2パーティションに書き込んだ。
Ultra96_Yocto_19_180901.png

sudo tar xzvf core-image-minimal-zcu102-zynqmp-20180831230734.rootfs.tar.gz -C /media/masaaki/ROOT_FS/
sync

Micro SD カードの第2パーティションの内容を示す。
Ultra96_Yocto_51_180917.png

このMicro SD カードをUltra96にMicro SD カード・スロットに挿入して、スイッチをMicro SD カード・ブートに変更して、電源ON。
gtkterm を立ち上げて、設定を行った。
ログイン画面が表示された。成功だ。。。
root 、パス無しで入れた。
ifconfig してみたが、lo しかなかった。
Ultra96_Yocto_52_180917.png

起動メッセージを貼っておく。

root@zcu102-zynqmp:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0 (masaaki@masaaki-H110M4-M01) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #1 SMP Sun Sep 16 14:17:46 JST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x0000000070000000
[    0.000000] On node 0 totalpages: 524288
[    0.000000]   DMA zone: 7168 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 524288 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc06ff71000 s45080 r8192 d32744 u86016
[    0.000000] pcpu-alloc: s45080 r8192 d32744 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 517120
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1786500K/2097152K available (9660K kernel code, 634K rwdata, 3072K rodata, 512K init, 2158K bss, 48508K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff80089f0000   (  9664 KB)
[    0.000000]     .rodata : 0xffffff80089f0000 - 0xffffff8008d00000   (  3136 KB)
[    0.000000]       .init : 0xffffff8008d00000 - 0xffffff8008d80000   (   512 KB)
[    0.000000]       .data : 0xffffff8008d80000 - 0xffffff8008e1ea00   (   635 KB)
[    0.000000]        .bss : 0xffffff8008e1ea00 - 0xffffff800903a230   (  2159 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01c00000   (    28 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]     RCU event tracing is enabled.
[    0.000000]     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024ee1c, max_idle_ns: 440795203561 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008400] Console: colour dummy device 80x25
[    0.012653] console [tty0] enabled
[    0.016018] bootconsole [cdns0] disabled
[    0.019931] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.019945] pid_max: default: 32768 minimum: 301
[    0.020067] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020084] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020820] ASID allocator initialised with 65536 entries
[    0.020875] Hierarchical SRCU implementation.
[    0.021221] EFI services will not be available.
[    0.021256] zynqmp_plat_ini�$*[X��orm Management API v1.0
[    0.021264] zynqmp_plat_init Trustzone version v1.0
[    0.021371] smp: Bringing up secondary CPUs ...
[    0.021661] Detected VIPT I-cache on CPU1
[    0.021697] CPU1: Booted secondary processor [410fd034]
[    0.022003] Detected VIPT I-cache on CPU2
[    0.022021] CPU2: Booted secondary processor [410fd034]
[    0.022306] Detected VIPT I-cache on CPU3
[    0.022325] CPU3: Booted secondary processor [410fd034]
[    0.022368] smp: Brought up 1 node, 4 CPUs
[    0.022399] SMP: Total of 4 processors activated.
[    0.022408] CPU features: detected feature: 32-bit EL0 Support
[    0.022419] CPU: All CPU(s) started at EL2
[    0.022436] alternatives: patching kernel code
[    0.023445] devtmpfs: initialized
[    0.027840] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.027869] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.034000] xor: measuring software checksum speed
[    0.072029]    8regs     :  2303.000 MB/sec
[    0.112060]    8regs_prefetch:  2053.000 MB/sec
[    0.152092]    32regs    :  2831.000 MB/sec
[    0.192123]    32regs_prefetch:  2379.000 MB/sec
[    0.192131] xor: using function: 32regs (2831.000 MB/sec)
[    0.192228] pinctrl core: initialized pinctrl subsystem
[    0.192950] NET: Registered protocol family 16
[    0.193742] cpuidle: using governor menu
[    0.194366] vdso: 2 pages (1 code @ ffffff80089f6000, 1 data @ ffffff8008d84000)
[    0.194385] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.195005] DMA: preallocated 256 KiB pool for atomic allocations
[    0.226753] zynqmp-pinctrl pinctrl: zynqmp pinctrl initialized
[    0.227634] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.228163] ARM CCI_400_r1 PMU driver probed
[    0.237923] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.304286] raid6: int64x1  gen()   451 MB/s
[    0.372353] raid6: int64x1  xor()   433 MB/s
[    0.440391] raid6: int64x2  gen()   678 MB/s
[    0.508426] raid6: int64x2  xor()   595 MB/s
[    0.576479] raid6: int64x4  gen()  1033 MB/s
[    0.644550] raid6: int64x4  xor()   758 MB/s
[    0.712566] raid6: int64x8  gen()   978 MB/s
[    0.780622] raid6: int64x8  xor()   748 MB/s
[    0.848709] raid6: neonx1   gen()   717 MB/s
[    0.916716] raid6: neonx1   xor()   832 MB/s
[    0.984807] raid6: neonx2   gen()  1157 MB/s
[    1.052830] raid6: neonx2   xor()  1187 MB/s
[    1.120897] raid6: neonx4   gen()  1497 MB/s
[    1.188915] raid6: neonx4   xor()  1428 MB/s
[    1.256988] raid6: neonx8   gen()  1659 MB/s
[    1.325014] raid6: neonx8   xor()  1526 MB/s
[    1.325022] raid6: using algorithm neonx8 gen() 1659 MB/s
[    1.325029] raid6: .... xor() 1526 MB/s, rmw enabled
[    1.325037] raid6: using neon recovery algorithm
[    1.326167] SCSI subsystem initialized
[    1.326217] libata version 3.00 loaded.
[    1.326379] usbcore: registered new interface driver usbfs
[    1.326419] usbcore: registered new interface driver hub
[    1.326462] usbcore: registered new device driver usb
[    1.326535] media: Linux media interface: v0.10
[    1.326564] Linux video capture interface: v2.00
[    1.326609] pps_core: LinuxPPS API ver. 1 registered
[    1.326617] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.326638] PTP clock support registered
[    1.326668] EDAC MC: Ver: 3.0.0
[    1.327052] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.327306] FPGA manager framework
[    1.327421] fpga-region fpga-full: FPGA Region probed
[    1.327511] Advanced Linux Sound Architecture Driver Initialized.
[    1.327829] Bluetooth: Core ver 2.22
[    1.327856] NET: Registered protocol family 31
[    1.327864] Bluetooth: HCI device and connection manager initialized
[    1.327879] Bluetooth: HCI socket layer initialized
[    1.327889] Bluetooth: L2CAP socket layer initialized
[    1.327915] Bluetooth: SCO socket layer initialized
[    1.328605] clocksource: Switched to clocksource arch_sys_counter
[    1.328696] VFS: Disk quotas dquot_6.6.0
[    1.328746] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.333082] NET: Registered protocol family 2
[    1.333442] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.333558] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.333882] TCP: Hash tables configured (established 16384 bind 16384)
[    1.333985] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.334029] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.334172] NET: Registered protocol family 1
[    1.334390] RPC: Registered named UNIX socket transport module.
[    1.334399] RPC: Registered udp transport module.
[    1.334406] RPC: Registered tcp transport module.
[    1.334413] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.334427] PCI: CLS 0 bytes, default 128
[    1.335003] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.335176] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.335890] audit: initializing netlink subsys (disabled)
[    1.336292] audit: type=2000 audit(1.316:1): state=initialized audit_enabled=0 res=1
[    1.336336] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.337211] NFS: Registering the id_resolver key type
[    1.337239] Key type id_resolver registered
[    1.337246] Key type id_legacy registered
[    1.337260] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.337285] jffs2: version 2.2. (NAND) (SUMMARY)  \xc2\xa9 2001-2006 Red Hat, Inc.
[    1.361472] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.361490] io scheduler noop registered
[    1.361498] io scheduler deadline registered
[    1.361518] io scheduler cfq registered (default)
[    1.361527] io scheduler mq-deadline registered
[    1.361535] io scheduler kyber registered
[    1.362808] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.390370] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.393412] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.398198] brd: module loaded
[    1.402379] loop: module loaded
[    1.403157] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.405795] libphy: Fixed MDIO Bus: probed
[    1.406868] tun: Universal TUN/TAP device driver, 1.6
[    1.407093] CAN device driver interface
[    1.407857] usbcore: registered new interface driver asix
[    1.407924] usbcore: registered new interface driver ax88179_178a
[    1.407956] usbcore: registered new interface driver cdc_ether
[    1.407989] usbcore: registered new interface driver net1080
[    1.408019] usbcore: registered new interface driver cdc_subset
[    1.408051] usbcore: registered new interface driver zaurus
[    1.408094] usbcore: registered new interface driver cdc_ncm
[    1.408483] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    1.410720] usbcore: registered new interface driver uas
[    1.410761] usbcore: registered new interface driver usb-storage
[    1.411346] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    1.411408] i2c /dev entries driver
[    1.412053] IR NEC protocol handler initialized
[    1.412062] IR RC5(x/sz) protocol handler initialized
[    1.412070] IR RC6 protocol handler initialized
[    1.412077] IR JVC protocol handler initialized
[    1.412084] IR Sony protocol handler initialized
[    1.412091] IR SANYO protocol handler initialized
[    1.412098] IR Sharp protocol handler initialized
[    1.412105] IR MCE Keyboard/mouse protocol handler initialized
[    1.412113] IR XMP protocol handler initialized
[    1.413024] usbcore: registered new interface driver uvcvideo
[    1.413033] USB Video Class driver (1.1.1)
[    1.413097] ltc2952-poweroff ltc2954: pm_power_off already registered
[    1.413111] ltc2952-poweroff: probe of ltc2954 failed with error -16
[    1.414073] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff8009045000 with timeout 10s
[    1.414275] Bluetooth: HCI UART driver ver 2.3
[    1.414285] Bluetooth: HCI UART protocol H4 registered
[    1.414293] Bluetooth: HCI UART protocol BCSP registered
[    1.414325] Bluetooth: HCI UART protocol LL registered
[    1.414333] Bluetooth: HCI UART protocol ATH3K registered
[    1.414341] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    1.414382] Bluetooth: HCI UART protocol Intel registered
[    1.414391] Bluetooth: HCI UART protocol QCA registered
[    1.414431] usbcore: registered new interface driver bcm203x
[    1.414466] usbcore: registered new interface driver bpa10x
[    1.414502] usbcore: registered new interface driver bfusb
[    1.414537] usbcore: registered new interface driver btusb
[    1.414546] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    1.414601] usbcore: registered new interface driver ath3k
[    1.414717] EDAC MC: ECC not enabled
[    1.414862] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    1.415867] sdhci: Secure Digital Host Controller Interface driver
[    1.415876] sdhci: Copyright(c) Pierre Ossman
[    1.415883] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.417374] ledtrig-cpu: registered to indicate activity on CPUs
[    1.417542] usbcore: registered new interface driver usbhid
[    1.417550] usbhid: USB HID core driver
[    1.419276] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    1.420220] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    1.420854] Netfilter messages via NETLINK v0.30.
[    1.420999] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.421161] Initializing XFRM netlink socket
[    1.421242] NET: Registered protocol family 10
[    1.421664] Segment Routing with IPv6
[    1.421716] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    1.421850] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.422208] NET: Registered protocol family 17
[    1.422225] NET: Registered protocol family 15
[    1.422248] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.422262] Ebtables v2.0 registered
[    1.422688] can: controller area network core (rev 20170425 abi 9)
[    1.422729] NET: Registered protocol family 29
[    1.422739] can: raw protocol (rev 20170425)
[    1.422747] can: broadcast manager protocol (rev 20170425 t)
[    1.422759] can: netlink gateway (rev 20170425) max_hops=1
[    1.422843] Bluetooth: RFCOMM TTY layer initialized
[    1.422856] Bluetooth: RFCOMM socket layer initialized
[    1.422873] Bluetooth: RFCOMM ver 1.11
[    1.422889] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    1.422897] Bluetooth: BNEP filters: protocol multicast
[    1.422907] Bluetooth: BNEP socket layer initialized
[    1.422915] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.422925] Bluetooth: HIDP socket layer initialized
[    1.423064] 9pnet: Installing 9P2000 support
[    1.423087] Key type dns_resolver registered
[    1.423777] registered taskstats version 1
[    1.424157] Btrfs loaded, crc32c=crc32c-generic
[    1.431290] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 24, base_baud = 6249999) is a xuartps
[    1.431492] serial serial0: tty port ttyPS1 registered
[    1.431833] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 25, base_baud = 6249999) is a xuartps
[    2.798359] console [ttyPS0] enabled
[    2.803544] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    2.811730] PLL: shutdown
[    2.814410] PLL: shutdown
[    2.817413] PLL: enable
[    2.819903] PLL: shutdown
[    2.823539] PLL: enable
[    2.826011] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    2.836641] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    2.844617] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    2.852993] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.865360] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.878027] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    2.888147] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    2.895114] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.901646] [drm] No driver support for vblank timestamp query.
[    2.907628] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008aa5fa8)
[    3.009700] PLL: enable
[    3.137844] Console: switching to colour frame buffer device 240x67
[    3.163213] zynqmp-display fd4a0000.zynqmp-display: fb0:  frame buffer device
[    3.170558] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    3.178673] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    3.189411] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locked:yes
[    3.199758] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:1 protocol:3 pll_locked:yes
[    3.207857] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.213340] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.221240] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.229980] xhci-hcd xhci-hcd.0.auto: irq 33, io mem 0xfe300000
[    3.236005] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.242780] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.249986] usb usb1: Product: xHCI Host Controller
[    3.254824] usb usb1: Manufacturer: Linux 4.14.0 xhci-hcd
[    3.260209] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.265395] hub 1-0:1.0: USB hub found
[    3.269128] hub 1-0:1.0: 1 port detected
[    3.273206] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.278664] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.286364] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.294518] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    3.301289] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.308496] usb usb2: Product: xHCI Host Controller
[    3.313336] usb usb2: Manufacturer: Linux 4.14.0 xhci-hcd
[    3.318720] usb usb2: SerialNumber: xhci-hcd.0.auto
[    3.323827] hub 2-0:1.0: USB hub found
[    3.327552] hub 2-0:1.0: 1 port detected
[    3.333123] i2c i2c-0: Added multiplexed i2c bus 2
[    3.338008] i2c i2c-0: Added multiplexed i2c bus 3
[    3.342891] i2c i2c-0: Added multiplexed i2c bus 4
[    3.347785] i2c i2c-0: Added multiplexed i2c bus 5
[    3.353531] tps65086 6-005e: Device: TPS650864, OTP: C, Rev: 0
[    3.365860] i2c i2c-0: Added multiplexed i2c bus 6
[    3.371983] ina2xx 7-0040: power monitor ina226 (Rshunt = 10000 uOhm)
[    3.378431] i2c i2c-0: Added multiplexed i2c bus 7
[    3.383319] i2c i2c-0: Added multiplexed i2c bus 8
[    3.388204] i2c i2c-0: Added multiplexed i2c bus 9
[    3.392968] pca954x 0-0075: registered 8 multiplexed busses for I2C switch pca9548
[    3.400562] cdns-i2c ff030000.i2c: 100 kHz mmio ff030000 irq 15
[    3.452615] mmc0: SDHCI controller on ff160000.sdhci [ff160000.sdhci] using ADMA 64-bit
[    3.467073] sdhci-arasan ff170000.sdhci: allocated mmc-pwrseq
[    3.513487] mmc0: new high speed SDHC card at address aaaa
[    3.522175] mmc1: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit
[    3.533356] mmcblk0: mmc0:aaaa SL08G 7.40 GiB 
[    3.543621] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.544646]  mmcblk0: p1 p2
[    3.559567] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:00:39 UTC (39)
[    3.571028] clk: Not disabling unused clocks
[    3.578521] ALSA device list:
[    3.584606]   #0: DisplayPort monitor
[    3.592144] sdhci-arasan ff170000.sdhci: card claims to support voltages below defined range
[    3.592662] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    3.627576] mmc1: new high speed SDIO card at address 0001
[    3.636937] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[    3.650759] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    3.660492] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[    3.674421] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[    3.686431] wlcore: WARNING falling back to default config
[    3.796127] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.807472] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.819452] devtmpfs: mounted
[    3.825787] Freeing unused kernel memory: 512K
[    3.845115] usb 1-1: New USB device found, idVendor=0424, idProduct=2744
[    3.855001] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.865314] usb 1-1: Product: USB2744
[    3.872102] usb 1-1: Manufacturer: Microchip Tech
[    3.894499] hub 1-1:1.0: USB hub found
[    3.901423] hub 1-1:1.0: 4 ports detected
[    3.972670] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    3.989058] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    4.001491] wlcore: loaded
[    4.007689] usb 2-1: New USB device found, idVendor=0424, idProduct=5744
[    4.017501] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    4.027721] usb 2-1: Product: USB5744
[    4.034442] usb 2-1: Manufacturer: Microchip Tech
[    4.054475] hub 2-1:1.0: USB hub found
[    4.061279] hub 2-1:1.0: 3 ports detected
[    4.079580] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    4.092676] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    4.095036] systemd[1]: System time before build time, advancing clock.
[    4.114699] Bluetooth: hci0: download firmware failed, retrying...
[    4.139122] systemd[1]: systemd 237 running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
[    4.167616] systemd[1]: Detected architecture arm64.
[    4.193266] systemd[1]: Set hostname to <zcu102-zynqmp>.
[    4.244696] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[    4.318484] systemd-sysv-generator[1697]: Overwriting existing symlink /run/systemd/generator.late/bootlogd.service with real service.
[    4.357377] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740
[    4.357737] systemd[1]: File /lib/systemd/system/systemd-journald.service:35 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[    4.357745] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[    4.405117] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.416194] usb 1-1.4: Product: Hub Controller
[    4.424388] usb 1-1.4: Manufacturer: Microchip Tech
[    4.457484] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    4.484763] systemd[1]: Reached target Remote File Systems.
[    4.504743] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    4.532648] systemd[1]: Reached target Paths.
[    4.552674] systemd[1]: Reached target Host and Network Name Lookups.
[    4.655507] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    4.669497] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    4.669499] Bluetooth: hci0: download firmware failed, retrying...
[    4.746043] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    5.047519] systemd-journald[1711]: Received request to flush runtime journal from PID 1
[    5.231635] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    5.245907] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    5.259378] Bluetooth: hci0: download firmware failed, retrying...
[    5.807549] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    5.821828] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    5.835261] Bluetooth: hci0: download firmware failed, retrying...
[    6.749439] audit: type=1325 audit(1535634244.667:2): table=filter family=2 entries=4
[    6.761658] audit: type=1300 audit(1535634244.667:2): arch=c00000b7 syscall=208 success=yes exit=0 a0=9 a1=0 a2=40 a3=3111ac00 items=0 ppid=1 pid=3009 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="connmand" exe="/usr/sbin/connmand" key=(null)
[    6.797101] audit: type=1327 audit(1535634244.667:2): proctitle=2F7573722F7362696E2F636F6E6E6D616E64002D6E
[    6.811300] audit: type=1325 audit(1535634244.667:3): table=mangle family=2 entries=6
[    6.824726] audit: type=1300 audit(1535634244.667:3): arch=c00000b7 syscall=208 success=yes exit=0 a0=9 a1=0 a2=40 a3=3111b890 items=0 ppid=1 pid=3009 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="connmand" exe="/usr/sbin/connmand" key=(null)
[    6.860807] audit: type=1327 audit(1535634244.667:3): proctitle=2F7573722F7362696E2F636F6E6E6D616E64002D6E
root@zcu102-zynqmp:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0 (masaaki@masaaki-H110M4-M01) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #1 SMP Sun Sep 16 14:17:46 JST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x0000000070000000
[    0.000000] On node 0 totalpages: 524288
[    0.000000]   DMA zone: 7168 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 524288 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc06ff71000 s45080 r8192 d32744 u86016
[    0.000000] pcpu-alloc: s45080 r8192 d32744 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 517120
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1786500K/2097152K available (9660K kernel code, 634K rwdata, 3072K rodata, 512K init, 2158K bss, 48508K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff80089f0000   (  9664 KB)
[    0.000000]     .rodata : 0xffffff80089f0000 - 0xffffff8008d00000   (  3136 KB)
[    0.000000]       .init : 0xffffff8008d00000 - 0xffffff8008d80000   (   512 KB)
[    0.000000]       .data : 0xffffff8008d80000 - 0xffffff8008e1ea00   (   635 KB)
[    0.000000]        .bss : 0xffffff8008e1ea00 - 0xffffff800903a230   (  2159 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01c00000   (    28 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]     RCU event tracing is enabled.
[    0.000000]     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024ee1c, max_idle_ns: 440795203561 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008400] Console: colour dummy device 80x25
[    0.012653] console [tty0] enabled
[    0.016018] bootconsole [cdns0] disabled
[    0.019931] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.019945] pid_max: default: 32768 minimum: 301
[    0.020067] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020084] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020820] ASID allocator initialised with 65536 entries
[    0.020875] Hierarchical SRCU implementation.
[    0.021221] EFI services will not be available.
[    0.021256] zynqmp_plat_init Platform Management API v1.0
[    0.021264] zynqmp_plat_init Trustzone version v1.0
[    0.021371] smp: Bringing up secondary CPUs ...
[    0.021661] Detected VIPT I-cache on CPU1
[    0.021697] CPU1: Booted secondary processor [410fd034]
[    0.022003] Detected VIPT I-cache on CPU2
[    0.022021] CPU2: Booted secondary processor [410fd034]
[    0.022306] Detected VIPT I-cache on CPU3
[    0.022325] CPU3: Booted secondary processor [410fd034]
[    0.022368] smp: Brought up 1 node, 4 CPUs
[    0.022399] SMP: Total of 4 processors activated.
[    0.022408] CPU features: detected feature: 32-bit EL0 Support
[    0.022419] CPU: All CPU(s) started at EL2
[    0.022436] alternatives: patching kernel code
[    0.023445] devtmpfs: initialized
[    0.027840] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.027869] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.034000] xor: measuring software checksum speed
[    0.072029]    8regs     :  2303.000 MB/sec
[    0.112060]    8regs_prefetch:  2053.000 MB/sec
[    0.152092]    32regs    :  2831.000 MB/sec
[    0.192123]    32regs_prefetch:  2379.000 MB/sec
[    0.192131] xor: using function: 32regs (2831.000 MB/sec)
[    0.192228] pinctrl core: initialized pinctrl subsystem
[    0.192950] NET: Registered protocol family 16
[    0.193742] cpuidle: using governor menu
[    0.194366] vdso: 2 pages (1 code @ ffffff80089f6000, 1 data @ ffffff8008d84000)
[    0.194385] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.195005] DMA: preallocated 25

  1. 2018年09月18日 04:06 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

FPGAの部屋のまとめサイトの更新(2018年9月17日)

FPGAの部屋のまとめサイトを更新しました。
2018年9月17日までの記事のエントリを追加しました。SDK のエントリを追加しました。
  1. 2018年09月17日 15:33 |
  2. その他のFPGAの話題
  3. | トラックバック:0
  4. | コメント:0

Ultra96用Yocto Linuxのビルドの続き3(boot.binの生成、Linux Kernel のビルド)

Ultra96用Yocto Linuxのビルドの続き2(u-boot.elf と bl32.elf の作成)”の続き。

前回は、u-boot.elf と bl32.elf をビルドした。今回は、boot.bin を生成して、Linux Kernel のビルドした。

なお、ここでやっていることは、石原ひでみさんの「超苦労したFPGAの薄い本」Yocto Project と立ち上げ編を参照しています。

まずは、boot.bin を生成しよう。
bl31.elf, ex_borad_test_wrapper.bit, fsbl.elf, pmufw.elf, u-boot.elf を ~/HDL/Ultra96/build に集めた。
そして、build_bootbin.bif を作成した。
Ultra96_Yocto_41_180916.png

build_bootbin.bif を示す。

the_ROM_image:
{
  [pmufw_image, destination_cpu=a53-0] pmufw.elf
  [bootloader, destination_cpu=a53-0] fsbl.elf
  [destination_device=pl] ex_board_test_wrapper.bit
  [destination_cpu=a53-0, exception_level=el-3] bl31.elf
  [destination_cpu=a53-0, exception_level=el-2] u-boot.elf
}


boot.bin を作成する。
bootgen -arch zynqmp -image build_bootbin.bif -o i boot.bin -w on
Ultra96_Yocto_42_180916.png

boot.bin が生成できた。

次に、Linux Kernel をビルドしよう。
まずは、git clone する。
git clone git://github.com/Xilinx/linux-xlnx -b xilinx-v2018.2
Ultra96_Yocto_43_180916.png

cd linux-xlnx
make xilinx_zynqmp_defconfig

だとエラーになってしまった。
Ultra96_Yocto_44_180916.png

どうも、X86 と誤認識しているようだ。
arm64 にする必要がある。
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
make xilinx_zynqmp_defconfig

Ultra96_Yocto_45_180916.png

今度はうまく行った。

make
Ultra96_Yocto_46_180916.png
Ultra96_Yocto_47_180916.png

make は成功だ。

linux-xlnx/arch/arm64/boot ディレクトリを見ると、Image とImage.gz が出来ていた。
Ultra96_Yocto_48_180916.png

linux-xlnx/arch/arm64/boot/dts/xilinx デイレクトリに zynqmp-zcu100-revC.dtb と zynqmp-zcu100-revC.dts が出来ていた。
Ultra96_Yocto_49_180916.png
  1. 2018年09月17日 05:14 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

Ultra96用Yocto Linuxのビルドの続き2(u-boot.elf と bl32.elf の作成)

Ultra96用Yocto Linuxのビルドの続き1(fsbl.elf と pmufw.elf の作成)”の続き。

前回は、SDK を使って、sbl.elf と pmufw.elf の作成を行った。今回は、u-boot.elf と bl32.elf をビルドしよう。

なお、ここでやっていることは、石原ひでみさんの「超苦労したFPGAの薄い本」Yocto Project と立ち上げ編を参照しています。

まずは、Xilinx のGitHub から Vivado 2018.2 用のU-boot をクローンする。
git clone git://github.com/Xilinx/u-boot-xlnx -b xilinx-v2018.2
Ultra96_Yocto_31_180914.png

cd u-boot-xlnx/
make xilinx_zynqmp_zcu100_revC_defconfig

Ultra96_Yocto_32_180914.png

make
Ultra96_Yocto_33_180914.png

gcc が古いということでエラーに鳴ってしまった。エラーの全内容を示す。

masaaki@masaaki-H110M4-M01:~/HDL/Ultra96/u-boot-xlnx$ make
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  CFG     u-boot.cfg
cc1: warning: unknown register name: x18
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
cc1: warning: unknown register name: x18
  CFG     spl/u-boot.cfg
cc1: warning: unknown register name: x18
  GEN     spl/include/autoconf.mk
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
cc1: warning: unknown register name: x18
cc1: error: bad value (‘armv8-a’) for ‘-march=’ switch
cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 bonnell atom silvermont slm knl x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1337: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2


Ubuntu 16.04 を Ubuntu 18.04 にアップグレードした。(注:Vivado などがUbuntu 18.04 に未対応なので、やらないほうが良いです

もう一度 make したら、またエラーだった。
Ultra96_Yocto_34_180914.png

検索すると、”u boot porting on rpi-3: getting error as “cc1: error: bad value (‘armv8-a’) for ‘-march=’ switch”.”が見つかった。
それによると、gcc-aarch64-linux-gnu をインストールして、それを使うようにするとのことだった。
sudo apt-get install gcc-aarch64-linux-gnu
export CROSS_COMPILE=aarch64-linux-gnu-
make

Ultra96_Yocto_35_180914.png
Ultra96_Yocto_36_180914.png

これで、u-boot.elf ができた。
Ultra96_Yocto_40_180916.png

でも、u-boot のビルドがエラーになったのは、source /opt/Xilinx/Vivado/2018.2/settings64.sh を忘れていたためかもしれない?


BL32.elf のビルドは、”@ikwzmさんのUltraZed 向け Debian GNU/Linux の構築をやってみる4(BL31を作る)”を参照した。

git clone https://github.com/Xilinx/arm-trusted-firmware.git
Ultra96_Yocto_37_180915.png

arm-trusted-firmware ディレクトリに入って、make を行った。
cd arm-trusted-firmware
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=zynqmp RESET_TO_BL31=1

Ultra96_Yocto_38_180915.png

bl32.elf がビルドされた。
Ultra96_Yocto_39_180915.png
  1. 2018年09月16日 07:35 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

Ubuntu 18.04 にアップグレードしてSDKとSDSoCが動いた

Ubuntu 16.04 をUbuntu 18.04 にアップグレードしてSDK が動かなくなる”の続き。

前回、Ubuntu 16.04 からUbuntu 18.04 にアップグレードすると、Vivado 2018.2 は動いてもSDK が起動画面のスプラッシュ画面でプログレスバーが止まってしまうという現象があって起動できなかった。今回は、そのトラブルシューティングを行った。

SDK が起動画面のスプラッシュ画面でプログレスバーが止まっているところを貼っておく。
Ubuntu18_04_Vivado_1_180915.png

VirtualBox をインストールしてトラブルシュートを図ろうと、”Ubuntu 18.04: 仮想化のVirtualBoxをインストールする”を参考にして、VirtualBox をインストールした。参考文献の通りで見事インストールすることが出来ました。
ただし、ViturlBoxのViturlBox Manager はウインドウを移動できるのだが、Ubuntu 16.04 をインストールしたウインドウは移動できないし、画面のサイズもドラックアンドドロップで変更できない。なぜ?ということで使い勝手が悪い。

ツィッターでの指摘を参考に32ビット版のライブラリの追加をしてみることにした。
検索してみると、”AR# 66184 インストール - Vivado ツールを Linux で実行するために必要なライブラリの検索方法”があったので、それを参考に32ビット版のライブラリの追加をしてみることにした。
それによると次のライブラリを追加する。
sudo apt install lib32stdc++6
sudo apt install libgtk2.0-0:i386
sudo apt install libfontconfig1:i386
sudo apt install libx11-6:i386
sudo apt install libxext6:i386
sudo apt install libxrender1:i386
sudo apt install libsm6:i386
sudo apt install libqtgui4:i386


これで再起動した。
Vivado 2018.2 を起動して、そこからSDK を起動したところ見事起動した。
Ubuntu18_04_Vivado_2_180915.png

SDSoC 2017.4 も起動して、ビルド中だ。(SDx 2017.4 用の settings64.sh は起動してある)
Ubuntu18_04_Vivado_3_180916.png

いろいろとやっていたので、32ビット版ライブラリが聞いたのか?イマイチ不確定なところはあるが、インストールしておいて損は無いと思う。ツィッターでのアドバイスがあってよかった。ありがとうございます。

Ubuntu 18.04 にアップグレードしてから再起動とシャットダウンがうまく行かなくなってしまった。いろいろと不具合はあるし、Xilinxでもツールのサポートもしていないし、まだアップグレードしない方が良いと思う。

(追記)
SDSoC のビルドがものすごく遅いです。使い物にならなそうです。
これは最初のビルドだったからのようです。Debugで試していたのに、Release ではじめにビルドしたからのようです。Debugでビルドしたら28分位で普通でした。
  1. 2018年09月16日 05:27 |
  2. SDK
  3. | トラックバック:0
  4. | コメント:0

Ultra96用Yocto Linuxのビルドの続き1(fsbl.elf と pmufw.elf の作成)

Ultra96用Yocto Linuxの再ビルド”の続き。

前回は、”Ultra96用Yocto Linuxのビルド”でUltra96 用Yocto Linux のビルドを行ったが、local.conf ファイルのEXTRA_IMAGE_FEATURES に development tools や debugging tools を追加したくなった。ついでに、Eclipse remote debugging support も入れてしまった。今回は、Ultra96 でYocto Linux を動かすためにビルドを進め、fsbl.elf と pmufw.elf を作成した。

なお、ここでやっていることは、石原ひでみさんの「超苦労したFPGAの薄い本」Yocto Project と立ち上げ編を参照しています。

まずは、メモリマップされたIP が無いのが寂しいが Vivado 2018.2 の ex_board_test プロジェクトを使用することにする。
Ultra96_Yocto_24_180914.png

ハードウェアをエクスポートして、SDK を立ち上げた。すでにHelloWorld プロジェクトは作ってある。
Ultra96_Yocto_25_180914.png

FSBL を作成する。
fsbl という名前でアプリケーション・プロジェクトを作成し、Templale でZynq MP FSBL を選択した。(キャプチャ画面が無いがSDKが上がらないので、省略)
Ultra96_Yocto_26_180914.png

fsbl.elf が作成された。
Ultra96_Yocto_27_180914.png

PMUFW を作成する。
やはり、pmufw アプリケーション・プロジェクトを作成し、Processor で psu_pmu_0 を選択する。
Ultra96_Yocto_28_180914.png

Template では、ZynqMP PMU Firmware しか無い。
Ultra96_Yocto_29_180914.png

pmufw.elf が出来た。
Ultra96_Yocto_30_180914.png
  1. 2018年09月15日 08:32 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

Ubuntu 16.04 をUbuntu 18.04 にアップグレードしてSDK が動かなくなる

Ubuntu 16.04 をUbuntu 18.04 にアップグレードしたのですが、Vivado 2018.2 は動いても、SDK が起動しなくなってしまいました。
調べたら、サポート外でした。Ubuntu 16.04 に戻そうと思いますが、再インストールとなり、かなり時間がかかりそうです。

なお、Ubuntu 18.04 からUbuntu 16.04 に再インストールせずにダウングレードする方法があったら教えてください。
よろしくお願いいたします。

(追記)
Ubuntu 18.04 にVirtualBox をインストールして、Ubuntu 16.04をインストールしようと思います。

(2018/09/16 : 追記)
SDK が起動した。詳しくは、”Ubuntu 18.04 にアップグレードしてSDKとSDSoCが動いた”をご覧ください。
  1. 2018年09月15日 05:59 |
  2. SDK
  3. | トラックバック:0
  4. | コメント:0

ZYBOt の学習用写真を取った(右回りコース)

”ZYBOt の学習用写真を取った(左回りコース)”の続き。

前回は左回りコースの写真を撮影したが、今回は、右回りコースの写真を撮影した。

このようにコースにZYBOt を置いて、多少位置をずらしながら、撮影している。この画像の場合はどこに行けば良いのかの正解ラベルを与えて学習させるわけだ。
なお、写真は日曜日に撮影した。
wl_tracing_cnn_9_180913.jpg

wl_tracing_cnn_10_180913.jpg

写真は前回と同じ train と test ディレクトリのそれぞれ left, right, straight のディレクトリと left_test, right_test, straight_test ディレクトリの下に左回りと一緒にマージした。
wl_tracing_cnn_17_180913.png

wl_tracing_cnn_11_180913.png
wl_tracing_cnn_12_180913.png
wl_tracing_cnn_13_180913.png
wl_tracing_cnn_14_180913.png
wl_tracing_cnn_15_180913.png
wl_tracing_cnn_16_180913.png

これで、学習用に 124 画像、テスト用に 123 画像を用意出来た。
  1. 2018年09月13日 05:22 |
  2. Zybot
  3. | トラックバック:0
  4. | コメント:0

Design Solution Forum 2018に行ってきました。

昨日はDesign Solution Forum 2018に行ってきました。

Deep Learning トラックに参加したのですが、大盛況で立ち見の人もいました。9つのセミナを受講したんですが、やはり、圧巻は中原先生の”低ビット化と枝刈りを同時に⾏う 3状態ディープラーニングとその設計法 中原 啓貴 東京⼯業⼤学 ⼯学院 情報通信系 DSF2018 @パシフィコ横浜”です。SlideShare に公開されています。

混合精度が良いそうですが、私も混合精度ではやっているのですが、徹底しているのが凄いですね。
あそこまで徹底的に枝狩りしているのか。。。というのが凄いですね。
HirokiNakahara/GUINNESS
HirokiNakahara/GUINNESS-Tutorial
GUINNESS 一回やってみようかな。

三栄ハイテックス株式会社も”FPGA によるセグメンテーションアルゴリズムの高速実行”という題で発表していました。
ZCU102を使用して、こちらは固定小数点演算のようですが、セグメンテーションを 40 fps で出来たと言ってました。

とても面白かったです。また行きたいですね。
最後に、お会いした方々、ありがとうございました。楽しかったです。
  1. 2018年09月13日 04:58 |
  2. その他のFPGAの話題
  3. | トラックバック:0
  4. | コメント:0

reVISION-Zybo-Z7-20をやってみた15(mnist_conv_nn10_sDMA その4)

reVISION-Zybo-Z7-20をやってみた14(mnist_conv_nn10_sDMA その3)”の続き。

前回は、Vivado HLS のプロジェクトを見て、他の動作周波数でもビルドが成功するどうか?を調べたところ、133.33 MHz でビルドが成功した。今回は、ビルドが成功した 133.33 MHz のファイルセットをMicroSDカードに書いて動作をチェックしよう。

今回参考にするのは、”reVISION-Zybo-Z7-20をやってみた6(Zybo-Z7-20 で確認)

最初に、MicroSDカードをフォーマットしておく。Ubuntu だと sudo fdiskで1パーティションでFAT32 でフォーマットする。
lsblk で見ると、MicroSD カードは /dev/sdc にマップされていた。

MicroSD カードがマウントされているときは、sudo umount /dev/sdc1 でアンマウントする。

cd reVISION-Zybo-Z7-20/sdsoc/zybo_z7_20/export/zybo_z7_20/sd_image/
で sd_image のディレクトリに入った。

unzip -p rootfs.zip | sudo dd of=/dev/sdd bs=2MB
sync

で、MicroSD に書き込んだ。

これだと、第2パーティションが 1.4GB しか無いので、後の 5GB 程度が無駄になるので、残りの容量をフルに使いたい。
ということで検索の結果、”Raspberry Pi のSDカードのパーティションを拡張する”を参考にして第2パーティションを拡張することにした。
sudo fdisk sdc
一旦、第2パーティションを削除して、もう一度、MicroSDカードの容量一杯に再度、第2パーティションを確保しなおした。
パーティション情報を書き込んで、
sudo resize2fs /dev/sdc2
コマンドで第2パーティションの容量を拡張した。
resize2fs_1_180910.png
resize2fs_2_180910.png
resize2fs_3_180910.png
resize2fs_4_180910.png

第2パーティションをマウントして容量を見てみると、7.1GB だった。容量が拡張されている。
resize2fs_5_180910.png

第1パーティションにブート用ファイルをコピーする。
sudo cp -r sdx_workspaces/revisio_zybo_z7_20_ws/mnist_conv_nn10_sDMA/Debug/sd_card/* /media/masaaki/ZYNQBOOT/

bmp_file0.bmp も/media/masaaki/ZYNQBOOT/ にコピーした。
reV_mnist_conv_nn10_sDMA_30_180911.png

この MicroSD カードを Zybo-Z7-20 に入れて電源ON した。
gtkterm を起動した。
sudo gtkterm
なお、sudo gtkterm & では、gtkterm が起動なかった。
gtkterm が起動したら次の設定を行った。
Configuration -> Portを選択する
Port:/dev/ttyUSB1、Baud Rate:115200を選択する

起動メッセージの一部とプロンプトが表示された。
ifconfig
すると、IP が振られているのが分かった。Ether のスイッチには接続してある。
reV_mnist_conv_nn10_sDMA_31_180911.png

ZYNQBOOT は /run/media/mmcblk0p1/ ディレクトリにマウントされていた。
reV_mnist_conv_nn10_sDMA_32_180911.png

./mnist_conv_nn10_sDMA.elf を起動した。
reV_mnist_conv_nn10_sDMA_33_180911.png
reV_mnist_conv_nn10_sDMA_34_180911.png

max_id_hw , max_id_sw 共に 8 と認識できた。成功だ。
  1. 2018年09月12日 04:44 |
  2. reVISION, xfOpenCV
  3. | トラックバック:0
  4. | コメント:0

reVISION-Zybo-Z7-20をやってみた14(mnist_conv_nn10_sDMA その3)

reVISION-Zybo-Z7-20をやってみた13(mnist_conv_nn10_sDMA その2)”の続き。

前回は、動作周波数 75 MHz でmnist_conv_nn10_sDMA.cpp がハードウェアとしてデバックでビルドできて、Vivado のレポートを見た。今回は、Vivado HLS のプロジェクトを見て、他の動作周波数でもビルドが成功しないのか?確かめてみよう。

まずは、Vivado HLS のプロジェクトは revisio_zybo_z7_20_ws/mnist_conv_nn10_sDMA/Debug/_sds/vhls/mnist_conv_nn ディレクトリにある。
reV_mnist_conv_nn10_sDMA_20_180911.png

Vivado HLS 2017.4 を立ち上げて、mnist_conv_nn プロジェクトを読み込んだ。
reV_mnist_conv_nn10_sDMA_21_180911.png

C コードの合成時のレポートを示す。
reV_mnist_conv_nn10_sDMA_22_180911.png
reV_mnist_conv_nn10_sDMA_23_180911.png

Timing のTarget が 13.33 ns に対して、Estimated が 10.73 ns だった。
Latency は min が 1161511 クロックで、max が 1363111 クロックだった。
リソース使用量は、BRAM_18K が 157 個、DSP48E が 4 個、FF が 1356 個、LUT が 4210 個だった。

次に、他の動作周波数でビルドが成功するか?確認してみよう。
115.38 MHz ではタイミングエラーでビルドが失敗した。
133.33 MHz では、ビルドが成功した。
reV_mnist_conv_nn10_sDMA_24_180911.png

Vivado HLS の C コードの合成結果を観す。
reV_mnist_conv_nn10_sDMA_25_180911.png
reV_mnist_conv_nn10_sDMA_26_180911.png

Target 7.5 ns に対して、Estimated は 12.13 ns でとても間に合わないように思える。
Latency は min 1609431クロックで、max が 1867351 クロックだった。133.33 MHz の周期 7.5 ns だと、min で約 12.1 ms で max で 14.0 ms となる。

Vivado synthesis, place and route にチェックを入れて、Export RTL を行った。
reV_mnist_conv_nn10_sDMA_27_180911.png

CP achieved post-implementation は 7.495 ns で、規格を満たしている。

Vivado を起動してレポートを見た。
reV_mnist_conv_nn10_sDMA_28_180911.png

WNS は 0.059 ns だった。微妙なところでタイミングがメットしている。

Implemented Design を開いて Intra-Clock Paths を確認するとやはり mnist_conv_nn_1 がタイミングの余裕が最小だということが分かった。
reV_mnist_conv_nn10_sDMA_29_180911.png
  1. 2018年09月11日 05:23 |
  2. reVISION, xfOpenCV
  3. | トラックバック:0
  4. | コメント:0

reVISION-Zybo-Z7-20をやってみた13(mnist_conv_nn10_sDMA その2)

reVISION-Zybo-Z7-20をやってみた12(mnist_conv_nn10_sDMA)”の続き。

前回は、畳み込みニューラル・ネットワークをreVISION-Zybo-Z7-20で実装しようとしたが、タイミングエラーで終わってしまった。今回は、動作周波数を 100 MHz から 75 MHz に変更してビルドしてみよう。成功したので、Vivadoのプロジェクトを見てみよう。

まずは動作周波数を 100 MHz から 75 MHz に変更した。
reV_mnist_conv_nn10_sDMA_9_180909.png

これで、Debug でビルドしたら、今度は成功した。
reV_mnist_conv_nn10_sDMA_10_180910.png

revisio_zybo_z7_20_ws/mnist_conv_nn10_sDMA/Debug/sd_card ディレクトリを見るとBOOT.BIN などのファイルが見えた。
reV_mnist_conv_nn10_sDMA_11_180910.png

Vivado のプロジェクトを見てみよう。
revisio_zybo_z7_20_ws/mnist_conv_nn10_sDMA/Debug/_sds/p0/_vpl/ipi/imp ディレクトリに imp.xpr があったので、Vivado 2017.4 で開いてみた。
reV_mnist_conv_nn10_sDMA_12_180910.png

reV_mnist_conv_nn10_sDMA_13_180910.png

Project Summary を見てみると、Timing のWorst Negative Slack は 0.264 ns だった。結構余裕がないかな?制約に依存するのではあるが、やはりこれだと 100 MHz はきついのかも?

Implemented Design を開いて Intra-Clock Paths を確認するとmnist_conv_nn_1 がタイミングの余裕が最小であることが分かった。
reV_mnist_conv_nn10_sDMA_19_180910.png

次に、revisio_zybo_z7_20_ws/mnist_conv_nn10_sDMA/Debug/_sds/p0/_vpl/ipi/syn ディレクトリの syn.xpr を開いた。
reV_mnist_conv_nn10_sDMA_15_180910.png

開いたVivado 2017.4 のプロジェクトを示す。
reV_mnist_conv_nn10_sDMA_16_180910.png

zybo_z7_20 ブロックデザインを開いた。
reV_mnist_conv_nn10_sDMA_17_180910.png

mnist_nn_conv_1 付近を拡大した。
reV_mnist_conv_nn10_sDMA_18_180910.png

mnist_conv_nn_1_if も見える。
  1. 2018年09月10日 05:23 |
  2. reVISION, xfOpenCV
  3. | トラックバック:0
  4. | コメント:0

reVISION-Zybo-Z7-20をやってみた12(mnist_conv_nn10_sDMA)

だいぶ飛んでしまったが、”reVISION-Zybo-Z7-20をやってみた11(WarpTransform)”の続き。

reVISION-Zybo-Z7-20をやっていたのは、畳み込みニューラル・ネットワークをreVISION, xfOpenCV (OpenCV 使っていないので、実質的には SDSoC だが)で実装するためだった。それをちょっと再開してみよう。理由はあるのだがここでは書かないでおく。

手書き数字認識用畳み込みニューラルネットワーク回路の製作3(畳み込みNN)”の mnist_conv_nn10_sDMA を使用して reVISION-Zybo-Z7-20 でやってみよう。

mnist_conv_nn10_sDMA プロジェクトを示す。
reV_mnist_conv_nn10_sDMA_1_180908.png

SDSoC に合わせて指示子を入れ替えた。
mnist_conv_nn10_sDMA.cpp のVivado HLS 用指示子をコメントアウトして、

#pragma SDS data zero_copy(in)

を追加した。
concatenate_2_180902.png

mnist_conv_nn10_sDMA_tb.cpp に

#include "sds_lib.h"

を追加し、malloc() を sds_alloc() に入れ替えた。
reV_mnist_conv_nn10_sDMA_3_180908.png

これで、Debug でビルドしたところエラーが発生した。
reV_mnist_conv_nn10_sDMA_4_180909.png

エラー内容を示す。

===>The following messages were generated while processing /home/masaaki/sdx_workspaces/revisio_zybo_z7_20_ws/mnist_conv_nn10_sDMA/Debug/_sds/p0/_vpl/ipi/syn/syn.runs/zybo_z7_20_mnist_conv_nn_1_if_0_synth_1 :
ERROR: [VPL 8-6058] Synth Error: [XPM_MEMORY 40-40] BYTE_WRITE_WIDTH_A (8) does not result in an integer number of bytes within the specified WRITE_DATA_WIDTH_A (12) for this configuration which uses port A write operations. [/opt/Xilinx/Vivado/2017.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv:683]


ということで、12 ビット長で 8 ビット境界で無いからダメということのようだ。

mnist_conv_nn10_sDMA.cpp と mnist_conv_nn10_sDMA_tb.cpp に

ap_fixed<12, 7, AP_TRN_ZERO, AP_SAT>

があった。
reV_mnist_conv_nn10_sDMA_5_180909.png

それを

ap_fixed<16, 7, AP_TRN_ZERO, AP_SAT>

に変更した。
reV_mnist_conv_nn10_sDMA_6_180909.png

もう一度、Debug でビルドしたら、Vivado は起動したが、タイミングエラーで落ちてしまった。
reV_mnist_conv_nn10_sDMA_7_180909.png

でも elf ファイルはできた。
reV_mnist_conv_nn10_sDMA_8_180909.png
  1. 2018年09月09日 08:23 |
  2. reVISION, xfOpenCV
  3. | トラックバック:0
  4. | コメント:0

SqueezeNet for MNIST のVivado HLS での試行3

SqueezeNet for MNIST のVivado HLS での試行2”の続き。

前回はSqueezeNet for MNISTで、どのくらいのリソースが必要なのかを探ってみようということで、C コードの合成を行って、結果を調べた。今回は、Vivado synthesis, place and route にチェックを入れてExport RTL を行い、合成結果と比較した。

Vivado synthesis, place and route にチェックを入れて、Vivado 2017.4 のインプリメンテーションを行って、レポートを確認した。結果を示す。
squeezenet_vhls_12_180908.png

その結果は LUT が 26930 個で、FF が 30836 個、DSP が 194 個、BRAM が 3 個だった。
CP achieved post-implementation は 10.283 ns だった。

C コードの合成時のレポートを示す。
squeezenet_vhls_2_180906.png

まずは、BRAM 3 個と DSP 194 個は変化が無い。FF はC コードの合成時が 33233 個に対して、Vivado 合成時には 30836 個だった。Vivado 合成時の使用率のパーセンテージは、約 29 % だった。C コードの合成時が 31 % だったので、それほどの変更はない。
LUT はどうかというと、C コードの合成時には、66650 個で、Vivado 合成時には、26930 個だった。Vivado 合成時のパーセンテージは、約 51 % だった。C コードの合成時には、125 % だったので、大幅に低下して実装可能となった。
しかし、これだけでは SqueezeNet のほんの一部分しか実装できていないので、無理そうだ。

次回は、今はチャネル数分の幅のHLS ストリームを使用しているが、チャネルの幅を変更できるように、すでにテンプレートを書き換えてあるので、それについてブログに書いてみたい。
  1. 2018年09月08日 06:43 |
  2. DNN
  3. | トラックバック:0
  4. | コメント:0

SqueezeNet for MNIST のVivado HLS での試行2

SqueezeNet for MNIST のVivado HLS での試行1”の続き。

SqueezeNet for MNIST 3(層の統計情報とC ヘッダ・ファイルへの出力)”で層の統計情報と重みやバイアスの C ヘッダ・ファイルを出力したので、それらを使用して、SqueezeNet for MNISTで、どのくらいのリソースが必要なのかを探ってみようということで、前回はソースコードを示した。今回はC コードの合成結果を示す。

さて、都合(reVISION-ZYBO-Z7-20 を動かす関係上)により、Vivado HLS 2017.4 で合成した時の結果を示す。
squeezenet_vhls_2_180906.png

Estimated は 11.46 ns で Target の 10.00 ns をオーバーしている。
Latency は 63527 クロックだった。
Instance は conv_layer1_U0 、 max_pooling_U0 、 relu_conv1_U0 のインスタンスがある。
リソース使用量は BRAM_18K が 3 個、DSP48E が 194 個、FF が 33233 個、LUT が 66650 個だった。
LUT が 125 % でオーバーしている。やはり、出力ストームの 96 チャネルを並列に計算しているので、リソースが足りない。

次に、Instance の conv_layer1_U0 をクリックして、畳み込み層の合成結果を見てみよう。
squeezenet_vhls_3_180906.png

Estimated は 11.46 ns で畳み込み層が全体の足を引っ張っていることがわかる。
ここでのLatency は 63527 クロックで、全体のレイテンシと同じだ。
BRAM_18K は 1 個、 DSP48E は 194 個、FF は 14752 個、 FF は 37433 個使用している。
FF は全体の 70 % を使用している。

次に conv_layer_template.h のリソース使用量を確認するために、Detail -> Instance の grp_conv_layer_template_fu_1426 をクリックした。
squeezenet_vhls_4_180906.png

Latency は 63526 クロックだった。
Detail -> Loop を見ると、Loop_y_Loop_pix_mat_nd の Initiation Interval の achieved が 81 クロックで Target の 1 から大きくかけ離れている。
やはり、96 Channel を一度に実装するのは無理があるようだ。
BRAM_18K は 1 個、 DSP48E は 194 個、FF は 14747 個、 FF は 36483 個使用している。

最初のレポートに戻って、max_pooling_U0 をクリックした。今度はマックス・プーリングを見ていこう。
squeezenet_vhls_8_180907.png

こちらのEstimated は 6.89 ns だった。これは要求を満たしている。
Latency は 16278 クロックだった。
リソース使用量は、BRAM_18K は 1 個、 DSP48E は 0 個、FF は 8986 個、 FF は 13993 個使用している。
マックス・プーリングも結構リソースを消費している。

max_pooling_template.h の状況を見るために grp_max_pooling_template_fu_2756 を見ていこう。
squeezenet_vhls_9_180907.png

Detail -> Loop を見ると、Loop1 の Initiation Interval の achieved が 48 クロックで、Loop2_Loop3 のそれが、96 クロックだった。Loop2_Loop3 は チャネルごとにシリアライズされている感じだ。

最後に、最初のレポートに戻って、relu_conv1_U0 をクリックして見てみよう。
squeezenet_vhls_10_180907.png

Estimated は 6.89 ns だった。
Latency は 16445 クロックで、マックス・プーリングよりも使用クロック数が少し多い。
リソース使用量は、BRAM_18K が 1 個、DSP48E が 0 個、FF が 8447 個、LUT が 10632 個使用してる。

relu_template.h のリソース使用量を確認するために、Detail -> Instance の grp_relu_template_fu_2756 をクリックした。
squeezenet_vhls_11_180907.png

Detail -> Loop を見ると、Loop1 の Initiation Interval の achieved が 48 クロックで、Loop2_Loop3 のそれが、97 クロックだった。こちらの Loop2_Loop3 もチャネルごとにシリアライズされている感じだ。

C コードの合成結果からは、SqueezeNet for MNIST の 96 チャネル並列演算でZYBO Z7-20 では使い物にならないことが分かった。リソース使用量が大きすぎる。
だが、テンプレートを使用するとVivado HLS はリソース使用量の見積もりが甘くなることはすでに経験済みだ。よって、次回はExport RTL をやってみて、どのくらいの変化があるかを検証してみよう。
  1. 2018年09月07日 07:08 |
  2. DNN
  3. | トラックバック:0
  4. | コメント:0

SqueezeNet for MNIST のVivado HLS での試行1

SqueezeNet for MNIST 3(層の統計情報とC ヘッダ・ファイルへの出力)”で層の統計情報と重みやバイアスの C ヘッダ・ファイルを出力したので、それらを使用して、SqueezeNet for MNISTで、どのくらいのリソースが必要なのかを探ってみた。
とりあえずは、層の内の第1層目の畳み込み層、ReLU, MaxPooling の 3 つを実装してみよう。
なお、実装には、conv_layer_template.h, relu_template.h, max_pooling_template.h を使用している。

最初に conv_layer1.cpp を示す。

// conv_layer1.cpp
// 2018/08/22 by marsee
// conv layer1 for squeeze4mnist
//

#include "conv_layer_template.h"
#include "conv1_weight.h"
#include "conv1_bias.h"

int conv_layer1(hls::stream<ap_fixed_axis<9,1,1,1> >& ins,
        hls::stream<ap_fixed_axis<11,1,96,1> >& outs){
//#pragma HLS DATA_PACK variable=outs
//#pragma HLS DATA_PACK variable=ins
    return(conv_layer_template<9,1,16,2,11,1,9,1,1,96,3,3,0,0,2,28,28>(ins, outs, conv1_weight, conv1_bias));
}


次に、relu_conv1.cpp を示す。

// relu_conv1.cpp
// 2018/05/06 by marsee
// relu after conv1
//

#include "relu_template.h"

int relu_conv1(hls::stream<ap_fixed_axis<11,1,96,1> >& ins,
        hls::stream<ap_fixed_axis<11,1,96,1> >& outs){
//#pragma HLS DATA_PACK variable=outs
//#pragma HLS DATA_PACK variable=ins
    return(relu_template<11,1,96,13,13>(ins, outs));
}


max_pooling.cpp を示す。

// max_pooling.cpp
// 2018/05/10 by marsee
//

#include "max_pooling_template.h"

int max_pooling(hls::stream<ap_fixed_axis<11,1,96,1> >& ins,
        hls::stream<ap_fixed_axis<11,1,96,1> >& outs){
//#pragma HLS DATA_PACK variable=outs
//#pragma HLS DATA_PACK variable=ins
    return(max_pooling_template<11,1,96,2,2,2,13,13>(ins, outs));
}


squeezenet4mnist1.cpp を示す。

// squeezenet4mnist1.cpp
// 2018/08/28 by marsee
//

#include <ap_int.h>
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include <hls_video.h>

#include "layer_general.h"

int conv_layer1(hls::stream<ap_fixed_axis<9,1,1,1> >& ins,
    hls::stream<ap_fixed_axis<11,1,96,1> >& outs);
int relu_conv1(hls::stream<ap_fixed_axis<11,1,96,1> >& ins,
    hls::stream<ap_fixed_axis<11,1,96,1> >& outs);
int max_pooling(hls::stream<ap_fixed_axis<11,1,96,1> >& ins,
    hls::stream<ap_fixed_axis<11,1,96,1> >& outs);

int squeezenet4mnist1(hls::stream<ap_fixed_axis<9,1,1,1> >& ins, hls::stream<ap_fixed_axis<11,1,96,1> >& outs){
#pragma HLS INTERFACE s_axilite port=return
#pragma HLS DATAFLOW
    hls::stream<ap_fixed_axis<11,1,96,1> > outs_conv_layer1;
    hls::stream<ap_fixed_axis<11,1,96,1> > outs_relu_conv1;

    conv_layer1(ins, outs_conv_layer1);
    relu_conv1(outs_conv_layer1, outs_relu_conv1);
    max_pooling(outs_relu_conv1, outs);

    return(0);
}


Vivado HLS 2017.4 で squeezenet4mnist1 プロジェクトを作成した。
squeezenet_vhls_1_180906.png
  1. 2018年09月06日 05:06 |
  2. DNN
  3. | トラックバック:0
  4. | コメント:0
»