diff mbox

[U-Boot,3/7] arm: socfpga: update arria5 socdk default environment

Message ID 1485019919-1926-3-git-send-email-dwesterg@gmail.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Dalon Westergreen Jan. 21, 2017, 5:31 p.m. UTC
From: Dalon Westergreen <dalon.westergreen@intel.com>

The default values for CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
and CONFIG_SYS_MMCSD_FS_OS_PARTITION have changed and as
as result the default uboot environment for this board
needs updating.  This sets the default envirnment to
use the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION and
CONFIG_SYS_MMCSD_FS_OS_PARTITION configs for the boot
and os partitions.

Also set the default fdtimage value to match the
devicetree name in the linux kernel for this board.

Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
---
 include/configs/socfpga_arria5_socdk.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Marek Vasut Jan. 21, 2017, 7:29 p.m. UTC | #1
On 01/21/2017 06:31 PM, Dalon Westergreen wrote:
> From: Dalon Westergreen <dalon.westergreen@intel.com>
> 
> The default values for CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
> and CONFIG_SYS_MMCSD_FS_OS_PARTITION have changed and as
> as result the default uboot environment for this board
> needs updating.  This sets the default envirnment to
> use the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION and
> CONFIG_SYS_MMCSD_FS_OS_PARTITION configs for the boot
> and os partitions.
> 
> Also set the default fdtimage value to match the
> devicetree name in the linux kernel for this board.
> 
> Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>

Acked-by: Marek Vasut <marex@denx.de>

but please see my comment on 1/7

btw I think this is repeating too much, why don't we pull the env into
socfpga_common.h first ?

> ---
>  include/configs/socfpga_arria5_socdk.h | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h
> index 3b0b416..0a7fcd2 100644
> --- a/include/configs/socfpga_arria5_socdk.h
> +++ b/include/configs/socfpga_arria5_socdk.h
> @@ -44,15 +44,17 @@
>  		"bootm ${loadaddr} - ${fdt_addr}\0" \
>  	"bootimage=zImage\0" \
>  	"fdt_addr=100\0" \
> -	"fdtimage=socfpga.dtb\0" \
> +	"fdtimage=socfpga_arria5_socdk.dtb\0" \
>  	"bootm ${loadaddr} - ${fdt_addr}\0" \
> -	"mmcroot=/dev/mmcblk0p2\0" \
> +	"mmc_boot=" __stringify(CONFIG_SYS_MMCSD_FS_BOOT_PARTITION) "\0" \
> +	"mmc_os=" __stringify(CONFIG_SYS_MMCSD_FS_OS_PARTITION) "\0" \
> +	"mmcroot=/dev/mmcblk0p${mmc_os}\0" \
>  	"mmcboot=setenv bootargs " CONFIG_BOOTARGS \
>  		" root=${mmcroot} rw rootwait;" \
>  		"bootz ${loadaddr} - ${fdt_addr}\0" \
>  	"mmcload=mmc rescan;" \
> -		"load mmc 0:1 ${loadaddr} ${bootimage};" \
> -		"load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
> +		"load mmc 0:${mmc_boot} ${loadaddr} ${bootimage};" \
> +		"load mmc 0:${mmc_boot} ${fdt_addr} ${fdtimage}\0" \
>  	"qspiload=sf probe && mtdparts default && run ubiload\0" \
>  	"qspiboot=setenv bootargs " CONFIG_BOOTARGS \
>  		" ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\
>
Westergreen, Dalon Jan. 21, 2017, 11:04 p.m. UTC | #2
On Sat, 2017-01-21 at 20:29 +0100, Marek Vasut wrote:
> On 01/21/2017 06:31 PM, Dalon Westergreen wrote:

> > 

> > From: Dalon Westergreen <dalon.westergreen@intel.com>

> > 

> > The default values for CONFIG_SYS_MMCSD_FS_BOOT_PARTITION

> > and CONFIG_SYS_MMCSD_FS_OS_PARTITION have changed and as

> > as result the default uboot environment for this board

> > needs updating.  This sets the default envirnment to

> > use the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION and

> > CONFIG_SYS_MMCSD_FS_OS_PARTITION configs for the boot

> > and os partitions.

> > 

> > Also set the default fdtimage value to match the

> > devicetree name in the linux kernel for this board.

> > 

> > Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>

> 

> Acked-by: Marek Vasut <marex@denx.de>

> 

> but please see my comment on 1/7

> 

> btw I think this is repeating too much, why don't we pull the env into

> socfpga_common.h first ?


I'd prefer to keep the boards separate and look at
moving to disto boot.
> 

> > 

> > ---

> >  include/configs/socfpga_arria5_socdk.h | 10 ++++++----

