Re: some patches
and stage 3 is not needed at all - killall5 -TERM etc still works, no need to talk to init. I see. But IMO killall5ing would just makes kernel panic after /sbin/init exits, right? How to reboot? I personally will continue to use script as init + killall5 for shutdown. http://busybox.net/~vda/init_vs_runsv.htmlhttp://busybox.net/%7Evda/init_vs_runsv.htmlexplains my position. I've read it. Please, point me: which chunk of text explains it? TIA, -- Vladimir ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: some patches
On Thursday 04 September 2008 08:08, Vladimir Dronnikov wrote: and stage 3 is not needed at all - killall5 -TERM etc still works, no need to talk to init. I see. But IMO killall5ing would just makes kernel panic after /sbin/init exits, right? No. Even killall5 -KILL won't. Process with PID 1 is not killed, even if it is a shell. Kernel will not panic. Also, killall5 does not kill processes in its session, so it works just fine to have killall5 in a shutdown shell script. I mean, killall5 doesn't kill its own parent process (shell) too. How to reboot? hardshutdown -r See attached. -- vda /* Including unistd.h makes sure that on a glibc system features.h is included, which again defines __GLIBC__ */ #include unistd.h #include stdio.h /* puts */ #include time.h /* nanosleep */ #include errno.h #include linux_reboot.h /* reboot magic */ #define USE_LIBC #ifdef USE_LIBC /* libc version */ #if defined __GLIBC__ __GLIBC__ = 2 # include sys/reboot.h # define REBOOT(cmd) reboot(cmd) #else extern int reboot(int, int, int); # define REBOOT(cmd) reboot(LINUX_REBOOT_MAGIC1,LINUX_REBOOT_MAGIC2,(cmd)) #endif int my_reboot(int cmd) { return REBOOT(cmd); } #else /* no USE_LIBC */ /* direct syscall version */ #include linux/unistd.h #ifdef _syscall3 _syscall3(int, reboot, int, magic, int, magic_too, int, cmd); #else /* Let us hope we have a 3-argument reboot here */ extern int reboot(int, int, int); #endif int my_reboot(int cmd) { return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd); } #endif void do_reboot() { my_reboot(LINUX_REBOOT_CMD_RESTART); } void do_poweroff() { my_reboot(LINUX_REBOOT_CMD_POWER_OFF); } void do_halt() { my_reboot(LINUX_REBOOT_CMD_HALT); } void usage() { puts( Usage: hardshutdown -h|-r|-p [NN]\n NN - seconds to sleep before requested action ); exit(1); } enum action_t { SHUTDOWN, // do nothing HALT, POWEROFF, REBOOT }; int main(int argc, char *argv[]) { struct timespec t = {0,0}; enum action_t action = SHUTDOWN; int c, i; char *prog, *ptr; //if(*argv[0] == '-') argv[0]++; /* allow shutdown as login shell */ prog = argv[0]; if( (ptr=strrchr(prog,'/')) != 0 ) prog = ptr+1; for(c=1; c argc; c++) { if(argv[c][0] = '0' argv[c][0] = '9') { t.tv_sec = strtol(argv[c], NULL, 10); continue; } if(argv[c][0] != '-') { usage(); return 1; } for(i=1; argv[c][i]; i++) { switch(argv[c][i]) { case 'h': action = HALT; break; case 'p': action = POWEROFF; break; case 'r': action = REBOOT; break; default: usage(); return 1; } } } if(action==SHUTDOWN) { usage(); return 1; } chdir(/); while(nanosleep(t,t)0) if(errno!=EINTR) break; switch(action) { case HALT: do_halt(); break; case POWEROFF: do_poweroff(); break; case REBOOT: do_reboot(); break; } return 1; } /* * Magic values required to use _reboot() system call. */ #define LINUX_REBOOT_MAGIC1 0xfee1dead #define LINUX_REBOOT_MAGIC2 672274793 #define LINUX_REBOOT_MAGIC2A 85072278 #define LINUX_REBOOT_MAGIC2B 369367448 /* * Commands accepted by the _reboot() system call. * * RESTART Restart system using default command and mode. * HALTStop OS and give system control to ROM monitor, if any. * CAD_ON Ctrl-Alt-Del sequence causes RESTART command. * CAD_OFF Ctrl-Alt-Del sequence sends SIGINT to init task. * POWER_OFF Stop OS and remove all power from system, if possible. * RESTART2Restart system using given command string. */ #define LINUX_REBOOT_CMD_RESTART 0x01234567 #define LINUX_REBOOT_CMD_HALT 0xCDEF0123 #define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF #define LINUX_REBOOT_CMD_CAD_OFF 0x #define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC #define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4 ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: insmod broken in 1.12.0
On Thu, Sep 04, 2008 at 12:36:16AM +0200, Denys Vlasenko wrote: Still can't reproduce. # /usr/app/module-init-tools-3.4/sbin/insmod --version module-init-tools version 3.4 # /usr/app/module-init-tools-3.4/sbin/insmod camellia insmod: can't read 'camellia': No such file or directory Hello Denys, thanks for investigating and sorry for being unclear. It's about a missing /lib/modules/`uname -r` directory, not about a missing module file. Here's how you can reproduce the problem. I created a test directory with busybox 1.11.2 and 1.12.0 binaries, and a kernel module: # pwd /mnt/HD_a2/tmp/test # ls busybox-1.11.2 busybox-1.12.0 usb-storage.ko # file * busybox-1.11.2: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), stripped busybox-1.12.0: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), stripped usb-storage.ko: ELF 32-bit LSB relocatable, ARM, version 1 There's no /lib/modules/`uname -r`: # uname -r 2.6.12.6-arm1 # rm -rf /lib/modules/2.6.12.6-arm1 I can load and unload the module just fine with busybox-1.11.2: # ./busybox-1.11.2 lsmod Module Size Used byNot tainted usblp 10976 0 sd_mod 14484 3 # ./busybox-1.11.2 insmod usb-storage.ko # ./busybox-1.11.2 lsmod Module Size Used byNot tainted usb_storage29956 0 usblp 10976 0 sd_mod 14484 3 # ./busybox-1.11.2 rmmod usb-storage # ./busybox-1.11.2 lsmod Module Size Used byNot tainted usblp 10976 0 sd_mod 14484 3 But I can't with 1.12.0: # ./busybox-1.12.0 lsmod usblp 10976 0 - Live 0xbf005000 sd_mod 14484 3 - Live 0xbf00 # ./busybox-1.12.0 insmod usb-storage.ko insmod: chdir(2.6.12.6-arm1): No such file or directory Here's strace output: # strace -o log -tt -s 99 ./busybox-1.12.0 insmod usb-storage.ko log: ... 09:06:46.654800 getpid()= 20713 09:06:46.655656 getuid32() = 0 09:06:46.656633 brk(0) = 0xb4000 09:06:46.657360 brk(0xbd000)= 0xbd000 09:06:46.658569 chdir(/lib/modules) = 0 09:06:46.659495 uname({sys=Linux, node=ede, ...}) = 0 09:06:46.662604 chdir(2.6.12.6-arm1) = -1 ENOENT (No such file or directory) 09:06:46.663772 write(2, insmod: chdir(2.6.12.6-arm1): No such file or directory\n, 56) = 56 09:06:46.665381 exit(1) = ? Cheers, Tobias ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
modprobe patches
Hi, I've been caught up with some more important stuff to fix/do for a while. I hoped to get the 2.4 support tested. But currently this patch has been tested only on 2.6 (I just rebased it to svn head so hopefully it's still working). Currently not implemented is 2.4 module argument parsing. Otherwise it's in pretty good shape. Patches against: - trunk: http://solidboot.com/~fabled/bb-modprobe-v7.diff - 1.11.1: http://solidboot.com/~fabled/busybox-1.11.1-modprobe-v7.diff Please take a look and a test spin. - Timo ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: Add ethtool to Busybox ?
hi Steven, 1. i am not the maintainer but these are the questions that came to mine mind as i read your proposal. BB has is target audience in the embedded area. Do you think that this is a really useful extension ? why not port others like blktool also ? are you interested in maintaining a kernel-tools section ? re, wh Steven Shiau schrieb: Hi, Ethtool (http://sourceforge.net/projects/gkernel) is an useful tool. I found in 2006 there was a try to include that: http://bugs.busybox.net/view.php?id=789 Is that possible to include that in the future release of busybox ? Thanks in advance. ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: Add ethtool to Busybox ?
Hi Walter, Thank you for asking. Actually I need ethtool to do some network card testing in initrd (about PXE booting), that's why I proposed that idea. Regards, Steven. walter harms wrote: hi Steven, 1. i am not the maintainer but these are the questions that came to mine mind as i read your proposal. BB has is target audience in the embedded area. Do you think that this is a really useful extension ? why not port others like blktool also ? are you interested in maintaining a kernel-tools section ? re, wh Steven Shiau schrieb: Hi, Ethtool (http://sourceforge.net/projects/gkernel) is an useful tool. I found in 2006 there was a try to include that: http://bugs.busybox.net/view.php?id=789 Is that possible to include that in the future release of busybox ? Thanks in advance. -- Steven Shiau steven _at_ nchc org tw steven _at_ stevenshiau org National Center for High-performance Computing, Taiwan. http://www.nchc.org.tw Public Key Server PGP Key ID: 1024D/9762755A Fingerprint: A2A1 08B7 C22C 3D06 34DB F4BC 08B3 E3D7 9762 755A ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
install -D support
On Wed, Sep 03, 2008 at 08:51:38PM +0200, Denys Vlasenko wrote: On Monday 01 September 2008 19:55, Vladimir Dronnikov wrote: And -D option for install, please :^) I can't compile buildroot using BB coreutils... Try this. -- vda @@ -161,6 +161,16 @@ int install_main(int argc, char **argv) } else { if (isdir) dest = concat_path_file(last, basename(arg)); + if (opts OPT_MKDIR_LEADING) { + char *slash = strrchr(dest, '/'); + if (slash) { + *slash = '\0'; + bb_make_directory(dest, 0755, FILEUTILS_RECUR); + /* errors are not checked. copy_file + * will fail if dir is not created. */ + *slash = '/'; + } + } What about something like the attached, which is smaller for me? $ size coreutils/install.o* textdata bss dec hex filename 706 0 0 706 2c2 coreutils/install.o.oorig 798 0 0 798 31e coreutils/install.o.vda 787 0 0 787 313 coreutils/install.o.attached Perhaps it would be handy not to touch the path in bb_make_directory but return NULL on error or the trimmed path on success? Index: coreutils/install.c === --- coreutils/install.c (revision 23319) +++ coreutils/install.c (working copy) @@ -159,6 +159,7 @@ int install_main(int argc, char **argv) goto next; } } else { +# if 0 if (isdir) dest = concat_path_file(last, basename(arg)); if (opts OPT_MKDIR_LEADING) { @@ -171,6 +172,18 @@ int install_main(int argc, char **argv) *slash = '/'; } } +#else + if (opts OPT_MKDIR_LEADING) { +char *ddir = xstrdup(dest); +if (bb_make_directory(dirname(ddir), 0755, FILEUTILS_RECUR)) { + ret = EXIT_FAILURE; + goto next; +} +free(ddir); + } + if (isdir) +dest = concat_path_file(last, basename(arg)); +#endif if (copy_file(arg, dest, copy_flags)) { /* copy is not made */ ret = EXIT_FAILURE; ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: Add ethtool to Busybox ?
On Thu, Sep 04, 2008 at 01:38:16PM +0800, Steven Shiau wrote: Hi, Ethtool (http://sourceforge.net/projects/gkernel) is an useful tool. I found in 2006 there was a try to include that: http://bugs.busybox.net/view.php?id=789 That bug was about adding ethtool to buildroot and it was applied. Is that possible to include that in the future release of busybox ? I don't think that adding ethtool to busybox is really useful. ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
DiffServ support on BusyBox
Hi, Since the tc (traffic control utility from iproute2) is not part of the BusyBox distribution, I wonder how I can implement DiffServ prioritized queueing on our BusyBox embedded system. What we want is PRIO queuing (3 queues) with TBF (token bucket filter) on the two highest priorities to avoid best effort starvation (the DSCP marks are set elsewhere, our BusyBox system acts as a core DiffServ router). So the questions are: 1. is it possible to use existing BusyBox tools to configure PRIO and TBF queuing? 2. If not, are there any obstacles from cross-compiling the iproute2 package for embedded Linux (libraries etc.)? Best regards, Arne Lie SINTEF ICT, Dept. of Communication Systems NO-7465 Trondheim, NORWAY Dir. phone +47 73 59 27 03 - mobile +47 450 20 040 e-mail: [EMAIL PROTECTED] ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: DiffServ support on BusyBox
On Thu, Sep 04, 2008 at 04:07:04PM +0200, Lie Arne wrote: Bernhard, Thanks for the info. In the meantime we did a cross-compilation and I think it is working ok. Have to check further; anyway, thanks again! welcome. The box that hosts svn is a bit slow ATM, so said commit may not have made it into the repo.. ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: [Buildroot] Login exited
On Thu, Sep 04, 2008 at 01:34:14PM +0800, Steven Woody wrote: On Thu, Sep 4, 2008 at 10:00 AM, Hamish Moffatt [EMAIL PROTECTED] wrote: Did you try booting with init=/bin/sh as I suggested two days ago? Or modify your inittab to present you with a shell without needing to login? This will help to break down the problem dramatically. I did init=/bin/sh as you suggested and reported the result to the list. Again, the result is: there is nothing I can do after rootfs was loaded by kernel. I can type in characters can see the echo of what I typed on the screen, but no any other outputs. Does this has something to do with my read-only file system type (cramfs)? I didn't see your posting. Do you get a prompt? Do you get any messages at all after the kernel loads, loads the RAM disk, etc? Please post the whole log. No I don't see how the root file system being read-only would be significant. cramfs is always read-only. I build cramfs here with buildroot and it works just fine. Hamish -- Hamish Moffatt VK3SB [EMAIL PROTECTED] [EMAIL PROTECTED] ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
RE: DiffServ support on BusyBox
Bernhard, Thanks for the info. In the meantime we did a cross-compilation and I think it is working ok. Have to check further; anyway, thanks again! /Arne -Original Message- From: Bernhard Reutner-Fischer [mailto:[EMAIL PROTECTED] Sent: 4. september 2008 15:23 To: Lie Arne Cc: busybox@busybox.net Subject: Re: DiffServ support on BusyBox On Thu, Sep 04, 2008 at 01:00:16PM +0200, Lie Arne wrote: Hi, Since the tc (traffic control utility from iproute2) is not part of the BusyBox distribution, I wonder how I can implement DiffServ prioritized queueing on our BusyBox embedded system. What we want is PRIO queuing (3 queues) with TBF (token bucket filter) on the two highest priorities to avoid best effort starvation (the DSCP marks are set elsewhere, our BusyBox system acts as a core DiffServ router). So the questions are: 1. is it possible to use existing BusyBox tools to configure PRIO and TBF queuing? 2. If not, are there any obstacles from cross-compiling the iproute2 package for embedded Linux (libraries etc.)? see buildroot.uclibc.org PS: I've added my current stub of tc(8) to svn. At one point in time, printing worked; Modify/delete will require some refactoring. ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: DiffServ support on BusyBox
On Thu, Sep 04, 2008 at 01:00:16PM +0200, Lie Arne wrote: Hi, Since the tc (traffic control utility from iproute2) is not part of the BusyBox distribution, I wonder how I can implement DiffServ prioritized queueing on our BusyBox embedded system. What we want is PRIO queuing (3 queues) with TBF (token bucket filter) on the two highest priorities to avoid best effort starvation (the DSCP marks are set elsewhere, our BusyBox system acts as a core DiffServ router). So the questions are: 1. is it possible to use existing BusyBox tools to configure PRIO and TBF queuing? 2. If not, are there any obstacles from cross-compiling the iproute2 package for embedded Linux (libraries etc.)? see buildroot.uclibc.org PS: I've added my current stub of tc(8) to svn. At one point in time, printing worked; Modify/delete will require some refactoring. ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
modprobe patches
Hello, Timo! modutils.h redefines some stuff causing build failure. See attached patch against v7. Regards, -- Vladimir b.patch Description: Binary data ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: [Buildroot] Login exited
On Thu, Sep 4, 2008 at 10:29 PM, Hamish Moffatt [EMAIL PROTECTED] wrote: On Thu, Sep 04, 2008 at 01:34:14PM +0800, Steven Woody wrote: On Thu, Sep 4, 2008 at 10:00 AM, Hamish Moffatt [EMAIL PROTECTED] wrote: Did you try booting with init=/bin/sh as I suggested two days ago? Or modify your inittab to present you with a shell without needing to login? This will help to break down the problem dramatically. I did init=/bin/sh as you suggested and reported the result to the list. Again, the result is: there is nothing I can do after rootfs was loaded by kernel. I can type in characters can see the echo of what I typed on the screen, but no any other outputs. Does this has something to do with my read-only file system type (cramfs)? I didn't see your posting. Do you get a prompt? Do you get any messages at all after the kernel loads, loads the RAM disk, etc? Please post the whole log. No I don't see how the root file system being read-only would be significant. cramfs is always read-only. I build cramfs here with buildroot and it works just fine. Hamish Hi, Hamish Below are the whole boot message, and I like to say sorry to other peoples here for the reposting. --- Freeing init memory: 84K mount: mounting configfs on /config failed: No such device Error -3 while decompressing! c021ac2c(-8656788)-c3e6e000(4096) Dec 31 17:00:02 nlmt syslog.info syslogd started: BusyBox v1.12.0 Dec 31 17:00:02 nlmt daemon.info init: init: starting pid 205, tty '/dev/null': '/sbin/klogd -n' Dec 31 17:00:02 nlmt user.notice kernel: klogd started: BusyBox v1.12.0 (2008-09-02 20:51:05 CST) Dec 31 17:00:02 nlmt user.notice kernel: Linux version 2.6.16.4 ([EMAIL PROTECTED]) (gcc version 3.3) #638 Mon Aug 4 11:59:45 CST 2008 Dec 31 17:00:02 nlmt user.warn kernel: CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T) Dec 31 17:00:02 nlmt user.warn kernel: Machine: LMT Dec 31 17:00:02 nlmt user.debug kernel: Converting old-style param struct to taglist Dec 31 17:00:02 nlmt user.warn kernel: Memory policy: ECC disabled, Data cache writeback Dec 31 17:00:02 nlmt user.debug kernel: On node 0 totalpages: 16384 Dec 31 17:00:02 nlmt user.debug kernel: DMA zone: 16384 pages, LIFO batch:3 Dec 31 17:00:02 nlmt user.debug kernel: DMA32 zone: 0 pages, LIFO batch:0 Dec 31 17:00:02 nlmt user.debug kernel: Normal zone: 0 pages, LIFO batch:0 Dec 31 17:00:02 nlmt user.debug kernel: HighMem zone: 0 pages, LIFO batch:0 Dec 31 17:00:02 nlmt user.warn kernel: CPU S3C2440A (id 0x32440001) Dec 31 17:00:02 nlmt user.warn kernel: S3C2440: core 399.651 MHz, memory 99.912 MHz, peripheral 49.956 MHz Dec 31 17:00:02 nlmt user.info kernel: S3C2410 Clocks, (c) 2004 Simtec Electronics Dec 31 17:00:02 nlmt user.warn kernel: CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on Dec 31 17:00:02 nlmt user.warn kernel: CPU0: D VIVT write-back cache Dec 31 17:00:02 nlmt user.warn kernel: CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets Dec 31 17:00:02 nlmt user.warn kernel: CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets Dec 31 17:00:02 nlmt user.warn kernel: Built 1 zonelists Dec 31 17:00:02 nlmt user.notice kernel: Kernel command line: root=/dev/mtdblock3 console=ttyS0 Dec 31 17:00:02 nlmt user.warn kernel: irq: clearing pending ext status 0020 Dec 31 17:00:02 nlmt user.warn kernel: irq: clearing subpending status 0003 Dec 31 17:00:02 nlmt user.warn kernel: irq: clearing subpending status 0002 Dec 31 17:00:02 nlmt user.warn kernel: PID hash table entries: 512 (order: 9, 8192 bytes) Dec 31 17:00:02 nlmt user.warn kernel: timer tcon=0050, tcnt a29d, tcfg 0200,, usec 1ebf Dec 31 17:00:02 nlmt user.warn kernel: Console: colour dummy device 80x30 Dec 31 17:00:02 nlmt user.warn kernel: Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Dec 31 17:00:02 nlmt user.warn kernel: Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Dec 31 17:00:02 nlmt user.info kernel: Memory: 64MB = 64MB total Dec 31 17:00:02 nlmt user.notice kernel: Memory: 62604KB available (1880K code, 230K data, 84K init) Dec 31 17:00:02 nlmt user.debug kernel: Calibrating delay loop... 199.47 BogoMIPS (lpj=498688) Dec 31 17:00:02 nlmt user.warn kernel: Mount-cache hash table entries: 512 Dec 31 17:00:02 nlmt user.info kernel: CPU: Testing write buffer coherency: ok Dec 31 17:00:02 nlmt user.info kernel: NET: Registered protocol family 16 Dec 31 17:00:02 nlmt user.warn kernel: S3C2440: Initialising architecture Dec 31 17:00:02 nlmt user.warn kernel: S3C2440: IRQ Support Dec 31 17:00:02 nlmt user.warn kernel: S3C2440: Clock Support, UPLL 47.980 MHz, DVS off Dec 31 17:00:02 nlmt user.notice kernel: SCSI subsystem initialized Dec 31 17:00:02 nlmt user.info kernel: usbcore: registered new driver usbfs Dec 31 17:00:02 nlmt user.info kernel: usbcore: registered new driver hub Dec 31 17:00:02 nlmt user.warn kernel: S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics Dec 31 17:00:02
Ответ: modprobe patches
I wish the patch were applied. It is much better to work on some base code than ping-pong a huge patches... Vanilla BB modprobe should be gone as it is big, slow and lacks several features. Tested the patch. Compiles cleanly with some cleanup in modutils.h (several defines are redundant). Works. Regards, -- Vladimir ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: Login exited
On Thursday 04 September 2008 03:50, Steven Woody wrote: And, I got see a suspicious messages just after the kernel booted: --- VFS: Mounted root (cramfs filesystem) readonly. Freeing init memory: 84K Error -3 while decompressing! c0925384(-7384812)-c3e38000(4096) Coming from kernel's fs/cramfs/uncompress.c: err: printk(Error %d while decompressing!\n, err); printk(%p(%d)-%p(%d)\n, src, srclen, dst, dstlen); return 0; I think I am so near to success, please help me! Thanks. Your filesystem image seems to be damaged. Okay, we leave this 'decompressing' error for a moment. I rebuilt (mostly using default options from buildroot) a very small rootfs image, 780k cramfs. This time, it boots without the 'decompressing' error message, I still can not login in. It's same: whatever user name I inputed, the getty restarted and I get nothing but another prompt. Tough. I think you need to debug it. You can add debug prints. For example, if in getty.c you will add this bb_error_msg: /* Let the login program take care of password validation. */ /* We use PATH because we trust that root doesn't set bad PATH, * and getty is not suid-root applet. */ /* With -n, logname == NULL, and login will ask for username instead */ bb_error_msg(Execing %s, options.login); BB_EXECLP(options.login, options.login, --, logname, NULL); bb_error_msg_and_die(%s: can't exec %s, options.tty, options.login); } rebuild buildroot and boot it, you will know whether getty reaches this place. If it does, then the problem is in login. If not, it is in getty. Add more bb_error_msg's then. For example: /* Read the login name. */ debug(reading login name\n); logname = get_logname(line_buf, sizeof(line_buf), options, chardata); bb_error_msg(got logname %s, logname); if (logname) break; Can you do this? -- vda ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: [Buildroot] Login exited
On Thursday 04 September 2008 17:49, Steven Woody wrote: On Thu, Sep 4, 2008 at 10:29 PM, Hamish Moffatt [EMAIL PROTECTED] wrote: On Thu, Sep 04, 2008 at 01:34:14PM +0800, Steven Woody wrote: On Thu, Sep 4, 2008 at 10:00 AM, Hamish Moffatt [EMAIL PROTECTED] wrote: Did you try booting with init=/bin/sh as I suggested two days ago? Or modify your inittab to present you with a shell without needing to login? This will help to break down the problem dramatically. I did init=/bin/sh as you suggested and reported the result to the list. Again, the result is: there is nothing I can do after rootfs was loaded by kernel. I can type in characters can see the echo of what I typed on the screen, but no any other outputs. Does this has something to do with my read-only file system type (cramfs)? I didn't see your posting. Do you get a prompt? Do you get any messages at all after the kernel loads, loads the RAM disk, etc? Please post the whole log. No I don't see how the root file system being read-only would be significant. cramfs is always read-only. I build cramfs here with buildroot and it works just fine. Hamish Hi, Hamish Below are the whole boot message, and I like to say sorry to other peoples here for the reposting. --- Freeing init memory: 84K mount: mounting configfs on /config failed: No such device Error -3 while decompressing! c021ac2c(-8656788)-c3e6e000(4096) Dec 31 17:00:02 nlmt syslog.info syslogd started: BusyBox v1.12.0 Dec 31 17:00:02 nlmt daemon.info init: init: starting pid 205, tty '/dev/null': '/sbin/klogd -n' Dec 31 17:00:02 nlmt user.notice kernel: klogd started: BusyBox v1.12.0 (2008-09-02 20:51:05 CST) Dec 31 17:00:02 nlmt user.notice kernel: Linux version 2.6.16.4 ([EMAIL PROTECTED]) (gcc version 3.3) #638 Mon Aug 4 11:59:45 CST 2008 Dec 31 17:00:02 nlmt user.warn kernel: CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T) Dec 31 17:00:02 nlmt user.warn kernel: Machine: LMT Dec 31 17:00:02 nlmt user.debug kernel: Converting old-style param struct to taglist Dec 31 17:00:02 nlmt user.warn kernel: Memory policy: ECC disabled, Data cache writeback Dec 31 17:00:02 nlmt user.debug kernel: On node 0 totalpages: 16384 Dec 31 17:00:02 nlmt user.debug kernel: DMA zone: 16384 pages, LIFO batch:3 Dec 31 17:00:02 nlmt user.debug kernel: DMA32 zone: 0 pages, LIFO batch:0 Dec 31 17:00:02 nlmt user.debug kernel: Normal zone: 0 pages, LIFO batch:0 Dec 31 17:00:02 nlmt user.debug kernel: HighMem zone: 0 pages, LIFO batch:0 Dec 31 17:00:02 nlmt user.warn kernel: CPU S3C2440A (id 0x32440001) Dec 31 17:00:02 nlmt user.warn kernel: S3C2440: core 399.651 MHz, memory 99.912 MHz, peripheral 49.956 MHz Dec 31 17:00:02 nlmt user.info kernel: S3C2410 Clocks, (c) 2004 Simtec Electronics Dec 31 17:00:02 nlmt user.warn kernel: CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on Dec 31 17:00:02 nlmt user.warn kernel: CPU0: D VIVT write-back cache Dec 31 17:00:02 nlmt user.warn kernel: CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets Dec 31 17:00:02 nlmt user.warn kernel: CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets Dec 31 17:00:02 nlmt user.warn kernel: Built 1 zonelists Dec 31 17:00:02 nlmt user.notice kernel: Kernel command line: root=/dev/mtdblock3 console=ttyS0 Dec 31 17:00:02 nlmt user.warn kernel: irq: clearing pending ext status 0020 Dec 31 17:00:02 nlmt user.warn kernel: irq: clearing subpending status 0003 Dec 31 17:00:02 nlmt user.warn kernel: irq: clearing subpending status 0002 Dec 31 17:00:02 nlmt user.warn kernel: PID hash table entries: 512 (order: 9, 8192 bytes) Dec 31 17:00:02 nlmt user.warn kernel: timer tcon=0050, tcnt a29d, tcfg 0200,, usec 1ebf Dec 31 17:00:02 nlmt user.warn kernel: Console: colour dummy device 80x30 Dec 31 17:00:02 nlmt user.warn kernel: Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Dec 31 17:00:02 nlmt user.warn kernel: Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Dec 31 17:00:02 nlmt user.info kernel: Memory: 64MB = 64MB total Dec 31 17:00:02 nlmt user.notice kernel: Memory: 62604KB available (1880K code, 230K data, 84K init) Dec 31 17:00:02 nlmt user.debug kernel: Calibrating delay loop... 199.47 BogoMIPS (lpj=498688) Dec 31 17:00:02 nlmt user.warn kernel: Mount-cache hash table entries: 512 Dec 31 17:00:02 nlmt user.info kernel: CPU: Testing write buffer coherency: ok Dec 31 17:00:02 nlmt user.info kernel: NET: Registered protocol family 16 Dec 31 17:00:02 nlmt user.warn kernel: S3C2440: Initialising architecture Dec 31 17:00:02 nlmt user.warn kernel: S3C2440: IRQ Support Dec 31 17:00:02 nlmt user.warn kernel: S3C2440: Clock Support, UPLL 47.980 MHz, DVS off Dec 31 17:00:02 nlmt user.notice kernel: SCSI subsystem initialized Dec 31 17:00:02 nlmt user.info kernel: usbcore: registered new driver usbfs Dec 31 17:00:02 nlmt
Re: insmod broken in 1.12.0
On Thursday 04 September 2008 22:13, Denys Vlasenko wrote: Can't reproduce. My strace.log has no chdir(): # strace -o insmod.log ./busybox insmod ufs.ko # cat insmod.log execve(./busybox, [./busybox, insmod, ufs.ko], [/* 32 vars */]) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 getuid32() = 0 brk(0) = 0x810d000 brk(0x810e000) = 0x810e000 open(ufs.ko, O_RDONLY|O_LARGEFILE)= 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=88275, ...}) = 0 brk(0x8123000) = 0x8123000 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0..., 89088) = 88275 read(3, , 813)= 0 close(3)= 0 init_module(ELF, 0x158d3) = 0 _exit(0)= ? I guess we have different .config files. This is mine. Can you post yours? Aha. You probably have CONFIG_MODPROBE_SMALL=y You are using Vladimir's reimplementation of modprobe, but it is very new. So far it does not fully emulate insmod. Basically, insmod abc is handled as modprobe abc by it. -- vda ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox