Modify

Opened 9 years ago

Closed 9 years ago

#2400 closed defect (fixed)

Enabling of storage dir /jffs takes around 30 sec on boot up.

Reported by: nabcore Owned by: developers
Priority: low Milestone: Kamikaze 8.09 RC1
Component: base system Version:
Keywords: ar7 jffs Cc:

Description

The enabling of the /jffs partition takes a very log time on boot up. This has been an issue for a while, but I don't recall this taking so long on the 2.6.19.x change sets of openwrt. This is not to say that the cause of this is the the kernel change, but more that "this was not an issue a long time ago, but has been an issue for a while, but I've not reported this until now".

[42949374.340000] Warning: unable to open an initial console.
[42949376.350000] Algorithmics/MIPS FPU Emulator v1.5
[42949377.480000] mini_fo: using base directory: /
[42949377.480000] mini_fo: using storage directory: /jffs   <---------
[42949408.780000] ar7_wdt: enabling watchdog timer          <---------
[42949411.680000] PHY: fixed@100:1 - Link is Up - 10/Half
[42949413.250000] NET: Registered protocol family 8

Attachments (2)

serial.diff (548 bytes) - added by nabcore 9 years ago.
fix for 30 sec pause on boot
serial.2.diff (550 bytes) - added by nabcore 9 years ago.
fix for 30 sec pause on boot (take 2)

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by nabcore

This is also seen here by another user: http://forum.openwrt.org/viewtopic.php?pid=52650#p52650

comment:2 Changed 9 years ago by nabcore

Still seeing this in r8850:

[42949376.360000] Algorithmics/MIPS FPU Emulator v1.5
[42949377.510000] mini_fo: using base directory: /
[42949377.510000] mini_fo: using storage directory: /jffs
[42949408.690000] ar7_wdt: enabling watchdog timer
[42949410.670000] PHY: fixed@100:1 - Link is Up - 10/Half
[42949413.920000] NET: Registered protocol family 8

comment:3 Changed 9 years ago by nabcore

Could these be an issue in /sbin/mount_root or /bin/firstboot ? The lines starting with mini_fo: correspond to this section in firstboot:

fopivot() { # <rw_root> <ro_root> <dupe?>
        root=$1
        {
                mount -t mini_fo -o base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt
        } || {
                [ "$3" = "1" ] && {
                mount | grep "on $1 type" 2>&- 1>&- || mount -o bind $1 $1
                dupe $1 $rom
                }
        }
        pivot $root $2
}

comment:4 Changed 9 years ago by nabcore

Having modified /etc/preinit:

} | tee /tmp/preinit.log

killall hotplug2
echo `date` "Calling init " >> /tmp/preinit.log
exec /sbin/init

and /etc/init.d/rcS

#!/bin/sh
# Copyright (C) 2006 OpenWrt.org

echo `date` "Staring rcS" >> /tmp/rc.log
.....

to enable logging to a file, it seems that the 30 sec delay is in executing busybox's /sbin/init :

root@Bunny:/tmp# cat preinit.log
Sat Jan 1 00:00:04 GMT 2000 - preinit -
switching to jffs2
Sat Jan 1 00:00:04 GMT 2000 - init -
Sat Jan 1 00:00:04 GMT 2000 Calling init
root@Bunny:/tmp# cat rc.log
Sat Jan 1 00:00:35 GMT 2000 Staring rcS

comment:5 Changed 9 years ago by nabcore

Interestingly; if /sbin/init is removed:

[42949374.290000] VFS: Mounted root (squashfs filesystem) readonly.
[42949374.300000] Freeing unused kernel memory: 104k freed
[42949374.330000] Warning: unable to open an initial console.
[42949376.400000] Algorithmics/MIPS FPU Emulator v1.5
[42949377.600000] mini_fo: using base directory: /
[42949377.610000] mini_fo: using storage directory: /jffs
[42949377.880000] Kernel panic - not syncing: Attempted to kill init!
[42949377.890000] Rebooting in 3 seconds..

Changed 9 years ago by nabcore

fix for 30 sec pause on boot

comment:6 Changed 9 years ago by nabcore

The above patch seems to fix the problem; basically removing the "n8r" from the console speed parameter fixes it:

[42949374.300000] Freeing unused kernel memory: 104k freed
[42949374.330000] Warning: unable to open an initial console.
[42949376.370000] Algorithmics/MIPS FPU Emulator v1.5
- preinit -
switching to jffs2
[42949377.490000] mini_fo: using base directory: /
[42949377.500000] mini_fo: using storage directory: /jffs
- init -
init started:  BusyBox v1.4.2 (2007-09-23 23:06:53 BST) multi-call binary
[42949380.740000] PHY: fixed@100:1 - Link is Up - 10/Half
[42949381.130000] NET: Registered protocol family 8

I have no idea why it works.

comment:7 Changed 9 years ago by nacbore

Just done some more testing, console=ttyS0,115200n8 works as well. Hence the "r" option must be what is causing the problem.

Changed 9 years ago by nabcore

fix for 30 sec pause on boot (take 2)

comment:8 Changed 9 years ago by ejka

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r9078

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.