[yocto] new system booting directly to halt

Maxwell Bottiger sleepylight at jive-turkey.net
Fri Sep 30 09:16:29 PDT 2016


Chris,

Thanks for the suggestions.  The system is based on SystemV and uses the
old school init scripts.

I rebuilt my kernel with init=/bin/sh and I can get into the system now!
The thing is, I don't see anything in /proc, and only /dev/null exists in
the /dev directory.  I don't know if the lack of meta filesystems is due to
me skipping an actual init, or if I've buggered up something in my kernel
configuration.

This continues to be the world's most secure box, but I feel like I'm
making progress on that.

-Max

On Thu, Sep 29, 2016 at 4:40 PM, Chris Hallinan <challinan at gmail.com> wrote:

> You could sell this as a very secure box ;)
>
> Kidding aside, it didn't "zip" through runlevel 5, in fact, you don't know
> what runlevel it is actually in.  11 seconds after your file system is
> mounted, a reboot is issued.  From your trace, nothing running in userspace
> displayed any messages to the console.  You didn't mention what type of
> init system you are using, systemd or sysV.  It almost looks like a console
> problem.  But...i don't know why a reboot would be issued.  That's not
> normal behavior if you simply have a min-configured console.  Maybe init
> will do that under certain circumstances, I am not sure.
>
> Just for FYI, notice that your serial port is instantiating on ttyS0. (I
> do see that agrees with your kernel command line so at least that much is
> correct.)
>
> First thing I would try is to see if I can get anything on userspace.  Try
> using init= on your kernel command line to just spawn a shell.
>  (init=/bin/sh)
>
> Do you have a way to examine the flash after a reboot to see if a syslog
> was populated on the file system and examine its contents?  ie JTAG?
>
> Make sure your root file system is sane, ie mount it on a development box
> and make sure it's contents make sense to you.  ie for sysV /sbin/init
> should point to init, and it should contain a /etc/inittab and that should
> have sane contents, etc. For systemd, /sbin/init should point (possibly
> through /etc/alternatives) to a systemd executable.  You get the idea.
>
> Good luck,
>
> Chris
>
>
> On Thu, Sep 29, 2016 at 3:18 PM, Maxwell Bottiger <
> sleepylight at jive-turkey.net> wrote:
>
>> I've been working on setting up a poky distro on an older intel XScale
>> system, and I finally got a working kernel and root filesystem.  However,
>> when I boot the box it zips through runlevel 5, then halts.  It seems to me
>> like maybe init isn't kicking off getty or some sort of interactive login.
>> Has anyone else run into this problem?  I'll post the boot output below.
>>
>> -Max
>>
>> Bootloader Initialization Successful.
>> Copyright (c) 2010 InHand Electronics (www.inhand.com)
>>  FT4: Fingertip4              v.0A211004 (Oct 21 2010, 10:04:57)
>>  IBL: InHandBoot_4.9 BETA     v.0A211004 (Oct 21 2010, 10:04:19)
>>
>> CPLD Version:      5.10
>> DRAM Size:         128 MBytes
>> SRAM Size:         240 KBytes
>> IBC Start Page:    /nor/512
>>
>> Platform Post-Init
>> ac97
>>
>> Autorun '/cf/autoexec.brc'
>> '/cf/autoexec.brc' not found
>>
>> Autorun '/sd/autoexec.brc'
>> '/sd/autoexec.brc' not found
>>
>> Autorun '/nor/config.brc'
>> >> bootlin
>> Starting Linux
>> Copying image (2689792 bytes) to RAM: 0xa0008000
>>
>> Copying file /nor/zImage to /ram/os
>>   Source File:          2689792 bytes
>>   Destination Space:    4194304 bytes
>>
>> Copying 2689792 bytes
>>  pct remaining  time
>>  --- --------- -----
>> 100%        0   0:00
>> Copied 2689792B (3MB)
>> Setting up Kernel tags at: 0xa0000100
>> Kernel tags used 36 bytes
>> Disabling MMU
>> Jumping to Linux kernel @ 0xa0008000
>> Uncompressing Linux... done, booting the kernel.
>> [    0.000000] Booting Linux on physical CPU 0x0
>> [    0.000000] Linux version 3.14.4 (max at tsunami.pacs.agpea.army.mil)
>> (gcc version 4.9.2 (GCC) ) #1 PREEMPT Wed Sep 28 16:29:41 EDT 2016
>> [    0.000000] CPU: XScale-PXA270 [69054118] revision 8 (ARMv5TE),
>> cr=0000397f
>> [    0.000000] CPU: VIVT data cache, VIVT instruction cache
>> [    0.000000] Machine: InHand Fingertip4 Development Platform (aka FT4)
>> [    0.000000] Memory policy: Data cache writeback
>> [    0.000000] BUG: mapping for 0x00000000 at 0xff000000 out of vmalloc
>> space
>> [    0.000000] Run Mode clock: 208.00MHz (*16)
>> [    0.000000] Turbo Mode clock: 520.00MHz (*2.5, active)
>> [    0.000000] Memory clock: 208.00MHz (/2)
>> [    0.000000] System bus clock: 208.00MHz
>> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
>> Total pages: 16256
>> [    0.000000] Kernel command line: console=ttyS0,115200
>> root=/dev/mtdblock0 rw rootfstype=jffs2 mem=64M
>> earlyprintk=serial,ttyS0,115200
>> [    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
>> [    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768
>> bytes)
>> [    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384
>> bytes)
>> [    0.000000] Memory: 59616K/65536K available (3732K kernel code, 184K
>> rwdata, 1132K rodata, 139K init, 94K bss, 5920K reserved)
>> [    0.000000] Virtual kernel memory layout:
>> [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
>> [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
>> [    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
>> [    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
>> [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
>> [    0.000000]       .text : 0xc0008000 - 0xc04c83fc   (4865 kB)
>> [    0.000000]       .init : 0xc04c9000 - 0xc04ebcd4   ( 140 kB)
>> [    0.000000]       .data : 0xc04ec000 - 0xc051a180   ( 185 kB)
>> [    0.000000]        .bss : 0xc051a18c - 0xc0531b90   (  95 kB)
>> [    0.000000] Preemptible hierarchical RCU implementation.
>> [    0.000000] NR_IRQS:16 nr_irqs:304 304
>> [    0.000046] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps
>> every 1321528397516ns
>> [    0.000691] Console: colour dummy device 80x30
>> [    0.000769] Calibrating delay loop... 518.55 BogoMIPS (lpj=2592768)
>> [    0.060347] pid_max: default: 32768 minimum: 301
>> [    0.060594] Security Framework initialized
>> [    0.060741] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
>> [    0.060774] Mountpoint-cache hash table entries: 1024 (order: 0, 4096
>> bytes)
>> [    0.062150] CPU: Testing write buffer coherency: ok
>> [    0.063287] Setting up static identity map for 0xa038e6d8 - 0xa038e744
>> [    0.069844] NET: Registered protocol family 16
>> [    0.071694] DMA: preallocated 256 KiB pool for atomic coherent
>> allocations
>> [    0.095946] Configure Fingertip4...
>> [    0.188992] bio: create slab <bio-0> at 0
>> [    0.197249] usbcore: registered new interface driver usbfs
>> [    0.198138] usbcore: registered new interface driver hub
>> [    0.199246] usbcore: registered new device driver usb
>> [    0.210323] cfg80211: Calling CRDA to update world regulatory domain
>> [    0.211077] Switched to clocksource oscr0
>> [    0.282781] NET: Registered protocol family 2
>> [    0.284302] TCP established hash table entries: 1024 (order: 0, 4096
>> bytes)
>> [    0.284382] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
>> [    0.284426] TCP: Hash tables configured (established 1024 bind 1024)
>> [    0.284648] TCP: reno registered
>> [    0.284673] UDP hash table entries: 256 (order: 0, 4096 bytes)
>> [    0.284717] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
>> [    0.285236] NET: Registered protocol family 1
>> [    0.286343] RPC: Registered named UNIX socket transport module.
>> [    0.286402] RPC: Registered udp transport module.
>> [    0.286416] RPC: Registered tcp transport module.
>> [    0.286431] RPC: Registered tcp NFSv4.1 backchannel transport module.
>> [    0.292910] futex hash table entries: 256 (order: -1, 3072 bytes)
>> [    0.295619] NFS: Registering the id_resolver key type
>> [    0.295843] Key type id_resolver registered
>> [    0.295859] Key type id_legacy registered
>> [    0.295901] Installing knfsd (copyright (C) 1996 okir at monad.swb.de).
>> [    0.296346] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
>> [    0.297841] msgmni has been set to 116
>> [    0.300940] io scheduler noop registered
>> [    0.300991] io scheduler deadline registered
>> [    0.301491] io scheduler cfq registered (default)
>> [    0.754840] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 22,
>> base_baud = 928562) is a UART1
>> [    1.153128] console [ttyS0] enabled
>> [    1.157921] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 21,
>> base_baud = 928562) is a UART2
>> [    1.168016] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 20,
>> base_baud = 928562) is a UART3
>> [    1.197503] brd: module loaded
>> [    1.221064] loop: module loaded
>> [    1.225694] nbd: registered device at major 43
>> [    1.271030] Uniform Multi-Platform E-IDE driver
>> [    1.277643] ide-gd driver 1.18
>> [    1.286435] physmap platform flash device: 04000000 at 00000000
>> [    1.293684] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit
>> bank. Manufacturer ID 0x000089 Chip ID 0x00891c
>> [    1.304429] physmap-flash.0: Found 1 x16 devices at 0x2000000 in
>> 16-bit bank
>> [    1.311720] Intel/Sharp Extended Query Table at 0x010A
>> [    1.316876] Intel/Sharp Extended Query Table at 0x010A
>> [    1.322184] Intel/Sharp Extended Query Table at 0x010A
>> [    1.327328] Intel/Sharp Extended Query Table at 0x010A
>> [    1.332518] Intel/Sharp Extended Query Table at 0x010A
>> [    1.337660] Using buffer write method
>> [    1.341323] Using auto-unlock on power-up/resume
>> [    1.345909] cfi_cmdset_0001: Erase suspend on write enabled
>> [    1.353683] Creating 1 MTD partitions on "physmap-flash.0":
>> [    1.359284] 0x000000900000-0x000004000000 : "Filesystem"
>> [    1.371691] Using configured DiskOnChip probe address 0x4000000
>> [    1.380537] mousedev: PS/2 mouse device common for all mice
>> [    1.386463] i2c /dev entries driver
>> [    1.393931] TCP: cubic registered
>> [    1.397286] NET: Registered protocol family 17
>> [    1.402235] NET: Registered protocol family 15
>> [    1.406830] lib80211: common routines for IEEE802.11 drivers
>> [    1.413102] Key type dns_resolver registered
>> [    1.417577] XScale iWMMXt coprocessor detected.
>> [    3.259509] VFS: Mounted root (jffs2 filesystem) on device 31:0.
>> [    3.266333] Freeing unused kernel memory: 136K (c04c9000 - c04eb000)
>> [   14.484953] reboot: System halted
>>
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>
>
> --
> Life is like Linux - it never stands still.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160930/f4fa2d4b/attachment.html>


More information about the yocto mailing list