2008-12-19 07:01:04 Generating Assembler Listing from Kernel source
ian davidson (UNITED KINGDOM)
Message: 66951
#
# arch/blackfin/mach-bf527/Makefile
#
# I am trying to get a listing from the assembler when head.S is built, in this directory.
# None of these additions to the makefile worked, none produced either a
# listing file (in this directory, or /linux-2.6.x) or a listing on stdout
# Although I did manage to get listing files for ints_priority and dma, dot i and dot s
# files in the directory uClinux-dist-2008R1.5-RC3/linux-2.6.x.
# I have read linux-2.6.x/Documentation/kbuild/makefiles.txt and the GNU GCC man pages
# and I think that at least one of the lines that I tried should work.
# I have checked that head.S does not contain a .nolist directive.
# I have run out of ideas.
# What do I need to do to get an assembler listing of head.S ?
# Thank you,
# Ian Davidson
# cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),)
#CFLAGS += -v
#AFLAGS += -ahlms=head
#AFLAGS += -ahlms=head.lst
#AFLAGS += -a
#AFLAGS += -a=head.lst
#CFLAGS += -Wa,-a
#CFLAGS += -Wa,-a
#cflags-y += -Wa,-a
#cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),)
extra-y := head.o
obj-y := ints-priority.o dma.o
QuoteReplyEditDelete
2008-12-19 13:28:20 Re: Generating Assembler Listing from Kernel source
Mike Frysinger (UNITED STATES)
Message: 66960
what exactly are you trying to produce ?
QuoteReplyEditDelete
2008-12-19 14:38:31 Re: Generating Assembler Listing from Kernel source
Robin Getz (UNITED STATES)
Message: 66964
Ian:
There is no need to add extra CFLAGS - no need to change the makefile at all.
rgetz@imhotep:~/blackfin/trunk/uClinux-dist/linux-2.6.x> make arch/blackfin/mach-common/head.s
works for me.
QuoteReplyEditDelete
2008-12-20 05:21:51 Re: Generating Assembler Listing from Kernel source
ian davidson (UNITED KINGDOM)
Message: 66988
Mike and Robin,
Thanks for your replys.
Mike: I'm trying to see what values are being written into the EBIU.. registers when the Kernel reprograms the clock. The
actual values are (conditionally) defined as macros I honestly thought it would take about 2 minutes to generate an assembler listing.
We have added a new board, and what the documentation does not say is that there are many parts of the kernel code
of the form
#if CONFIG_BF527_EZKIT
#define THIS ....
#define THAT ....
#endif
So if you add another board you have to go and change either Kconfig or header files to define THIS and THAT for your board.
The point about the EBIU registers is that if they are set incorrectly the board simply stops working.
Robin: Thanks, make arch/blackfin/mach-common/head.s did not work but make arch/blackfin/mach-BF527/head.s did.
I would never have thought of generating the listing file as a separate operation like this, in every other system I have worked on it is easy to generate listing files during the build process. Anyway I now have what I need, thanks a lot.
Have a merry Christmas,
Ian Davidson
QuoteReplyEditDelete
2008-12-21 16:03:48 Re: Generating Assembler Listing from Kernel source
Mike Frysinger (UNITED STATES)
Message: 67015
you can generate the .s file yourself manually if you run the compiler with the right flags, but since it's hard for people to do that right without screwing it up, using the kernel kbuild system to do it for you is a lot easier
QuoteReplyEditDelete
2008-12-22 08:22:54 Re: Generating Assembler Listing from Kernel source
Michael McTernan (UNITED KINGDOM)
Message: 67039
Kbuild is good. It also allows vebose builds with "$ make V=1" to see what flags are being used at each step...