2016-06-20 3 views
0

Мне было предоставлено ядро ​​Linux 3.0.35 для платы arm i.mx6, в которой используется более старый формат «картотеки», а также более старый (2013.02) buildroot repo который использовался для генерации правильных изображений и rootfs.Путаница в отношении версии ядра, дерева устройств и buildroot

Моя цель - использовать последнее публичное сообщение repo commit buildout, чтобы в будущем было проще обновлять пакеты. В настоящее время мне приходится вручную редактировать файлы пакетов (OpenSSL, lighttpd и т. Д.), Чтобы сделать последнюю версию доступной через buildroot.

Я попытался реплицировать конфигурацию моей доски в рамках последнего buildroot (после 2016.05). Все оставалось более или менее одинаковым, за исключением того, что инструментальная цепочка должна была меняться для поддержки новой системы (Linaro 2013.01 -> CodeBench ARM 2014.05). Результаты:

  • Buildroot: сборка прошла успешно
  • U-Boot: образ работает
  • Ядро: образ вызывает панику ядра

Мои вопросы на самом деле:

  1. Могу ли я использовать мое старое ядро ​​с новым buildroot/toolchain, или это несовместимость? У некоторых инструментальных цепей не поддерживаются старые ядра?
  2. Если это is несовместимость, есть ли более простой способ сохранить обновления старых пакетов buildroot?
  3. Если оба варианта не являются параметрами, есть ли какой-либо инструмент, помогающий выполнить миграцию из файла платы в дерево устройств? Легко ли преобразовать в dts или это длинный проект?

EDIT: Изменен Линаро 2014.09 набора инструментов. Я ранее использовал systemd 202 в качестве моей системы init. Поскольку для нового buildroot требуется инструментальная цепочка, построенная против заголовков ядра> = 3.10 для systemd, мне пришлось переключить мою систему 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, поэтому вы должны включить его в «Целевые параметры», затем выберите «EABIhf» в качестве «Target ABI»; таким образом вы сможете использовать инструмент Linaro toolchain (который использует EABIhf). –

+0

До тех пор, пока вы начинаете с исходного кода, Buildroot должен иметь возможность создавать ядро ​​3.x с более новой toolchain. Ядро Linux 3.0.x не так уж и старое! Если вы хотите обеспечить совместимость, создайте свою собственную инструментальную цепочку, используя те же заголовки ядра вашей версии. Переход на DT AFAIK должен быть ручным. Используйте конструкцию эталонной доски, которая находится в ядре как шаблон/руководство.BTW, объединяющее ядро ​​с rootfs другой сборки, не должно выполняться, потому что это вряд ли сработает, если вы действительно не знаете, что делаете. – sawdust

+0

@ LucaCersoli Я переключился на использование Linaro 2014.09 с VFP/EABIhf. Приложил результат от запуска, включая панику ядра в конце. – schumacher574

ответ

1

Как я уже говорил в комментариях, авария очень похожа на тот, в Freescale 3.0.35 kernel crash. Если это так, авария происходит в memset.S. Две верхние позиции заключаются в memset.S in upstream kernel, чей SHA1 начинается с c2459d3 и 1bd4678, соответственно, должен решить эту проблему.

+0

Определенно кажется, что это тот же самый крах. Источник ядра, который нам предоставили, отличается от того, что эти коммиты не переводятся на него очевидным образом, но, по крайней мере, переход на gcc 4.7.4 предотвращает крушение. – schumacher574

Смежные вопросы