替换uImage时启动时出现问题

时间:2019-11-29 13:37:04

标签: ubuntu linux-kernel driver u-boot

我对内核中的驱动程序代码进行了小改动,构建了内核(uImage)。

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage

将uImage替换为ISO(提取并重建)。但是启动时出现以下错误。我什至还原了代码更改,仅构建并替换了uImage。仍然存在错误。我不明白这个问题。甚至在互联网上搜索,但无法通过所有解决方案获得成功。

任何人都可以指导我。预先构建的内核uImage可以正常工作。

U-Boot 2009.08 (Jan 11 2019 - 08:37:07)

CPU: Freescale i.MX6 family TO0.0 at 996 MHz
Thermal sensor with ratio = 189
Temperature:   20 C, calibration data 0x5a94f97d
mx6q pll1: 996MHz
mx6q pll2: 528MHz
mx6q pll3: 480MHz
mx6q pll8: 50MHz
ipg clock     : 66000000Hz
ipg per clock : 66000000Hz
uart clock    : 80000000Hz
cspi clock    : 60000000Hz
ahb clock     : 132000000Hz
axi clock   : 264000000Hz
emi_slow clock: 132000000Hz
ddr clock     : 528000000Hz
usdhc1 clock  : 198000000Hz
usdhc2 clock  : 198000000Hz
usdhc3 clock  : 198000000Hz
usdhc4 clock  : 198000000Hz
nfc clock     : 24000000Hz
Board: MX6-IAVS:[POR] - Built under Wind River Linux
Boot Device: UNKNOWN
I2C:   ready
DRAM:   2 GB
MMC:   status 0
FSL_ESDHC: 0
In:    serial
Out:   serial
Err:   serial
Net:   got MAC address from IIM: 9c:28:bf:d2:c1:c7
FEC0 [PRIME]
autoboot in 5 seconds
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found

Loading from USB device 0, partition 0: Name: usbda0  Type: U-Boot
   Image Name:   EoLTesting
   Image Type:   ARM Linux Multi-File Image (uncompressed)
   Data Size:    4708687 Bytes =  4.5 MB
   Load Address: 10008000
   Entry Point:  10008000
   Contents:
      Image 0: 4283224 Bytes =  4.1 MB
      Image 1: 425451 Bytes = 415.5 kB
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................
stopping USB..
## Copying part 1 from legacy image at 10800000 ...
   Verifying Checksum ... OK
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   EoLTesting
   Image Type:   ARM Linux Multi-File Image (uncompressed)
   Data Size:    4708687 Bytes =  4.5 MB
   Load Address: 10008000
   Entry Point:  10008000
   Contents:
      Image 0: 4283224 Bytes =  4.1 MB
      Image 1: 425451 Bytes = 415.5 kB
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 12000000 ...
   Image Name:   
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    425387 Bytes = 415.4 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Multi-File Image ... OK
OK

Starting kernel ...

Booting Linux on physical CPU 0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.4.91-rt56-WR5.0.1.26_preempt-rt (chukkaa@nul6136u) (gcc version 4.6.3 (Wind River Linux Sourcery CodeBench 4.6a-148) ) #4 SMP PREEMPT RT Tue Jul 12 13:18:56 CEST 2016
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

