This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x initramfs init进程退出Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100

Other Parts Discussed in Thread: TMDSSK3358, TFP410, TPS65910

各位好:

    在AM335x平台开发,使用initramfs,进入到系统初始化的时候,init进程退出。具体环境及步骤如下:

    开发包版本:ti-processor-sdk-linux-am335x-evm-01.00.00.03

    文件系统:使用 ti-processor-sdk-linux-am335x-evm-01.00.00.03自带的arago-base-tisdk-image-am335x-evm.tar.gz

   开发板:TI官方TMDSSK3358 开发板

    步骤

    1、参照http://processors.wiki.ti.com/index.php/Initrd#initramfs 制作initramfs系统

    2、本机建立TFPT服务,将编译好的zImage和开发包提供的am335x-evmsk.dtb放入到TFTP应用程序目录

    3、使用开发板自带的micro sd卡启动开发板,到u-boot提示界面

    4、设置网络参数

    5、设置bootcmd(直接使用u-boot的“run ramagrs”命令)

    4、使用tftp命令加载am335x-evmsk.dtb

    5、使用tftp命令加载zImage

    6、启动内核

打印信息如下:

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.14.43-g875c69b (root@ubuntu) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 Wed Dec 9 15:24:06 CST 2015
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: TI AM335x EVM-SK
[ 0.000000] cma: CMA: reserved 24 MiB at 8c800000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (sgx neon )
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 rw rootfstype=ext2
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc082c0c4 (8337 kB)
[ 0.000000] .init : 0xc082d000 - 0xc1bd3f74 (20124 kB)
[ 0.000000] .data : 0xc1bd4000 - 0xc1c2f860 ( 367 kB)
[ 0.000000] .bss : 0xc1c2f860 - 0xc1c69878 ( 233 kB)
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] Total of 128 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000012] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
[ 0.000029] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000272] Console: colour dummy device 80x30
[ 0.000293] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[ 0.000298] This ensures that you still see kernel messages. Please
[ 0.000302] update your kernel commandline.
[ 0.000321] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[ 0.089531] pid_max: default: 32768 minimum: 301
[ 0.089618] Security Framework initialized
[ 0.089706] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.089715] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.096064] CPU: Testing write buffer coherency: ok
[ 0.096424] Setting up static identity map for 0x805e4e60 - 0x805e4eb8
[ 0.100040] devtmpfs: initialized
[ 0.101544] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.107358] omap_hwmod: tptc0 using broken dt data from edma
[ 0.107427] omap_hwmod: tptc1 using broken dt data from edma
[ 0.107486] omap_hwmod: tptc2 using broken dt data from edma
[ 0.111503] omap_hwmod: debugss: _wait_target_disable failed
[ 0.165845] pinctrl core: initialized pinctrl subsystem
[ 0.166752] regulator-dummy: no parameters
[ 0.168893] NET: Registered protocol family 16
[ 0.170688] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.172860] cpuidle: using governor ladder
[ 0.172874] cpuidle: using governor menu
[ 0.178021] syscon 44e10000.control_module: regmap [mem 0x44e10000-0x44e107fb] registered
[ 0.179254] platform 49000000.edma: alias fck already exists
[ 0.179275] platform 49000000.edma: alias fck already exists
[ 0.179287] platform 49000000.edma: alias fck already exists
[ 0.180347] OMAP GPIO hardware version 0.1
[ 0.192508] No ATAGs?
[ 0.192529] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.214052] bio: create slab <bio-0> at 0
[ 0.227277] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[ 0.228171] vbat: 5000 mV
[ 0.228518] lis3_reg: no parameters
[ 0.228610] reg-fixed-voltage fixedregulator@2: could not find pctldev for node /pinmux@44e10800/pinmux_wl12xx_gpio, deferring probe
[ 0.228629] platform fixedregulator@2: Driver reg-fixed-voltage requests probe deferral
[ 0.229017] vtt: 1500 mV
[ 0.231701] vgaarb: loaded
[ 0.232169] i2c-core: driver [palmas] using legacy suspend method
[ 0.232178] i2c-core: driver [palmas] using legacy resume method
[ 0.232799] SCSI subsystem initialized
[ 0.234061] usbcore: registered new interface driver usbfs
[ 0.234220] usbcore: registered new interface driver hub
[ 0.234385] usbcore: registered new device driver usb
[ 0.235198] omap_i2c 44e0b000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c0_pins, deferring probe
[ 0.235226] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
[ 0.235566] pps_core: LinuxPPS API ver. 1 registered
[ 0.235574] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.235678] PTP clock support registered
[ 0.237338] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.238130] Advanced Linux Sound Architecture Driver Initialized.
[ 0.239554] Switched to clocksource timer1
[ 0.255648] NET: Registered protocol family 2
[ 0.256414] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.256442] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.256465] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.256536] TCP: reno registered
[ 0.256547] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.256562] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.256709] NET: Registered protocol family 1
[ 0.257073] RPC: Registered named UNIX socket transport module.
[ 0.257085] RPC: Registered udp transport module.
[ 0.257090] RPC: Registered tcp transport module.
[ 0.257095] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.701611] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
[ 1.704333] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 1.843024] VFS: Disk quotas dquot_6.5.2
[ 1.843562] NFS: Registering the id_resolver key type
[ 1.843631] Key type id_resolver registered
[ 1.843638] Key type id_legacy registered
[ 1.843672] jffs2: version 2.2. (NAND) (SUMMARY) ? 2001-2006 Red Hat, Inc.
[ 1.843825] msgmni has been set to 448
[ 1.845031] NET: Registered protocol family 38
[ 1.845066] io scheduler noop registered
[ 1.845073] io scheduler deadline registered
[ 1.845092] io scheduler cfq registered (default)
[ 1.846660] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 1.850190] backlight supply power not found, using dummy regulator
[ 1.853358] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[ 1.857745] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a 8250
[ 2.482727] console [ttyS0] enabled
[ 2.487877] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[ 2.494939] [drm] Initialized drm 1.1.0 20060810
[ 2.508694] brd: module loaded
[ 2.516579] loop: module loaded
[ 2.520173] (hci_tty): inside hci_tty_init
[ 2.524695] (hci_tty): allocated 250, 0
[ 2.532311] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 2.542039] usbcore: registered new interface driver asix
[ 2.547659] usbcore: registered new interface driver ax88179_178a
[ 2.553947] usbcore: registered new interface driver cdc_ether
[ 2.559993] usbcore: registered new interface driver smsc95xx
[ 2.565916] usbcore: registered new interface driver net1080
[ 2.571726] usbcore: registered new interface driver cdc_subset
[ 2.577814] usbcore: registered new interface driver zaurus
[ 2.583600] usbcore: registered new interface driver cdc_ncm
[ 2.589795] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.596365] ehci-pci: EHCI PCI platform driver
[ 2.601034] ehci-omap: OMAP-EHCI Host Controller driver
[ 2.606706] usbcore: registered new interface driver cdc_wdm
[ 2.612591] usbcore: registered new interface driver usb-storage
[ 2.619581] mousedev: PS/2 mouse device common for all mice
[ 2.626667] input: ti-tsc as /devices/ocp/44e0d000.tscadc/TI-am335x-tsc/input/input0
[ 2.635701] i2c-core: driver [rtc-ds1307] using legacy suspend method
[ 2.642210] i2c-core: driver [rtc-ds1307] using legacy resume method
[ 2.649344] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[ 2.656541] 44e3e000.rtc: already running
[ 2.661282] i2c /dev entries driver
[ 2.664920] Driver for 1-wire Dallas network protocol.
[ 2.672285] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 2.680990] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
[ 2.687677] platform 48060000.mmc: Driver omap_hsmmc requests probe deferral
[ 2.695188] omap_hsmmc 481d8000.mmc: unable to get vmmc regulator -517
[ 2.701849] platform 481d8000.mmc: Driver omap_hsmmc requests probe deferral
[ 2.710892] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.717208] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[ 2.724243] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[ 2.731363] usbcore: registered new interface driver usbhid
[ 2.736962] usbhid: USB HID core driver
[ 2.741088] platform 44d00000.wkup_m3: Driver wkup_m3 requests probe deferral
[ 2.751151] oprofile: using arm/armv7
[ 2.755104] TCP: cubic registered
[ 2.758432] Initializing XFRM netlink socket
[ 2.762839] NET: Registered protocol family 17
[ 2.767343] NET: Registered protocol family 15
[ 2.771925] Key type dns_resolver registered
[ 2.776842] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
[ 2.785642] cpu cpu0: cpu0 clock notifier not ready, retry
[ 2.791248] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral
[ 2.799303] PM: bootloader does not support rtc-only!
[ 2.804483] ThumbEE CPU extension supported.
[ 2.808802] Registering SWP/SWPB emulation handler
[ 2.815043] lis3_reg: disabling
[ 2.818207] vbat: disabling
[ 2.821109] regulator-dummy: disabling
[ 2.825505] Error: Driver 'tfp410' is already registered, aborting...
[ 2.834210] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.840917] [drm] No driver support for vblank timestamp query.
[ 2.891383] Console: switching to colour frame buffer device 60x34
[ 2.899278] tilcdc 4830e000.lcdc: fb0: frame buffer device
[ 2.904901] tilcdc 4830e000.lcdc: registered panic notifier
[ 2.910525] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
[ 2.917493] vwl1271: 1800 mV
[ 2.927678] tps65910 0-002d: No interrupt support, no core IRQ
[ 2.937967] vrtc: 1800 mV
[ 2.940988] vrtc: supplied by vbat
[ 2.946093] vio: at 1500 mV
[ 2.949067] vio: supplied by vbat
[ 2.954172] vdd_mpu: 912 <--> 1375 mV at 1325 mV
[ 2.958966] vdd_mpu: supplied by vbat
[ 2.964401] vdd_core: 912 <--> 1150 mV at 1137 mV
[ 2.969280] vdd_core: supplied by vbat
[ 2.974337] vdd3: 5000 mV
[ 2.978364] vdig1: at 1800 mV
[ 2.981520] vdig1: supplied by vbat
[ 2.986336] vdig2: at 1800 mV
[ 2.989467] vdig2: supplied by vbat
[ 2.994296] vpll: at 1800 mV
[ 2.997345] vpll: supplied by vbat
[ 3.002103] vdac: at 1800 mV
[ 3.005144] vdac: supplied by vbat
[ 3.009895] vaux1: at 1800 mV
[ 3.013027] vaux1: supplied by vbat
[ 3.017853] vaux2: at 3300 mV
[ 3.021006] vaux2: supplied by vbat
[ 3.025825] vaux33: at 3300 mV
[ 3.029035] vaux33: supplied by vbat
[ 3.033957] vmmc: 1800 <--> 3300 mV at 3300 mV
[ 3.038580] vmmc: supplied by vbat
[ 3.072707] lis3lv02d: 16 bits lis331dlh sensor found
[ 3.159906] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input1
[ 3.177457] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 3.276981] mmc0: host does not support reading read-only switch. assuming write-enable.
[ 3.287320] mmc0: new high speed SD card at address 2bf0
[ 3.293252] mmcblk0: mmc0:2bf0 SD02G 1.87 GiB
[ 3.298966] mmcblk0: p1 p2
[ 3.340201] remoteproc0: wkup_m3 is available
[ 3.344675] remoteproc0: Note: remoteproc is still under development and considered experimental.
[ 3.353728] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 3.369220] remoteproc0: powering up wkup_m3
[ 3.389959] remoteproc0: Booting fw image am335x-pm-firmware.elf, size 154412
[ 3.397756] PM: CM3 Firmware Version = 0x190
[ 3.404097] remoteproc0: remote processor wkup_m3 is now up
[ 3.449568] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 3.455690] davinci_mdio 4a101000.mdio: detected phy mask fffffffc
[ 3.472961] libphy: 4a101000.mdio: probed
[ 3.477049] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Atheros 8031 ethernet
[ 3.486360] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Atheros 8031 ethernet
[ 3.496594] cpsw 4a100000.ethernet: Detected MACID = c4:ed:ba:8b:33:fd
[ 3.504445] cpsw 4a100000.ethernet: cpsw: Detected MACID = c4:ed:ba:8b:33:ff
[ 3.513734] input: gpio_buttons@0 as /devices/gpio_buttons@0/input/input2
[ 3.521295] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:01:26 UTC (946684886)
[ 3.532842] ALSA device list:
[ 3.535840] No soundcards found.
[ 3.564319] Freeing unused kernel memory: 20120K (c082d000 - c1bd3000)
init: applet not found
[ 3.589728] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[ 3.589728]
[ 3.598916] drm_kms_helper: panic occurred, switching back to text console
[ 105.119511] random: nonblocking pool is initialized

  • 我理解如果你使用InitRamfs文件系统的时候,会把文件系统压缩为一个cpio.gz的文件,这个文件你生成的大小是多少。

  • 24150K,可能和驱动有关,在我司的开发板上也是这个情况,然后我把tlv320aic3x-codec和视频驱动去掉,就可以进入busybox了,不过SDK自带的busybox没有df命令,需要自己新版,然后编译替换即可。

  • cpio.gz大小为51505152字节,然后压缩到内核后24150K

  • InitRamfs Boot对文件系统镜像的大小有要求,如果镜像太大了,是会有问题的。

    还有就是Uboot配置中你有没有根据自己的镜像大小,去修改args_ramfs中的长度参数(下面是从其他系统中copy过来的一个配置,17M是cpio.gz的文件大小)

    args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x802000000,17M

  • initrd是通过ramdisk的方式,及内核和文件系统分离,我是通过initramfs的方式,内核和文件系统在编译到一个文件,initramfs的方式也没有指定文件大小。

    No special installation like above with initrd is necessary. The initramfs is already in the kernel. If you start the kernel, the initramfs is already there. Therefore, there is no root=/dev/ram0 rw initrd=0x87000000,8M bootargs option necessary. Remove this if you still have it!


    initrd vs. initramfs

    • Using initrd, kernel and initial file system are splitted. Making changes to kernel or filesystem doesn't touch the other one. The download size (e.g. while development) of one component is smaller.
    • Creating and modifying an initramfs is easier than with initrd (unzip & mount & unmount & zip)
    • Having one big image (kernel & initramfs) is easier to handle (e.g. download or flashing) than having two splitted images.
    我根据http://processors.wiki.ti.com/index.php/Initrd#initramfs,使用的busybox来初始化系统的。目前进入busybox后,一直循环打印如下信息:

    can't open /dev/O0: No such file or directory
    can't open /dev/1: No such file or directory
    can't open /dev/z6: No such file or directory

    我现在准备在文件系统的dev目录创建这三个设备,搞不清楚busybox用这三个设备做什么用。


x 出现错误。请重试或与管理员联系。