Skip to contentSkip to conversation

firmware/Makefile: force recompilation if makefile changes

PATCH Superseded Luis R. Rodriguez 3 participants 14 messages Jan 18, 2017 – Mar 18, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware/Makefile: force recompilation if makefile changes

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Greg,

This was part of the linker table series [0], but I'm going to split up patches further there. This is an atomic change which is independent so sending this separately now.

[0] https://lkml.kernel.org/r/[email protected]

 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
firmware/Makefile +2 -1
index e297e1b52636..fa3e81c2a97b 100644
@@ -176,7 +176,8 @@ quiet_cmd_fwbin = MK_FW   $@
 wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \
 		include/config/ppc32.h include/config/ppc64.h \
 		include/config/superh32.h include/config/superh64.h \
-		include/config/x86_32.h include/config/x86_64.h)
+		include/config/x86_32.h include/config/x86_64.h \
+		firmware/Makefile)
 
 $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps)
 	$(call cmd,fwbin,$(patsubst %.gen.S,%,$@))
Signature · 1 line
2.11.0
#1 lore raw
Quoted 5 lines · Luis R. Rodriguez

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

Why would changing the Makefile require the asm to change?

Anyway, this should go through the kbuild tree, not mine, they know Makefiles much better than I do...

thanks,

greg k-h

#2 lore raw
Quoted 8 lines · Greg KH
Quoted 5 lines · Luis R. Rodriguez

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

Why would changing the Makefile require the asm to change?

The Makefile is the file that provides the assembly logic, so changing the asm should affect recreating the binary.

Quoted 2 lines

Anyway, this should go through the kbuild tree, not mine, they know Makefiles much better than I do...

Will send it there. Thanks.

Luis

#3 lore raw
Quoted 8 lines · Luis R. Rodriguez
Quoted 7 lines · Greg KH
Quoted 5 lines · Luis R. Rodriguez

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

Quoted 4 lines
Quoted 1 line

Why would changing the Makefile require the asm to change?

The Makefile is the file that provides the assembly logic, so changing the asm should affect recreating the binary.

Ah, I see it now, that's horrid, echoing asm from the Makefile itself :)

thanks,

greg k-h

#4 lore raw
Quoted 9 lines · Greg KH
Quoted 8 lines · Luis R. Rodriguez
Quoted 7 lines · Greg KH
Quoted 5 lines · Luis R. Rodriguez

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Why would changing the Makefile require the asm to change?

The Makefile is the file that provides the assembly logic, so changing the asm should affect recreating the binary.

Ah, I see it now, that's horrid, echoing asm from the Makefile itself :)

Yeah, I can change the way that works but I think I would much prefer to make that a separate atomic functional change.

Luis

#5 lore raw

PATCH v2 1/1 firmware/Makefile: force recompilation if makefile changes

In reply to Luis R. Rodriguez

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Michal,

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

[0] https://lkml.kernel.org/r/[email protected]

 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
firmware/Makefile +2 -1
index e297e1b52636..fa3e81c2a97b 100644
@@ -176,7 +176,8 @@ quiet_cmd_fwbin = MK_FW   $@
 wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \
 		include/config/ppc32.h include/config/ppc64.h \
 		include/config/superh32.h include/config/superh64.h \
-		include/config/x86_32.h include/config/x86_64.h)
+		include/config/x86_32.h include/config/x86_64.h \
+		firmware/Makefile)
 
 $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps)
 	$(call cmd,fwbin,$(patsubst %.gen.S,%,$@))
Signature · 1 line
2.11.0
#6 lore raw
Quoted 9 lines · Luis R. Rodriguez

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Quoted 8 lines

Michal,

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

[0] https://lkml.kernel.org/r/[email protected]

*Poke*

Luis

#7 lore raw
Quoted 12 lines · Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Michal,

Quoted 8 lines
Quoted 6 lines

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

[0] https://lkml.kernel.org/r/[email protected]

*Poke*

*Re-poke*

Luis

#8 lore raw
Quoted 18 lines · Luis R. Rodriguez
Quoted 17 lines · Luis R. Rodriguez
Quoted 16 lines · Luis R. Rodriguez

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Michal,

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

[0] https://lkml.kernel.org/r/[email protected]

*Poke*

*Re-poke*

*Re-re-poke*

Luis

#9 lore raw
In reply to Luis R. Rodriguez

Hi Luis,

2017-01-24 0:07 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 26 lines

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Michal,

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

[0] https://lkml.kernel.org/r/[email protected]

 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
firmware/Makefile +0 -0
index e297e1b52636..fa3e81c2a97b 100644

firmware/Makefile quiet_cmd_fwbin = MK_FW $@ · line 183

Quoted 9 lines
firmware/Makefile +2 -1
@@ -176,7 +176,8 @@ quiet_cmd_fwbin = MK_FW   $@
 wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \
                include/config/ppc32.h include/config/ppc64.h \
                include/config/superh32.h include/config/superh64.h \
-               include/config/x86_32.h include/config/x86_64.h)
+               include/config/x86_32.h include/config/x86_64.h \
+               firmware/Makefile)
 
 $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps)
        $(call cmd,fwbin,$(patsubst %.gen.S,%,$@))

Why don't you use $(call filechk,...) or $(call if_changed,...) instead of wordsize_deps ?

Signature · 2 lines
Best Regards
Masahiro Yamada
#10 lore raw
Quoted 37 lines · Masahiro Yamada

Hi Luis,

2017-01-24 0:07 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 33 lines

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Michal,

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

[0] https://lkml.kernel.org/r/[email protected]

 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
