2015-10-06 3 views
1

При загрузке linux-3.14.4 на FPGA ZC706 появляется следующая ошибка. У меня есть построить все инструменты следующими способами:Загрузка linux-3.14.41 на ZC706: Kernel Panic

Ракетно-Chip:

$ Latest master branch is checked out and generate boot.bin 

riscv-gnu-toolchain: 
$ ./build.sh (riscv64-unknown-elf) 
$ make linux (for riscv64-unknown-linux-gnu-gcc) 

Linux kernel: 
$curl -L https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.41.tar.xz | tar -xJkf - 
$ cd linux-3.14.41 
$ git init 
$ git remote add origin https://github.com/riscv/riscv-linux.git 
$ git fetch 
$ git checkout -f -t origin/master 
$ make ARCH=riscv defconfig 
$ make -j12 ARCH=riscv vmlinux 

Root образ диска:

$ dd if=/dev/zero of=root.bin bs=1M count=64 
$ mkfs.ext2 -F root.bin 

Загрузка:

1. First copy all files (vmlinux, root.bin, boot.bin, devicetree.dtb, uImage, uramdisk.image.gz) into sdcard. 
(2) $ mkdir /sdcard 
$ mount /dev/mmcblk0p1 /sdcard 
$ ./fesvr-zynq +disk=/sdcard/riscv/root.bin bbl /sdcard/riscv/vmlinux 

Загрузка начинается, но застрял на точка. Ниже приведена ошибка загрузки

[ 0.000000] Zone ranges: 
    [ 0.000000] Normal [mem 0x00200000-0x0fffffff] 
    [ 0.000000] Movable zone start for each node 
    [ 0.000000] Early memory node ranges 
    [ 0.000000] node 0: [mem 0x00200000-0x0fffffff] 
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64135 
    [ 0.000000] Kernel command line: root=/dev/htifblk0 
    [ 0.000000] PID hash table entries: 1024 (order: 1, 8192 bytes) 
    [ 0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes) 
    [ 0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes) 
    [ 0.000000] Sorting __ex_table... 
    [ 0.000000] Memory: 253568K/260096K available (1725K kernel code, 120K rwdata, 356K rodata, 68K init, 211K bss, 6528K reserved) 
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 
    [ 0.000000] NR_IRQS:2 
    [ 0.150000] Calibrating delay using timer specific routine.. 20.01 BogoMIPS (lpj=100074) 
    [ 0.150000] pid_max: default: 32768 minimum: 301 
    [ 0.150000] Mount-cache hash table entries: 512 (order: 0, 4096 bytes) 
    [ 0.150000] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes) 
    [ 0.150000] devtmpfs: initialized 
    [ 0.150000] NET: Registered protocol family 16 
    [ 0.150000] bio: create slab <bio-0> at 0 
    [ 0.150000] Switched to clocksource riscv_clocksource 
    [ 0.150000] NET: Registered protocol family 2 
    [ 0.150000] TCP established hash table entries: 2048 (order: 2, 16384 bytes) 
    [ 0.150000] TCP bind hash table entries: 2048 (order: 2, 16384 bytes) 
    [ 0.150000] TCP: Hash tables configured (established 2048 bind 2048) 
    [ 0.150000] TCP: reno registered 
    [ 0.150000] UDP hash table entries: 256 (order: 1, 8192 bytes) 
    [ 0.150000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) 
    [ 0.150000] NET: Registered protocol family 1 
    [ 0.150000] futex hash table entries: 256 (order: 0, 6144 bytes) 
    [ 0.150000] io scheduler noop registered 
    [ 0.150000] io scheduler cfq registered (default) 
    [ 0.170000] htifcon htif1: detected console 
    [ 0.180000] console [htifcon0] enabled 
    [ 0.180000] htifblk htif2: detected disk 
    [ 0.180000] htifblk htif2: added htifblk0 
    [ 0.180000] TCP: cubic registered 
    [ 0.180000] VFS: Mounted root (ext2 filesystem) readonly on device 254:0. 
    [ 0.180000] devtmpfs: error mounting -2 
    [ 0.180000] Freeing unused kernel memory: 68K (ffffffff80000000 - ffffffff80011000) 
    [ 0.180000] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance. 
    [ 0.180000] CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.41-g2317c43-dirty #2 
    [ 0.180000] Call Trace: 
    [ 0.180000] [<ffffffff80012f54>] walk_stackframe+0x0/0xc8 
    [ 0.180000] [<ffffffff801bbff4>] panic+0xb4/0x1c4 
    [ 0.180000] [<ffffffff80012a24>] sys_rt_sigreturn+0x140/0x178 
    [ 0.180000] [<ffffffff801bba08>] rest_init+0x80/0x84 
    [ 0.180000] [<ffffffff801bbafc>] kernel_init+0xf0/0xf4 
    [ 0.180000] [<ffffffff801bba08>] rest_init+0x80/0x84 

Может ли кто-нибудь помочь мне, пропустил ли я что-нибудь. Я также пробовал с linux-3.14.33; такая же ошибка наступает

+2

'Никакой рабочий init не найдено' кажется достаточно ясным ... –

+0

Спасибо Marc, за ваш ответ смены. Можете ли вы предложить работу, чтобы исправить это? Я пропустил какие-то шаги? – Monjur

+0

, вы, возможно, скопировали ядро ​​на загрузочное устройство, но само ядро ​​в принципе бесполезно без остальной ОС. как только запуск ядра начинается, он запускает 'init', который затем начинает запускать все остальное. и в соответствии с сообщением об ошибке у вас нет 'init', или я не указал ядро, где он должен искать init. –

ответ

1
I can now boot kernel on SPIKE ISA as well as FPGA. I omit some steps while building root.bin mentioned at https://github.com/riscv/riscv-tools. 

$ dd if=/dev/zero of=root.bin bs=1M count=64 
$ mkfs.ext2 -F root.bin 

will generate empty root.bin. We need to mount disc image and complete the file systems after completing busy box building as mentioned at https://github.com/riscv/riscv-tools 
Смежные вопросы