All of lore.kernel.org
 help / color / mirror / Atom feed
* meta-ti setup suggestions for beaglebone (SoC AM335x)
@ 2020-05-06 11:08 Luca
  2020-05-07  9:50 ` yoc.dev
  0 siblings, 1 reply; 6+ messages in thread
From: Luca @ 2020-05-06 11:08 UTC (permalink / raw)
  To: meta-ti

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

Hi all,

as others before me, I am trying to use poky and meta-ti to customize Yocto to run on the Beaglebone Black (and Green).
The reason to use the meta-ti layer is to get the drivers for the PowerVR GPU and for the PRUs.

At the moment I have used meta-ti zeus branch and I have been able to compile both core-image-minimal and core-image-base.
Both compilations have been successful but when I try to load the generated wic.xz images in the beaglebone through the MMC the board does not boot.
The same images using meta-yocto-bsp (instead of meta-ti) and setting the machine to beaglebone-yocto are booting fine.
Therefore, before going further with the tests, I have decided to check if the initial assumptions/the current setup are correct.

I have seen a few threads here in the mailing list with a similar topic, the last ones being:

* [meta-ti] Getting Started with meta-ti "rocko" and beaglebone black (BBB) ( https://www.yoctoproject.org/pipermail/meta-ti/2018-August/011034.html )
* [meta-ti] Poky and meta-ti advice for Beaglebone Black ( https://www.yoctoproject.org/pipermail/meta-ti/2018-September/011179.html )
* [meta-ti] Building for AM335x with meta-ti and meta-qt5 ( https://www.yoctoproject.org/pipermail/meta-ti/2019-July/012020.html )

There is a nice presentation too Working with meta-ti - Yocto Project Wiki ( https://wiki.yoctoproject.org/wiki/images/b/b3/Meta-ti.pdf ) , but it seems to be outdated.

Even considering the documentation above I still have a few doubts:
* I don't get which is the branch expected to work for every SOC (possibly different depending on the SOC). At the moment I am interested in the amx335 SOC used for both the beaglebone black and green. Is there in the repository a note in a readme explaining the combinations that are expected to work?
* which are the differences between the machines am335-evm and beaglebone? "Only" the KERNEL_DEVICETREE setup? Are the differences summarized somewhere?
* given that I can test the resulting distro on a beaglebone green should I try to set the machine to beaglebone or to am335-evm and customize the uEnv.txt? Which is the suggested/supported approach? I see that in the past it has been suggested to use the am335-evm, but probably that suggestion is outdated now.
* when using meta-ti, is it suggested to add the meta-yocto-bsp layer in the bblayers.conf or not? There are threads and patches (added and reverted) about that, but I am not sue about the updated verdict
As explained above I am not sure witch branch or tag is expected to work with MACHINE=beaglebone.
I am currently using:

* meta-ti: branch zeus, commit 1dd4558
* poky: branch zeus, commit ca9cc50
* meta-openembedded: branch zeus, commit 44e458f

Anyway here you have the two boot log:
* the first one is ok and has been obtained using meta-yocto-bsp
* the second one is giving the error "## Error: "bootcmd_nand0" not defined" followed by others
Log 1
U-Boot 2019.07 (May 05 2020 - 16:35:11 +0000)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

<ethaddr> not set. Validating first E-fuse MAC
Net:   eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is          de:ad:be:ef:00:01
Address in environment is  c8:fd:19:c6:c2:93
, eth1: usb_ether
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
119 bytes read in 2 ms (57.6 KiB/s)
1:      Yocto
Retrieving file: /zImage
4755816 bytes read in 305 ms (14.9 MiB/s)
append: root=PARTUUID=00033363-02 rootwait console=ttyS0,115200
Retrieving file: /am335x-bonegreen.dtb
56060 bytes read in 6 ms (8.9 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffef000, end 8ffffafb ... OK

Log 2

U-Boot 2020.01-gae8ceb7b6e (May 04 2020 - 18:55:25 +0000)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
WDT:   Started with servicing (60s timeout)
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

<ethaddr> not set. Validating first E-fuse MAC
Net:   eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is          de:ad:be:ef:00:01
Address in environment is  c8:fd:19:c6:c2:93
, eth1: usb_ether
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc1(part 0) is current device
** No partition table - mmc 1 **
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
** No partition table - mmc 1 **
## Error: "bootcmd_nand0" not defined
starting USB...
Bus usb@47401800: Port not available.
ethernet@4a100000 Waiting for PHY auto negotiation to complete.................................................................................. done
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.0.16 (900 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-c8-fd-19-c6-c2-91
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A80010
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A8001
link up on port 0, speed 100, full duplex

Any suggestion would be very much appreciated.

Luca

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

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

* Re: meta-ti setup suggestions for beaglebone (SoC AM335x)
  2020-05-06 11:08 meta-ti setup suggestions for beaglebone (SoC AM335x) Luca
@ 2020-05-07  9:50 ` yoc.dev
  2020-05-07 10:17   ` yoc.dev
  0 siblings, 1 reply; 6+ messages in thread
From: yoc.dev @ 2020-05-07  9:50 UTC (permalink / raw)
  To: meta-ti

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

Hi Luca,

In the meta-ti repository this commit 7646efc16a2b0aeafb6790a7d18b8fa2ca4547ad added a wks script which by default creates an SD card image with 3 partitions.

In the TI uboot code you will see that when booting from the MMC uboot expects there to be two partitions not three, hence your error.

include/configs/am335x_evm.h

lines 53 - 57

#define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
"bootcmd_" #devtypel #instance "=" \
"setenv mmcdev " #instance"; "\
"setenv bootpart " #instance":2 ; "\
"run mmcboot\0"

To fix this you will want to include the following line in your local.conf (or custom bsp layer):

WKS_FILE ?= "sdimage-bootpart.wks"

This will create a wic image which only has two partitions and you will be able to boot from the MMC successfully. For reference the sdimage-bootpart.wks is part of poky.

To be clear I had this working using the meta-ti layer - with the change above and by setting the MACHINE variable to beaglebone.

Hope this helps!

Charlie

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

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

* Re: meta-ti setup suggestions for beaglebone (SoC AM335x)
  2020-05-07  9:50 ` yoc.dev
