2017-04-05 6 views
-1

私はアルテラのDE2-115 FPGA用にLinux from Alteraの最新バージョンを作成しました。ファイルシステムの何かのために正常に起動しません。多分私は何をすべきか知っていますか?私はそれがmake menuconfigのいくつかのオプションだと思うが、私は何をするのか分からない。buildrootとNios2 FPGAでinitramfsソースファイルを選択する方法

Linux version 4.9.0-00104-g84d4f8a-dirty ([email protected]) (gcc version 6.2.0 (Sourcery CodeBench Lite 2016.11-32)) #28 Wed Apr 5 04:23:07 CEST 2017 
bootconsole [early0] enabled 
early_console initialized at 0xe8001440 
On node 0 totalpages: 32768 
free_area_init_node: node 0, pgdat c022166c, node_mem_map c0254b80 
    Normal zone: 256 pages used for memmap 
    Normal zone: 0 pages reserved 
    Normal zone: 32768 pages, LIFO batch:7 
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 
Kernel command line: debug console=ttyAL0,115200 
PID hash table entries: 512 (order: -1, 2048 bytes) 
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) 
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) 
Sorting __ex_table... 
Memory: 127528K/131072K available (1750K kernel code, 66K rwdata, 284K rodata, 76K init, 191K bss, 3544K reserved, 0K cma-reserved) 
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 
NR_IRQS:64 nr_irqs:64 0 
clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 38225208935 ns 
Console: colour dummy device 80x25 
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000) 
pid_max: default: 32768 minimum: 301 
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) 
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) 
cpu cpu0: Error -2 creating of_node link 
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns 
random: fast init done 
clocksource: Switched to clocksource nios2-clksrc 
futex hash table entries: 256 (order: -1, 3072 bytes) 
workingset: timestamp_bits=30 max_order=15 bucket_order=0 
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254) 
io scheduler noop registered 
io scheduler deadline registered 
io scheduler cfq registered (default) 
8001440.serial: ttyJ0 at MMIO 0x8001440 (irq = 2, base_baud = 0) is a Altera JTAG UART 
mousedev: PS/2 mouse device common for all mice 
Warning: unable to open an initial console. 
List of all partitions: 
No filesystem could mount root, tried: 
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) 
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) 
random: crng init done 

enter image description here

私はmenuconfigの中にオプションを発見し、今私は別のエラーが出る:

Linux version 4.9.0-00104-g84d4f8a-dirty ([email protected]) (gcc version 6.2.0 (Sourcery CodeBench Lite 2016.11-32)) #37 Wed Apr 5 11:23:36 CEST 2017 
bootconsole [early0] enabled 
early_console initialized at 0xe8001440 
On node 0 totalpages: 32768 
free_area_init_node: node 0, pgdat c03cf6b0, node_mem_map c0402b80 
    Normal zone: 256 pages used for memmap 
    Normal zone: 0 pages reserved 
    Normal zone: 32768 pages, LIFO batch:7 
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 
Kernel command line: debug console=ttyAL0,115200 
PID hash table entries: 512 (order: -1, 2048 bytes) 
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) 
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) 
Sorting __ex_table... 
Memory: 125808K/131072K available (1775K kernel code, 67K rwdata, 288K rodata, 1768K init, 191K bss, 5264K reserved, 0K cma-reserved) 
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 
NR_IRQS:64 nr_irqs:64 0 
clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 38225208935 ns 
Console: colour dummy device 80x25 
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000) 
pid_max: default: 32768 minimum: 301 
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) 
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) 
cpu cpu0: Error -2 creating of_node link 
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns 
random: fast init done 
clocksource: Switched to clocksource nios2-clksrc 
futex hash table entries: 256 (order: -1, 3072 bytes) 
workingset: timestamp_bits=30 max_order=15 bucket_order=0 
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254) 
io scheduler noop registered 
io scheduler deadline registered 
io scheduler cfq registered (default) 
8001440.serial: ttyJ0 at MMIO 0x8001440 (irq = 2, base_baud = 0) is a Altera JTAG UART 
mousedev: PS/2 mouse device common for all mice 
Warning: unable to open an initial console. 
Freeing unused kernel memory: 1768K (c01bd000 - c0377000) 
This architecture does not have kernel memory protection. 
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 

---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 

random: crng init done 

enter image description here

今、私は私のbuildrootファイルのディレクトリを選択し、

~$ ls -ahl /home/developer/nios2/buildroot/output/images/ 
total 9,6M 
drwxr-xr-x 2 developer developer 4,0K apr 5 07:56 . 
drwxrwxr-x 6 developer developer 4,0K apr 5 07:33 .. 
-rw-r--r-- 1 developer developer 3,7M apr 5 07:56 rootfs.cpio 
-rw-r--r-- 1 developer developer 2,1M apr 5 07:56 rootfs.jffs2 
-rw-r--r-- 1 developer developer 3,8M apr 5 07:56 rootfs.tar 