firmware/Makefile +2 -1
index e297e1b52636..fa3e81c2a97b 100644
@@ -176,7 +176,8 @@ quiet_cmd_fwbin = MK_FW   $@
 wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \
                include/config/ppc32.h include/config/ppc64.h \
                include/config/superh32.h include/config/superh64.h \
-               include/config/x86_32.h include/config/x86_64.h)
+               include/config/x86_32.h include/config/x86_64.h \
+               firmware/Makefile)
 
Quoted 6 lines

firmware/Makefile quiet_cmd_fwbin = MK_FW $@ · line 183

Quoted 2 lines
firmware/Makefile +0 -0
 $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps)
        $(call cmd,fwbin,$(patsubst %.gen.S,%,$@))

Why don't you use $(call filechk,...) or $(call if_changed,...) instead of wordsize_deps ?

Care to send a patch?

Luis

#11 lore raw

Hi Luis,

2017-03-15 9:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 38 lines · Masahiro Yamada
Quoted 37 lines

Hi Luis,

2017-01-24 0:07 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 33 lines

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Michal,

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

[0] https://lkml.kernel.org/r/[email protected]

 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
firmware/Makefile +2 -1
index e297e1b52636..fa3e81c2a97b 100644
@@ -176,7 +176,8 @@ quiet_cmd_fwbin = MK_FW   $@
 wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \
                include/config/ppc32.h include/config/ppc64.h \
                include/config/superh32.h include/config/superh64.h \
-               include/config/x86_32.h include/config/x86_64.h)
+               include/config/x86_32.h include/config/x86_64.h \
+               firmware/Makefile)
 
Quoted 8 lines
Quoted 6 lines

firmware/Makefile quiet_cmd_fwbin = MK_FW $@ · line 183

Quoted 2 lines
firmware/Makefile +0 -0
 $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps)
        $(call cmd,fwbin,$(patsubst %.gen.S,%,$@))

Why don't you use $(call filechk,...) or $(call if_changed,...) instead of wordsize_deps ?

Care to send a patch?

Sorry for my late reply.

Yes, if you want, I will give it a try.

But, please wait until this weekend...

Signature · 2 lines
Best Regards
Masahiro Yamada
#12 lore raw
Quoted 48 lines · Masahiro Yamada

Hi Luis,

2017-03-15 9:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 45 lines · Masahiro Yamada
Quoted 43 lines

Hi Luis,

2017-01-24 0:07 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 26 lines

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Michal,

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

[0] https://lkml.kernel.org/r/[email protected]

 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
firmware/Makefile +0 -0
index e297e1b52636..fa3e81c2a97b 100644

firmware/Makefile quiet_cmd_fwbin = MK_FW $@ · line 183

Quoted 9 lines
firmware/Makefile +2 -1
@@ -176,7 +176,8 @@ quiet_cmd_fwbin = MK_FW   $@
 wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \
                include/config/ppc32.h include/config/ppc64.h \
                include/config/superh32.h include/config/superh64.h \
-               include/config/x86_32.h include/config/x86_64.h)
+               include/config/x86_32.h include/config/x86_64.h \
+               firmware/Makefile)
 
 $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps)
        $(call cmd,fwbin,$(patsubst %.gen.S,%,$@))

Why don't you use $(call filechk,...) or $(call if_changed,...) instead of wordsize_deps ?

Quoted 8 lines
Quoted 1 line

Care to send a patch?

Sorry for my late reply.

Yes, if you want, I will give it a try.

But, please wait until this weekend...

Andrew picked up my patch already as its been sitting in limbo without any feedback for a long time --- so you can work off of what is on linux-next or we can request Andrew to drop this patch once and if you get a replacement as its not yet on Linus' tree.

Luis

#13 lore raw

Hi Luis,

2017-03-17 2:55 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 53 lines
Quoted 51 lines · Masahiro Yamada

Hi Luis,

2017-03-15 9:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 46 lines · Masahiro Yamada
Quoted 37 lines

Hi Luis,

2017-01-24 0:07 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 33 lines

If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes.

---

Michal,

I had this patch as part of my linker table series [0] but have split it off as its a small atomic separate change and can go in separately. Greg prefers this be reviewed by the kbuild tree so sending it your way. This v2 has no modifications, just resending it to the kbuild tree.

[0] https://lkml.kernel.org/r/[email protected]

 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
firmware/Makefile +2 -1
index e297e1b52636..fa3e81c2a97b 100644
@@ -176,7 +176,8 @@ quiet_cmd_fwbin = MK_FW   $@
 wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \
                include/config/ppc32.h include/config/ppc64.h \
                include/config/superh32.h include/config/superh64.h \
-               include/config/x86_32.h include/config/x86_64.h)
+               include/config/x86_32.h include/config/x86_64.h \
+               firmware/Makefile)
 
Quoted 6 lines

firmware/Makefile quiet_cmd_fwbin = MK_FW $@ · line 183

Quoted 2 lines
firmware/Makefile +0 -0
 $(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps)
        $(call cmd,fwbin,$(patsubst %.gen.S,%,$@))

Why don't you use $(call filechk,...) or $(call if_changed,...) instead of wordsize_deps ?

Care to send a patch?

Quoted 8 lines
Quoted 5 lines

Sorry for my late reply.

Yes, if you want, I will give it a try.

But, please wait until this weekend...

Andrew picked up my patch already as its been sitting in limbo without any feedback for a long time

OK. (and, sorry for the delay.)

It is not a good idea to make your work stuck even longer.

Quoted 4 lines

--- so you can work off of what is on
linux-next or we can request Andrew to drop this patch once and if you get a replacement as its not yet on Linus' tree.

Please go ahead with your patch.

When I find time to take a close look,
I may come back to firmware/Makefile.
But, I guess it will not happen soon.

Signature · 2 lines
Best Regards
Masahiro Yamada