未解决:自行打包cpio格式的Ramdisk,与编译成功生成的kernel.bin,deviceTree一起打包成image.ub,不能正常启动kernel的问题???

田博远
2023-12-01

使用开发板Z-turn Board,编译工具Petalinux,启动kernel相关打印:

非正常启动kernel:

## Loading kernel from FIT Image at 01000000 ...
   Using 'conf@system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x01000104
     Data Size:    3937059 Bytes = 3.8 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   3e120d35bb60fdf8cff9c938e45fc72a6054523c
   Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 01000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'ramdisk@1' ramdisk subimage
     Description:  petalinux-user-image
     Type:         RAMDisk Image
     Compression:  gzip compressed
     Data Start:   0x013c4f74
     Data Size:    6030722 Bytes = 5.8 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha1
     Hash value:   f07d0dd62af8f147fa8cbfa2deadac1b689d1db6
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 01000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x013c1528
     Data Size:    14730 Bytes = 14.4 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   c57d0ffad8ae285e139a0ab650340bdbc45f9d7d
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x13c1528
   Uncompressing Kernel Image ... OK
   Loading Ramdisk to 07a3f000, end 07fff582 ... OK
   Loading Device Tree to 07a38000, end 07a3e989 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx-v2018.1 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Thu Jun 13 11:23:19 CST 2019
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: xlnx,zynq-7000
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x3f000000
percpu: Embedded 16 pages/cpu @ef7ce000 s34764 r8192 d22580 u65536
Built 1 zonelists, mobility grouping on.  Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1006996K/1048576K available (6144K kernel code, 238K rwdata, 1560K rodata, 1024K init, 153K bss, 25196K reserved, 16384K cma-reserved, 245760K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0700000   (7136 kB)
      .init : 0xc0900000 - 0xc0a00000   (1024 kB)
      .data : 0xc0a00000 - 0xc0a3b900   ( 239 kB)
       .bss : 0xc0a3b900 - 0xc0a61e44   ( 154 kB)
Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
        Tasks RCU enabled.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to f0802000
slcr mapped to f0804000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at f0804100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at f080c000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc+0x1c4/0x204 with crng_init=0
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
random: fast init done
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 27, base_baud = 6249999) is a xuartps
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 28, base_baud = 6249999) is a xuartps
`??k?±??[ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
fpga-region fpga-full: FPGA Region probed
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 5892K
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
m25p80 spi0.0: found w25q128, expected n25q512a
m25p80 spi0.0: w25q128 (16384 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x0000000e0000 : "boot"
0x0000000e0000-0x000000100000 : "bootenv"
0x000000100000-0x000000d00000 : "kernel"
0x000000d00000-0x000001000000 : "spare"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 30 (00:0a:35:00:1e:53)
Generic PHY e000b000.ethernet-ffffffff:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:03, irq=POLL)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
cdns-i2c e0005000.i2c: 400 kHz mmio e0005000 irq 24
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f098b000 with timeout 10s
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
ALSA device list:
  No soundcards found.
Freeing unused kernel memory: 1024K
INIT: version 2.88 booting
mount: you must be root
mount: you must be root
grep: /proc/filesystems: No such file or directory
grep: /proc/filesystems: No such file or directory
mount: you must be root
grep: /proc/filesystems: No such file or directory
bootlogd: cannot find console device 253:0 under /dev
hwclock: can't open '/dev/misc/rtc': No such file or directory
Thu Jun 13 03:28:48 UTC 2019
hwclock: can't open '/dev/misc/rtc': No such file or directory
/etc/rcS.d/S37populate-volatile.sh: line 217: /proc/cmdline: No such file or directory
/etc/rcS.d/S38dmesg.sh: line 17: /var/log/dmesg: No such file or directory
Starting internet superserver: inetd.
Configuring packages on first boot....
 (This may take several minutes. Please do not power off the machine.)
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
 Removing any system startup links for run-postinsts ...
  /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... /etc/rc5.d/S10dropbear: line 32: /proc/mounts: No such file or directory
Starting Dropbear SSH server: Exited: Failure reading random device /dev/urandom
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: Jun 13 03:28:48 Pzturn syslog.info syslogd started: BusyBox v1.24.1
done
Jun 13 03:28:48 Pzturn user.notice kernel: klogd started: BusyBox v1.24.1 (2019-06-13 11:25:04 CST)
Jun 13 03:28:48 Pzturn user.info kernel: Booting Linux on physical CPU 0x0
Jun 13 03:28:48 Pzturn user.notice kernel: Linux version 4.14.0-xilinx-v2018.1 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Thu Jun 13 11:23:19 CST 2019
Jun 13 03:28:48 Pzturn user.info kernel: CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
Jun 13 03:28:48 Pzturn user.info kernel: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Jun 13 03:28:48 Pzturn user.info kernel: OF: fdt: Machine model: xlnx,zynq-7000
Jun 13 03:28:48 Pzturn user.info kernel: bootconsole [earlycon0] enabled
Jun 13 03:28:48 Pzturn user.info kernel: Memory policy: Data cache writealloc
Jun 13 03:28:48 Pzturn user.info kernel: cma: Reserved 16 MiB at 0x3f000000
Jun 13 03:28:48 Pzturn user.debug kernel: On node 0 totalpages: 262144
Jun 13 03:28:48 Pzturn user.debug kernel: free_area_init_node: node 0, pgdat c0a3ad00, node_mem_map ef7f7000
Jun 13 03:28:48 Pzturn user.debug kernel:   Normal zone: 1536 pages used for memmap
Jun 13 03:28:48 Pzturn user.debug kernel:   Normal zone: 0 pages reserved
Jun 13 03:28:48 Pzturn user.debug kernel:   Normal zone: 196608 pages, LIFO batch:31
Jun 13 03:28:48 Pzturn user.debug kernel:   HighMem zone: 65536 pages, LIFO batch:15
Jun 13 03:28:48 Pzturn user.info kernel: percpu: Embedded 16 pages/cpu @ef7ce000 s34764 r8192 d22580 u65536
Jun 13 03:28:48 Pzturn user.debug kernel: pcpu-alloc: s34764 r8192 d22580 u65536 alloc=16*4096
Jun 13 03:28:48 Pzturn user.debug kernel: pcpu-alloc: [0] 0 [0] 1 
Jun 13 03:28:48 Pzturn user.info kernel: Built 1 zonelists, mobility grouping on.  Total pages: 260608
Jun 13 03:28:48 Pzturn user.notice kernel: Kernel command line: console=ttyPS0,115200 earlyprintk
Jun 13 03:28:48 Pzturn user.info kernel: PID hash table entries: 4096 (order: 2, 16384 bytes)
Jun 13 03:28:48 Pzturn user.info kernel: Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Jun 13 03:28:48 Pzturn user.info kernel: Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Jun 13 03:28:48 Pzturn user.info kernel: Memory: 1006996K/1048576K available (6144K kernel code, 238K rwdata, 1560K rodata, 1024K init, 153K bss, 25196K reserved, 16384K cma-reserved, 245760K highmem)
Jun 13 03:28:48 Pzturn user.notice kernel: Virtual kernel memory layout:
Jun 13 03:28:48 Pzturn user.notice kernel:     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
Jun 13 03:28:48 Pzturn user.notice kernel:     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
Jun 13 03:28:48 Pzturn user.notice kernel:     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
Jun 13 03:28:48 Pzturn user.notice kernel:     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
Jun 13 03:28:48 Pzturn user.notice kernel:     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
Jun 13 03:28:48 Pzturn user.notice kernel:     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
Jun 13 03:28:48 Pzturn user.notice kernel:       .text : 0xc0008000 - 0xc0700000   (7136 kB)
Jun 13 03:28:48 Pzturn user.notice kernel:       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
Jun 13 03:28:48 Pzturn user.notice kernel:       .data : 0xc0a00000 - 0xc0a3b900   ( 239 kB)
Jun 13 03:28:48 Pzturn user.notice kernel:        .bss : 0xc0a3b900 - 0xc0a61e44   ( 154 kB)
Jun 13 03:28:48 Pzturn user.info kernel: Preemptible hierarchical RCU implementation.
Jun 13 03:28:48 Pzturn user.info kernel:        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
Jun 13 03:28:48 Pzturn user.info kernel:        Tasks RCU enabled.
Jun 13 03:28:48 Pzturn user.info kernel: RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
Jun 13 03:28:48 Pzturn user.info kernel: NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
Jun 13 03:28:48 Pzturn user.info kernel: efuse mapped to f0802000
Jun 13 03:28:48 Pzturn user.info kernel: slcr mapped to f0804000
Jun 13 03:28:48 Pzturn user.warn kernel: L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
Jun 13 03:28:48 Pzturn user.warn kernel: L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
Jun 13 03:28:48 Pzturn user.info kernel: L2C-310 erratum 769419 enablJun JunJun JunJun JunJun JunJunJun JunJun 1JuJuJJJuJun 13JuJuJuJJun 1JuJuJuJuJun 13JuJuJuJunJuJun 13 03JuJuJuJunJun 13JuJuJuJuJun 13 0JuJunJuJuJuJun 13 03Jun Jun 1Jun JunJun Jun Jun Jun 13Jun 1Jun 1Jun Jun JunJun 1Jun JunJun JuJuJuJuJuJuStarting tcf-agent: OK
touch: /var/lock/subsys/tcf-agent: No such file or directory
Jun 13 03:28:48 Pzturn auth.err getty[787]: can't open '/dev/tty1': No such file or directory^M
INIT: Jun 13 03:28:48 Pzturn daemon.info init: Id "PS0" respawning too fast: disabled for 5 minutes

Jun 13 03:28:58 Pzturn auth.err getty[797]: can't open '/dev/tty1': No such file or directory^M

正常启动kernel:

## Loading kernel from FIT Image at 01000000 ...
   Using 'conf@system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x01000104
     Data Size:    3937059 Bytes = 3.8 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   3e120d35bb60fdf8cff9c938e45fc72a6054523c
   Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 01000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'ramdisk@1' ramdisk subimage
     Description:  petalinux-user-image
     Type:         RAMDisk Image
     Compression:  gzip compressed
     Data Start:   0x013c4f74
     Data Size:    6019535 Bytes = 5.7 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha1
     Hash value:   a4df4cda17aaa9f6b49c58fa23b9c54d21e58d4d
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 01000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x013c1528
     Data Size:    14730 Bytes = 14.4 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   c57d0ffad8ae285e139a0ab650340bdbc45f9d7d
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x13c1528
   Uncompressing Kernel Image ... OK
   Loading Ramdisk to 07a42000, end 07fff9cf ... OK
   Loading Device Tree to 07a3b000, end 07a41989 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx-v2018.1 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Thu Jun 13 11:23:19 CST 2019
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: xlnx,zynq-7000
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x3f000000
percpu: Embedded 16 pages/cpu @ef7ce000 s34764 r8192 d22580 u65536
Built 1 zonelists, mobility grouping on.  Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1007008K/1048576K available (6144K kernel code, 238K rwdata, 1560K rodata, 1024K init, 153K bss, 25184K reserved, 16384K cma-reserved, 
245760K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0700000   (7136 kB)
      .init : 0xc0900000 - 0xc0a00000   (1024 kB)
      .data : 0xc0a00000 - 0xc0a3b900   ( 239 kB)
       .bss : 0xc0a3b900 - 0xc0a61e44   ( 154 kB)
Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
        Tasks RCU enabled.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to f0802000
slcr mapped to f0804000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at f0804100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at f080c000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc+0x1c4/0x204 with crng_init=0
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
random: fast init done
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 27, base_baud = 6249999) is a xuartps
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 28, base_baud = 6249999) is a xuartps
?console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
fpga-region fpga-full: FPGA Region probed
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 5880K
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
m25p80 spi0.0: found w25q128, expected n25q512a
m25p80 spi0.0: w25q128 (16384 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x0000000e0000 : "boot"
0x0000000e0000-0x000000100000 : "bootenv"
0x000000100000-0x000000d00000 : "kernel"
0x000000d00000-0x000001000000 : "spare"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 30 (00:0a:35:00:1e:53)
Generic PHY e000b000.ethernet-ffffffff:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:03, irq=POLL)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
cdns-i2c e0005000.i2c: 400 kHz mmio e0005000 irq 24
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f098b000 with timeout 10s
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
ALSA device list:
  No soundcards found.
Freeing unused kernel memory: 1024K
INIT: version 2.88 booting
Starting udev
udevd[733]: starting version 3.2.2
udevd[734]: starting eudev-3.2.2
hwclock: can't open '/dev/misc/rtc': No such file or directory
Thu Jun 13 03:28:48 UTC 2019
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting internet superserver: inetd.
Configuring packages on first boot....
 (This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
 Removing any system startup links for run-postinsts ...
  /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
macb e000b000.ethernet eth0: link up (100/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending discover...
Sending select for 192.168.10.208...
Lease of 192.168.10.208 obtained, lease time 172800
/etc/udhcpc.d/50default: Adding DNS 192.168.10.1
/etc/udhcpc.d/50default: Adding DNS 192.168.10.1
done.
Starting Dropbear SSH server: Generating key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDE/mhKejv1BcN5daJ6ErVa7zFGDlyGA97a0lpAxnZKY5feelX3L2U+o67mIKcOwqY59RtRafQ
+Rz/fdHp4xAt6seE63PJ8amaxYuYh1Zd3NXYoi2i5IbGcJETvP7lmqUrHmMn1amgNG/puJpyGx1qI6iz0faDIQHiQTxUzoTDAkAzq3/JyR/XryMdtlKF3BBiSbdsICLShtANc56lxxM9NeM5IGe5T
X8T/uLPthBq//Se5cN2QWKmsPTbVFyRsw/CxQh0Heu/6ObepHAn8B7jxEnE4Dko9JICC9Z+iRa4+MuVBBFyoIrmaQzNjXqah9sn6n3fjTKj6jIRBxiWLH7C1 root@Pzturn
Fingerprint: md5 4c:6c:a4:c8:d4:b4:cc:bb:2e:99:b4:29:8f:f0:17:9f
dropbear.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
Starting tcf-agent: OK

PetaLinux 2018.1 Pzturn /dev/ttyPS0
Pzturn login: 

一、打包image.ub

需要工具mkimage,文件XXX.its

确保已安装u-boot工具包,运行mkimage命令生成image.ub(FIT image),fitImage.its可仿写petalinux工程中的
fitImage-its-petalinux-user-image-plnx-zynq7-4.14-xilinx-v2018.1+gitAUTOINC+4ac76ffacb-r0-20190613030027.its: (PATH:/build/tmp/deploy/images/plnx-zynq7),确保相关文件的引用路径正确

mkimage -f fitImage.its image.ub

二、自行打包Ramdisk过程:

1、首先有编译成功的petalinux工程,取工程中已生成可用ramdisk:rootfs.cpio.gz(PATH:/images/linux)
2、新建文件夹,解压ramdisk:

gunzip rootfs.cpio.gz
cpio -idmv < rootfs.cpio.gz

3、解压后可以进入目录,根据需要做修改,再打包

我先是测试原包解压,不做任何修改,打包成rootfs.cpio.gz,最终打包入image.ub,看是否能正常加载,结果是不能正常启动kernel,打印已在最前面给出,不知是否是缺少什么步骤,望高人指点一二,万分感谢***

打包上面解压的ramdisk过程如下:
网上可搜寻到的两种方法:
a、直接通过指令打包:

find ./* | cpio -H newc -o > rootfs.cpio
gzip rootfs.cpio

b、通过脚本文件gen_initramfs_list.sh(PATH:/build/tmp/work-shared/plnx-zynq7/kernel-source/scripts)生成filelist

./gen_initramfs_list.sh /home/opt/Pzturn/ramdisk > filelist

编译源码中的gen_init_cpio.c(PATH:/build/tmp/work-shared/plnx-zynq7/kernel-source/usr)生成gen_init_cpio可执行文件

gcc -o gen_init_cpio gen_init_cpio.c

通过可执行文件gen_init_cpio链接filelist打包生成rootfs.cpio,再压缩成gzip格式

./gen_init_cpio filelist > rootfs.cpio
gzip rootfs.cpio
 类似资料: