Skip to contentSkip to conversation

mpc83xx: make dtb basename file references equal those of linux

PATCH New Kim Phillips 4 participants 12 messages Mar 7, 2008 – Mar 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

the dts file basenames were updated in linux - this helps avoid inadvertently loading any old dtbs laying around.

---
 include/configs/MPC832XEMDS.h |    2 +-
 include/configs/MPC8360EMDS.h |    2 +-
 include/configs/MPC837XEMDS.h |    2 +-
 include/configs/MPC837XERDB.h |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
include/configs/MPC832XEMDS.h +1 -1
index 702b073..f32c4f7 100644
@@ -583,7 +583,7 @@
    "ramdiskaddr=1000000\0"						\
    "ramdiskfile=ramfs.83xx\0"						\
    "fdtaddr=400000\0"							\
-   "fdtfile=mpc832xemds.dtb\0"						\
+   "fdtfile=mpc832x_mds.dtb\0"						\
    ""
 
 #define CONFIG_NFSBOOTCOMMAND						\
include/configs/MPC8360EMDS.h +1 -1
index eff9fba..c8dcbc6 100644
@@ -615,7 +615,7 @@
    "ramdiskaddr=1000000\0"						\
    "ramdiskfile=ramfs.83xx\0"						\
    "fdtaddr=400000\0"							\
-   "fdtfile=mpc8360emds.dtb\0"						\
+   "fdtfile=mpc836x_mds.dtb\0"						\
    ""
 
 #define CONFIG_NFSBOOTCOMMAND						\
include/configs/MPC837XEMDS.h +1 -1
index 2222ef2..5586533 100644
@@ -578,7 +578,7 @@
    "ramdiskaddr=1000000\0"						\
    "ramdiskfile=ramfs.83xx\0"						\
    "fdtaddr=400000\0"							\
-   "fdtfile=mpc837xemds.dtb\0"						\
+   "fdtfile=mpc8379_mds.dtb\0"						\
    ""
 
 #define CONFIG_NFSBOOTCOMMAND						\
include/configs/MPC837XERDB.h +1 -1
index 2da4f29..1964946 100644
@@ -545,7 +545,7 @@
 #define CONFIG_RAMDISKFILE	rootfs.ext2.gz.uboot
 #define CONFIG_BOOTFILE		uImage
 #define CONFIG_UBOOTPATH	u-boot.bin	/* U-Boot image on TFTP server */
-#define CONFIG_FDTFILE		mpc837x_rdb.dtb
+#define CONFIG_FDTFILE		mpc8379_rdb.dtb
 
 #define CONFIG_LOADADDR		200000	/* default location for tftp and bootm */
 #define CONFIG_BOOTDELAY	-1	/* -1 disables auto-boot */
Signature · 1 line
1.5.4.3.450.gb92176
#1 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Quoted 16 lines · In message <[email protected]> you wrote:

the dts file basenames were updated in linux - this helps avoid inadvertently loading any old dtbs laying around.

---
 include/configs/MPC832XEMDS.h |    2 +-
 include/configs/MPC8360EMDS.h |    2 +-
 include/configs/MPC837XEMDS.h |    2 +-
 include/configs/MPC837XERDB.h |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
include/configs/MPC832XEMDS.h +0 -0
index 702b073..f32c4f7 100644

include/configs/MPC832XEMDS.h line 586

Quoted 5 lines
include/configs/MPC832XEMDS.h +1 -1
@@ -583,7 +583,7 @@
    "ramdiskaddr=1000000\0"						\
    "ramdiskfile=ramfs.83xx\0"						\
    "fdtaddr=400000\0"							\
-   "fdtfile=mpc832xemds.dtb\0"						\
+   "fdtfile=mpc832x_mds.dtb\0"						\

I don't think this is a good idea. File names and board config names should match as far as possible, and here is no good reason to deviate from this rule.

I tend to NAK this.

Best regards,

Wolfgang Denk

