[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Source debug of busybox.



Hi:

After switching to newer version of Microblaze on my Spartan-2e and
enabled caches. As a result my busybox ceased to work:

VFS: Mounted root (cramfs filesystem) readonly.
Freeing init memory: 48K
sh: applet not found
init: Booting to single user mode
sh: applet not found
init: /bin/agetty respawning too fast
init: /bin/agetty respawning too fast
init: /bin/agetty respawning too fast

See attached message with details.

But my current question is different. I have reasons to believe that
it's some kind of memory corruption - may be stack is too small and when
image grows, it must be increased. I want to debug busybox, but it's
different from debugging any other application using gdbserver - I don't
have shell prompt to start busybox. 

From another side, I can debug kernel (and u-boot) remotely, connecting
to XMD. I could set breakpoints in busybox had I know where it runs
from.

Anyway, what is the simplest way to debug busybox?

Thanks,

Leonid.
--- Begin Message ---
Hi:

I have 2 EDK designs for Spartan-2e based board: with and without caches
(in the first case I have also applied petalogix cache patch for
u-boot).

With caches (autoconf.h) all works much quicker, but init doesn't work
correct - sh applet cannot be found:

VFS: Mounted root (cramfs filesystem) readonly.
Freeing init memory: 48K
sh: applet not found
init: Booting to single user mode
sh: applet not found
init: /bin/agetty respawning too fast
init: /bin/agetty respawning too fast
init: /bin/agetty respawning too fast
init: /bin/agetty respawning too fast
init: /bin/agetty respawning too fast

Interesting thing, when I compile precisely the same source code and not
use caches in EDK design (see autoconf64.h attached) the problem doesn't
show up:

VFS: Mounted root (cramfs filesystem) readonly.
Freeing init memory: 52K
Mounting proc:
Mounting var:
Populating /var:
Running local start scripts.
Mounting /etc/config:
Populating /etc/config:
flatfsd: Created 6 configuration files (193 bytes)
Setting hostname:
Setting up interface lo:
Setting up interface eth0:
Starting portmap:
Starting thttpd:

What's this - kernel starts too fast and filesystem gets corrupted?

I did clean rebuild couple of times, but results are the same.

SH is configured in BUSYBOX in both cases:

CONFIG_USER_BUSYBOX_SHELL=y
# CONFIG_USER_BUSYBOX_ASH is not set
# CONFIG_USER_BUSYBOX_SH_IS_ASH is not set
# CONFIG_USER_BUSYBOX_HUSH is not set
# CONFIG_USER_BUSYBOX_SH_IS_HUSH is not set
# CONFIG_USER_BUSYBOX_LASH is not set
# CONFIG_USER_BUSYBOX_SH_IS_LASH is not set
CONFIG_USER_BUSYBOX_MSH=y
CONFIG_USER_BUSYBOX_SH_IS_MSH=y
CONFIG_USER_BUSYBOX_COMMAND_EDITING=y
CONFIG_USER_BUSYBOX_COMMAND_SAVEHISTORY=y
CONFIG_USER_BUSYBOX_COMMAND_TAB_COMPLETION=y
CONFIG_USER_BUSYBOX_COMMAND_USERNAME_COMPLETION=y
CONFIG_USER_BUSYBOX_TAB_COMPLETION=y
CONFIG_USER_BUSYBOX_USERNAME_COMPLETION=y
CONFIG_USER_BUSYBOX_SH_STANDALONE_SHELL=y
CONFIG_USER_BUSYBOX_SH_APPLETS_ALWAYS_WIN=y
CONFIG_USER_BUSYBOX_SH_FANCY_PROMPT=y
CONFIG_USER_BUSYBOX_SH_EXTRA_QUIET=y
# CONFIG_USER_BUSYBOX_SHA1SUM is not set
# CONFIG_USER_BUSYBOX_SLEEP is not set

Thanks,

Leonid.

Attachment: autoconf.h
Description: autoconf.h

Attachment: autoconf64.h
Description: autoconf64.h


--- End Message ---