Changes between Initial Version and Version 1 of Boards/Beagle Board


Ignore:
Timestamp:
Oct 3, 2017, 4:08:44 AM (23 months ago)
Author:
Chris Johns
Comment:

Initial page.

Legend:

Unmodified
Added
Removed
Modified
  • Boards/Beagle Board

    v1 v1  
     1= Beagle Board Support =
     2
     3[[TOC(Boards/Beagle Board, depth=4)]]
     4
     5The page details how to run RTEMS on a [http://http://beagleboard.org/ Beagle Board] family of boards. The Beagle Boards are supported by [http://www.denx.de/wiki/U-Boot U-Boot] and [http://www.denx.de/wiki/U-Boot U-Boot] can boot RTEMS. Please refer to the U-Boot documentation and the internet for documentation and example on using U-Boot.
     6
     7This page provide details on updating a Beaglebone Black board. Please update and support for other Beagle Boards.
     8
     9= Consoles =
     10
     11RTEMS uses the console for a booting and as the primary interface. These are UARTs on the Beagle Boards. We recommend you have a working console and the default Linux images from the Beagle Board project use the UART consoles when booting and initialising.
     12
     13== Beagleboard-MX Console ==
     14
     15The Beagleboard-MX has a standard female DB9 RS-232 connector. You will need an RS-232 to USB converter.
     16
     17== Beagle Bone Console ==
     18
     19The Beaglebone Black supports the standard 6pin inline UART TTL connector. You can purchase a TTL to USB cable that plugs onto this header. Please refer to the board's user manual for the details of the cable and how to connect it.
     20
     21= Boot Loader =
     22
     23U-Boot is the boot loader for the Beagle Board family. The following is for each board in the family.
     24
     25== Beaglebone Black ==
     26
     27The Beaglebone Black has a TI Sitara AM3358BZCZ100 processor and it configured to boot from eMMC memory. The factory ships the board with U-Boot, Linux kernel, and a full file system in the eMMC memory. You need to update the eMMC image to latest for the best results.
     28
     29To control the boot we need a recent U-Boot and a suitable `uEnv.txt` file on the SD card. The following procedure will create a suitable SD card image with a current U-Boot and `uEnv.txt` file.
     30
     31To boot using TFTP the `uEnv.txt` contents is:
     32
     33{{{
     34bootfile=bbb/rtems.img
     35loadaddr=0x82000000
     36uenvcmd=echo Booting RTEMS BBB from net; set autoload no; dhcp; set serverip 10.10.5.2; set tftpdstp 55567; tftpboot bbb/rtems.img; bootm; reset;
     37}}}
     38
     39The server IP address is the host machine running the `rtems-test` command.
     40
     41=== Updating the eMMC ===
     42
     43We recommend you upgrade this software to the latest found at https://rcn-ee.net/rootfs/bb.org/testing/2017-09-24/stretch-lxqt-2gb/. At the time of writing this the latest 2G image is [https://rcn-ee.net/rootfs/bb.org/testing/2017-09-24/stretch-lxqt-2gb/BBB-blank-debian-9.1-lxqt-2gb-armhf-2017-09-24-2gb.img.xz 2G Beaglebone Black Debian 9.1 2017-09-24]. Make sure you get a 2G image as this is the size of the eMMC on the a RevB Beaglebone Black. You need to use a 2G or great SD card.
     44
     45{{{
     46$ xz -d bone-debian-9.1-lxqt-2gb-armhf-2017-09-24-2gb.img.xz
     47$ dd if=bone-debian-9.1-lxqt-2gb-armhf-2017-09-24-2gb.img of=/dev/da0 bs=1m
     481700+0 records in
     491700+0 records out
     501782579200 bytes transferred in 180.028664 secs (9901641 bytes/sec)
     51}}}
     52
     53Place the SD card into the Beaglebone Black board and hold the Boot switch and turn the power on. The Boot switch is `S2` and is located at the same end of the board as the SD card, HDMI and USB master connectors. Hold the Boot button on until the leds all turn on. This takes a few seconds. If booting from the SD card the console will start showing something like:
     54
     55{{{
     56U-Boot SPL 2017.09-00003-g11d92ba68a (Sep 21 2017 - 10:40:17)
     57Trying to boot from MMC1
     58
     59
     60U-Boot 2017.09-00003-g11d92ba68a (Sep 21 2017 - 10:40:17 -0500), Build: jenkins-github_Bootloader-Builder-602
     61
     62CPU  : AM335X-GP rev 2.1
     63I2C:   ready
     64DRAM:  512 MiB
     65No match for driver 'omap_hsmmc'
     66No match for driver 'omap_hsmmc'
     67Some drivers were not found
     68Reset Source: Power-on reset has occurred.
     69MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
     70Using default environment
     71
     72Board: BeagleBone Black
     73}}}
     74
     75Once the system has booted you will have a Beagebone Black login:
     76
     77{{{
     78Debian GNU/Linux 9 beaglebone ttyS0
     79
     80BeagleBoard.org Debian Image 2017-09-24
     81
     82Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
     83
     84default username:password is [debian:temppwd]
     85
     86beaglebone login:
     87}}}
     88
     89Login as the default user using the provided password and then change to the `/boot` directory and open as root using `sudo` the u-Boot's user environment file (`uEnv.txt`) to edit, in this case using `vi`:
     90
     91{{{
     92debian@beaglebone:~$ cd /boot
     93debian@beaglebone:/boot$ sudo vi uEnv.txt
     94}}}
     95
     96At the end of the file is the Generic eMMC Flasher support. Uncomment the line to have:
     97
     98{{{
     99##enable Generic eMMC Flasher:
     100##make sure, these tools are installed: dosfstools rsync
     101cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
     102}}}
     103
     104Save the file and shutdown:
     105
     106{{{
     107debian@beaglebone:/boot$ sudo shutdown -h now
     108[  529.915200] reboot: Power down
     109}}}
     110
     111Remove the power from the board and again apply power while pressing the Boot switch as you did before. This time the console will show the eMMC quit flasher procedure:
     112
     113{{{
     114************************************************************
     115==> Loaded
     116
     117----------------------------------------
     118
     119================================================================================
     120Writing bootloader to [/dev/mmcblk1]
     121----------------------------------------
     122==> Figuring out options for SPL U-Boot copy ...
     123===> Will use : count=1 seek=1 conv=notrunc bs=128k
     124==> Figuring out options for U-Boot copy ...
     125===> Will use : count=2 seek=1 conv=notrunc bs=384k
     126==> Copying SPL U-Boot with dd if=/opt/backup/uboot/MLO of=/dev/mmcblk1 count=1 seek=1 conv=notrunc bs=128k
     127------------------------------------------------------------
     1280+1 records in
     1290+1 records out
     13075080 bytes (75 kB, 73 KiB) copied, 0.0239506 s, 3.1 MB/s
     131------------------------------------------------------------
     132==> Copying U-Boot with dd if=/opt/backup/uboot/u-boot.img of=/dev/mmcblk1 count=2 seek=1 conv=notrunc bs=384k
     133------------------------------------------------------------
     1341+1 records in
     1351+1 records out
     136397640 bytes (398 kB, 388 KiB) copied, 0.188179 s, 2.1 MB/s
     137------------------------------------------------------------
     138Writing bootloader completed
     139================================================================================
     140
     141================================================================================
     142Partitionning /dev/mmcblk1
     143----------------------------------------
     144sfdisk: [2.26.x or greater]
     145==> sfdisk parameters:
     146sfdisk: [sfdisk from util-linux 2.29.2]
     147sfdisk: [sfdisk --force /dev/mmcblk1]
     148sfdisk: [4M,,L,*]
     149==> Partitionning
     150------------------------------------------------------------
     151Checking that no-one is using this disk right now ... OK
     152
     153Disk /dev/mmcblk1: 1.8 GiB, 1920991232 bytes, 3751936 sectors
     154Units: sectors of 1 * 512 = 512 bytes
     155Sector size (logical/physical): 512 bytes / 512 bytes
     156I/O size (minimum/optimal): 512 bytes / 512 bytes
     157
     158>>> Created a new DOS disklabel with disk identifier 0xb759f922.
     159/dev/mmcblk1p1: Created a new partition 1 of type 'Linux' and of size 1.8 GiB.
     160/dev/mmcblk1p2: Done.
     161
     162New situation:
     163
     164Device         Boot Start     End Sectors  Size Id Type
     165/dev/mmcblk1p1 *     8192 3751935 3743744  1.8G 8[   63.419843]  mmcblk1: p1
     1663 Linux
     167
     168The partition table has been altered.
     169Calling ioctl() to re-read partition table.
     170Syncing disks.
     171------------------------------------------------------------
     172
     173==> Partitionning Completed
     174==> Generated Partitions:
     175------------------------------------------------------------
     176Disk /dev/mmcblk1: 1.8 GiB, 1920991232 bytes, 3751936 sectors
     177Units: sectors of 1 * 512 = 512 bytes
     178Sector size (logical/physical): 512 bytes / 512 bytes
     179I/O size (minimum/optimal): 512 bytes / 512 bytes
     180Disklabel type: dos
     181Disk identifier: 0xb759f922
     182
     183Device         Boot Start     End Sectors  Size Id Type
     184/dev/mmcblk1p1 *     8192 3751935 3743744  1.8G 83 Linux
     185------------------------------------------------------------
     186================================================================================
     187
     188================================================================================
     189Preparing future rootfs to receive files
     190----------------------------------------
     191
     192==> Formatting rootfs with mkfs.ext4  -O ^metadata_csum,^64bit /dev/mmcblk1p1 -L rootfs
     193--------------------------------------------------------------------------------
     194
     195mke2fs 1.43.4 (31-Jan-2017)
     196Discarding device blocks: done                           
     197Creating filesystem with 467968 4k blocks and 117120 inodes
     198Filesystem UUID: 1aa2f1b9-7a7c-4dbc-9d36-c7e01ce19540
     199Superblock backups stored on blocks:
     200        32768, 98304, 163840, 229376, 294912
     201
     202Allocating group tables: done                           
     203Writing inode tables: done                           
     204Creating journal (8192 blocks): done
     205Writing superblocks and filesystem accounting information: done
     206
     207--------------------------------------------------------------------------------
     208==> Formatting rootfs: /dev/mmcblk1p1 complete
     209==> Creating temporary rootfs directory (/tmp/rootfs)
     210==> Mounting /dev/mmcblk1p1 to /tmp/rootfs
     211[   77.717437] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
     212
     213================================================================================
     214
     215================================================================================
     216Copying: Current rootfs to /dev/mmcblk1p1
     217----------------------------------------
     218==> rsync: / -> /tmp/rootfs
     219----------------------------------------
     220}}}
     221
     222The leds show activity. Once the procedure has finished remove the power and remove the SD card:
     223
     224{{{
     225[  513.490441] reboot: Power down
     226[  513.493962] System will go to power_off state in approx. 1 second
     227}}}
     228
     229Apply power and watch the board boot from the updated eMMC memory.