> >  1 file changed, 6 insertions(+), 4 deletions(-)

> > 

> > diff --git a/include/configs/socfpga_arria5_socdk.h

> > b/include/configs/socfpga_arria5_socdk.h

> > index 3b0b416..0a7fcd2 100644

> > --- a/include/configs/socfpga_arria5_socdk.h

> > +++ b/include/configs/socfpga_arria5_socdk.h

> > @@ -44,15 +44,17 @@

> >  		"bootm ${loadaddr} - ${fdt_addr}\0" \

> >  	"bootimage=zImage\0" \

> >  	"fdt_addr=100\0" \

> > -	"fdtimage=socfpga.dtb\0" \

> > +	"fdtimage=socfpga_arria5_socdk.dtb\0" \

> >  	"bootm ${loadaddr} - ${fdt_addr}\0" \

> > -	"mmcroot=/dev/mmcblk0p2\0" \

> > +	"mmc_boot=" __stringify(CONFIG_SYS_MMCSD_FS_BOOT_PARTITION) "\0" \

> > +	"mmc_os=" __stringify(CONFIG_SYS_MMCSD_FS_OS_PARTITION) "\0" \

> > +	"mmcroot=/dev/mmcblk0p${mmc_os}\0" \

> >  	"mmcboot=setenv bootargs " CONFIG_BOOTARGS \

> >  		" root=${mmcroot} rw rootwait;" \

> >  		"bootz ${loadaddr} - ${fdt_addr}\0" \

> >  	"mmcload=mmc rescan;" \

> > -		"load mmc 0:1 ${loadaddr} ${bootimage};" \

> > -		"load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \

> > +		"load mmc 0:${mmc_boot} ${loadaddr} ${bootimage};" \

> > +		"load mmc 0:${mmc_boot} ${fdt_addr} ${fdtimage}\0" \

> >  	"qspiload=sf probe && mtdparts default && run ubiload\0" \

> >  	"qspiboot=setenv bootargs " CONFIG_BOOTARGS \

> >  		" ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\

> > 

> 

>
Marek Vasut Jan. 22, 2017, 12:36 a.m. UTC | #3
On 01/22/2017 12:04 AM, Westergreen, Dalon wrote:
> On Sat, 2017-01-21 at 20:29 +0100, Marek Vasut wrote:
>> On 01/21/2017 06:31 PM, Dalon Westergreen wrote:
>>>
>>> From: Dalon Westergreen <dalon.westergreen@intel.com>
>>>
>>> The default values for CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
>>> and CONFIG_SYS_MMCSD_FS_OS_PARTITION have changed and as
>>> as result the default uboot environment for this board
>>> needs updating.  This sets the default envirnment to
>>> use the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION and
>>> CONFIG_SYS_MMCSD_FS_OS_PARTITION configs for the boot
>>> and os partitions.
>>>
>>> Also set the default fdtimage value to match the
>>> devicetree name in the linux kernel for this board.
>>>
>>> Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
>>
>> Acked-by: Marek Vasut <marex@denx.de>
>>
>> but please see my comment on 1/7
>>
>> btw I think this is repeating too much, why don't we pull the env into
>> socfpga_common.h first ?
> 
> I'd prefer to keep the boards separate and look at
> moving to disto boot.

If you create common env in socfpga_common.h first and then update it,
the update will be in a single patch changing a single file. So will
then be the switch to distro bootcmd. I would prefer such course of
action over many patches doing the same thing in many files.

Given how similar (and broken) the envs are for those boards, pulling
the common env should be easy and very beneficial.
Westergreen, Dalon Jan. 22, 2017, 6:29 a.m. UTC | #4
On Sun, 2017-01-22 at 01:36 +0100, Marek Vasut wrote:
> On 01/22/2017 12:04 AM, Westergreen, Dalon wrote:

> > 

> > On Sat, 2017-01-21 at 20:29 +0100, Marek Vasut wrote:

> > > 

> > > On 01/21/2017 06:31 PM, Dalon Westergreen wrote:

> > > > 

> > > > 

> > > > From: Dalon Westergreen <dalon.westergreen@intel.com>

> > > > 

> > > > The default values for CONFIG_SYS_MMCSD_FS_BOOT_PARTITION

> > > > and CONFIG_SYS_MMCSD_FS_OS_PARTITION have changed and as

> > > > as result the default uboot environment for this board

> > > > needs updating.  This sets the default envirnment to

> > > > use the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION and

> > > > CONFIG_SYS_MMCSD_FS_OS_PARTITION configs for the boot

> > > > and os partitions.

> > > > 

> > > > Also set the default fdtimage value to match the