@ 2020-05-07 10:17   ` yoc.dev
  2020-05-07 18:59     ` Luca
  0 siblings, 1 reply; 6+ messages in thread
From: yoc.dev @ 2020-05-07 10:17 UTC (permalink / raw)
  To: meta-ti

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

Dont worry about the above - its been fixed on meta-ti master a few hours ago.

https://lists.yoctoproject.org/g/meta-ti/message/12916

Charlie

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

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

* Re: meta-ti setup suggestions for beaglebone (SoC AM335x)
  2020-05-07 10:17   ` yoc.dev
@ 2020-05-07 18:59     ` Luca
  2020-05-09  2:32       ` [meta-ti] " Denys Dmytriyenko
  0 siblings, 1 reply; 6+ messages in thread
From: Luca @ 2020-05-07 18:59 UTC (permalink / raw)
  To: meta-ti

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

Thanks Charlie,

now it is booting fine and from your explanation I can also try to understand the reason behind the error I was getting.

Actually both the commits you pointed out had already caught my attention because I was trying to get a first bootable setup before using a custom a .wic.in file.
Considering that, I think my doubts about which branch or tag is stable are somehow still valid.

May I ask you if you can at least partially solve the doubts that I expressed?
* suggested/tested branch, tag or commit for beaglebone and amx335 SOC? Maybe it would be useful to know that for all the supported SOCs.
* which are the differences between the machines am335-evm and beaglebone? Since beaglebone uses am335 SOC there should be only a "reduced amount of differences" right?
Maybe I am wrong, but I think a short explanation in the main README, at least for the first question, would save a few hours for newbies like me and possibly a few minutes even to experienced users. Maybe the explanation is already in the right place and I simply don't know where I have to look for it.

Regards
Luca

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

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

* Re: [meta-ti] meta-ti setup suggestions for beaglebone (SoC AM335x)
  2020-05-07 18:59     ` Luca
@ 2020-05-09  2:32       ` Denys Dmytriyenko
  2020-05-11 14:48         ` Luca
  0 siblings, 1 reply; 6+ messages in thread
