Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire
@ 2023-06-29  5:31 Jean-Michel Hautbois
  2023-06-29  5:31 ` [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire Jean-Michel Hautbois
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jean-Michel Hautbois @ 2023-06-29  5:31 UTC (permalink / raw)
  To: buildroot
  Cc: Romain Naour, Giulio Benetti, Jean-Michel Hautbois,
	Thomas De Schampheleire, Thomas Petazzoni

Hi !

I have a custom board which uses a MCF54418 and I want it to use an
upstream buildroot (for all the good reasons ;-)).
From what I can tell the only Coldfire processor currently supported is
the MCF5208 which does not have a MMU.

While trying to add the processor support, I faced an issue during the
host-gcc build when the MMU configuration is selected, because it makes
it compile the multilib part.

Sadly, a commit [1] removed the GCC ARCH configuration which was used to
determine if the architecture is "m68k" or "cf". I have re-introduced
this configuration here, only for the MCF54418 case for now as I am not
sure if it is my real issue or not. What I can tell is that when I have
the BR2_USE_MMU selected, the host-gcc fails and it passes when I add
the proper architecture.

[1]: eda11417be m68k: remove BR2_GCC_TARGET_ARCH

Jean-Michel Hautbois (3):
  arch: add support for mcf54418 Colfdire
  board: add the qemu board support for mcf54418
  configs: add support for the 54418 qemu defconfig

 arch/Config.in.m68k                   |  9 +++++++++
 board/qemu/m68k-mcf54418/linux.config | 23 +++++++++++++++++++++++
 configs/qemu_m68k_mcf54418_defconfig  | 19 +++++++++++++++++++
 toolchain/Config.in                   |  1 +
 4 files changed, 52 insertions(+)
 create mode 100644 board/qemu/m68k-mcf54418/linux.config
 create mode 100644 configs/qemu_m68k_mcf54418_defconfig

-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire
  2023-06-29  5:31 [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire Jean-Michel Hautbois
@ 2023-06-29  5:31 ` Jean-Michel Hautbois
  2023-07-03 18:55   ` Yann E. MORIN
  2023-07-03 19:03   ` Yann E. MORIN
  2023-06-29  5:31 ` [Buildroot] [PATCH 2/3] board: add the qemu board support for mcf54418 Jean-Michel Hautbois
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Jean-Michel Hautbois @ 2023-06-29  5:31 UTC (permalink / raw)
  To: buildroot
  Cc: Romain Naour, Giulio Benetti, Jean-Michel Hautbois,
	Thomas De Schampheleire, Thomas Petazzoni

The m68k family ony has one Coldfire variant, namely the 5208. Add the
support for the MCF54418 CPU in the configuration file.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
 arch/Config.in.m68k | 9 +++++++++
 toolchain/Config.in | 1 +
 2 files changed, 10 insertions(+)

diff --git a/arch/Config.in.m68k b/arch/Config.in.m68k
index 9fd22aaf1e..6aa409b272 100644
--- a/arch/Config.in.m68k
+++ b/arch/Config.in.m68k
@@ -33,11 +33,20 @@ config BR2_m68k_cf5208
 	select BR2_m68k_cf
 	select BR2_SOFT_FLOAT
 
+config BR2_m68k_cf54418
+	bool "54418"
+	select BR2_m68k_cf
+	select BR2_USE_MMU
+	select BR2_SOFT_FLOAT
 endchoice
 
 config BR2_GCC_TARGET_CPU
 	default "68040"		if BR2_m68k_68040
 	default "5208"		if BR2_m68k_cf5208
+	default "54455"		if BR2_m68k_cf54418
+
+config BR2_GCC_TARGET_ARCH
+	default "cf"            if BR2_m68k_cf54418
 
 config BR2_READELF_ARCH_NAME
 	default "MC68000"
diff --git a/toolchain/Config.in b/toolchain/Config.in
index ff0eb93017..ec2185cb39 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -95,6 +95,7 @@ config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
 	depends on !BR2_ARM_CPU_ARMV5
 	depends on !BR2_sparc_v8
 	depends on !BR2_m68k_cf5208
+	depends on !BR2_m68k_cf54418
 
 # GCC uses thunk functions to adjust the 'this' pointer when calling
 # C++ member functions in classes derived with multiple inheritance.
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/3] board: add the qemu board support for mcf54418
  2023-06-29  5:31 [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire Jean-Michel Hautbois
  2023-06-29  5:31 ` [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire Jean-Michel Hautbois
@ 2023-06-29  5:31 ` Jean-Michel Hautbois
  2023-07-03 18:42   ` Yann E. MORIN
  2023-06-29  5:31 ` [Buildroot] [PATCH 3/3] configs: add support for the 54418 qemu defconfig Jean-Michel Hautbois
  2023-07-03 19:01 ` [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire Yann E. MORIN
  3 siblings, 1 reply; 10+ messages in thread
From: Jean-Michel Hautbois @ 2023-06-29  5:31 UTC (permalink / raw)
  To: buildroot
  Cc: Romain Naour, Giulio Benetti, Jean-Michel Hautbois,
	Thomas De Schampheleire, Thomas Petazzoni

The Coldfire MCF54418 needs a board to give the proper linux defconfig
to buildroot. Add it based on a simplified Linux stmark2_defconfig file.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
 board/qemu/m68k-mcf54418/linux.config | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 board/qemu/m68k-mcf54418/linux.config

diff --git a/board/qemu/m68k-mcf54418/linux.config b/board/qemu/m68k-mcf54418/linux.config
new file mode 100644
index 0000000000..e950052061
--- /dev/null
+++ b/board/qemu/m68k-mcf54418/linux.config
@@ -0,0 +1,23 @@
+CONFIG_COLDFIRE=y
+CONFIG_M5441x=y
+CONFIG_CLOCK_FREQ=240000000
+CONFIG_STMARK2=y
+CONFIG_UBOOT=y
+CONFIG_RAMBASE=0x40000000
+CONFIG_RAMSIZE=0x8000000
+CONFIG_VECTORBASE=0x40000000
+CONFIG_KERNELBASE=0x40001000
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_BINFMT_FLAT=y
+CONFIG_SERIAL_MCF=y
+CONFIG_SERIAL_MCF_BAUDRATE=115200
+CONFIG_SERIAL_MCF_CONSOLE=y
+CONFIG_BOOTPARAM=y
+CONFIG_BOOTPARAM_STRING="console=ttyS0,115200"
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_NETDEVICES=y
+CONFIG_NET_VENDOR_FREESCALE=y
+CONFIG_FEC=y
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 3/3] configs: add support for the 54418 qemu defconfig
  2023-06-29  5:31 [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire Jean-Michel Hautbois
  2023-06-29  5:31 ` [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire Jean-Michel Hautbois
  2023-06-29  5:31 ` [Buildroot] [PATCH 2/3] board: add the qemu board support for mcf54418 Jean-Michel Hautbois
@ 2023-06-29  5:31 ` Jean-Michel Hautbois
  2023-07-03 19:01 ` [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire Yann E. MORIN
  3 siblings, 0 replies; 10+ messages in thread
From: Jean-Michel Hautbois @ 2023-06-29  5:31 UTC (permalink / raw)
  To: buildroot
  Cc: Romain Naour, Giulio Benetti, Jean-Michel Hautbois,
	Thomas De Schampheleire, Thomas Petazzoni

This file is a copy of the qemu_m68k_mcf5208_defconfig as there is not
so much difference to expect except the CPU value.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
 configs/qemu_m68k_mcf54418_defconfig | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 configs/qemu_m68k_mcf54418_defconfig

diff --git a/configs/qemu_m68k_mcf54418_defconfig b/configs/qemu_m68k_mcf54418_defconfig
new file mode 100644
index 0000000000..91326e1f3c
--- /dev/null
+++ b/configs/qemu_m68k_mcf54418_defconfig
@@ -0,0 +1,19 @@
+BR2_m68k=y
+BR2_m68k_cf54418=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
+BR2_PTHREADS=y
+BR2_STATIC_LIBS=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+BR2_SYSTEM_DHCP="eth0"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.26"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/m68k-mcf54418/linux.config"
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+BR2_TARGET_ROOTFS_INITRAMFS=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 2/3] board: add the qemu board support for mcf54418
  2023-06-29  5:31 ` [Buildroot] [PATCH 2/3] board: add the qemu board support for mcf54418 Jean-Michel Hautbois
@ 2023-07-03 18:42   ` Yann E. MORIN
  0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2023-07-03 18:42 UTC (permalink / raw)
  To: Jean-Michel Hautbois
  Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti,
	Thomas De Schampheleire, buildroot

Jean-Michel, All,

On 2023-06-29 07:31 +0200, Jean-Michel Hautbois spake thusly:
> The Coldfire MCF54418 needs a board to give the proper linux defconfig
> to buildroot. Add it based on a simplified Linux stmark2_defconfig file.
> 
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
> ---
>  board/qemu/m68k-mcf54418/linux.config | 23 +++++++++++++++++++++++

This file is unused as of this patch; it only gets used in patch 3, when
you eventually do add the qemu defcconfig, which is where you should
also add the corresponding kernel config.

No need to rsend, these two can be squashed together when applying.

Regards,
Yann E. MORIN.

>  1 file changed, 23 insertions(+)
>  create mode 100644 board/qemu/m68k-mcf54418/linux.config
> 
> diff --git a/board/qemu/m68k-mcf54418/linux.config b/board/qemu/m68k-mcf54418/linux.config
> new file mode 100644
> index 0000000000..e950052061
> --- /dev/null
> +++ b/board/qemu/m68k-mcf54418/linux.config
> @@ -0,0 +1,23 @@
> +CONFIG_COLDFIRE=y
> +CONFIG_M5441x=y
> +CONFIG_CLOCK_FREQ=240000000
> +CONFIG_STMARK2=y
> +CONFIG_UBOOT=y
> +CONFIG_RAMBASE=0x40000000
> +CONFIG_RAMSIZE=0x8000000
> +CONFIG_VECTORBASE=0x40000000
> +CONFIG_KERNELBASE=0x40001000
> +# CONFIG_BLK_DEV_BSG is not set
> +CONFIG_BINFMT_FLAT=y
> +CONFIG_SERIAL_MCF=y
> +CONFIG_SERIAL_MCF_BAUDRATE=115200
> +CONFIG_SERIAL_MCF_CONSOLE=y
> +CONFIG_BOOTPARAM=y
> +CONFIG_BOOTPARAM_STRING="console=ttyS0,115200"
> +CONFIG_NET=y
> +CONFIG_PACKET=y
> +CONFIG_UNIX=y
> +CONFIG_INET=y
> +CONFIG_NETDEVICES=y
> +CONFIG_NET_VENDOR_FREESCALE=y
> +CONFIG_FEC=y
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire
  2023-06-29  5:31 ` [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire Jean-Michel Hautbois
@ 2023-07-03 18:55   ` Yann E. MORIN
  2023-07-03 20:37     ` Jean-Michel Hautbois
  2023-07-03 19:03   ` Yann E. MORIN
  1 sibling, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2023-07-03 18:55 UTC (permalink / raw)
  To: Jean-Michel Hautbois
  Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti,
	Thomas De Schampheleire, buildroot

Jean-Michel, All,

On 2023-06-29 07:31 +0200, Jean-Michel Hautbois spake thusly:
> The m68k family ony has one Coldfire variant, namely the 5208. Add the
> support for the MCF54418 CPU in the configuration file.

As your cover-letter said, eda11417beaf (m68k: remove
BR2_GCC_TARGET_ARCH), setting it breaks use of external toolchains.

Granted, the commit log was not very expansive in why it did break them
which required dropping setting m68k/cf.

However, it did state that the m68k/cf defconfigs where working
perfectly well without it.

So, your commit log should explain how/why it is safe to re-introduce
BR2_GCC_TARGET_ARCH. I see you only set ig for this new CPU variant, so
maybe that's enough of a reason.

Still, it'd be nice to have it explained in plain letters.

Also, it'd be nice if you could try with an external toolchain, and
explain that in the commit log. If you do not have an external toolchain
available, you can generate one with Buildroot, and re-use it as an
external toolchain.

Regards,
Yann E. MORIN.

> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
> ---
>  arch/Config.in.m68k | 9 +++++++++
>  toolchain/Config.in | 1 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/arch/Config.in.m68k b/arch/Config.in.m68k
> index 9fd22aaf1e..6aa409b272 100644
> --- a/arch/Config.in.m68k
> +++ b/arch/Config.in.m68k
> @@ -33,11 +33,20 @@ config BR2_m68k_cf5208
>  	select BR2_m68k_cf
>  	select BR2_SOFT_FLOAT
>  
> +config BR2_m68k_cf54418
> +	bool "54418"
> +	select BR2_m68k_cf
> +	select BR2_USE_MMU
> +	select BR2_SOFT_FLOAT
>  endchoice
>  
>  config BR2_GCC_TARGET_CPU
>  	default "68040"		if BR2_m68k_68040
>  	default "5208"		if BR2_m68k_cf5208
> +	default "54455"		if BR2_m68k_cf54418
> +
> +config BR2_GCC_TARGET_ARCH
> +	default "cf"            if BR2_m68k_cf54418
>  
>  config BR2_READELF_ARCH_NAME
>  	default "MC68000"
> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index ff0eb93017..ec2185cb39 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -95,6 +95,7 @@ config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
>  	depends on !BR2_ARM_CPU_ARMV5
>  	depends on !BR2_sparc_v8
>  	depends on !BR2_m68k_cf5208
> +	depends on !BR2_m68k_cf54418
>  
>  # GCC uses thunk functions to adjust the 'this' pointer when calling
>  # C++ member functions in classes derived with multiple inheritance.
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire
  2023-06-29  5:31 [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire Jean-Michel Hautbois
                   ` (2 preceding siblings ...)
  2023-06-29  5:31 ` [Buildroot] [PATCH 3/3] configs: add support for the 54418 qemu defconfig Jean-Michel Hautbois
@ 2023-07-03 19:01 ` Yann E. MORIN
  3 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2023-07-03 19:01 UTC (permalink / raw)
  To: Jean-Michel Hautbois
  Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti,
	Thomas De Schampheleire, buildroot

Jean-Michel, All,

On 2023-06-29 07:31 +0200, Jean-Michel Hautbois spake thusly:
> I have a custom board which uses a MCF54418 and I want it to use an
> upstream buildroot (for all the good reasons ;-)).
> From what I can tell the only Coldfire processor currently supported is
> the MCF5208 which does not have a MMU.
> 
> While trying to add the processor support, I faced an issue during the
> host-gcc build when the MMU configuration is selected, because it makes
> it compile the multilib part.
> 
> Sadly, a commit [1] removed the GCC ARCH configuration which was used to
> determine if the architecture is "m68k" or "cf". I have re-introduced
> this configuration here, only for the MCF54418 case for now as I am not
> sure if it is my real issue or not. What I can tell is that when I have
> the BR2_USE_MMU selected, the host-gcc fails and it passes when I add
> the proper architecture.
> 
> [1]: eda11417be m68k: remove BR2_GCC_TARGET_ARCH

Since commit 1/3 will need a more detailed commit log, I've marked the
series as changes-requested on Patchwork. Which means that my comment
on patch 2/3 is mott: you have to squash commits 2 and three together
when you respin.

Regards,
Yann E. MORIN.

> Jean-Michel Hautbois (3):
>   arch: add support for mcf54418 Colfdire
>   board: add the qemu board support for mcf54418
>   configs: add support for the 54418 qemu defconfig
> 
>  arch/Config.in.m68k                   |  9 +++++++++
>  board/qemu/m68k-mcf54418/linux.config | 23 +++++++++++++++++++++++
>  configs/qemu_m68k_mcf54418_defconfig  | 19 +++++++++++++++++++
>  toolchain/Config.in                   |  1 +
>  4 files changed, 52 insertions(+)
>  create mode 100644 board/qemu/m68k-mcf54418/linux.config
>  create mode 100644 configs/qemu_m68k_mcf54418_defconfig
> 
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire
  2023-06-29  5:31 ` [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire Jean-Michel Hautbois
  2023-07-03 18:55   ` Yann E. MORIN
@ 2023-07-03 19:03   ` Yann E. MORIN
  1 sibling, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2023-07-03 19:03 UTC (permalink / raw)
  To: Jean-Michel Hautbois
  Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti,
	Thomas De Schampheleire, buildroot

Jean-Michel, All,

Second round... For just a minor detail this time. ;-)

On 2023-06-29 07:31 +0200, Jean-Michel Hautbois spake thusly:
> The m68k family ony has one Coldfire variant, namely the 5208. Add the
> support for the MCF54418 CPU in the configuration file.
> 
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
> ---
>  arch/Config.in.m68k | 9 +++++++++
>  toolchain/Config.in | 1 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/arch/Config.in.m68k b/arch/Config.in.m68k
> index 9fd22aaf1e..6aa409b272 100644
> --- a/arch/Config.in.m68k
> +++ b/arch/Config.in.m68k
> @@ -33,11 +33,20 @@ config BR2_m68k_cf5208
>  	select BR2_m68k_cf
>  	select BR2_SOFT_FLOAT
>  
> +config BR2_m68k_cf54418
> +	bool "54418"
> +	select BR2_m68k_cf
> +	select BR2_USE_MMU
> +	select BR2_SOFT_FLOAT

You missed adding an empty line between the new entry and the
'endchoice' statement, like there was before.

Regards,
Yann E. MORIN.

>  endchoice
>  
>  config BR2_GCC_TARGET_CPU
>  	default "68040"		if BR2_m68k_68040
>  	default "5208"		if BR2_m68k_cf5208
> +	default "54455"		if BR2_m68k_cf54418
> +
> +config BR2_GCC_TARGET_ARCH
> +	default "cf"            if BR2_m68k_cf54418
>  
>  config BR2_READELF_ARCH_NAME
>  	default "MC68000"
> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index ff0eb93017..ec2185cb39 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -95,6 +95,7 @@ config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
>  	depends on !BR2_ARM_CPU_ARMV5
>  	depends on !BR2_sparc_v8
>  	depends on !BR2_m68k_cf5208
> +	depends on !BR2_m68k_cf54418
>  
>  # GCC uses thunk functions to adjust the 'this' pointer when calling
>  # C++ member functions in classes derived with multiple inheritance.
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire
  2023-07-03 18:55   ` Yann E. MORIN
@ 2023-07-03 20:37     ` Jean-Michel Hautbois
  2023-07-04  5:24       ` Yann E. MORIN
  0 siblings, 1 reply; 10+ messages in thread
From: Jean-Michel Hautbois @ 2023-07-03 20:37 UTC (permalink / raw)
  To: Yann E. MORIN
  Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti,
	Thomas De Schampheleire, buildroot

Hi Yann,

On 03/07/2023 20:55, Yann E. MORIN wrote:
> Jean-Michel, All,
> 
> On 2023-06-29 07:31 +0200, Jean-Michel Hautbois spake thusly:
>> The m68k family ony has one Coldfire variant, namely the 5208. Add the
>> support for the MCF54418 CPU in the configuration file.
> 
> As your cover-letter said, eda11417beaf (m68k: remove
> BR2_GCC_TARGET_ARCH), setting it breaks use of external toolchains.
> 
> Granted, the commit log was not very expansive in why it did break them
> which required dropping setting m68k/cf.

Indeed. Well, I did not found the root cause, but I can say for sure 
that the USE_MMU configuration makes it impossible to build the 
buildroot toolchain.

> However, it did state that the m68k/cf defconfigs where working
> perfectly well without it.
> 
> So, your commit log should explain how/why it is safe to re-introduce
> BR2_GCC_TARGET_ARCH. I see you only set ig for this new CPU variant, so
> maybe that's enough of a reason.
> 
> Still, it'd be nice to have it explained in plain letters.

OK, so get the content from the plain letter and have it in this commit 
message too ;-).

> Also, it'd be nice if you could try with an external toolchain, and
> explain that in the commit log. If you do not have an external toolchain
> available, you can generate one with Buildroot, and re-use it as an
> external toolchain.

Sadly, the only external toolchain I tried is the one from bootlin, and 
it is not compatible with a CPU which has a MMU. Considering I might 
miss some things !

JM
> 
> Regards,
> Yann E. MORIN.
> 
>> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
>> ---
>>   arch/Config.in.m68k | 9 +++++++++
>>   toolchain/Config.in | 1 +
>>   2 files changed, 10 insertions(+)
>>
>> diff --git a/arch/Config.in.m68k b/arch/Config.in.m68k
>> index 9fd22aaf1e..6aa409b272 100644
>> --- a/arch/Config.in.m68k
>> +++ b/arch/Config.in.m68k
>> @@ -33,11 +33,20 @@ config BR2_m68k_cf5208
>>   	select BR2_m68k_cf
>>   	select BR2_SOFT_FLOAT
>>   
>> +config BR2_m68k_cf54418
>> +	bool "54418"
>> +	select BR2_m68k_cf
>> +	select BR2_USE_MMU
>> +	select BR2_SOFT_FLOAT
>>   endchoice
>>   
>>   config BR2_GCC_TARGET_CPU
>>   	default "68040"		if BR2_m68k_68040
>>   	default "5208"		if BR2_m68k_cf5208
>> +	default "54455"		if BR2_m68k_cf54418
>> +
>> +config BR2_GCC_TARGET_ARCH
>> +	default "cf"            if BR2_m68k_cf54418
>>   
>>   config BR2_READELF_ARCH_NAME
>>   	default "MC68000"
>> diff --git a/toolchain/Config.in b/toolchain/Config.in
>> index ff0eb93017..ec2185cb39 100644
>> --- a/toolchain/Config.in
>> +++ b/toolchain/Config.in
>> @@ -95,6 +95,7 @@ config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
>>   	depends on !BR2_ARM_CPU_ARMV5
>>   	depends on !BR2_sparc_v8
>>   	depends on !BR2_m68k_cf5208
>> +	depends on !BR2_m68k_cf54418
>>   
>>   # GCC uses thunk functions to adjust the 'this' pointer when calling
>>   # C++ member functions in classes derived with multiple inheritance.
>> -- 
>> 2.39.2
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire
  2023-07-03 20:37     ` Jean-Michel Hautbois
@ 2023-07-04  5:24       ` Yann E. MORIN
  0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2023-07-04  5:24 UTC (permalink / raw)
  To: Jean-Michel Hautbois
  Cc: Thomas Petazzoni, Romain Naour, Giulio Benetti,
	Thomas De Schampheleire, buildroot

Jean-Michel, All,

On 2023-07-03 22:37 +0200, Jean-Michel Hautbois spake thusly:
> On 03/07/2023 20:55, Yann E. MORIN wrote:
> >On 2023-06-29 07:31 +0200, Jean-Michel Hautbois spake thusly:
> >>The m68k family ony has one Coldfire variant, namely the 5208. Add the
> >>support for the MCF54418 CPU in the configuration file.
> >As your cover-letter said, eda11417beaf (m68k: remove
> >BR2_GCC_TARGET_ARCH), setting it breaks use of external toolchains.
[--SNIP--]
> >So, your commit log should explain how/why it is safe to re-introduce
> >BR2_GCC_TARGET_ARCH. I see you only set ig for this new CPU variant, so
> >maybe that's enough of a reason.
> >
> >Still, it'd be nice to have it explained in plain letters.
> 
> OK, so get the content from the plain letter and have it in this commit
> message too ;-).

Yes, the reference to commit eda11417beaf is very important to have in
the nez commit mess is very important to have in the nez commit messagee

> >Also, it'd be nice if you could try with an external toolchain, and
> >explain that in the commit log. If you do not have an external toolchain
> >available, you can generate one with Buildroot, and re-use it as an
> >external toolchain.
> Sadly, the only external toolchain I tried is the one from bootlin, and it
> is not compatible with a CPU which has a MMU. Considering I might miss some
> things !

If there is no other pre-built toolchain, then build one with Buildroot
(with this change!), and re-user it as an external toolchain, just to be
sure that this case at least still works; see the manual [0] on how to
do that.

[0] https://buildroot.org/downloads/manual/manual.html#_advanced_usage

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-04  5:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-29  5:31 [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire Jean-Michel Hautbois
2023-06-29  5:31 ` [Buildroot] [PATCH 1/3] arch: add support for mcf54418 Colfdire Jean-Michel Hautbois
2023-07-03 18:55   ` Yann E. MORIN
2023-07-03 20:37     ` Jean-Michel Hautbois
2023-07-04  5:24       ` Yann E. MORIN
2023-07-03 19:03   ` Yann E. MORIN
2023-06-29  5:31 ` [Buildroot] [PATCH 2/3] board: add the qemu board support for mcf54418 Jean-Michel Hautbois
2023-07-03 18:42   ` Yann E. MORIN
2023-06-29  5:31 ` [Buildroot] [PATCH 3/3] configs: add support for the 54418 qemu defconfig Jean-Michel Hautbois
2023-07-03 19:01 ` [Buildroot] [PATCH 0/3] Add support for the MCF54418 Coldfire Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox