Skip to contentSkip to conversation

Update Makefile for new dirs to be included in tag list

PATCH New Li Yang 6 participants 12 messages Dec 9, 2009 – Dec 10, 2009 Kbuild

lore
Share & tools
lore

Li Yang

author
#0 lore raw

PATCH 1/3 Update Makefile for new dirs to be included in tag list

---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Makefile +3 -0
index bcb3fe9..4d71366 100644
@@ -406,6 +406,8 @@ TAG_SUBDIRS += include
 TAG_SUBDIRS += lib_generic board/$(BOARDDIR)
 TAG_SUBDIRS += cpu/$(CPU)
 TAG_SUBDIRS += lib_$(ARCH)
+TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
+	"board/$(VENDOR)/common"; fi)
 TAG_SUBDIRS += fs/cramfs
 TAG_SUBDIRS += fs/fat
 TAG_SUBDIRS += fs/fdos
@@ -414,6 +416,7 @@ TAG_SUBDIRS += fs/yaffs2
 TAG_SUBDIRS += net
 TAG_SUBDIRS += disk
 TAG_SUBDIRS += common
+TAG_SUBDIRS += libfdt
 TAG_SUBDIRS += drivers/bios_emulator
 TAG_SUBDIRS += drivers/block
 TAG_SUBDIRS += drivers/gpio
Signature · 1 line
1.6.4
author
#1 lore raw

PATCH 2/3 fdt: add fdt_del_node_by_path() API

For removing node easily by path or alias.

---
 common/fdt_support.c  |   10 ++++++++++
 include/fdt_support.h |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)
common/fdt_support.c +10 -0
index f89a3ee..8f1186e 100644
@@ -757,3 +757,13 @@ int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size)
 	return -1;
 }
 #endif
+
+int fdt_del_node_by_path(void *fdt, const char *path)
+{
+	int off = fdt_path_offset(fdt, path);
+
+	if (off >= 0)
+		return fdt_del_node(fdt, off);
+	else
+		return off;
+}
include/fdt_support.h +1 -0
index 0a9dd0d..d0705d1 100644
@@ -80,6 +80,7 @@ void set_working_fdt_addr(void *addr);
 int fdt_resize(void *blob);
 
 int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size);
+int fdt_del_node_by_path(void *fdt, const char *path);
 
 #endif /* ifdef CONFIG_OF_LIBFDT */
 #endif /* ifndef __FDT_SUPPORT_H */
Signature · 1 line
1.6.4
author
#2 lore raw

PATCH 3/3 fsl_law: add SRIO2 target id and law_size_bits() macro

---
 include/asm-ppc/fsl_law.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
include/asm-ppc/fsl_law.h +3 -0
index 31bb754..34c56a2 100644
@@ -46,6 +46,8 @@ enum law_size {
 	LAW_SIZE_32G,
 };
 
+#define law_size_bits(sz)	(__ilog2_u64(sz) - 1)
+
 #ifdef CONFIG_FSL_CORENET
 enum law_trgt_if {
 	LAW_TRGT_IF_PCIE_1 = 0x00,
@@ -78,6 +80,7 @@ enum law_trgt_if {
 	LAW_TRGT_IF_CCSR = 0x08,
 	LAW_TRGT_IF_DDR_INTRLV = 0x0b,
 	LAW_TRGT_IF_RIO = 0x0c,
+	LAW_TRGT_IF_RIO_2 = 0x0d,
 	LAW_TRGT_IF_DDR = 0x0f,
 	LAW_TRGT_IF_DDR_2 = 0x16,	/* 2nd controller */
 };
Signature · 1 line
1.6.4
Applied
#3 lore raw

PATCH 3/3 fsl_law: add SRIO2 target id and law_size_bits() macro

Quoted 4 lines · Li Yang

---
include/asm-ppc/fsl_law.h | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)

applied to 85xx-next

- k

#4 lore raw

PATCH 2/3 fdt: add fdt_del_node_by_path() API

In reply to Li Yang

