Removal of generated asm-offsets.s/h
Hi
If a soc automatically generates asm-offsets.s/h in its makefile it isn't removed by a make clean or make distclean. See mx35 as an example. Even adding a clean: target to the SoCs makefile doesn't help. What would be the right way to remove these files with make clean?
Regards
Matthias Wei?er
Dear =?ISO-8859-15?Q?Matthias_Wei=DFer?=,
Quoted 5 lines · In message <[email protected]> you wrote:
If a soc automatically generates asm-offsets.s/h in its makefile it isn't removed by a make clean or make distclean. See mx35 as an example. Even adding a clean: target to the SoCs makefile doesn't help. What would be the right way to remove these files with make clean?
Add it to the list of files to remove in the top level Makefile?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de 1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2.
Am 29.06.2011 16:20, schrieb Wolfgang Denk:
Quoted 10 lines
Dear =?ISO-8859-15?Q?Matthias_Wei=DFer?=,
Quoted 5 lines · In message<[email protected]> you wrote:
If a soc automatically generates asm-offsets.s/h in its makefile it isn't removed by a make clean or make distclean. See mx35 as an example. Even adding a clean: target to the SoCs makefile doesn't help. What would be the right way to remove these files with make clean?
Add it to the list of files to remove in the top level
Makefile?
Well, thats is not that easy. The generated asm-offsets.h file ends up in arch/arm/include/asm/arch-mx35/ after a "make mx35pdk_config" "make" "make distclean" run. It is generated to include/asm/arch/ in the SoCs makefile so I don't understand why it ends up in arch/arm/include/asm/arch-mx35/
I don't think it makes sense to add a entry for each SoC using auto generated asm-offset files to the top level makefile. Same goes for the .s file as we shouldn't remove all .s files in the tree.
Matthias
Quoted 3 lines · Matthias Wei?er
Am 29.06.2011 16:20, schrieb Wolfgang Denk:
Quoted 2 lines
Dear =?ISO-8859-15?Q?Matthias_Wei=DFer?=,
Hi Matthias,
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines · In message<[email protected]> you wrote:
If a soc automatically generates asm-offsets.s/h in its makefile it isn't removed by a make clean or make distclean. See mx35 as an example. Even adding a clean: target to the SoCs makefile doesn't help. What would be the right way to remove these files with make clean?
Quoted 7 lines
Quoted 1 line
Add it to the list of files to remove in the top level
Makefile?Well, thats is not that easy. The generated
asm-offsets.hfile ends up inarch/arm/include/asm/arch-mx35/after a "makemx35pdk_config" "make" "make distclean" run. It is generated toinclude/asm/arch/in the SoCs makefile so I don't understand why it ends up inarch/arm/include/asm/arch-mx35/
There is an explicit rule in arch/arm/cpu/arm1136/mx35/Makefile. It seems to me the right place to put the generated file. It is an include header, and it should be the include directory for the desired soc, in this case arch/arm/include/asm/arch-mx35/
Quoted 4 lines
I don't think it makes sense to add a entry for each SoC using auto generated asm-offset files to the top level makefile. Same goes for the .s file as we shouldn't remove all .s files in the tree.
Is it not enough to add the following lines to the central Makefile, as suggested by Wolfgang:
@rm -f arch/$(ARCH)/include/asm/arch-$(SOC)/asm-offsets.h
@rm -f $(CPUDIR)/$(SOC)/asm-offsets.sThe files are removed, as I now tested.
And we do not need to add an entry for each CPU/SOC...
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
Hi Stefano
Am 29.06.2011 17:48, schrieb Stefano Babic:
Quoted 17 lines
Hi Matthias,
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines · In message<[email protected]> you wrote:
If a soc automatically generates asm-offsets.s/h in its makefile it isn't removed by a make clean or make distclean. See mx35 as an example. Even adding a clean: target to the SoCs makefile doesn't help. What would be the right way to remove these files with make clean?
Quoted 7 lines
Quoted 1 line
Add it to the list of files to remove in the top level
Makefile?Well, thats is not that easy. The generated
asm-offsets.hfile ends up inarch/arm/include/asm/arch-mx35/after a "makemx35pdk_config" "make" "make distclean" run. It is generated toinclude/asm/arch/in the SoCs makefile so I don't understand why it ends up inarch/arm/include/asm/arch-mx35/
Quoted 4 lines
There is an explicit rule in
arch/arm/cpu/arm1136/mx35/Makefile. It seems to me the right place to put the generated file. It is an include header, and it should be the include directory for the desired soc, in this casearch/arm/include/asm/arch-mx35/
If I look into that Makefile I observe the following rule
$(TOPDIR)/include/asm/arch/asm-offsets.h:
And this rule should put the generated header file into include/asm/arch/ which is completly removed by a "make clean". But it ends up in arch/arm/include/asm/arch-mx35/ also. That puzzled me a bit but I must admit that I am not an expert in the u-boot makefile structure.
Quoted 8 lines
Quoted 3 lines
I don't think it makes sense to add a entry for each SoC using auto generated asm-offset files to the top level makefile. Same goes for the .s file as we shouldn't remove all .s files in the tree.
Is it not enough to add the following lines to the central
Makefile, as suggested by Wolfgang:@rm -f arch/$(ARCH)/include/asm/arch-$(SOC)/asm-offsets.h
This will remove the handwritten asm-offsets.h files which are used in arm/mb86r0x, arm/mx27, arm-mx5 and powerpc/mpc512x. I can change mb86r0x to auto generate the file as I am the maintainer of this SoC. I can also change the other ARM based SoCs but the PowerPC stuff is out of my focus.
Quoted 1 line
@rm -f $(CPUDIR)/$(SOC)/asm-offsets.s
Thats perfect for the generated .s file. I will use this if we find a solution for the .h file in a patch.
Quoted 2 lines
The files are removed, as I now tested.
And we do not need to add an entry for each CPU/SOC...
See my comments above.
Matthias Wei?er
Quoted 1 line · Matthias Weisser
Hi Stefano
Hi Matthias,
Quoted 11 lines
Quoted 4 lines
There is an explicit rule in
arch/arm/cpu/arm1136/mx35/Makefile. It seems to me the right place to put the generated file. It is an include header, and it should be the include directory for the desired soc, in this casearch/arm/include/asm/arch-mx35/If I look into that
MakefileI observe the following rule$(TOPDIR)/include/asm/arch/asm-offsets.h:
And this rule should put the generated header file into
include/asm/arch/which is completly removed by a "make clean".
This is a link. The link is removed, but the file still remains under arch/arm/include/asm/arch-mx35/asm-offsets.h.
Quoted 3 lines
But it
ends up inarch/arm/include/asm/arch-mx35/also. That puzzled me a bit but I must admit that I am not an expert in the u-boot makefile structure.
The reason to have a separate asm-offsets.h is that we have general generated offsets (with GENERATED_GBL_DATA_SIZE for example), and SOC offsets. This second asm-offsets.h is put for the mx35 into the specific SOC include directory.
Quoted 9 lines
Quoted 4 lines
Is it not enough to add the following lines to the central
Makefile, as suggested by Wolfgang:@rm -f arch/$(ARCH)/include/asm/arch-$(SOC)/asm-offsets.hThis will remove the handwritten
asm-offsets.hfiles which are used in arm/mb86r0x, arm/mx27, arm-mx5 and powerpc/mpc512x. I can change mb86r0x to auto generate the file as I am the maintainer of this SoC. I can also change the other ARM based SoCs but the PowerPC stuff is out of my focus.
Agree. We should get rid of handwritten asm-offsets.h. They were written when there was not a tool to generate them.
We can start adding the generation for each specific SOC (as you already found, at the moment we have only 4: mb86r0x, mx27, mx5, and mpc512x). When all patches will be integrated, we can add the final patch for the clean target in the main Makefile.
Quoted 5 lines
Quoted 2 lines
@rm -f $(CPUDIR)/$(SOC)/asm-offsets.sThats perfect for the generated .s file. I will use this if we find a solution for the .h file in a patch.
I think the solution is to generate asm-offsets.h, and remove the handwritten files.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================