Yocto boot beaglebone green wifi.

239 views
Skip to first unread message

phatnguy...@gmail.com

unread,
Oct 2, 2019, 7:24:17 AM10/2/19
to BeagleBoard
Hi all,
I use Yocto to create image and boot beaglebone green wifi. like this introdctuion:
https://embeddedguruji.blogspot.com/2019/04/steps-to-build-and-flash-yocto-image-on.html
After flash process, board turn down, but it's still old image. Please help thank in advance.
Step1: Create a folder for Yocto source code:
$ mkdir beagblebone_yocto && cd beagblebone_yocto

Step2: Clone the poky source code:
$ git clone -b thud git://git.yoctoproject.org/poky.git

Step3: Run the environment script to setup the Yocto Environment and create build directory
$ source poky/oe-init-build-env build

Step4: Set the MACHINE variable to 'beaglebone-yocto'
$ echo 'MACHINE = "beaglebone-yocto"' > conf/local.conf

Step5: Build the core-image-minimal image
$ bitbake core-image-minimal

After a few hours, you will find the images will be present in beaglebone_yocto/build/tmp/deploy/images/beaglebone-yocto folder

Step6: Take memory card and make two partitions using gparted:
Partition1 : Size 100 MB, fat16 (boot flag)
Partition2: Size > 2GB , ext4

Step7: Copy the files in the required partition.
$ cd beaglebone_yocto/build/tmp/deploy/images/beaglebone-yocto 
$ cp MLO-beaglebone-yocto /media/jamal/boot/MLO
$ cp u-boot.img /media/jamal/boot/u-boot.img
$ sudo tar -xf core-image-minimal-beaglebone-yocto.tar.bz2 -C /media/jamal/rootfs

Step8: Connect the Micro SD Card to the beaglebone black and to boot from MicroSD press the User Button(S2) While applying power. 


Karishma jaiswal

unread,
Feb 5, 2020, 5:56:59 AM2/5/20
to BeagleBoard
were you able to resolve your issue?

Hugo van den Brand

unread,
Feb 5, 2020, 2:04:20 PM2/5/20
to beagl...@googlegroups.com
The instructions below do not flash the onboard eMMC.
So you will need to press the button every time to force booting from the SD card. 

You probably want to use dd.


Op wo 5 feb. 2020 11:57 schreef Karishma jaiswal <karishma...@kritikalvision.ai>:
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/b51409ec-4d6f-4e8b-9437-6b1391b92c03%40googlegroups.com.

David Cherkus

unread,
Feb 5, 2020, 2:09:41 PM2/5/20
to BeagleBoard
"After flash process, board turn down, but it's still old image."

BBGW will boot from eMMC by default.


"to boot from MicroSD press the User Button(S2) While applying power"

This is important but ambiguous.

The button to push is the BOOT button near the Grove connectors and the antennas.

You must hold down BOOT, then remove USB power then re-insert USB power then release BOOT button.

BBGW System Reference Manual has the details:

A switch is provided to allow switching between the modes.

Holding the boot switch down during a removal and reapplication of power
without a microSD card inserted will force the boot source to be the USB port
and if nothing is detected on the USB client port, it will go to the serial port for
download.

Without holding the switch, the board will boot try to boot from the eMMC. If
it is empty, then it will try booting from the microSD slot, followed by the serial
port, and then the USB port.

If you hold the boot switch down during the removal and reapplication of power
to the board, and you have a microSD card inserted with a bootable image, the
board will boot from the microSD card.

NOTE: Pressing the RESET button on the board will NOT result in a change of the boot
mode. You MUST remove power and reapply power to change the boot mode. The
boot pins are sampled during power on reset from the PMIC to the processor. The
reset button on the board is a warm reset only and will not force a boot mode change.

Regards,
Dave

David Cherkus

unread,
Feb 5, 2020, 2:44:24 PM2/5/20
to BeagleBoard
--------------------------------------------------------------------------------

> Step6: Take memory card and make two partitions using gparted:
> Partition1 : Size 100 MB, fat16 (boot flag)
> Partition2: Size > 2GB , ext4

> Step7: Copy the files in the required partition.
> $ cd beaglebone_yocto/build/tmp/ deploy/images/beaglebone- yocto
> $ cp MLO-beaglebone-yocto /media/jamal/boot/MLO
> $ cp u-boot.img /media/jamal/boot/u-boot.img
> $ sudo tar -xf core-image-minimal-beaglebone- yocto.tar.bz2 -C /media/jamal/rootfs