Hi Li,

Quoted 31 lines · Li Yang

For removing node easily by path or alias.

---
 common/fdt_support.c  |   10 ++++++++++
 include/fdt_support.h |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)
common/fdt_support.c +10 -0
index f89a3ee..8f1186e 100644
@@ -757,3 +757,13 @@ int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size)
 	return -1;
 }
 #endif
+
+int fdt_del_node_by_path(void *fdt, const char *path)
+{
+	int off = fdt_path_offset(fdt, path);
+
+	if (off >= 0)
+		return fdt_del_node(fdt, off);
+	else
+		return off;
+}
include/fdt_support.h +0 -0
index 0a9dd0d..d0705d1 100644

include/fdt_support.h void set_working_fdt_addr(void *addr); · line 86

Quoted 7 lines
include/fdt_support.h +1 -0
@@ -80,6 +80,7 @@ void set_working_fdt_addr(void *addr);
 int fdt_resize(void *blob);
 
 int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size);
+int fdt_del_node_by_path(void *fdt, const char *path);
 
 #endif /* ifdef CONFIG_OF_LIBFDT */
 #endif /* ifndef __FDT_SUPPORT_H */

This seems like a reasonable function, but I don't see it used anywhere?

Best regards,
gvb

#5 lore raw

PATCH 2/3 fdt: add fdt_del_node_by_path() API

Quoted 38 lines

Subject: Re: [U-Boot] [PATCH 2/3] fdt: add fdt_del_node_by_path() API

Hi Li,

common/fdt_support.c int fdt_fixup_nor_flash_size(void

Quoted 13 lines · Li Yang

For removing node easily by path or alias.

---
 common/fdt_support.c  |   10 ++++++++++
 include/fdt_support.h |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)
common/fdt_support.c index renamed from common/fdt_support.c +0 -0

f89a3ee..8f1186e 100644

common/fdt_support.c +0 -0
@@ -757,3 +757,13 @@ int fdt_fixup_nor_flash_size(void 

*blob, int cs, u32 size)

Quoted 19 lines
common/fdt_support.c +9 -0
 	return -1;
 }
 #endif
+
+int fdt_del_node_by_path(void *fdt, const char *path) {
+	int off = fdt_path_offset(fdt, path);
+
+	if (off >= 0)
+		return fdt_del_node(fdt, off);
+	else
+		return off;
+}
include/fdt_support.h index renamed from include/fdt_support.h +0 -0

0a9dd0d..d0705d1 100644

include/fdt_support.h +0 -0
@@ -80,6 +80,7 @@ void set_working_fdt_addr(void *addr);  int 
 fdt_resize(void *blob);
 
Quoted 8 lines

include/fdt_support.h void set_working_fdt_addr(void *addr); · line 86

Quoted 5 lines
include/fdt_support.h +1 -0
 int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size);
+int fdt_del_node_by_path(void *fdt, const char *path);
 
 #endif /* ifdef CONFIG_OF_LIBFDT */
 #endif /* ifndef __FDT_SUPPORT_H */

This seems like a reasonable function, but I don't see it used anywhere?

It will be used in patches to be submitted, we want to remove the nodes of devices which are not enabled depending on the board configuration.

- Leo

#6 lore raw

PATCH 2/3 fdt: add fdt_del_node_by_path() API

Dear "Li Yang-R58472",

Quoted 3 lines · In message <3A45394FD742FA419B760BB8D398F9EDE667CD@zch01exm26.fsl.freescale.net…

It will be used in patches to be submitted, we want to remove the nodes of devices which are not enabled depending on the board configuration.

The rule is that we don't add dead code, so this patch should be part of a patch series that also adds users of this new code.

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
A day without sunshine is like night.
#7 lore raw

PATCH 2/3 fdt: add fdt_del_node_by_path() API

Quoted 8 lines

Subject: Re: [U-Boot] [PATCH 2/3] fdt: add fdt_del_node_by_path() API

Dear "Li Yang-R58472",

In message <[email protected]

