Slow boot up without ethernet connected - Debian

When I start my BBB with the ethernet connection I am generally up and at a login prompt within a few seconds. But when I boot with the ethernet cable disconnected then the boot seems to hang right after the last message here:

Uncompressing Linux… done, booting the kernel.

[ 0.361461] omap2_mbox_probe: platform not supported

[ 0.516311] tps65217-bl tps65217-bl: no platform data provided

[ 0.579093] bone-capemgr bone_capemgr.9: slot #0: No cape found

[ 0.616203] bone-capemgr bone_capemgr.9: slot #1: No cape found

[ 0.653308] bone-capemgr bone_capemgr.9: slot #2: No cape found

[ 0.690418] bone-capemgr bone_capemgr.9: slot #3: No cape found

[ 0.709273] omap_hsmmc mmc.5: of_parse_phandle_with_args of ‘reset’ failed

[ 0.770742] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8

[ 0.782436] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22

[ 0.789715] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single

Loading, please wait…

Scanning for Btrfs filesystems

systemd-fsck[204]: rootfs: clean, 31460/230144 files, 195808/919296 blocks

[ 4.134130] libphy: PHY 4a101000.mdio:01 not found

[ 4.139188] net eth0: phy 4a101000.mdio:01 not found on slave 1

From here it will sit and do nothing but the heartbeat blink without indication of any real disk activity. The delay seems to be around 45 seconds to maybe a minute. At that point the wireless adapter finally begins to negotiate and connect. Only when that has completed do I then get a login prompt at the serial console.

I would really like to determine how I can speed this up. I don’t want my robot to sit and blink at me for 50 seconds just burning time at startup. Below is the dmesg output. You can see the very long delay after about the 5 second mark.

[ 0.000000] Booting Linux on physical CPU 0x0

[ 0.000000] Initializing cgroup subsys cpu

[ 0.000000] Linux version 3.8.13-bone59 (root@imx6q-wandboard-2gb-0) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Fri Jul 4 22:52:56 UTC 2014