> Step8: Connect the Micro SD Card to the beaglebone black and to boot from MicroSD press the User Button(S2) While applying power.
--------------------------------------------------------------------------------

I am not sure this is the right scheme for BBGW using new u-boot.

https://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 seems to be what is now used.

It says "Starting with u-boot: v2014.07/v2014.10/v2015.01 this will be default"

And it says:

--------------------------------------------------------------------------------
Boot Partition (omap4+ (am335x))

MLO/u-boot: dd'ed to drive:

dd if=MLO of=/dev/sdX count=1 seek=1 conv=notrunc bs=128k
dd if=u-boot.img of=/dev/sdX count=2 seek=1 conv=notrunc bs=384k

Boot:

xMb fat16/ext2 (unmounted usually shared as a usb gadget)
/uEnv.txt (priority 1) (Optional)
/boot.scr (priority 2) (Optional, For: debian-installer: flash-kernel)
/boot/boot.scr (priority 3) (Optional, For: debian-installer: flash-kernel)
--------------------------------------------------------------------------------

This is pretty cryptic but BBGW is using AM335x.

I did make this scheme work to some degree with my yocto build but not completely.

If I do get it to work completely I can send instructions.

Or maybe someone else can send instructions or clarifications.

I never had success with BBGW and FAT16 boot partition on sdcard.

I purchased mine in 2018 and immediately updated its software so I think it has never had the FAT16 boot partition on it.

Regards,
Dave


David Cherkus

unread,
Feb 5, 2020, 6:20:39 PM2/5/20
to BeagleBoard
My observations are if you hook up the debug console port and boot
from eMMC (i.e. not holding BOOT button) you will see something like:

U-Boot SPL 2019.04-00002-gbb4af0f50f (Jul 08 2019 - 11:44:39 -0500)
Trying to boot from MMC2

and if you do boot from sdcard by holding the BOOT button then
removing and inserting the USB/power cable you see:

U-Boot SPL 2020.01-rc3 (Nov 19 2019 - 02:31:49 +0000)
Trying to boot from MMC1

My observation is that you will see:

Loading Environment from FAT...

if your u-boot expects to have a FAT file system for boot, and:

Loading Environment from EXT4...

if your u-boot expects to have an EXT4 file system for boot.

It seems the yocto u-boot still expects a FAT file system for boot,
whereas the debian/beaglebone.org one expects EXT4.

I suppose I could confirm this by reformatting my sdcard with
FAT file system for boot.

I am able to boot my yocto build with one EXT4 partition on sdcard
by interrupting u-boot at startup and doing the following in u-boot:

setenv loadzimage "load mmc 0:1 ${loadaddr} /boot/zImage"
setenv loadftd "load mmc 0:1 ${fdtaddr} /boot/am335x-boneblack.dtb"
setenv bootargs "console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait fixrtc ${optargs}"
run loadzimage
run loadftd
bootz ${loadaddr} - ${fdtaddr}

Comments?
Dave

David Cherkus

unread,
Feb 7, 2020, 6:23:42 PM2/7/20
to BeagleBoard
> It seems the yocto u-boot still expects a FAT file system for boot,
> whereas the debian/beaglebone.org one expects EXT4.
>
> I suppose I could confirm this by reformatting my sdcard with
> FAT file system for boot.

I did this by doing lab 1 in https://bootlin.com/doc/training/yocto/

It appears the u-boot in yocto still expects the fat file system.

Or maybe there are fall back paths where either can work?

Bottom line is you should be able to get yocto to work if you follow the slides/pdfs in that directory.

Feel free to ask any questions since I was just able to do lab 1 with no issues on BBGW.

Thanks,
Dave

Hugo van den Brand

unread,
Feb 8, 2020, 10:07:25 AM2/8/20
to beagl...@googlegroups.com

Op za 8 feb. 2020 00:23 schreef 'David Cherkus' via BeagleBoard <beagl...@googlegroups.com>:
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

David Cherkus

unread,
Feb 8, 2020, 10:35:32 AM2/8/20
to beagl...@googlegroups.com
Thanks, Hugo, I think you are right, both are probably supported and the difference probably is in how u-boot is configured.

Thanks for the link, it is very helpful.

Regards,
Dave
Reply all
Reply to author
Forward
0 new messages