= Beagleboard = {{Infobox BSP |BSP_name = BeagleBoard |Manufacturer = Texas Instruments |image = Beagle Board big.jpg |caption = BeagleBoard rev.B |Board_URL = http:/beagleboard.org |Architecture = ARM |CPU_model = Cortex-A8 |Monitor = uBoot |Simulator = Yes. [wiki:TBR/UserManual/QEMU QEMU] |Aliases = None |RAM = 256 MB LPDDR RAM |NVMEM = 256 MB NAND Flash memory |Serial = TBD |Video = S-Video, DVI |NICs = TBD |Other = TBD }} = Overview = This page documents the currently un-mainline support for the original Beagleboard. For an overview of it and related targets, see: http://en.wikipedia.org/wiki/BeagleBoard = Board Setup = None = Downloading and Executing = = 1. Clone and build qemu-maemo: = $ git clone git://gitorious.org/qemu-maemo/qemu.git $ cd qemu $ ./configure --target-list="arm-softmmu" $ make [http://meego.gitorious.org/qemu-maemo] = 2. Clone and build rtems from my fork: = $ git clone git://github.com/claas/rtems.git (ben's fork contains a branch that is uptodate w.r.t rtems mainline, has working clock and timers, and has beaglebone support, but is in flux - https://github.com/bengras/rtems.git , beaglebone-wip branch) $ mkdir rtems-b $ cd rtems $ ./bootstrap $ cd ../rtems-b $ ../rtems/configure --target=arm-rtems4.11 --enable-rtemsbsp=beagle $ make $ make install (these instructions previously mentioned the now-obsolete arm-rtemseabi4.11 target: --target=arm-rtemseabi4.11. these instructions also previously mentioned to disable posix, networking, cxx, and enable rtems debug, and specify a prefix, but the default also builds.) = 3. Clone my tools repository: = $ git clone git://github.com/claas/tools.git find the test.c file in the cloned repository and copy it to the examples hello/hello_world_c folder = 5. Download the x-loader and uboot images = $ wget http://qemu-omap3.googlecode.com/files/image-v0.01.tar.bz2 = 6. Build the nand flash image = The original beagleboard has 256MB builtin flash NAND. We make a full image for that flash and feed it to the emulator to boot from. The script to do that is in the tools repo, the name is: build-nand.sh For this, you will also need: * bb_nandflash.sh and bb_nandflash_ecc from e.g. http://beagleboard.lohray.com/vm-larix/setting-up-an-emulator/qemu-emulation * uboot mkimage, from e.g. uboot-mkimage package (apt-get install uboot-mkimage on ubuntu) * some minor modifications to the build-nand.sh script, like setting the path to the tools and files properly Invocation: $ build-nand.sh e.g. with my layout: $ sh tools/build-nand.sh rtems-b/arm-rtems4.11/c/beagle/testsuites/samples/hello/hello nand Then to invoke qemu: $ qemu-system-arm -M beagle -mtdblock nand -serial stdio Once you are in the boot prompt, load and run the program: OMAP3 beagleboard.org # nand read 0x80800000 0x280000 0x400000 NAND read: device 0 offset 0x280000, size 0x400000 4194304 bytes read: OK OMAP3 beagleboard.org # bootm 0x80800000 ## Booting kernel from Legacy Image at 80800000 ... Image Name: RTEMS Image Type: ARM RTEMS Kernel Image (gzip compressed) Data Size: 56484 Bytes = 55.2 kB Load Address: 80000000 Entry Point: 80000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Transferring control to RTEMS (at address 80000000) ... bsp_interrupt_facility_initializebeagle_set_exception_handler *** BEGIN OF TEST HELLO WORLD *** Hello World *** END OF TEST HELLO WORLD *** = Debugging = How do you debug code on this board? What gdb setup? BDM, stub, etc? = Beagleboard XM, Linaro qemu = Using a different emulator (fork), and running a different u-boot, emulating a beagleboard xm, this hello world also works on the bbxm. The bbxm has no internal NAND so booting is a bit different, the mmc card is needed. the image referenced contains a FAT partition that contains hello.img: $ qemu-system-arm -M beaglexm -drive if=sd,cache=writeback,file=rtems_arm_sd.img -clock unix -serial stdio booting then looks like: OMAP3 beagleboard.org # fatload mmc 0:1 0x80800000 hello.img reading hello.img 56548 bytes read in 12 ms (4.5 MiB/s) OMAP3 beagleboard.org # bootm 0x80800000 ## Booting kernel from Legacy Image at 80800000 ... Image Name: RTEMS Image Type: ARM RTEMS Kernel Image (gzip compressed) Data Size: 56484 Bytes = 55.2 KiB Load Address: 80000000 Entry Point: 80000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Transferring control to RTEMS (at address 80000000) ... bsp_interrupt_facility_initializebeagle_set_exception_handler *** BEGIN OF TEST HELLO WORLD *** Hello World *** END OF TEST HELLO WORLD *** This means that bbxm support should not be too far off. = Test Reports = {{Test Report |Version = CVS head |Date = DATE |User = [wiki:User:WhoTestedThis User:WhoTestedThis] |Report = reports that something happened. }} = References = * TBD = Ben and Chris's Big Beagleboard Adventure = The following are some notes about Ben and Chris's project to get full support for Beagleboards into the RTEMS kernel source. The plan is support all Beagleboards from the xM to the Black and White with JTAG debugging if possible. = GIT Repo = Ben has a WIP git repo. Use at your own risk. = Debugging = Using the xM and JTAG I cannot get Ben's build to work. The problem is no UART set up because it is not set up by the time JTAG is given control. From reading the TRM and by playing around it seems some code is being loaded off the SD card and that is setting up DRAM plus other things however the UART is not setup. If the SD card is removed the code sits in the ROM code. As a result we need a boot monitor of some form to get things working until supporting initialisation code is added to RTEMS we decide to settle on U-Boot as the initialisation code. = Building U-Boot = To build U-Boot: $ git clone git://git.denx.de/u-boot.git $ cd u-boot $ git checkout --track -b omap3 origin/master $ export PATH=$HOME/development/rtems/4.11/bin:$PATH $ gmake CROSS_COMPILE=arm-rtems4.11- mrproper $ gmake CROSS_COMPILE=arm-rtems4.11- omap3_beagle_config $ gmake CROSS_COMPILE=arm-rtems4.11- Note: I use FreeBSD so gmake is required. {{Navbox_BSPs}}