From: Denys Dmytriyenko @ 2020-05-09  2:32 UTC (permalink / raw)
  To: Luca; +Cc: meta-ti

Hi, Luca,

To answer your questions:

* It is always recommended to use so-called stable branches, that correspond 
to Yocto release names - dunfell, zeus, etc. It is expected that master can 
be broken at times due to active development. Also, we do extensive internal 
testing on those stable branches and apply tags when such testing completes 
successfully - i.e. internal releases. You can see those tags in the repo - 
ti2020.01.00, ti2020.00.04, etc. Between those tags it is unlikely, but still 
possible something may get inadvertently broken. Which is what happened for 
you here, unfortunately - we were migrating from zeus to dunfell between 
ti2020.00.04 and ti2020.01.00. If you are new and don't know where to start, 
I'd recommend picking the latest release tag in the series - the highest third 
number or no number at all, like ti2020.00=ti2020.00.04. As you can see, we 
just started with ti2020.01.xx series with the first .00 tag in dunfell. Other 
than that, we follow the standard Yocto Project and Open Source practices.

* There is very little difference between am335x-evm and beaglebone machines 
in meta-ti. You can think of it as beaglebone being a leaner variant of 
am335x-evm. The actual differences can be seen in the config files:
http://arago-project.org/git/?p=meta-ti.git;a=blob;f=conf/machine/am335x-evm.conf;hb=HEAD
http://arago-project.org/git/?p=meta-ti.git;a=blob;f=conf/machine/beaglebone.conf;hb=HEAD
They both build on top of a common ti33x.inc file that specifies the entire 
SoC family. From there, beaglebone uses fewer DTBs, ttyS0 as console, no 
built-in LCD/touchscreen and no UBI configuration. At some point it used own 
U-boot defconfig, but that got deprecated. So, in other words, beaglebone is 
a subset of am335x-evm machine. It is exactly the same BSP (kernel, u-boot, 
FWs, etc.) for both of them, with just minor packaging differences.

-- 
Denys


On Thu, May 07, 2020 at 11:59:15AM -0700, Luca wrote:
> Thanks Charlie,
> 
> now it is booting fine and from your explanation I can also try to 
> understand the reason behind the error I was getting.
> 
> Actually both the commits you pointed out had already caught my attention 
> because I was trying to get a first bootable setup before using a custom a 
> .wic.in file.
> Considering that, I think my doubts about which branch or tag is stable are 
> somehow still valid.
> 
> May I ask you if you can at least partially solve the doubts that I 
> expressed?
> * suggested/tested branch, tag or commit for beaglebone and amx335 SOC? 
> Maybe it would be useful to know that for all the supported SOCs.
> * which are the differences between the machines am335-evm and beaglebone? 
> Since beaglebone uses am335 SOC there should be only a "reduced amount of 
> differences" right?
> Maybe I am wrong, but I think a short explanation in the main README, at 
> least for the first question, would save a few hours for newbies like me and 
> possibly a few minutes even to experienced users. Maybe the explanation is 
> already in the right place and I simply don't know where I have to look for 
> it.
> 
> Regards
> Luca

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

* Re: meta-ti setup suggestions for beaglebone (SoC AM335x)
  2020-05-09  2:32       ` [meta-ti] " Denys Dmytriyenko
@ 2020-05-11 14:48         ` Luca
  0 siblings, 0 replies; 6+ messages in thread
From: Luca @ 2020-05-11 14:48 UTC (permalink / raw)
  To: meta-ti

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

Hi Denys,

thanks a lot for your detailed explanation.

I really appreciate the effort that the dev team puts on meta-ti.
I suppose that an excerpt from your detailed explanation added to the README would be beneficial.

Regards
Luca

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

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

end of thread, other threads:[~2020-05-11 14:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 11:08 meta-ti setup suggestions for beaglebone (SoC AM335x) Luca
2020-05-07  9:50 ` yoc.dev
2020-05-07 10:17   ` yoc.dev
2020-05-07 18:59     ` Luca
2020-05-09  2:32       ` [meta-ti] " Denys Dmytriyenko
2020-05-11 14:48         ` Luca

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.