Truncating RAM at 10000000-8fffffff to -7b7fffff (vmalloc region overlap).
Memory policy: ECC disabled, Data cache writealloc
CPU identified as i.MX6Q, silicon rev 1.5
PERCPU: Embedded 9 pages/cpu @81a75000 s16256 r8192 d12416 u36864
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 432784
Kernel command line: root=/dev/ram0 rw nosmp video=mxcfb0:dev=lcd,800x600-32@60,if=RGB24
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
allocated 15851520 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 752MB 952MB = 1704MB total
Memory: 1700200k/1700200k available, 61080k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xec000000 - 0xfb000000   ( 240 MB)
    lowmem  : 0x80000000 - 0xeb800000   (1720 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x80b789b8   (11715 kB)
      .init : 0x80b79000 - 0x80bc2f80   ( 296 kB)
      .data : 0x80bc4000 - 0x80c33a58   ( 447 kB)
       .bss : 0x80c33a7c - 0x80cdf06c   ( 686 kB)
Preemptible hierarchical RCU implementation.
NR_IRQS:436
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
arm_max_freq=1GHz
twd_local_timer_register failed -6
MXC_Early serial console at MMIO 0x21f0000 (options '115200')
bootconsole [ttymxc0] enabled
Console: colour dummy device 80x30
VFS: Unable to mount root fs on unknown-block(1,0)
User configuration error - no valid root filesystem found
Kernel panic - not syncing: Invalid configuration from end user prevents continuing
[<80017c70>] (unwind_backtrace+0x0/0xf8) from [<80542f64>] (dump_stack+0x20/0x24)
[<80542f64>] (dump_stack+0x20/0x24) from [<8054328c>] (panic+0x138/0x298)
[<8054328c>] (panic+0x138/0x298) from [<80afff60>] (change_floppy+0x0/0xec)
[<80afff60>] (change_floppy+0x0/0xec) from [<80b000b4>] (mount_root+0x68/0x6c)
[<80b000b4>] (mount_root+0x68/0x6c) from [<80b00250>] (prepare_namespace+0x198/0x1dc)
[<80b00250>] (prepare_namespace+0x198/0x1dc) from [<80affb50>] (kernel_init+0x294/0x29c)
[<80affb50>] (kernel_init+0x294/0x29c) from [<8000f4e4>] (kernel_thread_exit+0x0/0x8)
CPU3: stopping
[<80017c70>] (unwind_backtrace+0x0/0xf8) from [<80542f64>] (dump_stack+0x20/0x24)
[<80542f64>] (dump_stack+0x20/0x24) from [<80014e18>] (handle_IPI+0x170/0x1a8)
[<80014e18>] (handle_IPI+0x170/0x1a8) from [<80008544>] (gic_handle_irq+0x64/0x68)
[<80008544>] (gic_handle_irq+0x64/0x68) from [<805483c0>] (__irq_svc+0x40/0x70)
Exception stack(0xea0f5f58 to 0xea0f5fa0)
5f40:                                                       00000001 80000093
5f60: f2a02000 8001f200 80bb77c8 80b67408 805505d0 ea0f4000 ea0f4030 80b6c650
5f80: ea0f4000 ea0f5fac ea0f5fb0 ea0f5fa0 8000f5b8 8000f5bc 60000013 ffffffff
[<805483c0>] (__irq_svc+0x40/0x70) from [<8000f5bc>] (default_idle+0x48/0x4c)
[<8000f5bc>] (default_idle+0x48/0x4c) from [<8000f8f4>] (cpu_idle+0xdc/0x110)
[<8000f8f4>] (cpu_idle+0xdc/0x110) from [<8053f730>] (secondary_start_kernel+0x124/0x12c)
[<8053f730>] (secondary_start_kernel+0x124/0x12c) from [<1053ed14>] (0x1053ed14)
CPU1: stopping
[<80017c70>] (unwind_backtrace+0x0/0xf8) from [<80542f64>] (dump_stack+0x20/0x24)
[<80542f64>] (dump_stack+0x20/0x24) from [<80014e18>] (handle_IPI+0x170/0x1a8)
[<80014e18>] (handle_IPI+0x170/0x1a8) from [<80008544>] (gic_handle_irq+0x64/0x68)
[<80008544>] (gic_handle_irq+0x64/0x68) from [<805483c0>] (__irq_svc+0x40/0x70)
Exception stack(0xea0b1f58 to 0xea0b1fa0)
1f40:                                                       00000001 80000093
1f60: f2a02000 8001f200 80bb77c8 80b67408 805505d0 ea0b0000 ea0b0030 80b6c650
1f80: ea0b0000 ea0b1fac ea0b1fb0 ea0b1fa0 8000f5b8 8000f5bc 60000013 ffffffff
[<805483c0>] (__irq_svc+0x40/0x70) from [<8000f5bc>] (default_idle+0x48/0x4c)
[<8000f5bc>] (default_idle+0x48/0x4c) from [<8000f8f4>] (cpu_idle+0xdc/0x110)
[<8000f8f4>] (cpu_idle+0xdc/0x110) from [<8053f730>] (secondary_start_kernel+0x124/0x12c)
[<8053f730>] (secondary_start_kernel+0x124/0x12c) from [<1053ed14>] (0x1053ed14)
CPU2: stopping
[<80017c70>] (unwind_backtrace+0x0/0xf8) from [<80542f64>] (dump_stack+0x20/0x24)
[<80542f64>] (dump_stack+0x20/0x24) from [<80014e18>] (handle_IPI+0x170/0x1a8)
[<80014e18>] (handle_IPI+0x170/0x1a8) from [<80008544>] (gic_handle_irq+0x64/0x68)
[<80008544>] (gic_handle_irq+0x64/0x68) from [<805483c0>] (__irq_svc+0x40/0x70)
Exception stack(0xea0e3f58 to 0xea0e3fa0)
3f40:                                                       00000001 80000093
3f60: f2a02000 8001f200 80bb77c8 80b67408 805505d0 ea0e2000 ea0e2030 80b6c650
3f80: ea0e2000 ea0e3fac ea0e3fb0 ea0e3fa0 8000f5b8 8000f5bc 60000013 ffffffff
[<805483c0>] (__irq_svc+0x40/0x70) from [<8000f5bc>] (default_idle+0x48/0x4c)
[<8000f5bc>] (default_idle+0x48/0x4c) from [<8000f8f4>] (cpu_idle+0xdc/0x110)
[<8000f8f4>] (cpu_idle+0xdc/0x110) from [<8053f730>] (secondary_start_kernel+0x124/0x12c)
[<8053f730>] (secondary_start_kernel+0x124/0x12c) from [<1053ed14>] (0x1053ed14)

编辑: 这是一个imx ARM控制器。我使用mkisofs工具提取并重建ARM的ISO文件。如果我仅提取并重建旧的ISO,它就可以正常工作。

我使用了旧内核中的相同配置文件。

Boootloader(u-boot)从USB的ISO中的“ ubootImage”启动。 ubootImage是一个包含uImage和initrd的多映像文件。 此步骤成功。

此后,initrd的init脚本将rootfs挂载到iso映像中,并将chroots挂载到它,然后尝试使用kexec加载另一个内核和initrd。此initrd(与ubootImage中的上述initrd不同)具有一个init脚本,该脚本将isof映像中的rootfs挂载并对其进行chroot,然后仅运行bash来呈现bash shell。 这是失败的地方,基本上是kexec失败。我不知道kexec如何将initrd和uImage加载到内存中。如果有 解压缩的内核会覆盖initrd的问题。

0 个答案:

没有答案