Quoted 1 line · e.net> you wrote:
Quoted 6 lines
Quoted 2 lines

It will be used in patches to be submitted, we want to remove the nodes of devices which are not enabled depending on the

board configuration.

The rule is that we don't add dead code, so this patch should be part of a patch series that also adds users of this new code.

All right. I will include this in the patch series to come.

- Leo

#8 lore raw

PATCH 1/3 Update Makefile for new dirs to be included in tag list

In reply to Li Yang

Dear Li Yang,

Quoted 10 lines · In message <[email protected]> you wrote:
---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Makefile +0 -0
index bcb3fe9..4d71366 100644

Makefile TAG_SUBDIRS += include · line 410

Quoted 5 lines
Makefile +2 -0
@@ -406,6 +406,8 @@ TAG_SUBDIRS += include
 TAG_SUBDIRS += lib_generic board/$(BOARDDIR)
 TAG_SUBDIRS += cpu/$(CPU)
 TAG_SUBDIRS += lib_$(ARCH)
+TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
+	"board/$(VENDOR)/common"; fi)

Would it not be easier to do something like

	TAG_SUBDIRS = $(dir $(LIBS))

and get rid of all these duplicated settings?

[Warning: untested!]

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
Nothing ever becomes real until it is experienced.       - John Keats
#9 lore raw

PATCH 1/3 Update Makefile for new dirs to be included in tag list

Quoted 19 lines

Subject: Re: [U-Boot] [PATCH 1/3] Update Makefile for new dirs to be included in tag list

Dear Li Yang,

In message

Makefile TAG_SUBDIRS += include TAG_SUBDIRS +=

Quoted 10 lines · <[email protected]> you wrote:
---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Makefile +0 -0
index bcb3fe9..4d71366 100644
@@ -406,6 +406,8 @@ TAG_SUBDIRS += include  TAG_SUBDIRS += 

lib_generic

Quoted 8 lines

Makefile TAG_SUBDIRS += include · line 410

Quoted 4 lines

board/$(BOARDDIR) TAG_SUBDIRS += cpu/$(CPU) TAG_SUBDIRS += lib_$(ARCH)

Makefile +2 -0
+TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
+	"board/$(VENDOR)/common"; fi)

Would it not be easier to do something like

	TAG_SUBDIRS = $(dir $(LIBS))

Should be $(__LIBS)

Quoted 2 lines

and get rid of all these duplicated settings?

Great idea! I will come up a patch.

- Leo

#10 lore raw

PATCH 1/3 Update Makefile for new dirs to be included in tag list

In reply to Li Yang

Makefile TAG_SUBDIRS += include · line 410

Quoted 6 lines · On Wednesday 09 December 2009 01:26:06 Li Yang wrote:
Makefile +2 -0
index bcb3fe9..4d71366 100644
+TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
+	"board/$(VENDOR)/common"; fi)

ugh, dont do that. using $(shell) is awful. if you need to do things based on a dynamic path, use:
ifneq ($(wildcard some/path),)
...
endif

perhaps even better would be to let each dir define a tags.in or something and have the toplevel Makefile source that
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091209/6bf01346/attachment.pgp

#11 lore raw

PATCH 1/3 Update Makefile for new dirs to be included in tag list

Quoted 14 lines · On Wednesday 09 December 2009 05:28:33 Mike Frysinger wrote:

Makefile TAG_SUBDIRS += include · line 410

Quoted 6 lines · On Wednesday 09 December 2009 01:26:06 Li Yang wrote:
Makefile +2 -0
index bcb3fe9..4d71366 100644
+TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
+	"board/$(VENDOR)/common"; fi)

ugh, dont do that. using $(shell) is awful. if you need to do things
based on a dynamic path, use:
ifneq ($(wildcard some/path),)
...
endif

Quoted 2 lines

perhaps even better would be to let each dir define a tags.in or something
and have the toplevel Makefile source that

nm, Wolfgang proposed a better idea already
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091209/94876c8f/attachment.pgp