2016-06-20 13 views
0

以前の "board file"フォーマットを使用するarm i.mx6ボード用の3.0.35 Linuxカーネルと古いビルドルートリポジトリ(2013.02)が提供されました適切なイメージとrootfsを生成するために使用されています。カーネルバージョン、デバイスツリー、ビルドルートに関する混乱

私の目標は、最新のbuildroot public repo commitを使用して、今後パッケージを最新の状態に保つことがより簡単になるようにすることです。現在は、パッケージファイル(OpenSSL、lighttpdなど)を手作業で編集して、buildrootを介して最新のバージョンを入手する必要があります。

最新のbuildroot(post-2016.05)内で私のボード構成を複製しようとしました。より新しいシステム(Linaro 2013.01 - > CodeBench ARM 2014.05)をサポートするためにツールチェインを変更しなければならないことを除いて、すべてが多かれ少なかれ同じままです。結果:画像は

  • カーネルを動作します:

    1. することができます私は:画像は
    2. 私の質問は実際にあるカーネルパニックが発生し、ビルド

    3. U-ブートを成功:Buildrootは

      • 古いカーネルを新しいbuildroot/toolchainで使うか、これは非互換ですか?特定のツールチェーンは古いカーネルをサポートしていないのですか?
      • の場合、古いビルドルートパッケージを最新の状態に保つための簡単な方法がありますか?
      • 上記の両方がオプションでない場合、ボードファイルからデバイスツリーに移行するのに役立つツールはありますか? dtsに簡単に変換できますか、これは長いプロジェクトですか?

    EDIT

  • はリナロ2014.09ツールチェーンに変更します。私は以前、initdシステムとしてsystemd 202を使用していました。新しいビルドルートでは、systemdのカーネルヘッダ> = 3.10に対してツールチェーンを構築する必要があるため、initシステムをsystemvに切り替える必要がありました。ここで私が受けてるクラッシュがある:

    Starting kernel ... 
    
    Linux version 3.0.35 ([email protected]) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09)) #1 SMP PREEMPT Tue Jun 21 11:01:40 PDT 2016 
    CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d 
    CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache 
    Machine: i.MX 6Quad/DualLite/Solo SMARC CPU Board 
    Memory policy: ECC disabled, Data cache writealloc 
    CPU identified as i.MX6DL/SOLO, silicon rev 1.1 
    PERCPU: Embedded 7 pages/cpu @8bc06000 s5440 r8192 d15040 u32768 
    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 84992 
    Kernel command line: console=ttymxc3,115200 root=/dev/mmcblk0p2 rootwait rw 
    PID hash table entries: 2048 (order: 1, 8192 bytes) 
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) 
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) 
    Memory: 336MB = 336MB total 
    Memory: 327580k/327580k available, 196708k reserved, 0K highmem 
    Virtual kernel memory layout: 
        vector : 0xffff0000 - 0xffff1000 ( 4 kB) 
        fixmap : 0xfff00000 - 0xfffe0000 (896 kB) 
        DMA  : 0xf4600000 - 0xffe00000 (184 MB) 
        vmalloc : 0xa0800000 - 0xf2000000 (1304 MB) 
        lowmem : 0x80000000 - 0xa0000000 (512 MB) 
        pkmap : 0x7fe00000 - 0x80000000 ( 2 MB) 
        modules : 0x7f000000 - 0x7fe00000 ( 14 MB) 
         .init : 0x80008000 - 0x80039000 (196 kB) 
         .text : 0x80039000 - 0x80af9538 (11010 kB) 
         .data : 0x80afa000 - 0x80b53be0 (359 kB) 
         .bss : 0x80b53c04 - 0x80ba775c (335 kB) 
    SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 
    Preemptible hierarchical RCU implementation. 
    NR_IRQS:624 
    MXC GPIO hardware 
    sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms 
    Set periph_clk's parent to pll2_pfd_400M! 
    arm_max_freq=800MHz 
    MXC_Early serial console at MMIO 0x21f0000 (options '115200') 
    bootconsole [ttymxc3] enabled 
    Console: colour dummy device 80x30 
    Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280) 
    pid_max: default: 32768 minimum: 301 
    Mount-cache hash table entries: 512 
    CPU: Testing write buffer coherency: ok 
    hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available 
    Brought up 1 CPUs 
    SMP: Total of 1 processors activated (1581.05 BogoMIPS). 
    devtmpfs: initialized 
    print_constraints: dummy: 
    NET: Registered protocol family 16 
    print_constraints: vddpu: 725 <--> 1300 mV at 700 mV fast normal 
    print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal 
    print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal 
    print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal 
    print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal 
    print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal 
    hw-breakpoint: found 6 breakpoint and 1 watchpoint registers. 
    hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step. 
    hw-breakpoint: maximum watchpoint size is 4 bytes. 
    L310 cache controller enabled 
    l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02050000, Cache size: 524288 B 
    bio: create slab <bio-0> at 0 
    mxs-dma mxs-dma-apbh: initialized 
    print_constraints: vmmc: 3300 mV 
    vgaarb: loaded 
    SCSI subsystem initialized 
    usbcore: registered new interface driver usbfs 
    usbcore: registered new interface driver hub 
    usbcore: registered new device driver usb 
    Freescale USB OTG Driver loaded, $Revision: 1.55 $ 
    imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7) 
    MIPI CSI2 driver module loaded 
    Advanced Linux Sound Architecture Driver Version 1.0.24. 
    Bluetooth: Core ver 2.16 
    NET: Registered protocol family 31 
    Bluetooth: HCI device and connection manager initialized 
    Bluetooth: HCI socket layer initialized 
    Bluetooth: L2CAP socket layer initialized 
    Bluetooth: SCO socket layer initialized 
    i2c-core: driver [max17135] using legacy suspend method 
    i2c-core: driver [max17135] using legacy resume method 
    Switching to clocksource mxc_timer1 
    cfg80211: Calling CRDA to update world regulatory domain 
    Unable to handle kernel NULL pointer dereference at virtual address 00000040 
    pgd = 80004000 
    [00000040] *pgd=00000000 
    Internal error: Oops: 5 [#1] PREEMPT SMP 
    Modules linked in: 
    CPU: 0 Not tainted (3.0.35 #1) 
    PC is at kmem_cache_alloc+0xa4/0x108 
    LR is at con_insert_unipair+0xb8/0x104 
    pc : [<800f40c0>] lr : [<80299574>] psr: 60000093 
    sp : 9202fef0 ip : 9202e000 fp : 00000001 
    r10: 00000000 r9 : 0bbcf000 r8 : 20000013 
    r7 : 000000d0 r6 : 92002300 r5 : 00000040 r4 : 80b0fcc8 
    r3 : 8003a5a0 r2 : 80b0fcc8 r1 : 000024ac r0 : 00000001 
    Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel 
    Control: 10c53c7d Table: 1000404a DAC: 00000015 
    Process swapper (pid: 1, stack limit = 0x9202e2f0) 
    Stack: (0x9202fef0 to 0x92030000) 
    fee0:          00002665 921bcee4 920f4900 00000003 
    ff00: 80b2fee8 80b2fee6 00000003 80299574 00000000 00000001 920f4900 00000003 
    ff20: 80b2fee8 8029a1a4 00000000 80b30143 92003000 80b729d8 00000136 00000001 
    ff40: 00000014 80b72bfc 00000001 00000002 00000004 00000000 8001fce4 8001f214 
    ff60: 00000000 80b72ad8 00000001 8001f714 80a695d4 00000000 80b725d4 00000000 
    ff80: 8003fb04 00000013 00000000 00000000 00000000 8001eb68 80a37670 00000000 
    ffa0: 80b53c20 80b53c20 9202e030 800395c0 000001df 00000013 00000000 00000000 
    ffc0: 00000039 00000000 00000270 8002fb14 8002ffa0 8003fb04 00000013 00000000 
    ffe0: 00000000 00000000 00000000 8000898c 00000000 8003fb04 c38ac389 c38dc38b 
    [<800f40c0>] (kmem_cache_alloc+0xa4/0x108) from [<80299574>] (con_insert_unipair+0xb8/0x104) 
    [<80299574>] (con_insert_unipair+0xb8/0x104) from [<8029a1a4>] (con_set_default_unimap+0xe8/0x178) 
    [<8029a1a4>] (con_set_default_unimap+0xe8/0x178) from [<8001f214>] (console_map_init+0x44/0x50) 
    [<8001f214>] (console_map_init+0x44/0x50) from [<8001f714>] (vty_init+0x18c/0x19c) 
    [<8001f714>] (vty_init+0x18c/0x19c) from [<8001eb68>] (tty_init+0x12c/0x144) 
    [<8001eb68>] (tty_init+0x12c/0x144) from [<800395c0>] (do_one_initcall+0x114/0x16c) 
    [<800395c0>] (do_one_initcall+0x114/0x16c) from [<8000898c>] (kernel_init+0xc0/0x144) 
    [<8000898c>] (kernel_init+0xc0/0x144) from [<8003fb04>] (kernel_thread_exit+0x0/0x8) 
    Code: 1afffff3 e596a014 e2811004 e3a00001 (e795a00a) 
    ---[ end trace 1b75b31a2719ed1c ]--- 
    Kernel panic - not syncing: Attempted to kill init! 
    [<8004631c>] (unwind_backtrace+0x0/0xec) from [<80569100>] (panic+0x80/0x19c) 
    [<80569100>] (panic+0x80/0x19c) from [<80075934>] (complete_and_exit+0x0/0x1c) 
    [<80075934>] (complete_and_exit+0x0/0x1c) from [<00000001>] (0x1) 
    

    EDIT 2:

    私は私のカーネルヘッダを使用して独自のツールチェーンを構築するためにbuildrootの設定を変更しました。私はまだ同様のカーネルパニックを受けます。出力:

    Starting kernel ... 
    
    Linux version 3.0.35 ([email protected]) (gcc version 4.9.3 (Buildroot 2016.08-   git-00508-geba9c44-dirty)) #1 SMP PREEMPT Tue Jun 21 16:41:35 PDT 2016 
    CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d 
    CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache 
    Machine: i.MX 6Quad/DualLite/Solo SMARC CPU Board 
    Memory policy: ECC disabled, Data cache writealloc 
    CPU identified as i.MX6DL/SOLO, silicon rev 1.1 
    PERCPU: Embedded 7 pages/cpu @8bc06000 s5440 r8192 d15040 u32768 
    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 84992 
    Kernel command line: console=ttymxc3,115200 root=/dev/mmcblk0p2 rootwait rw 
    PID hash table entries: 2048 (order: 1, 8192 bytes) 
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) 
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) 
    Memory: 336MB = 336MB total 
    Memory: 327564k/327564k available, 196724k reserved, 0K highmem 
    Virtual kernel memory layout: 
        vector : 0xffff0000 - 0xffff1000 ( 4 kB) 
        fixmap : 0xfff00000 - 0xfffe0000 (896 kB) 
        DMA  : 0xf4600000 - 0xffe00000 (184 MB) 
        vmalloc : 0xa0800000 - 0xf2000000 (1304 MB) 
        lowmem : 0x80000000 - 0xa0000000 (512 MB) 
        pkmap : 0x7fe00000 - 0x80000000 ( 2 MB) 
        modules : 0x7f000000 - 0x7fe00000 ( 14 MB) 
         .init : 0x80008000 - 0x80039000 (196 kB) 
         .text : 0x80039000 - 0x80afd458 (11026 kB) 
         .data : 0x80afe000 - 0x80b57bc0 (359 kB) 
         .bss : 0x80b57be4 - 0x80bab73c (335 kB) 
    SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 
    Preemptible hierarchical RCU implementation. 
    NR_IRQS:624 
    MXC GPIO hardware 
    sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms 
    Set periph_clk's parent to pll2_pfd_400M! 
    arm_max_freq=800MHz 
    MXC_Early serial console at MMIO 0x21f0000 (options '115200') 
    bootconsole [ttymxc3] enabled 
    Console: colour dummy device 80x30 
    Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280) 
    pid_max: default: 32768 minimum: 301 
    Mount-cache hash table entries: 512 
    CPU: Testing write buffer coherency: ok 
    hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available 
    Brought up 1 CPUs 
    SMP: Total of 1 processors activated (1581.05 BogoMIPS). 
    devtmpfs: initialized 
    print_constraints: dummy: 
    NET: Registered protocol family 16 
    print_constraints: vddpu: 725 <--> 1300 mV at 700 mV fast normal 
    print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal 
    print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal 
    print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal 
    print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal 
    print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal 
    hw-breakpoint: found 6 breakpoint and 1 watchpoint registers. 
    hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step. 
    hw-breakpoint: maximum watchpoint size is 4 bytes. 
    L310 cache controller enabled 
    l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02050000, Cache size: 524288 B 
    bio: create slab <bio-0> at 0 
    mxs-dma mxs-dma-apbh: initialized 
    print_constraints: vmmc: 3300 mV 
    vgaarb: loaded 
    SCSI subsystem initialized 
    usbcore: registered new interface driver usbfs 
    usbcore: registered new interface driver hub 
    usbcore: registered new device driver usb 
    Freescale USB OTG Driver loaded, $Revision: 1.55 $ 
    imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7) 
    MIPI CSI2 driver module loaded 
    Advanced Linux Sound Architecture Driver Version 1.0.24. 
    Bluetooth: Core ver 2.16 
    NET: Registered protocol family 31 
    Bluetooth: HCI device and connection manager initialized 
    Bluetooth: HCI socket layer initialized 
    Bluetooth: L2CAP socket layer initialized 
    Bluetooth: SCO socket layer initialized 
    i2c-core: driver [max17135] using legacy suspend method 
    i2c-core: driver [max17135] using legacy resume method 
    Switching to clocksource mxc_timer1 
    cfg80211: Calling CRDA to update world regulatory domain 
    Unable to handle kernel NULL pointer dereference at virtual address 00000040 
    pgd = 80004000 
    [00000040] *pgd=00000000 
    Internal error: Oops: 5 [#1] PREEMPT SMP 
    Modules linked in: 
    CPU: 0 Not tainted (3.0.35 #1) 
    PC is at kmem_cache_alloc+0xa4/0x108 
    LR is at con_insert_unipair+0xb8/0x104 
    pc : [<800f3bbc>] lr : [<80298a88>] psr: 60000093 
    sp : 9202fef8 ip : 9202e000 fp : 00000001 
    r10: 00000000 r9 : 0bbcf000 r8 : 20000013 
    r7 : 000000d0 r6 : 92002300 r5 : 00000040 r4 : 80b13cc8 
    r3 : 8003a5a0 r2 : 80b13cc8 r1 : 000024ac r0 : 00000001 
    Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel 
    Control: 10c53c7d Table: 1000404a DAC: 00000015 
    Process swapper (pid: 1, stack limit = 0x9202e2f0) 
    Stack: (0x9202fef8 to 0x92030000) 
    fee0:              00002665 921bcee4 
    ff00: 920f4900 00000003 80b33ec8 80b33ec6 00000003 80298a88 80b34123 00000000 
    ff20: 00000001 920f4900 00000003 802996b8 00000001 80b34123 92003000 80b769b8 
    ff40: 8001fc40 00000001 00000014 80b76bdc 00000002 00000004 00000000 00000000 
    ff60: 8001fc40 8001f168 00000000 80b76ab8 00000001 8001f668 80a684a4 8014768c 
    ff80: 80b765b4 00000000 8003fac4 00000013 00000000 8001eac4 80a36540 00000000 
    ffa0: 80b57c00 80b57c00 9202e030 800395b8 000001df 00000013 00000000 00000000 
    ffc0: 00000039 00000000 00000270 8002fa74 8002ff00 8003fac4 00000013 00000000 
    ffe0: 00000000 00000000 00000000 8000898c 00000000 8003fac4 e345c1eb e0c32c90 
    [<800f3bbc>] (kmem_cache_alloc+0xa4/0x108) from [<80298a88>] (con_insert_unipair   +0xb8/0x104) 
    [<80298a88>] (con_insert_unipair+0xb8/0x104) from [<802996b8>] (con_set_default_   unimap+0xe8/0x178) 
    [<802996b8>] (con_set_default_unimap+0xe8/0x178) from [<8001f168>] (console_map_   init+0x44/0x50) 
    [<8001f168>] (console_map_init+0x44/0x50) from [<8001f668>] (vty_init+0x18c/0x19   c) 
    [<8001f668>] (vty_init+0x18c/0x19c) from [<8001eac4>] (tty_init+0x12c/0x144) 
    [<8001eac4>] (tty_init+0x12c/0x144) from [<800395b8>] (do_one_initcall+0x114/0x1   6c) 
    [<800395b8>] (do_one_initcall+0x114/0x16c) from [<8000898c>] (kernel_init+0xc0/0   x144) 
    [<8000898c>] (kernel_init+0xc0/0x144) from [<8003fac4>] (kernel_thread_exit+0x0/   0x8) 
    Code: 1afffff3 e596a014 e2811004 e3a00001 (e795a00a) 
    ---[ end trace 1b75b31a2719ed1c ]--- 
    Kernel panic - not syncing: Attempted to kill init! 
    [<800462c8>] (unwind_backtrace+0x0/0xec) from [<80567fcc>] (panic+0x80/0x19c) 
    [<80567fcc>] (panic+0x80/0x19c) from [<800757e0>] (complete_and_exit+0x0/0x1c) 
    [<800757e0>] (complete_and_exit+0x0/0x1c) from [<00000001>] (0x1) 
    
    +0

    カーネルパニックにはどのようなものがありますか?また、i.MX6にはVFPがあるので、 'Target options'で有効にし、' Target ABI'として 'EABIhf'を選択してください。この方法でLinaroのツールチェーン(EABIhfを使用)を使用することができます。 –

    +0

    ソースコードから始めれば、Buildrootはより新しいツールチェーンを備えた3.xカーネルを構築できるはずです。 Linuxカーネル3.0.xはそれほど古くはありません!互換性を確保したい場合は、同じバージョンのカーネルヘッダを使用して独自のツールチェーンを構築してください。 DT AFAIKへの移行は手動で行う必要があります。カーネル内にあるリファレンスボードデザインをテンプレート/ガイドとして使用してください。別のビルドのrootfsとカーネルを組み合わせるBTWは、実際に何をやっているのか分からない限りうまくいかない可能性があるため、実行しないでください。 – sawdust

    +0

    @ LucaCersoli Linaro 2014.09をVFP/EABIhfで使用するように切り替えました。終了時のカーネルパニックを含む起動時の出力を添付しました。 – schumacher574

    答えて

    1

    コメントに記載されているとおり、クラッシュはFreescale 3.0.35 kernel crashのものと非常によく似ています。その場合、クラッシュはmemset.Sで発生します。 SHA1がそれぞれc2459d3および1bd4678で始まるmemset.S in upstream kernelの上位2つのコミットは、この問題を解決するはずです。

    +0

    間違いなく同じクラッシュのようです。我々が提供したカーネルソースは、それらのコミットが明白な方法でそれに変換されないように十分に異なっていますが、少なくともgcc 4.7.4に切り替えることはクラッシュを防ぎます。 – schumacher574

    関連する問題