その後、私はあなたがそれをコマンドライン上で有効なルート=パラメータを与えることを忘れて、あなたのカーネルをコンパイルしたときにメジャー/マイナーのデフォルトルートを設定するのを忘れ

Linux version 4.9.0-00104-g84d4f8a-dirty ([email protected]) (gcc version 6.2.0 (Sourcery CodeBench Lite 2016.11-32)) #40 Wed Apr 5 11:35:15 CEST 2017 
bootconsole [early0] enabled 
early_console initialized at 0xe8001440 
On node 0 totalpages: 32768 
free_area_init_node: node 0, pgdat c07736b0, node_mem_map c07a6b80 
    Normal zone: 256 pages used for memmap 
    Normal zone: 0 pages reserved 
    Normal zone: 32768 pages, LIFO batch:7 
�pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 
Kernel command line: debug console=ttyAL0,115200 
PID hash table entries: 512 (order: -1, 2048 bytes) 
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) 
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) 
Sorting __ex_table... 
�Memory: 122080K/131072K available (1775K kernel code, 67K rwdata, 288K rodata, 5496K init, 191K bss, 8992K reserved, 0K cma-reserved) 
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 
NR_IRQS:64 nr_irqs:64 0 
clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 38225208935 ns 
Console: colour dummy device 80x25 
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000) 
pid_max: default: 32768 minimum: 301 
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) 
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) 
cpu cpu0: Error -2 creating of_node link 
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns 
random: fast init done 
clocksource: Switched to clocksource nios2-clksrc 
futex hash table entries: 256 (order: -1, 3072 bytes) 
workingset: timestamp_bits=30 max_order=15 bucket_order=0 
random: crng init done 
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254) 
io scheduler noop registered 
io scheduler deadline registered 
io scheduler cfq registered (default) 
8001440.serial: ttyJ0 at MMIO 0x8001440 (irq = 2, base_baud = 0) is a Altera JTAG UART 
mousedev: PS/2 mouse device common for all mice 
Warning: unable to open an initial console. 
Failed to create /dev/root: -2 
List of all partitions: 
No filesystem could mount root, tried: 
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) 
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) 

答えて

0

まず、rocketboard wikiページの指示が完全ではないことに注意してください。 Nios2のカーネルを再コンパイルするのは簡単な作業ではありません。なぜなら、多くのバグ、不十分な指示、およびメンテナ自身の混乱があるからです。第二に、Linuxカーネル自体は非常に巨大なソフトウェアです。古代の(例えば、仮想端末tty0)技術を含む雑多な知識が必要です。ですから、 'make menuconfig'と 'make'のコマンドはすべてうまくいくと思うのは幻想です。上記の答え「あなたのinitrdはどこですか?」を真剣に考えてください。

+0

質問のみで回答するかどうかは、どのように知ることができますか?私はinitrdについて調べたところ、情報は完全ではなく、情報はどこでも異なっていた。 –

+1

古いバージョン(ver2.6.34?)を起動してinitrdを使用したことがありますか?あなたのmenuconfigと設定を見てください。 フレキソさん、あなた自身のビジネスを心に留めてください。 – KAZUYASU

+1

> initrdに関する350行のドキュメントを読みましたが、どのように作成するのかについての指示はありません。 このドキュメント「Linux/Documentation/initrd.txt」を読んでいますか? http://lxr.free-electrons.com/source/Documentation/initrd.txt?v=4.9 このドキュメントでは、initrd fsの役割と内部について説明し、作成手順については説明しません。 >作家は故意に読者の妨害をしています。 Linuxでよく見られるように、多くのドキュメントは過去に書かれ、時代遅れです。だから時には、ソースコード自体が最適な命令です。 – KAZUYASU

1

この出力を取得します。メジャー/マイナー設定はクロスコンパイル時にカーネルを16進化しないと動作しないので、本当にroot =パラメータを渡す必要があります。

パーティションが見つかりません。あなたのinitrdはどこですか?

/initがinitrdに見つからない場合、または終了すると、initrdがアンマウントされ、rootfsがマウントされます。

+0

私はファイルシステムを持っているとは思わない。私は働くかもしれないSDカードを持っています。私はrt * mする必要がありますNios 2とこのFPGAを使ってファイルシステムを作成する方法を考えています。 –

+0

ファイルシステムを持たずinitrdもないので、カーネルは何もしません。 – Joshua

関連する問題