[OpenWrt-Devel] Not able to see all the symbols in the output of nm command
Dear All, I build the OpenWRT image for my target device. I am able to see the vmlinux image in trunk/build_dir/linux-s3c2510/linux-2.6.36 directory where linux-s3c2510 indicates my target device. I am NOT able to see some of the function names (symbols), which I developed, in the output of the nm command for vmlinux image. Am I missing any thing while building the image for getting all the symbols into the image? I am NOT able to see all the function names which are defined in arch/arm/plat-samsung/include/uncompress.h file. Please let me know if I am missing any thing. Thanks for your suggestions / hints. Thanks and Regards, Madhavi M. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Debugging OpenWRT ELF image with GDB on host system
Dear Slawomir Cygan, Thank you very much for your infromation. 2011/4/12 Sławomir Cygan slawomir.cy...@gmail.com: Hi, We are unable to debug the OpenWRT image through GDB from a host system. When we try to debug, we are seeing the following error messages on the GDB screen. We are running the GDB from Cygwin on a Windows XP system. Please use cross-compiled version of gdb - the one build by OpenWRT. I am trying to debug the vmlinux OpenWRT image which is build for my target device. The procedure that I am following is as follows. I build the OpenWRT image (vmlinux) on a Linux box in the ELF format for my Samsung MCU. Then, I am trying to load it on to my device's RAM area using a J-Link J-TAG and J-LinkGDBServer tool with a .gdbinit script from a Windows XP system. The .gdbinit script contains the initialization of the address map and CPU registers UART etc. Then, I am running the gdb from Cygwin on Windows XP system. If this is the case, how can I use OpenWRT gdb? Where is OpenWRT gdb available? Is it in staging_dir? Shall we need to be changed CFLAGS in any Makefile for including the -g option? Propably, or modify global CFLAGS setting in OpenWRT. By default all programs are build without debug info (and can be stripped, but I am not sure about this at the moment). Yes. By default all are build without debugging information. I added -g option in the Makefile which is located at the trunk/target/linux/board directory. Any suggestions / ideas / links would be appreciated and help us a lot My own point of view: usually it is better to use printf() instead of gdb and printk() instead of kgdb. I am not able to see any debug messages on the hyper terminal. That is the reason, I want to put some break points in the HAL code and need to check whether it is reaching there or not through gdb. I explained the loading procedure above. Please let me know, if you need any additional information. I will provide. Thanks and Regards, Madhavi M. -- Pozdrawiam, Sławomir Cygan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Debugging OpenWRT ELF image with GDB on host system
Dear Slawomir Cygan, Thanks for your response. 2011/4/12 Sławomir Cygan slawomir.cy...@gmail.com: So now you are using jtag - You mentioned gdbserver in last post, so my last response won't apply to Your problem. Please refer to your jtag hardware and software documentation for more help. You also did not mention in last post that You are trying debug the kernel - if so, build it with debug info (option unser make kernel_menuconfig kernel hacking), no manual CFLAGS modification needed. Sorry. I did not mention the details in my previous email. I will take care from now-on-words. However, I did the same thing what you said like run the make kernel_menuconfig then kernel hacking and enabled the kernel debug. But, when I run make V=99, again, it is not set in the .config file of the kernel. So, I enabled it from trunk/make menuconfig -- Global Build Settings -- Compile the kernel with debug information. Then, I am able to see CONFIG_DEBUG_KERNEL=y in the .config file of the linux kernel. Thanks for your suggestions and information. Thanks and Regards, Madhavi M. -- Pozdrawiam, Sławomir Cygan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Debugging OpenWRT ELF image with GDB on host system
Dear All, We are unable to debug the OpenWRT image through GDB from a host system. When we try to debug, we are seeing the following error messages on the GDB screen. We are running the GDB from Cygwin on a Windows XP system. No symbol table is loaded. Use the file command. Make breakpoint pending on future shared library load? We also tried to load the executable image from gdb prompt with file command. This time, we are seeing the following error messages. no debugging symbols found ...done. We enabled the following from make menuconfig which we run from the trunk. Advanced configuration options (for developers) [enter] → Toolchain Options → [*] Build gdb Utilities → gdbserver Shall we need to be changed CFLAGS in any Makefile for including the -g option? Any suggestions / ideas / links would be appreciated and help us a lot. Thanks and Regards, Madhavi M. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] linker errors like ignoring invalid character `#' in expression
On Tue, Mar 29, 2011 at 7:16 PM, Madhavi Manchala madhavi.li...@gmail.com wrote: Dear All, I am seeing the following linker error messages when I try to build the OpenWRT image for my board. arm-openwrt-linux-uclibcgnueabi-ld:arch/arm/kernel/vmlinux.lds:284: ignoring invalid character `#' in expression arm-openwrt-linux-uclibcgnueabi-ld:arch/arm/kernel/vmlinux.lds:284: syntax error I googled, but there is no much luck for me. I did not understand why am I getting this error. Any suggestions / hints would be appreciated. Thanks for your help, too. Thanks and Regards, Madhavi M. Dear All, It was resolved. Thanks. Regards, Madhavi M. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] linker errors like ignoring invalid character `#' in expression
On Tue, Mar 29, 2011 at 7:38 PM, Jonathan Bennett jbscienc...@gmail.com wrote: On Tue, Mar 29, 2011 at 9:06 AM, Madhavi Manchala madhavi.li...@gmail.com wrote: On Tue, Mar 29, 2011 at 7:16 PM, Madhavi Manchala madhavi.li...@gmail.com wrote: Dear All, I am seeing the following linker error messages when I try to build the OpenWRT image for my board. arm-openwrt-linux-uclibcgnueabi-ld:arch/arm/kernel/vmlinux.lds:284: ignoring invalid character `#' in expression arm-openwrt-linux-uclibcgnueabi-ld:arch/arm/kernel/vmlinux.lds:284: syntax error I googled, but there is no much luck for me. I did not understand why am I getting this error. Any suggestions / hints would be appreciated. Thanks for your help, too. Thanks and Regards, Madhavi M. Dear All, It was resolved. Thanks. That's great! However, a few words of explanation might be helpful in case anyone else runs across this issue. (And I'm curious.) Dear Jonathan Bennett, It was due to a comment line which is placed in the arch/arm/kernel/vmlinux.lds file. The comment was added as //comment. However, when I looked whole vmlinux.lds file, all the comments are included in /* */. So, I changed it to /* */ instead //. Then it compiled. I do not know the exact reason for that. May be .lds files do not accept the comments in //. Thanks. Regards, Madhavi M. Regards, Madhavi M. ~Jonathan Bennett ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Assember errors like bad instruction and junk at the end of line ...
On Mon, Mar 28, 2011 at 7:08 PM, Madhavi Manchala madhavi.li...@gmail.com wrote: Dear All, I am seeing the following assembler error messages when I try to build the OpenWRT image for my board. Assembler messages: /home/madhavi/openwrt-s3c2510/trunk/build_dir/linux-s3c2510_test/linux-2.6.36/arch/arm/include/asm/swab.h:43: Error: bad instruction `static inline __u32 __arch_swab32(__u32 x)' /home/madhavi/openwrt-s3c2510/trunk/build_dir/linux-s3c2510_test/linux-2.6.36/arch/arm/include/asm/swab.h:44: Error: junk at end of line, first unrecognized character is `{' .. Please find the complete errors in the attached assembler-errors.txt file. Why am I seeing these errors? I googled, but there is no much luck for me. Any suggestions / hints would be appreciated. Thanks and Regards, Madhavi M. Dear All, I removed all the assembler errors with the help of Slawomir Cygan. Thanks to him. The errors are due to wrong includes. When I removed unnecessary include files, from other include files, which are included in the ASSEMBLY files (*.S files), then I am able to compile the sources. Thanks and Regards, Madhavi M. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] HAL code for pheriperal initialization like SDRAM, Flash, UART etc.
Dear All, Where can I find the HAL (Hardware Abstraction Layer) code in the OpenWRT sources? I checked out the trunk through svn. I need to change the RAM, FLASH, UART and MCU details in the HAL code in order to support our device. Thanks you very mych in advance for your answer. Regards, Madhavi M. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] HAL code for pheriperal initialization like SDRAM, Flash, UART etc.
2011/2/27 Sławomir Cygan slawomir.cy...@gmail.com: On Sun, Feb 27, 2011 at 2:04 PM, Florian Fainelli flor...@openwrt.org wrote: Hello, On Sunday 27 February 2011 13:12:03 Madhavi Manchala wrote: Dear All, Where can I find the HAL (Hardware Abstraction Layer) code in the OpenWRT sources? I checked out the trunk through svn. I need to change the RAM, FLASH, UART and MCU details in the HAL code in order to support our device. You have not mentionned which target you are talking about, which one are working on? -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel Usually code for platform devices initialization is placed in patches and files in apropriate target directory. For example for devices with Ralink RT3050 target is ramips and target directory is trunk/target/linux/ramips/. Platform devices are configured by board-specific code in trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-* files, than initialised in trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/devices.c Early serial and ram in trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c All files from trunk/target/linux/ramips/files are added to lnx kernel, than patches from trunk/target/linux/ramips/patches-[kernel version] are applied - theese the files you should concentrate on, when booting new device. Lnx kernels does not offer HAL, but instead features like platform devices are avaliable Dear Swalomir Cygan, Thanks for your useful important information. However, here are my findings. We are planning to build the OpenWRT to our custom board which is based on Samsung S3C2510A processor. This is not available under trunk/target/linux/ directory. However, there is a directory, named s3c24xx, which is based on Samsung S3C24xx processor. So, what is the procedure for porting the OpenWRT to my board which is based on the Samsung s3c2510A processor? Further information, I extracted the linux-2.6.30-10.tar.bz2 directory from dl (downloads) directory of the OpenWRT sources. After extracting also, I did not find any mach- directory which is based on S3C25XX. Even, I did not find anything about S3C25xx in the latest stable kernel 2.6.37 also. Then, how can I proceed further for porting the OpenWRT to my Samsung S3C2510A processor. Please suggest me. Thanks and Regards, Madhavi M. -- Pozdrawiam, Sławomir Cygan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] OpenWRT image linker error when trying to link it to an application
Dear All, I build a OpenWRT image for Samsung S3C24XX MCU from trunk. After getting final OpenWRT image (which is a 6-UIMAGE file type), I tried to link it my application through a linker script. Then, I am getting the error from ld from Cygwin. file not recognized: File format not recognized collect2: ld returned 1 exit status. I think, the UIMAGE format is not recognized by the ld command. So, If I want to link the final OpenWRT image into my application through a linker, how can I build the OpenWRT image and where can I need to modify (where in the makefile)? I want to link the build OpenWRT image into my application through a linker. How can I do this? Any idea / hints greatly helps me and would be appreciated. Thanks and Regards, Madhavi M. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] error: '__LINUX_ARM_ARCH__' undeclared
Dear All, We are getting the following error messages when we run make kernel_menuonfig command from backfire. For your information, we selected the Intel IXP4XX from Target System of make menuconfig, then from make kernel_menuconfig we selected the System Type as ARM System type (Samsung s3c24xx). ++ mkdir -p /home/madhavi/backfire/staging_dir/toolchain-armeb_v5te_gcc-4.3.3+cs_uClibc-0.9.30.1_eabi ++ cd /home/madhavi/backfire/staging_dir/toolchain-armeb_v5te_gcc-4.3.3+cs_uClibc-0.9.30.1_eabi ++ mkdir -p stamp lib usr/include usr/lib make[1]: Entering directory `/home/madhavi/backfire/target/linux' make[2]: Entering directory `/home/madhavi/backfire/target/linux/ixp4xx' [ -e /home/madhavi/backfire/target/linux/ixp4xx/config-2.6.32 ] || touch /home/madhavi/backfire/target/linux/ixp4xx/config-2.6.32 /home/madhavi/backfire/scripts/kconfig.pl + /home/madhavi/backfire/target/linux/generic-2.6/config-2.6.32 /home/madhavi/backfire/target/linux/ixp4xx/config-2.6.32 /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config touch /home/madhavi/backfire/target/linux/ixp4xx/config-2.6.32 export MAKEFLAGS= ;make -C /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27 -C /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27 CROSS_COMPILE=armeb-openwrt-linux-uclibcgnueabi- ARCH=arm KBUILD_HAVE_NLS=no CONFIG_SHELL=/bin/bash CC=armeb-openwrt-linux-uclibcgnueabi-gcc menuconfig make[3]: Entering directory `/home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27' scripts/kconfig/mconf arch/arm/Kconfig # # configuration written to .config # *** End of Linux kernel configuration. *** Execute 'make' to build the kernel or try 'make help'. make[3]: Leaving directory `/home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27' /home/madhavi/backfire/scripts/kconfig.pl '' /home/madhavi/backfire/target/linux/generic-2.6/config-2.6.32 /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config /home/madhavi/backfire/target/linux/ixp4xx/config-2.6.32 /home/madhavi/backfire/scripts/kconfig.pl + /home/madhavi/backfire/target/linux/generic-2.6/config-2.6.32 /home/madhavi/backfire/target/linux/ixp4xx/config-2.6.32 /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.target awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub(CONFIG_KERNEL_,CONFIG_);print}' /home/madhavi/backfire/.config /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.target echo # CONFIG_KALLSYMS_EXTRA_PASS is not set /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.target echo # CONFIG_KALLSYMS_ALL is not set /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.target echo # CONFIG_KPROBES is not set /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.target /home/madhavi/backfire/staging_dir/host/bin/sed -i -e 's,.*CONFIG_AEABI.*,CONFIG_AEABI=y,' /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.target echo '# CONFIG_OABI_COMPAT is not set' /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.target /home/madhavi/backfire/scripts/metadata.pl kconfig /home/madhavi/backfire/tmp/.packageinfo /home/madhavi/backfire/.config /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.override /home/madhavi/backfire/scripts/kconfig.pl 'm+' '+' /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.target /dev/null /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.override /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config mv /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.old grep -v INITRAMFS /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config.old /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config echo 'CONFIG_INITRAMFS_SOURCE=' /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27/.config export MAKEFLAGS= ;make -C /home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27 CROSS_COMPILE=armeb-openwrt-linux-uclibcgnueabi- ARCH=arm KBUILD_HAVE_NLS=no CONFIG_SHELL=/bin/bash CC=armeb-openwrt-linux-uclibcgnueabi-gcc oldconfig prepare scripts make[3]: Entering directory `/home/madhavi/backfire/build_dir/linux-ixp4xx_generic/linux-2.6.32.27' scripts/kconfig/conf -o arch/arm/Kconfig # # configuration written to .config # scripts/kconfig/conf -s arch/arm/Kconfig CHK include/linux/version.h make[5]: `include/asm-arm/mach-types.h' is up to date. CHK include/linux/utsrelease.h SYMLINK include/asm - include/asm-arm CC kernel/bounds.s GEN include/linux/bounds.h CC arch/arm/kernel/asm-offsets.s In file included from include/linux/irqflags.h:57, from