> > > > devicetree name in the linux kernel for this board.

> > > > 

> > > > Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>

> > > 

> > > Acked-by: Marek Vasut <marex@denx.de>

> > > 

> > > but please see my comment on 1/7

> > > 

> > > btw I think this is repeating too much, why don't we pull the env into

> > > socfpga_common.h first ?

> > 

> > I'd prefer to keep the boards separate and look at

> > moving to disto boot.

> 

> If you create common env in socfpga_common.h first and then update it,

> the update will be in a single patch changing a single file. So will

> then be the switch to distro bootcmd. I would prefer such course of

> action over many patches doing the same thing in many files.

> 

> Given how similar (and broken) the envs are for those boards, pulling

> the common env should be easy and very beneficial.

> 

Okay, agreed.  I will move all of the common env variables to 
socfpga_common.h.  I will change the new board patch to do the same.


-- 
Thanks,
Dalon
Marek Vasut Jan. 22, 2017, 2:47 p.m. UTC | #5
On 01/22/2017 07:29 AM, Westergreen, Dalon wrote:
> On Sun, 2017-01-22 at 01:36 +0100, Marek Vasut wrote:
>> On 01/22/2017 12:04 AM, Westergreen, Dalon wrote:
>>>
>>> On Sat, 2017-01-21 at 20:29 +0100, Marek Vasut wrote:
>>>>
>>>> On 01/21/2017 06:31 PM, Dalon Westergreen wrote:
>>>>>
>>>>>
>>>>> From: Dalon Westergreen <dalon.westergreen@intel.com>
>>>>>
>>>>> The default values for CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
>>>>> and CONFIG_SYS_MMCSD_FS_OS_PARTITION have changed and as
>>>>> as result the default uboot environment for this board
>>>>> needs updating.  This sets the default envirnment to
>>>>> use the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION and
>>>>> CONFIG_SYS_MMCSD_FS_OS_PARTITION configs for the boot
>>>>> and os partitions.
>>>>>
>>>>> Also set the default fdtimage value to match the
>>>>> devicetree name in the linux kernel for this board.
>>>>>
>>>>> Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
>>>>
>>>> Acked-by: Marek Vasut <marex@denx.de>
>>>>
>>>> but please see my comment on 1/7
>>>>
>>>> btw I think this is repeating too much, why don't we pull the env into
>>>> socfpga_common.h first ?
>>>
>>> I'd prefer to keep the boards separate and look at
>>> moving to disto boot.
>>
>> If you create common env in socfpga_common.h first and then update it,
>> the update will be in a single patch changing a single file. So will
>> then be the switch to distro bootcmd. I would prefer such course of
>> action over many patches doing the same thing in many files.
>>
>> Given how similar (and broken) the envs are for those boards, pulling
>> the common env should be easy and very beneficial.
>>
> Okay, agreed.  I will move all of the common env variables to 
> socfpga_common.h.  I will change the new board patch to do the same.
> 
> 
Thanks!
diff mbox

Patch

diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h
index 3b0b416..0a7fcd2 100644
--- a/include/configs/socfpga_arria5_socdk.h
+++ b/include/configs/socfpga_arria5_socdk.h
@@ -44,15 +44,17 @@ 
 		"bootm ${loadaddr} - ${fdt_addr}\0" \
 	"bootimage=zImage\0" \
 	"fdt_addr=100\0" \
-	"fdtimage=socfpga.dtb\0" \
+	"fdtimage=socfpga_arria5_socdk.dtb\0" \
 	"bootm ${loadaddr} - ${fdt_addr}\0" \
-	"mmcroot=/dev/mmcblk0p2\0" \
+	"mmc_boot=" __stringify(CONFIG_SYS_MMCSD_FS_BOOT_PARTITION) "\0" \
+	"mmc_os=" __stringify(CONFIG_SYS_MMCSD_FS_OS_PARTITION) "\0" \
+	"mmcroot=/dev/mmcblk0p${mmc_os}\0" \
 	"mmcboot=setenv bootargs " CONFIG_BOOTARGS \
 		" root=${mmcroot} rw rootwait;" \
 		"bootz ${loadaddr} - ${fdt_addr}\0" \
 	"mmcload=mmc rescan;" \
-		"load mmc 0:1 ${loadaddr} ${bootimage};" \
-		"load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
+		"load mmc 0:${mmc_boot} ${loadaddr} ${bootimage};" \
+		"load mmc 0:${mmc_boot} ${fdt_addr} ${fdtimage}\0" \
 	"qspiload=sf probe && mtdparts default && run ubiload\0" \
 	"qspiboot=setenv bootargs " CONFIG_BOOTARGS \
 		" ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\