Signature · 6 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
We are all agreed that your  theory  is  crazy.  The  question  which
divides  us  is  whether it is crazy enough to have a chance of being
correct. My own feeling is that it is not crazy enough.  - Niels Bohr
#2 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Quoted 6 lines · Wolfgang Denk

include/configs/MPC832XEMDS.h line 586

Quoted 2 lines
include/configs/MPC832XEMDS.h +1 -1
-   "fdtfile=mpc832xemds.dtb\0"						\
+   "fdtfile=mpc832x_mds.dtb\0"						\

I don't think this is a good idea. File names and board config names should match as far as possible, and here is no good reason to deviate from this rule.

But the DTS files have already been renamed. The DTS for the MPC832xE-MDS is called mpc832x_mds.dts, so the DTB is going to be called mpc832x_mds.dtb.

Would you prefer that Kim also renamed MPC832XEMDS.h to MPC832X_MDS.h, as well as change the Makefile?

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#3 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 4 lines

I don't think this is a good idea. File names and board config names should match as far as possible, and here is no good reason to deviate from this rule.

But the DTS files have already been renamed. The DTS for the MPC832xE-MDS is called mpc832x_mds.dts, so the DTB is going to be called mpc832x_mds.dtb.

Well, then undo that change, please?

It doesn't make sense to me. Note that you only change the default environment, i. e. all the installed systems out in the field will most probably still use the old names anyway, even if they update to a recent version of U-Boot...

Quoted 2 lines

Would you prefer that Kim also renamed MPC832XEMDS.h to MPC832X_MDS.h, as well as change the Makefile?

No, definitely not.

Best regards,

Wolfgang Denk

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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The explanation requiring the fewest assumptions is the  most  likely
to be correct.                                    -- William of Occam
#4 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Quoted 8 lines · Wolfgang Denk
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines

I don't think this is a good idea. File names and board config names should match as far as possible, and here is no good reason to deviate from this rule.

But the DTS files have already been renamed. The DTS for the MPC832xE-MDS is called mpc832x_mds.dts, so the DTB is going to be called mpc832x_mds.dtb.

Well, then undo that change, please?

I'm not the one who renamed the files, but I don't think they're going to be changed back.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#5 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

In reply to Wolfgang Denk
Quoted 27 lines · On Fri, 07 Mar 2008 20:38:31 +0100 Wolfgang Denk <[email protected]> wrote:
Quoted 16 lines · In message <[email protected]> you wrote:

the dts file basenames were updated in linux - this helps avoid inadvertently loading any old dtbs laying around.

---
 include/configs/MPC832XEMDS.h |    2 +-
 include/configs/MPC8360EMDS.h |    2 +-
 include/configs/MPC837XEMDS.h |    2 +-
 include/configs/MPC837XERDB.h |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
include/configs/MPC832XEMDS.h +0 -0
index 702b073..f32c4f7 100644

include/configs/MPC832XEMDS.h line 586

Quoted 5 lines
include/configs/MPC832XEMDS.h +1 -1
@@ -583,7 +583,7 @@
    "ramdiskaddr=1000000\0"						\
    "ramdiskfile=ramfs.83xx\0"						\
    "fdtaddr=400000\0"							\
-   "fdtfile=mpc832xemds.dtb\0"						\
+   "fdtfile=mpc832x_mds.dtb\0"						\

I don't think this is a good idea. File names and board config names should match as far as possible, and here is no good reason to deviate from this rule.

Quoted 1 line

I tend to NAK this.

but these are the filenames in linux' device tree directory - arch/powerpc/boot/dts, and I'm assuming people do something sane like dtc -I $file.dts -O $file.dtb.

are you suggesting we rename u-boot's config files too?

Kim

#6 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Quoted 31 lines · Kim Phillips
Quoted 26 lines · On Fri, 07 Mar 2008 20:38:31 +0100 Wolfgang Denk <[email protected]> wrote:
Quoted 16 lines · In message <[email protected]> you wrote:

the dts file basenames were updated in linux - this helps avoid inadvertently loading any old dtbs laying around.

