Kexec not working for i.MX6ULL

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Kexec not working for i.MX6ULL

973件の閲覧回数
bsmucker
Contributor I

Hello all,

I am just beginning to work at creating a yocto environment for a new device which uses the var-som-6ul module. Our device requires the use of kexec.

I compiled a custom kernel and was able to boot that kernel from u-boot. Everything was fine. 
But when attempting to use kexec to boot back into the same kernel, I got the following boot message:

 kexec -d -l /mnt/images/boot/zImage --dtb /mnt/images/boot/imx6ull-var-som-concerto-board-nand-sd
-card.dtb '--append=root=/dev/ram0   console=ttymxc0,115200 rootwait=1 rw  earlyprintk '           
syscall kexec_file_load not available.                                                             
Try gzip decompression.                                                                            
Try LZMA decompression.                                                                            
lzma_decompress_file: read on /mnt/images/boot/zImage of 2127437444 bytes failed                   
kernel: 0x76599008 kernel_size: 0x805c70                                                           
MEMORY RANGES                                                                                      
0000000080000000-000000009fffffff (0)                                                              
zImage header: 0x016f2818 0x00000000 0x00805c70                                                    
zImage size 0x805c70, file size 0x805c70                                                           
zImage requires 0x00816c70 bytes                                                                   
  offset 0x00001980 tag 0x5a534c4b size 8                                                          
Decompressed kernel sizes:                                                                         
 text+data 0x012b1d80 bss 0x0006c568 total 0x0131e2e8                                              
Resulting kernel space: 0x01ac89f0                                                                 
Kernel: address=0x80008000 size=0x01ac89f0                                                         
DT    : address=0x81ad2000 size=0x00008600                                                         
kexec_load: entry = 0x80008000 flags = 0x280000                                                    
nr_segments = 2                                                                                    
segment[0].buf   = 0x76599008                                                                      
segment[0].bufsz = 0x805c74                                                                        
segment[0].mem   = 0x80008000                                                                      
segment[0].memsz = 0x806000                                                                        
segment[1].buf   = 0xd58658                                                                        
segment[1].bufsz = 0x8600                                                                          
segment[1].mem   = 0x81ad2000                                                                      
segment[1].memsz = 0x9000                                                                          
+ kexec -e                                                                                         
[   40.810290] cfg80211: failed to load regulatory.db                                              
[   40.848865] ci_hdrc ci_hdrc.1: remove, state 4                                                  
[   40.854702] usb usb1: USB disconnect, device number 1                                           
[   40.870996] ci_hdrc ci_hdrc.1: USB bus 1 deregistered                                           
[   40.894760] kexec_core: Starting new kernel                                                     
[   40.912538] Disabling non-boot CPUs ...                                                         
[   40.919907] Bye!                                                                                
[    0.000000] Booting Linux on physical CPU 0x0                                                   
[    0.000000] Linux version 5.4.3-imx6ul+gb40ccfdb73ea (oe-user@oe-host) (gcc version 9.2.0 (GCC))
 #1 SMP PREEMPT Sat Jan 2 20:29:17 UTC 2021                                                        
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d                     
[    0.000000] CPU: div instructions available: patching division code                             
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache            
[    0.000000] OF: fdt: Machine model: Variscite VAR-SOM-6UL with i.MX6ULL, NAND flash & SD card su
pport on Concerto-Board                                                                            
[    0.000000] printk: bootconsole [earlycon0] enabled                                             
[    0.000000] Memory policy: Data cache writealloc                                                
[    0.000000] cma: Size (0x02000000) of region at 0x00000000 exceeds limit (0x00000000)           
[    0.000000] cma: Failed to reserve 32 MiB                                                       
[    0.000000] Kernel panic - not syncing: early_alloc: Failed to allocate 8192 bytes align=0x2000 
[    0.000000] ---[ end Kernel panic - not syncing: early_alloc: Failed to allocate 8192 bytes alig
n=0x2000 ]---                                                                 

So somehow the u-boot environment is different from the kexec environment in terms of the memory, it seems. 

In the past, I have been able to fix this problem by either a linux command line option: (mem=xxxx??)
or in the device tree. 

But after experimenting with both of those approaches, I have had no success. 

Has anyone had any experience with this and could help?

Thanks,

Brian

0 件の賞賛
1 返信

965件の閲覧回数
bsmucker
Contributor I

Partial Success: Looks like the --dtb argument in kexec was the problem. Omitting it allowed me to get much further in the kernel boot process. Not there totally yet, but close, I think.

Brian

0 件の賞賛