All of lore.kernel.org
 help / color / mirror / Atom feed
* About RGMII mode setting of MAC0
@ 2020-04-18 11:14 zhouyuanqing8
  2020-04-19  4:30 ` Andrew Jeffery
  0 siblings, 1 reply; 4+ messages in thread
From: zhouyuanqing8 @ 2020-04-18 11:14 UTC (permalink / raw)
  To: openbmc; +Cc: uperic, shinerocky

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

Hi,

    My name is Harley, I am currently developing an openbmc project based on the AST2500 chip. There are a few questions that need to be consulted. Please help me to answer them. Thank you very much!

    1、About RGMII mode setting of MAC0
    The current openbmc project and uboot code support 2 modes: MAC0 uses NCSI, MAC2 uses RGMII, but my board uses MAC0 RGMII. How can I simply configure this to complete this work, or do I have to modify aspeednic.c and add the new patch file under the directory meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files ?

    2、There are lot of recipes under directory meta-phosphor, How does bitbake choose specific recipes? I read the manual of bitbake and the project of openbmc, and I didn't find a way to choose. openbmc has many recipes, we can't use them all。

    3、There are many common recipes under openbmc / meta-phosphor, is there any documentation about the architecture and detailed implementation principles of each recipe? For example, chassis power control.


Harley


[-- Attachment #2: Type: text/html, Size: 4896 bytes --]

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

* Re: About RGMII mode setting of MAC0
  2020-04-18 11:14 About RGMII mode setting of MAC0 zhouyuanqing8
@ 2020-04-19  4:30 ` Andrew Jeffery
  2020-04-19 12:41   ` 回复: " zhouyuanqing8
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Jeffery @ 2020-04-19  4:30 UTC (permalink / raw)
  To: zhouyuanqing8, openbmc; +Cc: uperic, shinerocky

Hi Harley

On Sat, 18 Apr 2020, at 20:44, zhouyuanqing8@outlook.com wrote:
>  
>  Hi, 
> 
>  My name is Harley, I am currently developing an openbmc project based 
> on the AST2500 chip. There are a few questions that need to be 
> consulted. Please help me to answer them. Thank you very much!
> 
>  1、About RGMII mode setting of MAC0
>  The current openbmc project and uboot code support 2 modes: MAC0 uses 
> NCSI, MAC2 uses RGMII, but my board uses MAC0 RGMII. How can I simply 
> configure this to complete this work, or do I have to modify 
> aspeednic.c and add the new patch file under the directory 
> meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files ?

The way to select NCSI vs PHY is via the u-boot config files. Here are some
examples of different platforms selecting between different configs:

```
$ git grep 'UBOOT_MACHINE =' | head
meta-aspeed/conf/machine/evb-ast2500.conf:UBOOT_MACHINE = "ast_g5_phy_config"
meta-aspeed/conf/machine/evb-ast2600.conf:UBOOT_MACHINE = "ast2600_openbmc_defconfig"
meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf/machine/evb-ast2500.conf:UBOOT_MACHINE = "ast_g5_phy_config"
meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf:UBOOT_MACHINE = "zynq_zc702_config"
meta-facebook/meta-tiogapass/conf/machine/tiogapass.conf:UBOOT_MACHINE = "ast_g5_ncsi_config"
meta-facebook/meta-yosemitev2/conf/machine/yosemitev2.conf:UBOOT_MACHINE = "ast_g5_ncsi_config"
```

Essentially, you want to configure your platform (i.e. in ${MACHINE}.conf) with:

```
UBOOT_MACHINE = "ast_g5_phy_config"
```

> 
>  2、There are lot of recipes under  directory meta-phosphor, How does 
> bitbake choose specific recipes? I read the manual of bitbake and the 
> project of openbmc, and I didn't find a way to choose. openbmc has many 
> recipes, we can't use them all。

This is handled by variously by packagegroups, DISTRO_FEATURES,
MACHINE_FEATURES and IMAGE_INSTALL. Additionally if we look at
e.g. meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf, we find:

```
require conf/machine/include/ast2500.inc
require conf/machine/include/obmc-bsp-common.inc
require conf/machine/include/openpower.inc
require conf/machine/include/p9.inc
```

If we drill down through these files we find things like
meta-aspeed/conf/machine/include/aspeed.inc:

MACHINE_EXTRA_RRECOMMENDS += "udev-aspeed-vuart udev-aspeed-mtd-partitions"

So if recommended packages are to be installed, then these two packages
will be installed on ASPEED-based images.

The hierarchy of `require` directives helps build up the set of packages to be
installed in the image via at least the variables I mentioned above.

> 
>  3、There are many common recipes under openbmc / meta-phosphor, is 
> there any documentation about the architecture and detailed 
> implementation principles of each recipe? For example, chassis power 
> control.

Less so documentation of the recipes themselves, but you'll find design
discussions, cheatsheets and guides in the docs repository:

https://github.com/openbmc/docs/

Hope that helps.

Andrew

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

* 回复: About RGMII mode setting of MAC0
  2020-04-19  4:30 ` Andrew Jeffery