---
 include/configs/MPC832XEMDS.h |    2 +-
 include/configs/MPC8360EMDS.h |    2 +-
 include/configs/MPC837XEMDS.h |    2 +-
 include/configs/MPC837XERDB.h |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
include/configs/MPC832XEMDS.h +0 -0
index 702b073..f32c4f7 100644

include/configs/MPC832XEMDS.h line 586

Quoted 5 lines
include/configs/MPC832XEMDS.h +1 -1
@@ -583,7 +583,7 @@
    "ramdiskaddr=1000000\0"						\
    "ramdiskfile=ramfs.83xx\0"						\
    "fdtaddr=400000\0"							\
-   "fdtfile=mpc832xemds.dtb\0"						\
+   "fdtfile=mpc832x_mds.dtb\0"						\

I don't think this is a good idea. File names and board config names should match as far as possible, and here is no good reason to deviate from this rule.

Quoted 1 line

I tend to NAK this.

Quoted 7 lines

but these are the filenames in linux' device tree directory - arch/powerpc/boot/dts, and I'm assuming people do something sane like dtc -I $file.dts -O $file.dtb.

are you suggesting we rename u-boot's config files too?

Kim

I'm with Kim & Timur on this one. The kernel is in the driver's seat on the .dts, and thus the .dtb file names for these targets.

Best regards,
gvb

#7 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Quoted 3 lines · In message <[email protected]> you wrote:

I'm with Kim & Timur on this one. The kernel is in the driver's seat on the .dts, and thus the .dtb file names for these targets.

That does not necessarily mean that the kernel is always right and that U-Boot must always follow it's errors.

Best regards,

Wolfgang Denk

Signature · 6 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
Our missions are peaceful -- not for conquest.  When we do battle, it
is only because we have no choice.
	-- Kirk, "The Squire of Gothos", stardate 2124.5
#8 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

In reply to Kim Phillips
Quoted 4 lines · In message <[email protected]> you wrote:

but these are the filenames in linux' device tree directory - arch/powerpc/boot/dts, and I'm assuming people do something sane like dtc -I $file.dts -O $file.dtb.

Argh... what a mess.

Quoted 1 line

are you suggesting we rename u-boot's config files too?

Well, my personal preference is to have the official board name and the related file names match as closely as possible, probabl;y just using lowercase letters for the files.

I don't think it's exactly intuitive to have a board named
"mpc832xemds" and the related files use "mpc832x_mds".

That looks awfully broken to me.

At the momnt, the U-Boot code looks OK, so if you do it differently in Linux, you should fix it there.

Just my $ 0.02 (well, I think I should say $ 0.03 given current exchange rates ;-).

Best regards,

Wolfgang Denk

Signature · 6 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
In a survey taken several years ago, all  incoming  freshmen  at  MIT
were  asked  if  they  expected  to graduate in the top half of their
class. Ninety-seven percent responded that they did.
#9 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Quoted 8 lines · On Sat, 08 Mar 2008 02:03:02 +0100 Wolfgang Denk <[email protected]> wrote:
Quoted 4 lines · In message <[email protected]> you wrote:

but these are the filenames in linux' device tree directory - arch/powerpc/boot/dts, and I'm assuming people do something sane like dtc -I $file.dts -O $file.dtb.

Argh... what a mess.

indeed.

Quoted 10 lines
Quoted 1 line

are you suggesting we rename u-boot's config files too?

Well, my personal preference is to have the official board name and the related file names match as closely as possible, probabl;y just using lowercase letters for the files.

I don't think it's exactly intuitive to have a board named
"mpc832xemds" and the related files use "mpc832x_mds".

That looks awfully broken to me.

afaik, you can supposedly buy an mds board with an mpc8321, mpc8321e, mpc8323, or an mpc8323e (the trailing 'e' denotes whether the crypto engine has its fuse intact). It's just the mpc8323e that is (probably by far) the most common.

Quoted 5 lines

At the momnt, the U-Boot code looks OK, so if you do it differently in Linux, you should fix it there.

