Hi Aqeel, I sent this out a few months ago, the unfortunate thing about building disk images is that it doesn't seem to be especially robust when it comes to changing platforms, kernels, etc.
try disabling host-util-linux in the ptxconfig so that you don't have to build it and see how far that gets you. Lisa ---------- Forwarded message ---------- From: Lisa Hsu <[EMAIL PROTECTED]> Date: Mar 3, 2007 9:38 PM Subject: Re: [m5-users] adding env to default disk image creates kernel panic To: M5 users mailing list <[email protected]> in the crosstool i built today, this was the full config file (from /opt/crosstoo/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/alpha- unknown-linux-gnu.crosstoolconfig.txt). it's at the bottom of the email. i rebuilt my machine lately and found that i can no longer seem to build host-util-linux, and realized it's also not necessary. it was probably a legacy selection - and likewise for consistency's sake removed module-init-tools also, from the host-tools section of the ptxconfig. other than that, our ptxconfigs are the same. i built the crosstool with gcc 4.0.4, binutils 2.17, and libc 2.4.1 on an ubuntu edgy x86 32 bit machine. i'm just listing all my stats here so maybe it will be easier for you to find where you differ. oh yeah, also, because of my rebuild i found that the MAKEDEV script provided no longer worked on my machine, so I hacked the rules/Toplevel.make script to change the way the image and devices are created, and used the native MAKEDEV script to do so. diff here: --- linux-dist-used/rules/Toplevel.make 2006-08-10 14:18:56.000000000 -0400 +++ dist-install/lib/ptxdist-0.10.3/rules/Toplevel.make 2007-03-03 19:18: 40.000000000 -0500 @@ -293,8 +293,10 @@ -f $(IMAGEDIR)/ipkg.conf endif ifdef PTXCONF_IMAGE_HD - sh $(PTXDIST_TOPDIR)/m5_files/initdev.sh $(ROOTDIR)/dev \ +# sh $(PTXDIST_TOPDIR)/m5_files/initdev.sh $(ROOTDIR)/dev \ $(PTXDIST_TOPDIR)/m5_files + cd $(ROOTDIR)/dev && sudo MAKEDEV console random urandom null hda \ + hdb hdc hdd sda cp $(PTXDIST_WORKSPACE)/m5_files/rcS $(ROOTDIR)/etc/init.d install -d $(ROOTDIR)/modules make -C $(PTXCONF_IMAGE_HD_KERNEL_SRC) ARCH=alpha \ i was able to run m5 beta2 release m5.fast configs/example/fs.py and get to a bash prompt, where typing 'env' listed current environment variables. i'm not sure what's happening on your end....i think what i used to see was successfully built cross-compilers that would inexplicably lead to kernel panics just like yours....i thought we'd hit on a magic combo with the instructions on the site, but somehow it doesn't play nice with you. it's times like this when i want to bang my head against something... :) hope this is helpful. lisa AR= BINUTILS_DIR=binutils-2.15 BINUTILS_EXTRA_CONFIG= BUILD=i686-pc-linux-gnu BUILD_DIR=/z/hsul/work/crosstool/crosstool-0.42/build/alpha-unknown-linux-gnu/gcc- CC= DEJAGNU= EXTRA_TARGET_CFLAGS= GCC_BUILD= GCC_CORE_DIR=gcc-3.4.3 GCC_DIR=gcc-3.4.3 GCC_EXTRA_CONFIG= GCC_HOST= GCC_LANGUAGES=c,c++ GDB_DIR= GLIBC_ADDON_OPTIONS==linuxthreads, GLIBC_DIR= glibc-2.3.5 GLIBC_EXTRA_CC_ARGS= GLIBC_EXTRA_CONFIG= GLIBC_EXTRA_ENV= JUST_DOWNLOAD= KERNELCONFIG=/z/hsul/work/crosstool/crosstool-0.42/alpha.config LINUX_DIR=linux-2.6.13 LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.12.0 NO_DOWNLOAD= PREFIX=/opt/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu PTXDIST_DIR= SHARED_MODE=--enable-shared SRC_DIR=/z/hsul/work/crosstool/crosstool-0.42 /build/alpha-unknown-linux-gnu/gcc-3. TARBALLS_DIR=/z/hsul/downloads TARGET=alpha-unknown-linux-gnu TARGET_CFLAGS=-O TOP_DIR=/z/hsul/work/crosstool/crosstool-0.42 USE_SYSROOT= On 3/3/07, Brad Penoff <[EMAIL PROTECTED]> wrote: > > hey Lisa, > > Exactly, out of the box works. In fact, I've been able to build disks > that have python and OpenSSH as well (needed for my application). But > when I added env, it created a problem; I worked backwards from there and > > discovered that adding only env (without python and OpenSSH) was > problematic as well, so that's when I came to the list. So you are saying > that you can create a disk with this ptxconfig: > http://cs.ubc.ca/~penoff/ptxconfig.plus_env_only<http://cs.ubc.ca/%7Epenoff/ptxconfig.plus_env_only> > after you change the PTXCONF_IMAGE_HD_KERNEL_SRC? If so, I guess it must > be my crosstool... > > I built my crosstool with this dat file: > BINUTILS_DIR= binutils-2.15 > GCC_DIR=gcc-3.4.3 > GLIBC_DIR=glibc-2.3.5 > LINUX_DIR=linux-2.6.13 > LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.12.0 > GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.5 > > What were the contents of your dat file? > > Thanks for helping! > brad > > On Sat, 3 Mar 2007, Lisa Hsu wrote: > > > Brad, > > > > I'm having a hard time replicating your error. I feel like I've seen > > something like this before, but it was a long time ago. So, when you > build > > out of the box, it works? And adding env makes it not work? What > version > > of gcc did you compile your crosstool with, out of curiosity? > > > > Lisa > > > > On 3/2/07, Brad Penoff < [EMAIL PROTECTED]> wrote: > >> > >> Greetings Ali, > >> > >> When I mount the disk image, /sbin/init exists. > >> > >> If you build an image on your system following the instructions from > here: > >> > >> http://www.m5sim.org/wiki/index.php/Using_linux-dist_to_Create_Disk_Images_and_Kernels_for_M5 > > >> ... if immediately after cloning (step #2) you add Shell & Console > >> Tools->BusyBox->Coreutils->env ONLY, then finish the instructions, can > you > >> mount your disk on your setup? I'm wondering if it's a BusyBox > issue... > >> > >> I've put a copy of my ptxconfig here: > >> http://cs.ubc.ca/~penoff/ptxconfig.plus_env_only<http://cs.ubc.ca/%7Epenoff/ptxconfig.plus_env_only> > >> ..but obviously you'll have to change your PTXCONF_IMAGE_HD_KERNEL_SRC > >> line. > >> > >> Looking forward to getting to the bottom of this, > >> brad > >> > >> On Thu, 1 Mar 2007, Ali Saidi wrote: > >> > >> > Have you mounted the disk image and verified that /sbin/init exists? > Is > >> hda > >> > actually your disk image and not some other disk image that doesn't > have > >> an > >> > init on it? > >> > > >> > Ali > >> > > >> > > >> > > >> > On Mar 1, 2007, at 1:51 PM, Brad Penoff wrote: > >> > > >> >> Greetings all, > >> >> > >> >> Thanks for your help. > >> >> > >> >> Ali mentioned initially building on real hardware but unfortunately > I > >> >> don't have access to an alpha... :-( > >> >> > >> >> As far as Lisa's questions are concerned, they are inline below. > >> >> > >> >> Looking forward to getting to the bottom of this! > >> >> > >> >> On Thu, 1 Mar 2007, Lisa Hsu wrote: > >> >> > >> >>> if it's something that came directly from busybox, it should play > >> nice, > >> >>> but > >> >>> not always. > >> >> > >> >> The most astonishing thing is literally the ONLY change in the > >> ptxconfig > >> >> is adding env... > >> >> > >> >>> > >> >>> it would be helpful to see some stats and data. > >> >>> > >> >> > >> >> When you ask for stats, do you also mean the m5stats.txt file? I've > >> put > >> >> it here temporarily just in case: > >> >> http://cs.ubc.ca/~penoff/m5stats.txt<http://cs.ubc.ca/%7Epenoff/m5stats.txt> > >> >> > >> >>> 1) what kernel headers are you compiling against in linux-dist? > >> >> > >> >> When I made my crosstool, my dat file looked like this: > >> >> BINUTILS_DIR= binutils-2.15 > >> >> GCC_DIR=gcc-3.4.3 > >> >> GLIBC_DIR=glibc-2.3.5 > >> >> LINUX_DIR=linux-2.6.13 > >> >> LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.12.0 > >> >> GLIBCTHREADS_FILENAME= glibc-linuxthreads-2.3.5 > >> >> > >> >> I set "Path to linux kernel src for headers" to the m5base-2.6.13 > >> >> directory and set my toolchain to the crosstool installed with the > >> above > >> >> dat file. > >> >> > >> >>> 2) what kernel have you compiled? > >> >> > >> >> The panic happens both with the distributed vmlinux (inside linux- > >> >> dist.tgz) and also with a kernel I build (where I added SCTP to be > >> >> compiled into m5base-2.6.13.tar.bz2). > >> >> > >> >>> 3) most importantly, what are your error messages? > >> >> > >> >> The final lines from the console are: > >> >> ... > >> >> VFS: Mounted root (ext2 filesystem) readonly. > >> >> Freeing unused kernel memory: 480k freed > >> >> Kernel panic: No init found. Try passing init= option to kernel. > >> >> > >> >> > >> >> Thanks for you help. Please let me know if you need anything else, > >> >> > >> >> brad > >> >> > >> >> > >> >>> > >> >>> lisa > >> >>> > >> >>> On 2/28/07, Brad Penoff < [EMAIL PROTECTED]> wrote: > >> >>>> Greetings, > >> >>>> I've been having a series of problems that I was hoping to get > some > >> >>>> help > >> >>>> on. Long story short, when I build disk images and add ONLY Shell > & > >> >>>> Console Tools->BusyBox->Coreutils->env after cloning, the > resulting > >> >>>> image > >> >>>> causes the kernel to panic, and I don't understand why... I have > >> been > >> >>>> able to build and boot disks using the same method successfully. > >> >>>> The reason I wish to add env is because when I ran my series of > >> >>>> applications, it complained that it didn't exist. So, there is > this > >> >>>> issue > >> >>>> of "why did the kernel panic?" but more generally, I seek advice > for > >> >>>> how > >> >>>> to add in my own applications the proper way. I'm guessing you > have > >> >>>> experience with this seeing as how you have so many advanced > >> >>>> benchmarks > >> >>>> available within the default system. Is there a list/person where > I > >> >>>> write to ask about your experiences of getting complex > applications > >> to > >> >>>> run > >> >>>> inside m5? Is this the right list to ask such questions? > >> >>>> Thanks! > >> >>>> brad > >> >>>> _______________________________________________ > >> >>>> m5-users mailing list > >> >>>> [email protected] > >> >>>> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users > >> >>> > >> >> _______________________________________________ > >> >> m5-users mailing list > >> >> [email protected] > >> >> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users > >> >> > >> > > >> > _______________________________________________ > >> > m5-users mailing list > >> > [email protected] > >> > http://m5sim.org/cgi-bin/mailman/listinfo/m5-users > >> > > >> _______________________________________________ > >> m5-users mailing list > >> [email protected] > >> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users > >> > >> > > > _______________________________________________ > m5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/m5-users > >
_______________________________________________ m5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