@ 2020-04-19 12:41   ` zhouyuanqing8
  2020-04-19 12:52     ` Andrew Jeffery
  0 siblings, 1 reply; 4+ messages in thread
From: zhouyuanqing8 @ 2020-04-19 12:41 UTC (permalink / raw)
  To: Andrew Jeffery, openbmc; +Cc: uperic, shinerocky

[-- Attachment #1: Type: text/plain, Size: 4105 bytes --]

Hi Andrew,

    Thank you very much for your guidance!

    I have modified the ${MACHINE}.conf file and recompiled u-boot,I will debug it on the board tomorrow.

    According to your guidance, I found the correspondence between the recipes specified in the ${MACHINE}.conf file and the pn-buildlist.

    In the compilation directory of obmc-op-control-power,as follows:

    [work/arm1176jzs-openbmc-linux-gnueabi/obmc-op-control-power/1.0+gitAUTOINC+1146f8c6e5-r1/image/usr/sbin]$ ls
    pgood_wait  power_control.exe

    The .exe file should be the executable file of windows, how can it appear in the linux system?

________________________________
发件人: Andrew Jeffery <andrew@aj.id.au>
发送时间: 2020年4月19日 12:30
收件人: zhouyuanqing8@outlook.com <zhouyuanqing8@outlook.com>; openbmc@lists.ozlabs.org <openbmc@lists.ozlabs.org>
抄送: uperic@163.com <uperic@163.com>; shinerocky@yahoo.com <shinerocky@yahoo.com>
主题: Re: About RGMII mode setting of MAC0

Hi Harley

On Sat, 18 Apr 2020, at 20:44, zhouyuanqing8@outlook.com wrote:
>
>  Hi,
>
>  My name is Harley, I am currently developing an openbmc project based
> on the AST2500 chip. There are a few questions that need to be
> consulted. Please help me to answer them. Thank you very much!
>
>  1、About RGMII mode setting of MAC0
>  The current openbmc project and uboot code support 2 modes: MAC0 uses
> NCSI, MAC2 uses RGMII, but my board uses MAC0 RGMII. How can I simply
> configure this to complete this work, or do I have to modify
> aspeednic.c and add the new patch file under the directory
> meta-phosphor/aspeed-layer/recipes-bsp/u-boot/files ?

The way to select NCSI vs PHY is via the u-boot config files. Here are some
examples of different platforms selecting between different configs:

```
$ git grep 'UBOOT_MACHINE =' | head
meta-aspeed/conf/machine/evb-ast2500.conf:UBOOT_MACHINE = "ast_g5_phy_config"
meta-aspeed/conf/machine/evb-ast2600.conf:UBOOT_MACHINE = "ast2600_openbmc_defconfig"
meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf/machine/evb-ast2500.conf:UBOOT_MACHINE = "ast_g5_phy_config"
meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf:UBOOT_MACHINE = "zynq_zc702_config"
meta-facebook/meta-tiogapass/conf/machine/tiogapass.conf:UBOOT_MACHINE = "ast_g5_ncsi_config"
meta-facebook/meta-yosemitev2/conf/machine/yosemitev2.conf:UBOOT_MACHINE = "ast_g5_ncsi_config"
```

Essentially, you want to configure your platform (i.e. in ${MACHINE}.conf) with:

```
UBOOT_MACHINE = "ast_g5_phy_config"
```

>
>  2、There are lot of recipes under  directory meta-phosphor, How does
> bitbake choose specific recipes? I read the manual of bitbake and the
> project of openbmc, and I didn't find a way to choose. openbmc has many
> recipes, we can't use them all。

This is handled by variously by packagegroups, DISTRO_FEATURES,
MACHINE_FEATURES and IMAGE_INSTALL. Additionally if we look at
e.g. meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf, we find:

```
require conf/machine/include/ast2500.inc
require conf/machine/include/obmc-bsp-common.inc
require conf/machine/include/openpower.inc
require conf/machine/include/p9.inc
```

If we drill down through these files we find things like
meta-aspeed/conf/machine/include/aspeed.inc:

MACHINE_EXTRA_RRECOMMENDS += "udev-aspeed-vuart udev-aspeed-mtd-partitions"

So if recommended packages are to be installed, then these two packages
will be installed on ASPEED-based images.

The hierarchy of `require` directives helps build up the set of packages to be
installed in the image via at least the variables I mentioned above.

>
>  3、There are many common recipes under openbmc / meta-phosphor, is
> there any documentation about the architecture and detailed
> implementation principles of each recipe? For example, chassis power
> control.

Less so documentation of the recipes themselves, but you'll find design
discussions, cheatsheets and guides in the docs repository:

https://github.com/openbmc/docs/

Hope that helps.

Andrew

[-- Attachment #2: Type: text/html, Size: 11860 bytes --]

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

* Re: About RGMII mode setting of MAC0
  2020-04-19 12:41   ` 回复: " zhouyuanqing8
@ 2020-04-19 12:52     ` Andrew Jeffery
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2020-04-19 12:52 UTC (permalink / raw)
  To: zhouyuanqing8, openbmc; +Cc: uperic, shinerocky



On Sun, 19 Apr 2020, at 22:11, zhouyuanqing8@outlook.com wrote:
>  Hi Andrew, 
> 
>  Thank you very much for your guidance!
> 
>  I have modified the  ${MACHINE}.conf file and recompiled u-boot,I will 
> debug it on the board tomorrow.
> 
>  According to your guidance, I found the correspondence between the 
> recipes specified in the  ${MACHINE}.conf file and the pn-buildlist.
> 
>  In the compilation directory of obmc-op-control-power,as follows:
> 
>  
> [work/arm1176jzs-openbmc-linux-gnueabi/obmc-op-control-power/1.0+gitAUTOINC+1146f8c6e5-r1/image/usr/sbin]$ ls 
>  pgood_wait power_control.exe
> 
>  The .exe file should be the executable file of windows, how can it 
> appear in the linux system?

So the rumour is one of the original OpenBMC devs was a bit lazy and
wanted an easy way to copy binaries onto the BMC. By tacking a '.exe'
suffix onto the executables he could run:

scp *.exe root@bmc:/usr/bin/

The binary itself is still an ARM ELF and not a PE/COFF. There's no harm
aside from looking bizarre. Having said that someone should fix it,
because everyone asks this question. Perhaps something to add to the
"gardening" tasks.

Andrew

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

end of thread, other threads:[~2020-04-19 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 11:14 About RGMII mode setting of MAC0 zhouyuanqing8
2020-04-19  4:30 ` Andrew Jeffery
2020-04-19 12:41   ` 回复: " zhouyuanqing8
2020-04-19 12:52     ` Andrew Jeffery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.