Re: [uClinux-dev] do_initcalls() where is vmlinuz set up to populate between __initcall_start to end
Thanks I am getting closer. The debug does not work for 2.4.32-uc0 I did stick a printk in "do_initcalls()" to show the called addresses of the modules which works. Is there a best place in the file structure (on the host) 2.4.32-uc0 to put the "static int __init my_init_stuff()" so link picks up the "module_init" macro. Cheers John > HI John, > > A simple way to do this is to use the "module_init" macro > > static int __init my_init_stuff(void) > { >return 0; > } > > module_init(my_init_stuff); > > You can see all the init calls as they happen > using the initcall_debug command line option > > root=/dev/mtdblock0 rw initcall_debug=1 ... > > Or by setting the variable ( just as a test) > > initcall_debug to 1 in > > init/main.c > > Regards >Phil Wilshire > ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] do_initcalls() where is vmlinuz set up to populate between __initcall_start to end
[EMAIL PROTECTED] wrote on 2007-10-15 06:03:59 PM: > On Monday 15 October 2007, [EMAIL PROTECTED] wrote: > > Yes I have puzzled through this and read a lot of material and code but > > have not quite found this answer. > > you're wondering how the initcall mechanism works and how to use it yourself ? > -mike Mike Absolutely! I see most of how the initcall mechanism works. I have read through Christopher Hallinan's book, "Embedded Linux Primer" and followed the init thread through ~/init/main.c and ~/include/init.h for ARM (he doesn't show a full working example, I guess you buy Montevista for that.)but am having no luck having the linker pick up the __setup_parameter macro by itself. as in "static init __init bjcs_leds()". I guess I need to rule out "is there a linker thing to do extra" seemingly not. Do I have to have to have the module in a favorite place? Did I screw up my syntax? (Highest probability!) In your code on blackfin is there a good example? Thanks John (P.S. I have presented as 20/20 hindsight I should have taken your course.) ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
[uClinux-dev] do_initcalls() where is vmlinuz set up to populate between __initcall_start to end
Hi Yes I have puzzled through this and read a lot of material and code but have not quite found this answer. With 20070130-dist 2.4.32 and uClib on a Coldfire m5235 board with some special kernel/driver modules for LEDs etc. For the ram between __initcall_start and end to populate with the calls to the devices with the *__initcall Macro's to load into the ram section. 1) does one have to put the module in a special place? (I suspect not) 2) It is obvious that the MTD driver is one of these and I have not quite found where the directive to ld is for it in the scripts. Perhaps it is enough for it to just compile and link and *__initcall does the rest? 3) If not where is the piece of script? that gathers all of these. 4) Is it better simply to add a call to initialize the module in a similar fashion to the timers in main.c. What do other people do for these cases? Anyway the printk's in what I presume is a correctly formulated module do not announce themselves as MTD's do. Thanks Ahead of time! Cheers John ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] Confessions of a Cut and Compile Application Builder
Bob Thanks! Now I see the entry point. "make user/cdl/cdl" Cdl is my "main(void)". I am seeing the correct compiler it's not quite getting all the symlinks but with the entry point found I can fix it. Cheers John [EMAIL PROTECTED] wrote on 2007-08-22 12:44:10 PM: > Hi John, > > I had the same question 5-6 months ago! > > Try > make user/mydir/myapp_only > > If you want to build the image and romfs too, do this: > make user/mydir/myapp_only romfs image > ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
[uClinux-dev] Confessions of a Cut and Compile Application Builder
My thanks to all who have allowed me to get to this stage. I can only compile my application with the correct "uClib Coldfire" libraries by executing "make" at the "uClinux-dist" (20070130) top level and thus observe the errors of my code "uClinux-dist/user/cdl/*" (make has to walk all the tree, build the symlinks and rebuild libraries). This takes about 3-4 minutes on a 1GHZ PIII. Is there a shortcut so I can just compile my application while getting the correct libraries and symlinks? As you know executing "make" in my application directory simply brings in gcc 4.1 i568 and glibc. Sometimes helpful but not really. (SuSE 10.2 current i586) My apologies ahead of time for such an obvious question! (I think there is a point in the scripting for the distribution make but have not found it yet.) John Jeffers P.Eng. , RM1074 BJ Services Company Instrumentation Embedded Software 11211 FM 2920, Tomball, TX, 77375 (281)357.2773, (281)357.5491 Fax ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] uClinux error jffs2 "cannot find -lz"
> Hi Greg > > Found the problem don't have the patch! But I have a good explanation and > a work around. > > I Compiled in ~/projects/uClinux-cdl/ not ~/projects/uClinux-dist/ > > > It should be generated as part of your snapgear/uClinux-dist build. > > If everything worked as it should (:-) then there would be a > > libz.a in your build tree at ~/lib/libz.a. Can you check that? > > ~/lib/libz.a is a symlink pointing to in this case > ~/projects/uClinux-dist/lib/zlib/libz.a (the rest of the symlinks appear > to build correctly) since I am building in ~/projects/uClinux-cdl/~ ( I > did "make xconfig", "make dep", "make" in "~/uClinux-cdl/") This is a bad > thing. ;-) The symlink is modified at build time per the symlink properties but exclusively points to ~/uClinux-dist/~. Cheers John ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] uClinux error jffs2 "cannot find -lz"
Hi Greg Found the problem don't have the patch! But I have a good explanation and a work around. I Compiled in ~/projects/uClinux-cdl/ not ~/projects/uClinux-dist/ > It should be generated as part of your snapgear/uClinux-dist build. > If everything worked as it should (:-) then there would be a > libz.a in your build tree at ~/lib/libz.a. Can you check that? ~/lib/libz.a is a symlink pointing to in this case ~/projects/uClinux-dist/lib/zlib/libz.a (the rest of the symlinks appear to build correctly) since I am building in ~/projects/uClinux-cdl/~ ( I did "make xconfig", "make dep", "make" in "~/uClinux-cdl/") This is a bad thing. ;-) So if I rename my top level directory to uClinux-dist then do the make trinity again, it works! (:-) It appears that this symlink happens at untarring? Looking at the achieves this has happened to a number of people. One of your pieces of advise was always to untar a fresh distribution and that always worked in the past for this reason. My question now is what are the cleaning steps to prepare a distribution that you follow from your /uClinux-dist/ --> "uClinux-20070717.tar.bz2" so I may complete the patch. Cheers John > > Can you check when you build that it is actually even trying > to build the code in lib/zlib? It does see below: > > The uClinux build 2.4.32-uC0 failed at the ever popular place of MTD-Utils > > for jffs2. So I have. > > > > All of Patrice's MTD patches in. Forced zlib config (not needed) > > > > This is Snapgear uClinux 20070130 ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -Wl,--fatal-warnings -Wl,-elf2flt -Wl,-move-rodata -msep-data -Wl,--fatal-warnings -Wl,-elf2flt -Wl,-move-rodata -msep-data -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -D__USE_BSD -I. -o mkfs.jffs2 crc32.o mkfs.jffs2.o compr_zlib.o compr_rtime.o -lz > > JFFS2 stores files compressed by default, and it uses the zlib code > to do it... > Absolutely. > The ld tool finds the symlink at ~/lib/zilb.a and most people typically still have the uClinux-dist available so the build works. The build always makes the correct "~/lib/zlib/zlib.a" but the symlink hides it from "ld" > > m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o zutil.o zutil.c ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o inflate.o inflate.c ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o infblock.o infblock.c ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o inftrees.o inftrees.c ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o infcodes.o infcodes.c ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o infutil.o infutil.c ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o inffast.o inffast.c m68k-elf-ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o make[3]: Leaving directory `/home/jjeffers/projects/uClinux-cdl/lib/zlib' make[2]: Leaving directory `/home/jjeffers/projects/uClinux-cdl/lib' ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
[uClinux-dev] uClinux error jffs2 "cannot find -lz"
Hi I have a problem that when I upgraded to openSuSE 10.2 I later found out the uClinux build 2.4.32-uC0 failed at the ever popular place of MTD-Utils for jffs2. The subject is one of the google search terms. I read all the previous emails from Mike, Gregg et al. So I have. All of Patrice's MTD patches in. Forced zlib config (not needed) This is Snapgear uClinux 20070130 zlib forced on (MTD Utils turned it on in the /config/.config file anyway) Host i586 zlib and zlib-develop (Latest on Kernel 2.6.18-5 SuSE) put in the correct places. I have tried both toolchain 2.95.3 and December 2006 4.1.1 installed from root per David's sh ./... script. Same Result. Target is m5235 (same core as m5272) As close as I can figure out the mkfs.jffs2 wants to create a binary image and then deflate it. The correct libz.a is not at (and I think it's supposed to be a coldfire tools one): /usr/local/lib/gcc/m68k-uclinux/4.1.1/../../../../m68k-uclinux/bin/ld.real or the other popular places to search. Coldfire Target compr_zlib.o and zlib.o were compiled and available. I suspect other people have the correct libz.a file left over in the correct place. I once did. So the "ld" tool simply cannot find the correct zlib.a with symbols. This is the second time this has happened with both 2006 August snapgear release and January 2007 release and I would like to fix it without doing the -L and telling LD where the library is. I would appreciate some advise on this. (uClinux-cdl<->uClinux-dist 20070130 Error in /user/mtd-utils, busybox compiled fine!) ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -D__USE_BSD -I. -c -o compr_zlib.o compr_zlib.c ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -D__USE_BSD -I. -c -o compr_rtime.o compr_rtime.c ucfront-gcc m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE -Wl,--fatal-warnings -Wl,-elf2flt -Wl,-move-rodata -msep-data -Wl,--fatal-warnings -Wl,-elf2flt -Wl,-move-rodata -msep-data -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -D__USE_BSD -I. -o mkfs.jffs2 crc32.o mkfs.jffs2.o compr_zlib.o compr_rtime.o -lz /usr/local/lib/gcc/m68k-uclinux/4.1.1/../../../../m68k-uclinux/bin/ld.real: cannot find -lz collect2: ld returned 1 exit status make[3]: *** [mkfs.jffs2] Error 1 make[3]: Leaving directory `/home/jjeffers/projects/uClinux-cdl/user/mtd-utils' make[2]: *** [mtd-utils] Error 2 make[2]: Leaving directory `/home/jjeffers/projects/uClinux-cdl/user' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/jjeffers/projects/uClinux-cdl/user' make: *** [subdirs] Error 1 [EMAIL PROTECTED]:~/projects/uClinux-cdl> I find uClinux has progressed well and look forward to contributing several configurations once I get my head around this last change. Thanks ahead of time! Cheers John John Jeffers P.Eng. , RM1074 BJ Services Company Instrumentation Embedded Software ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
[uClinux-dev] John Jeffers is out of the office.
I will be out of the office starting 2007-03-19 and will not return until 2007-03-22. I will respond to your message when I return. Messages regarding my home sale can reach me at [EMAIL PROTECTED] ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev