diff mbox

[v2,1/7] arch: Add blackfin CPU choice.

Message ID 1364550643-11793-1-git-send-email-sonic.adi@gmail.com
State Changes Requested
Headers show

Commit Message

Sonic Zhang March 29, 2013, 9:50 a.m. UTC
From: Sonic Zhang <sonic.zhang@analog.com>

v2-changes:
none

v1-changes:
- is patch adds a Target CPU configuration option and uses it to select a -m
option for gcc.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
 arch/Config.in.bfin |   97 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 90 insertions(+), 7 deletions(-)

Comments

Thomas Petazzoni April 7, 2013, 8:39 p.m. UTC | #1
Dear Sonic Zhang,

Thanks for continuing the work on this!

On Fri, 29 Mar 2013 17:50:37 +0800, Sonic Zhang wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
> 
> v2-changes:
> none
> 
> v1-changes:
> - is patch adds a Target CPU configuration option and uses it to select a -m
> option for gcc.
> 
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> ---
>  arch/Config.in.bfin |   97 +++++++++++++++++++++++++++++++++++++++++++++++----
>  1 files changed, 90 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/Config.in.bfin b/arch/Config.in.bfin
> index 0b137ae..ac96620 100644
> --- a/arch/Config.in.bfin
> +++ b/arch/Config.in.bfin
> @@ -1,12 +1,65 @@
>  choice
> -	prompt "Target ABI"
> +	prompt "Target CPU"
>  	depends on BR2_bfin
> -	default BR2_BFIN_FDPIC
> -config BR2_BFIN_FDPIC
> -	bool "FDPIC"
> -config BR2_BFIN_FLAT
> -	bool "FLAT"
> -	select BR2_PREFER_STATIC_LIB

You can't just remove BR2_BFIN_FDPIC and BR2_BFIN_FLAT, they are used
in the external toolchain logic of Buildroot:

$ git grep BR2_BFIN_FDPIC .
arch/Config.in.bfin:	default BR2_BFIN_FDPIC
arch/Config.in.bfin:config BR2_BFIN_FDPIC
toolchain/toolchain-external/Config.in:	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && !BR2_BFIN_FDPIC
toolchain/toolchain-external/Config.in:	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && BR2_BFIN_FDPIC
toolchain/toolchain-external/Config.in:	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && !BR2_BFIN_FDPIC
toolchain/toolchain-external/Config.in:	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && BR2_BFIN_FDPIC
toolchain/toolchain-external/Config.in:	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && !BR2_BFIN_FDPIC
toolchain/toolchain-external/Config.in:	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BFIN_FDPIC

So, I think your patch 3/7 should be first in the series, and it should
be followed by a patch that removes BR2_BFIN_FDPIC and BR2_BFIN_FLAT
and use the new BR2_BINFMT_* symbols in the external toolchain logic.

Basically, your patch set should not break things! When you remove a
symbol, make sure it isn't used anymore.

Other than that, I'm fine with this patch adding the blackfin CPU variants.

Best regards,

Thomas
Sonic Zhang April 8, 2013, 3:28 a.m. UTC | #2
Hi Thomas,

On Mon, Apr 8, 2013 at 4:39 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Sonic Zhang,
>
> Thanks for continuing the work on this!
>
> On Fri, 29 Mar 2013 17:50:37 +0800, Sonic Zhang wrote:
>> From: Sonic Zhang <sonic.zhang@analog.com>
>>
>> v2-changes:
>> none
>>
>> v1-changes:
>> - is patch adds a Target CPU configuration option and uses it to select a -m
>> option for gcc.
>>
>> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>> ---
>>  arch/Config.in.bfin |   97 +++++++++++++++++++++++++++++++++++++++++++++++----
>>  1 files changed, 90 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/Config.in.bfin b/arch/Config.in.bfin
>> index 0b137ae..ac96620 100644
>> --- a/arch/Config.in.bfin
>> +++ b/arch/Config.in.bfin
>> @@ -1,12 +1,65 @@
>>  choice
>> -     prompt "Target ABI"
>> +     prompt "Target CPU"
>>       depends on BR2_bfin
>> -     default BR2_BFIN_FDPIC
>> -config BR2_BFIN_FDPIC
>> -     bool "FDPIC"
>> -config BR2_BFIN_FLAT
>> -     bool "FLAT"
>> -     select BR2_PREFER_STATIC_LIB
>
> You can't just remove BR2_BFIN_FDPIC and BR2_BFIN_FLAT, they are used
> in the external toolchain logic of Buildroot:
>
> $ git grep BR2_BFIN_FDPIC .
> arch/Config.in.bfin:    default BR2_BFIN_FDPIC
> arch/Config.in.bfin:config BR2_BFIN_FDPIC
> toolchain/toolchain-external/Config.in: default "bfin-uclinux"           if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && !BR2_BFIN_FDPIC
> toolchain/toolchain-external/Config.in: default "bfin-linux-uclibc"      if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && BR2_BFIN_FDPIC
> toolchain/toolchain-external/Config.in: default "bfin-uclinux"           if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && !BR2_BFIN_FDPIC
> toolchain/toolchain-external/Config.in: default "bfin-linux-uclibc"      if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && BR2_BFIN_FDPIC
> toolchain/toolchain-external/Config.in: default "bfin-uclinux"           if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && !BR2_BFIN_FDPIC
> toolchain/toolchain-external/Config.in: default "bfin-linux-uclibc"      if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BFIN_FDPIC
>
> So, I think your patch 3/7 should be first in the series, and it should
> be followed by a patch that removes BR2_BFIN_FDPIC and BR2_BFIN_FLAT
> and use the new BR2_BINFMT_* symbols in the external toolchain logic.
>

OK. I will move 3/7 ahead.

Regards,

Sonic
diff mbox

Patch

diff --git a/arch/Config.in.bfin b/arch/Config.in.bfin
index 0b137ae..ac96620 100644
--- a/arch/Config.in.bfin
+++ b/arch/Config.in.bfin
@@ -1,12 +1,65 @@ 
 choice
-	prompt "Target ABI"
+	prompt "Target CPU"
 	depends on BR2_bfin
-	default BR2_BFIN_FDPIC
-config BR2_BFIN_FDPIC
-	bool "FDPIC"
-config BR2_BFIN_FLAT
-	bool "FLAT"
-	select BR2_PREFER_STATIC_LIB
+	default BR2_bf609
+	help
+	  Specify target CPU
+config BR2_bf606
+	bool "bf606"
+config BR2_bf607
+	bool "bf607"
+config BR2_bf608
+	bool "bf608"
+config BR2_bf609
+	bool "bf609"
+config BR2_bf512
+	bool "bf512"
+config BR2_bf514
+	bool "bf514"
+config BR2_bf516
+	bool "bf516"
+config BR2_bf518
+	bool "bf518"
+config BR2_bf522
+	bool "bf522"
+config BR2_bf523
+	bool "bf523"
+config BR2_bf524
+	bool "bf524"
+config BR2_bf525
+	bool "bf525"
+config BR2_bf526
+	bool "bf526"
+config BR2_bf527
+	bool "bf527"
+config BR2_bf531
+	bool "bf531"
+config BR2_bf532
+	bool "bf532"
+config BR2_bf533
+	bool "bf533"
+config BR2_bf534
+	bool "bf534"
+config BR2_bf536
+	bool "bf536"
+config BR2_bf537
+	bool "bf537"
+config BR2_bf538
+	bool "bf538"
+config BR2_bf539
+	bool "bf539"
+config BR2_bf542
+	bool "bf542"
+config BR2_bf544
+	bool "bf544"
+config BR2_bf547
+	bool "bf547"
+config BR2_bf548
+	bool "bf548"
+config BR2_bf549
+	bool "bf549"
+config BR2_bf561
+	bool "bf561"
 endchoice
 
 config BR2_ARCH
@@ -14,3 +67,33 @@  config BR2_ARCH
 
 config BR2_ENDIAN
         default "LITTLE"
+
+config BR2_GCC_TARGET_CPU
+	default bf606		if BR2_bf606
+	default bf607		if BR2_bf607
+	default bf608		if BR2_bf608
+	default bf609		if BR2_bf609
+	default bf512		if BR2_bf512
+	default bf514		if BR2_bf514
+	default bf516		if BR2_bf516
+	default bf518		if BR2_bf518
+	default bf522		if BR2_bf522
+	default bf523		if BR2_bf523
+	default bf524		if BR2_bf524
+	default bf525		if BR2_bf525
+	default bf526		if BR2_bf526
+	default bf527		if BR2_bf527
+	default bf531		if BR2_bf531
+	default bf532		if BR2_bf532
+	default bf533		if BR2_bf533
+	default bf534		if BR2_bf534
+	default bf536		if BR2_bf536
+	default bf537		if BR2_bf537
+	default bf538		if BR2_bf538
+	default bf539		if BR2_bf539
+	default bf542		if BR2_bf542
+	default bf544		if BR2_bf544
+	default bf547		if BR2_bf547
+	default bf548		if BR2_bf548
+	default bf549		if BR2_bf549
+	default bf561		if BR2_bf561