Just my $ 0.02 (well, I think I should say $ 0.03 given current exchange rates ;-).

bah, what can you buy with a cent these days? ;)

linux board support files are consistent /within/ linux, and u-boot board support files are intra-u-boot consistent; it's just this particular file (the device tree) needs to be inter-linux and u-boot consistent (for interoperability purposes). Since linux does currently host the device tree files, we should probably follow their naming scheme, unless you want to discuss hosting device tree files in u-boot ;).

fyi, the board file was changed in the linux git tree commit be156bed9ebfe365c6d95f715eae3529cf694fcb

Kim

#10 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Dear Kim,

Quoted 10 lines · in message <[email protected]> you wrote:
Quoted 5 lines

I don't think it's exactly intuitive to have a board named
"mpc832xemds" and the related files use "mpc832x_mds".

That looks awfully broken to me.

afaik, you can supposedly buy an mds board with an mpc8321, mpc8321e, mpc8323, or an mpc8323e (the trailing 'e' denotes whether the crypto engine has its fuse intact). It's just the mpc8323e that is (probably by far) the most common.

Yes, I know. By "board name" I mean the name of the configuration in U-Boot, and the related file names i. e.

	Makefile:	MPC8323ERDB_config
			MPC832XEMDS_config
			MPC832XEMDS_HOST_33_config
			MPC832XEMDS_HOST_66_config
			MPC832XEMDS_SLAVE_config
			MPC832XEMDS_ATM_config
	doc/README.mpc8323erdb
	doc/README.mpc832xemds
	include/configs/MPC8323ERDB.h
	include/configs/MPC832XEMDS.h
	board/freescale/mpc8323erdb/Makefile
	board/freescale/mpc8323erdb/config.mk
	board/freescale/mpc8323erdb/mpc8323erdb.c
	board/freescale/mpc832xemds/Makefile
	board/freescale/mpc832xemds/config.mk
	board/freescale/mpc832xemds/mpc832xemds.c
	board/freescale/mpc832xemds/pci.c

and:
CONFIG_MPC832XEMDS

compare Linux:

	arch/powerpc/configs/mpc832x_mds_defconfig
	arch/powerpc/configs/mpc832x_rdb_defconfig
	arch/powerpc/boot/dts/mpc832x_mds.dts
	arch/powerpc/boot/dts/mpc832x_rdb.dts
	arch/powerpc/platforms/83xx/mpc832x_mds.c
	arch/powerpc/platforms/83xx/mpc832x_rdb.c

and:
CONFIG_MPC832x_MDS

Quoted 1 line

linux board support files are consistent /within/ linux, and u-boot

No, not even this.

arch/powerpc/boot/dts/mpc832x_mds.dts says:

	* MPC8323E EMDS Device Tree Source
	 model = "MPC8323EMDS";
	 compatible = "MPC8323EMDS", "MPC832xMDS", "MPC83xxMDS";

There is no name with an underscore there.

Quoted 3 lines

board support files are intra-u-boot consistent; it's just this particular file (the device tree) needs to be inter-linux and u-boot consistent (for interoperability purposes). Since linux does currently

As you can see above, there are more places where the same name could or rather should be shared between U-Boot and Linux:

- for the board specific #define's
- for the board configuration ("MAKEALL foo" resp. "make foo_config" in U-Boot and "make foo_defconfig" in Linux)
- for the file names in the source trees

Depending on your lab setup, you probably also share between U-Boot and Linux

- the name of the /tftpboot directory
- the name of the BDI2000 config file
- the port name on the terminal server for serial console access
- the port name remote power switch unit

Quoted 6 lines

host the device tree files, we should probably follow their naming scheme, unless you want to discuss hosting device tree files in u-boot ;).

fyi, the board file was changed in the linux git tree commit be156bed9ebfe365c6d95f715eae3529cf694fcb

But OK - that's your stuff. I will not block your commit now, but I really think this shouldbe cleaned up - in your own interest, and in the interest of your users.

