Makefile: move fs/common.mk above external.mk
PATCH 1/1 Makefile: move fs/common.mk above external.mk
The file external.mk was included before fs/common.mk, so it was impossible to add rootfs target to external. This change move fs/common.mk before external.mk, so now rootfs target may be added to external.
--- Makefile | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Makefile +1 -2
@@ -391,6 +391,7 @@ include $(sort $(wildcard package/*/*.mk)) include boot/common.mk include linux/linux.mk include system/system.mk +include fs/common.mk include $(BR2_EXTERNAL)/external.mk
@@ -408,8 +409,6 @@ ifeq ($(BR2_ECLIPSE_REGISTER),y) TARGETS+=toolchain-eclipse-register endif -include fs/common.mk - TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS)) TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
Signature · 1 line
1.7.4.4
PATCH 1/1 Makefile: move fs/common.mk above external.mk
Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Philippe" == Philippe Reynes <[email protected]> writes:
The file external.mk was included before
fs/common.mk, so it was impossible to add rootfs target to external. This change movefs/common.mkbefore external.mk, so now rootfs target may be added to external.Signed-off-by Philippe Reynes <[email protected]>--- Makefile | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Makefile +1
-0@@ -391,6 +391,7 @@ include $(sort $(wildcard package/*/*.mk)) include boot/common.mk include linux/linux.mk include system/system.mk +include fs/common.mk include $(BR2_EXTERNAL)/external.mk
Makefile ifeq ($(BR2_ECLIPSE_REGISTER),y) · line 412
Quoted 5 lines
Makefile +0
-2@@ -408,8 +409,6 @@ ifeq ($(BR2_ECLIPSE_REGISTER),y) TARGETS+=toolchain-eclipse-register endif -include fs/common.mk -
Hmm, does that really work? Does the locale data get correctly purged / generated before the filesystem images are generated?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 Makefile: move fs/common.mk above external.mk
Hi Peter,
I've done a little test before sending this patch. I've used this useless fs :
define ROOTFS_USERFS_CMD
??? echo "Nothing to do" ; \
??? touch $@
endef
$(eval $(call ROOTFS_TARGET,userfs))
In the file $(BR2_EXTERNAL)/fs/common.mk
Without my patch, the file rootfs.userfs is not created. With my patch, the file rootfs.userfs is created.
I could have missed something.
Do you have an idea of what may failed ?
Regards,
Philippe
Le Mercredi 26 mars 2014 22h39, Peter Korsgaard <[email protected]> a ?crit :
Quoted 29 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Philippe" == Philippe Reynes <[email protected]> writes:
The file external.mk was included before
fs/common.mk, so it was impossible to add rootfs target to external. This change movefs/common.mkbefore external.mk, so now rootfs target may be added to external.Signed-off-by Philippe Reynes <[email protected]>---
?Makefile|? ? 3 +--
? 1 files changed, 1 insertions(+), 2 deletions(-)Makefile +0
-0@@ -391,6 +391,7 @@ include $(sort $(wildcard package/*/*.mk))? include
boot/common.mk
? includelinux/linux.mk
? includesystem/system.mk
+includefs/common.mk? include $(BR2_EXTERNAL)/external.mk
Makefile +0
-0@@ -408,8 +409,6 @@ ifeq ($(BR2_ECLIPSE_REGISTER),y)? TARGETS+=toolchain-eclipse-register
? endif
Makefile ifeq ($(BR2_ECLIPSE_REGISTER),y) · line 412
Quoted 2 lines
Makefile +0
-2-include fs/common.mk -
Hmm, does that really work? Does the locale data get correctly purged / generated before the filesystem images are generated?
Signature · 4 lines
Bye, Peter Korsgaard -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140327/8e1fef56/attachment.html>
PATCH 1/1 Makefile: move fs/common.mk above external.mk
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Philippe" == Philippe Reynes <[email protected]> writes:
Hi Peter,
I've done a little test before sending this patch. I've used this useless fs :define
ROOTFS_USERFS_CMDecho "Nothing to do" ; \ touch $@endef
$(eval $(call ROOTFS_TARGET,userfs))
Quoted 7 lines
In the file $(BR2_EXTERNAL)/fs/common.mk
Without my patch, the file rootfs.userfs is not created. With my patch, the file rootfs.userfs is created.
I could have missed something.
Do you have an idea of what may failed ?
The specific issue I mentioned was about the externally defined rootfs getting created before target-purgelocales / target-generatelocales gets called. The easiest way to check that is to use a glibc toolchain and enable BR2_ENABLE_LOCALE_PURGE / BR2_GENERATE_LOCALE, and then stick an echo statement in each of them.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 Makefile: move fs/common.mk above external.mk
Hi peter,
I think I understand the issue now (thanks to Thomas and Yann). The filesystem target depend on target-finalize, and target-finalize depends on targets.
grep -n target-finalize Makefile
513:$(TARGETS_ROOTFS): target-finalize
515:target-finalize: $(TARGETS)
So even if we move fs/common.mk above external.mk, the filesystem targets will always be done after targets. So I think that this change should be safe.
Best regards,
Philippe
Le , Peter Korsgaard <[email protected]> a ?crit :
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Philippe" == Philippe Reynes <[email protected]> writes:
Hi Peter,
I've done a little test before sending this patch. I've used this useless fs :define
ROOTFS_USERFS_CMD
? ? echo "Nothing to do" ; \
? ? touch $@
endef$(eval $(call ROOTFS_TARGET,userfs))
Quoted 7 lines
In the file $(BR2_EXTERNAL)/fs/common.mk
Without my patch, the file rootfs.userfs is not created. With my patch, the file rootfs.userfs is created.
I could have missed something.
Do you have an idea of what may failed ?
The specific issue I mentioned was about the externally defined rootfs getting created before
target-purgelocales / target-generatelocales gets
called. The easiest way to check that is to use a glibc toolchain and enable BR2_ENABLE_LOCALE_PURGE / BR2_GENERATE_LOCALE, and then stick an echo statement in each of them.
Signature · 4 lines
Bye, Peter Korsgaard -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140330/ee1b7964/attachment.html>
PATCH 1/1 Makefile: move fs/common.mk above external.mk
In reply to Peter KorsgaardHi Peter,
Quoted 18 lines · Peter Korsgaard
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Philippe" == Philippe Reynes <[email protected]> writes:
Hi Peter,
I've done a little test before sending this patch. I've used this useless fs :define
ROOTFS_USERFS_CMDecho "Nothing to do" ; \ touch $@endef
$(eval $(call ROOTFS_TARGET,userfs))
In the file $(BR2_EXTERNAL)/fs/common.mk
Without my patch, the file rootfs.userfs is not created. With my patch, the file rootfs.userfs is created.
Quoted 9 lines
Quoted 2 lines
I could have missed something.
Do you have an idea of what may failed ?The specific issue I mentioned was about the externally defined rootfs getting created before target-purgelocales / target-generatelocales gets called. The easiest way to check that is to use a glibc toolchain and enable
BR2_ENABLE_LOCALE_PURGE/BR2_GENERATE_LOCALE, and then stick an echo statement in each of them.
I performed this test, and can confirm that all is well:
purging/generating of locale data is done before the filesystem is created, in the order generate / purge / rootfs.
So moving that line does not impact the behavior with respect to locales.
As the patch does no longer cleanly apply, I'll send a new version. Do you still consider this for 2014.05 or is it too late/risky in your opinion?
Thanks,
Thomas
PATCH 1/1 Makefile: move fs/common.mk above external.mk
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
Hi,
Quoted 7 lines
Quoted 6 lines
The specific issue I mentioned was about the externally defined rootfs getting created before target-purgelocales / target-generatelocales gets called. The easiest way to check that is to use a glibc toolchain and enable
BR2_ENABLE_LOCALE_PURGE/BR2_GENERATE_LOCALE, and then stick an echo statement in each of them.
Quoted 5 lines
I performed this test, and can confirm that all is well:
purging/generating of locale data is done before the filesystem is created, in the order generate / purge / rootfs.So moving that line does not impact the behavior with respect to locales.
Thanks!
Quoted 2 lines
As the patch does no longer cleanly apply, I'll send a new version. Do you still consider this for 2014.05 or is it too late/risky in your opinion?
If you tested it then I'm Ok with it ;)
Signature · 1 line
Bye, Peter Korsgaard