[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c5387d

[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[ 0.000000] Machine: Generic AM33XX (Flattened Device Tree), model: TI AM335x BeagleBone

[ 0.000000] Memory policy: ECC disabled, Data cache writeback

[ 0.000000] On node 0 totalpages: 130816

[ 0.000000] free_area_init_node: node 0, pgdat c08b2640, node_mem_map c092d000

[ 0.000000] Normal zone: 1024 pages used for memmap

[ 0.000000] Normal zone: 0 pages reserved

[ 0.000000] Normal zone: 129792 pages, LIFO batch:31

[ 0.000000] AM335X ES2.1 (l2cache sgx neon )

[ 0.000000] PERCPU: Embedded 9 pages/cpu @c0d3d000 s14080 r8192 d14592 u36864

[ 0.000000] pcpu-alloc: s14080 r8192 d14592 u36864 alloc=9*4096

[ 0.000000] pcpu-alloc: [0] 0

[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129792

[ 0.000000] Kernel command line: console=ttyO0,115200n8 quiet capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN root=UUID=7efe3206-89e4-4951-92ea-bd15e60fb19b rootfstype=ext4 rootwait quiet init=/lib/systemd/systemd

[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)

[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

[ 0.000000] __ex_table already sorted, skipping sort

[ 0.000000] allocated 1048576 bytes of page_cgroup

[ 0.000000] please try ‘cgroup_disable=memory’ option if you don’t want memory cgroups

[ 0.000000] Memory: 511MB = 511MB total

[ 0.000000] Memory: 505580k/505580k available, 18708k reserved, 0K highmem

[ 0.000000] Virtual kernel memory layout:

[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)

[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)

[ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)

[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)

[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)

[ 0.000000] modules : 0xbf800000 - 0xbfe00000 ( 6 MB)

[ 0.000000] .text : 0xc0008000 - 0xc07ef7b8 (8094 kB)

[ 0.000000] .init : 0xc07f0000 - 0xc082d700 ( 246 kB)

[ 0.000000] .data : 0xc082e000 - 0xc08b5600 ( 542 kB)

[ 0.000000] .bss : 0xc08b5600 - 0xc092cd80 ( 478 kB)

[ 0.000000] Hierarchical RCU implementation.

[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.

[ 0.000000] NR_IRQS:0 nr_irqs:0 0

[ 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: GPTIMER1 at 24000000 Hz

[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms

[ 0.000000] OMAP clocksource: GPTIMER2 at 24000000 Hz

[ 0.000000] Console: colour dummy device 80x30

[ 0.000236] Calibrating delay loop… 993.47 BogoMIPS (lpj=969728)

[ 0.029194] pid_max: default: 32768 minimum: 301

[ 0.029329] Security Framework initialized

[ 0.029385] Mount-cache hash table entries: 512

[ 0.035115] Initializing cgroup subsys cpuacct

[ 0.035136] Initializing cgroup subsys memory

[ 0.035176] Initializing cgroup subsys blkio

[ 0.035263] CPU: Testing write buffer coherency: ok

[ 0.035643] CPU0: thread -1, cpu 0, socket -1, mpidr 0

[ 0.035698] Setting up static identity map for 0x804d2948 - 0x804d2994

[ 0.036636] Brought up 1 CPUs

[ 0.036650] SMP: Total of 1 processors activated (993.47 BogoMIPS).

[ 0.037439] devtmpfs: initialized

[ 0.045861] omap_hwmod: wd_timer2: _wait_target_disable failed

[ 0.097965] pinctrl core: initialized pinctrl subsystem

[ 0.098099] rstctl core: initialized rstctl subsystem

[ 0.098395] regulator-dummy: no parameters

[ 0.098714] NET: Registered protocol family 16

[ 0.099247] DMA: preallocated 256 KiB pool for atomic coherent allocations

[ 0.104845] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568

[ 0.105429] platform 49000000.edma: alias fck already exists

[ 0.105446] platform 49000000.edma: alias fck already exists

[ 0.105459] platform 49000000.edma: alias fck already exists

[ 0.106062] gpiochip_add: registered GPIOs 0 to 31 on device: gpio

[ 0.106156] OMAP GPIO hardware version 0.1

[ 0.106967] gpiochip_add: registered GPIOs 32 to 63 on device: gpio

[ 0.107678] gpiochip_add: registered GPIOs 64 to 95 on device: gpio

[ 0.108369] gpiochip_add: registered GPIOs 96 to 127 on device: gpio

[ 0.108622] of_get_named_gpio_flags exited with status 52

[ 0.108640] gpio-rctrl rstctl.4: loaded OK

[ 0.111775] hw-breakpoint: debug architecture 0x4 unsupported.

[ 0.113009] cpsw.0: No hwaddr in dt. Using d0:39:72:14:c9:21 from efuse

[ 0.113025] cpsw.1: No hwaddr in dt. Using d0:39:72:14:c9:23 from efuse

[ 0.121254] bio: create slab at 0

[ 0.127567] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver

[ 0.127718] of_get_named_gpio_flags: can’t parse gpios property

[ 0.127842] vmmcsd_fixed: 3300 mV

[ 0.129350] SCSI subsystem initialized

[ 0.129577] usbcore: registered new interface driver usbfs

[ 0.129637] usbcore: registered new interface driver hub

[ 0.129836] usbcore: registered new device driver usb

[ 0.131071] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz

[ 0.131981] input: tps65217_pwr_but as /devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0

[ 0.133255] DCDC1: at 1500 mV

[ 0.134084] vdd_mpu: 925 <–> 1325 mV at 1325 mV

[ 0.134939] vdd_core: 925 <–> 1150 mV at 1125 mV

[ 0.135745] LDO1: at 1800 mV

[ 0.136532] LDO2: at 3300 mV

[ 0.138064] LDO3: 1800 mV

[ 0.138873] LDO4: at 3300 mV

[ 0.139590] tps65217 0-0024: TPS65217 ID 0xe version 1.2

[ 0.140039] omap_i2c 44e0b000.i2c: unable to select pin group

[ 0.140496] omap_i2c 4819c000.i2c: bus 1 rev0.11 at 100 kHz

[ 0.141876] omap_i2c 4819c000.i2c: unable to select pin group

[ 0.142016] media: Linux media interface: v0.10

[ 0.142080] Linux video capture interface: v2.00

[ 0.142152] pps_core: LinuxPPS API ver. 1 registered

When I start my BBB with the ethernet connection I am generally up and at a
login prompt within a few seconds. But when I boot with the ethernet cable
disconnected then the boot seems to hang right after the last message here:

From here it will sit and do nothing but the heartbeat blink without
indication of any real disk activity. The delay seems to be around 45
seconds to maybe a minute. At that point the wireless adapter finally
begins to negotiate and connect. Only when that has completed do I then get
a login prompt at the serial console.

I would really like to determine how I can speed this up. I don't want my
robot to sit and blink at me for 50 seconds just burning time at startup.
Below is the dmesg output. You can see the very long delay after about the
5 second mark.

It sounds like you have eth0 enabled in /etc/network/interfaces

So it's waiting for a valid ip address and will wait a good 60 seconds.

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.8.13-bone59 (root@imx6q-wandboard-2gb-0) (gcc
version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Fri Jul 4 22:52:56 UTC 2014

btw, upgrade to bone60, we fixed a major bug on the phy, where
sometimes it can't be found.

Regards,

Well that almost got it. I set the eth0 interface to a static ip and that speeds up boot by a bunch it also seems to cause it to no longer bring up the wireless interface. I can manually ifup wlan1 and it will come online but it’s ignored at boot up.

Putting “ifup wlan1” into /etc/rc.local doesn’t help either. I have to log into the serial console and force it up now.

… been a long afternoon.

How do upgrade the kernel? apt-get upgrade does not do the trick.

It’s a timing issue. Adding a “sleep 10” to rc.local did the trick.

How do upgrade the kernel? apt-get upgrade does not do the trick.

Nevermind… found it on the Wiki.

Will there be any way to eliminate the boot-hang waiting for DHCP? My other distributions (Arch) will come up without delay and if Ethernet is present it's on and working if not, it doesn't come up. I ask because I'm sitting here hosed now since my boot up is to eMMC, the wireless is not coming online today and the cape arrangement blocks access to the console port, so I have no way to re-enable any other method of ssh access. Since ethernet is disabled I'm locked out till I disassemble the whole thing and try to access via the console.

I guess future capes will be designed to pull out the console serial lines to an external header. Not having those available keeps biting me.

PLug in a usb otg cable..

3 devices should come up, 2 will be useful.. (flash/usbnet/usbcdc)

Either connect to the usbnet (192.168.7.2)
Or the usbcdc (/dev/ttyACM0)?

The 2 second delay is just the way debian is for dhcp.

Regards,

I had tried the USB cable, and was getting ready to say that wasn't working when I realized I had forgotten to install the network driver on this Mac. I was afraid I had done something in interfaces that was not allowing that device to come up. Once that was done I was able to contact it on the USB network adapter address. That will be sufficient to help me in most cases where the kernel at least boots up. Thanks for the prod to look deeper at it.

Another thing you can do, is change "auto" to "allow-hotplug" but then
it only seems to work if you hotplug the eth cable after bootup..

Regards,