Best regards,

Wolfgang Denk

Signature · 6 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
If I don't document something, it's usually either for a good reason,
or a bad reason.  In this case it's a good reason.  :-)
                 - Larry Wall in <[email protected]>
#11 lore raw

PATCH 1/1 mpc83xx: make dtb basename file references equal those of linux

Quoted 67 lines · On Sat, 08 Mar 2008 10:19:56 +0100 Wolfgang Denk <[email protected]> wrote:

Dear Kim,

Quoted 10 lines · in message <[email protected]> you wrote:
Quoted 5 lines

I don't think it's exactly intuitive to have a board named
"mpc832xemds" and the related files use "mpc832x_mds".

That looks awfully broken to me.

afaik, you can supposedly buy an mds board with an mpc8321, mpc8321e, mpc8323, or an mpc8323e (the trailing 'e' denotes whether the crypto engine has its fuse intact). It's just the mpc8323e that is (probably by far) the most common.

Yes, I know. By "board name" I mean the name of the configuration in U-Boot, and the related file names i. e.

	Makefile:	MPC8323ERDB_config
			MPC832XEMDS_config
			MPC832XEMDS_HOST_33_config
			MPC832XEMDS_HOST_66_config
			MPC832XEMDS_SLAVE_config
			MPC832XEMDS_ATM_config
	doc/README.mpc8323erdb
	doc/README.mpc832xemds
	include/configs/MPC8323ERDB.h
	include/configs/MPC832XEMDS.h
	board/freescale/mpc8323erdb/Makefile
	board/freescale/mpc8323erdb/config.mk
	board/freescale/mpc8323erdb/mpc8323erdb.c
	board/freescale/mpc832xemds/Makefile
	board/freescale/mpc832xemds/config.mk
	board/freescale/mpc832xemds/mpc832xemds.c
	board/freescale/mpc832xemds/pci.c

and:
CONFIG_MPC832XEMDS

compare Linux:

	arch/powerpc/configs/mpc832x_mds_defconfig
	arch/powerpc/configs/mpc832x_rdb_defconfig
	arch/powerpc/boot/dts/mpc832x_mds.dts
	arch/powerpc/boot/dts/mpc832x_rdb.dts
	arch/powerpc/platforms/83xx/mpc832x_mds.c
	arch/powerpc/platforms/83xx/mpc832x_rdb.c

and:
CONFIG_MPC832x_MDS

Quoted 1 line

linux board support files are consistent /within/ linux, and u-boot

No, not even this.

arch/powerpc/boot/dts/mpc832x_mds.dts says:

	* MPC8323E EMDS Device Tree Source
	 model = "MPC8323EMDS";
	 compatible = "MPC8323EMDS", "MPC832xMDS", "MPC83xxMDS";

There is no name with an underscore there.

Quoted 3 lines

board support files are intra-u-boot consistent; it's just this particular file (the device tree) needs to be inter-linux and u-boot consistent (for interoperability purposes). Since linux does currently

Quoted 7 lines

As you can see above, there are more places where the same name could or rather should be shared between U-Boot and Linux:

- for the board specific #define's
- for the board configuration ("MAKEALL foo" resp. "make foo_config" in U-Boot and "make foo_defconfig" in Linux)
- for the file names in the source trees

you're right..

Quoted 12 lines

Depending on your lab setup, you probably also share between U-Boot and Linux

- the name of the /tftpboot directory
- the name of the BDI2000 config file
- the port name on the terminal server for serial console access
- the port name remote power switch unit

Quoted 4 lines

host the device tree files, we should probably follow their naming scheme, unless you want to discuss hosting device tree files in u-boot ;).

Quoted 7 lines
Quoted 2 lines

fyi, the board file was changed in the linux git tree commit be156bed9ebfe365c6d95f715eae3529cf694fcb

But OK - that's your stuff. I will not block your commit now, but I really think this shouldbe cleaned up - in your own interest, and in the interest of your users.

I'll have a look into it when I get a chance.

Thanks,

Kim