1 | BSP for beagleboard xm, beaglebone (original aka white), and beaglebone black. |
---|
2 | |
---|
3 | original beagleboard isn't tested. |
---|
4 | |
---|
5 | wiki: http://www.rtems.org/wiki/index.php/Beagleboard |
---|
6 | |
---|
7 | 1. *** CONFIGURING ************ |
---|
8 | |
---|
9 | bsp-specific build options in the environment at build time: |
---|
10 | CONSOLE_POLLED=1 use polled i/o for console, required to run testsuite |
---|
11 | CONSOLE_BAUD=... override default console baud rate |
---|
12 | |
---|
13 | BSPs recognized are: |
---|
14 | beagleboardorig original beagleboard |
---|
15 | beagleboardxm beagleboard xm |
---|
16 | beaglebonewhite original beaglebone |
---|
17 | beagleboneblack beaglebone black |
---|
18 | |
---|
19 | Currently the only distinction in the BSP are between the beagleboards and |
---|
20 | the beaglebones, but the 4 names are specified in case hardware-specific |
---|
21 | distinctions are made in the future, so this can be done without changing the |
---|
22 | usage. |
---|
23 | |
---|
24 | |
---|
25 | 2. *** BUILDING ************ |
---|
26 | |
---|
27 | To build BSPs for the beaglebone white and beagleboard xm, starting from |
---|
28 | a directory in which you have this source tree in rtems-src: |
---|
29 | |
---|
30 | $ mkdir b-beagle |
---|
31 | $ cd b-beagle |
---|
32 | $ ../rtems-src/configure --target=arm-rtems4.11 --enable-rtemsbsp="beaglebonewhite beagleboardxm" |
---|
33 | $ make all |
---|
34 | |
---|
35 | This should give you .exes somewhere. |
---|
36 | |
---|
37 | Then you need 'mkimage' to transform a .exe file to a u-boot image |
---|
38 | file. first make a flat binary: |
---|
39 | |
---|
40 | $ arm-rtems4.11-objcopy $exe -O binary $exe.bin |
---|
41 | $ gzip -9 $exe.bin |
---|
42 | $ mkimage -A arm -O rtems -T kernel -a 0x80000000 -e 0x80000000 -n RTEMS -d $exe.bin.gz rtems-app.img |
---|
43 | |
---|
44 | All beagles have memory starting at 0x80000000 so the load & run syntax is the same. |
---|
45 | |
---|
46 | 3. *** BOOTING ************ |
---|
47 | |
---|
48 | Then, boot the beaglebone with u-boot on an SD card and load rtems-app.img |
---|
49 | from u-boot. Interrupt the u-boot boot to get a prompt. |
---|
50 | |
---|
51 | Set up a tftp server and a network connection for netbooting. And to |
---|
52 | copy rtems-app.img to the tftp dir. Otherwise copy the .img to the FAT |
---|
53 | partition on the SD card and make uboot load & run that. |
---|
54 | |
---|
55 | 4. *** BEAGLEBONES ************ |
---|
56 | |
---|
57 | (tested on both beaglebones) |
---|
58 | |
---|
59 | Beaglebone original (white) or beaglebone black netbooting: |
---|
60 | |
---|
61 | uboot# setenv ipaddr 192.168.12.20 |
---|
62 | uboot# setenv serverip 192.168.12.10 |
---|
63 | uboot# echo starting from TFTP |
---|
64 | uboot# tftp 0x80800000 rtems-app.img |
---|
65 | uboot# dcache off ; icache off |
---|
66 | uboot# bootm 0x80800000 |
---|
67 | |
---|
68 | Beaglebone original (white) or beaglebone black from a FAT partition: |
---|
69 | |
---|
70 | uboot# fatload mmc :1 0x80800000 ticker.img |
---|
71 | uboot# dcache off ; icache off |
---|
72 | uboot# bootm 0x80800000 |
---|
73 | |
---|
74 | 4. *** BEAGLEBOARD ************ |
---|
75 | |
---|
76 | (tested on xm) |
---|
77 | |
---|
78 | For the beagleboard the necessary commands are a bit different because |
---|
79 | of the ethernet over usb: |
---|
80 | |
---|
81 | uboot# setenv serverip 192.168.12.10 |
---|
82 | uboot# setenv ipaddr 192.168.12.62 |
---|
83 | uboot# setenv usbnet_devaddr e8:03:9a:24:f9:10 |
---|
84 | uboot# setenv usbethaddr e8:03:9a:24:f9:11 |
---|
85 | uboot# usb start |
---|
86 | uboot# echo starting from TFTP |
---|
87 | uboot# tftp 0x80800000 rtems-app.img |
---|
88 | uboot# dcache off ; icache off |
---|
89 | uboot# bootm 0x80800000 |
---|
90 | |
---|
91 | 4. *** SD CARD **************** |
---|
92 | |
---|
93 | There is a script here that automatically writes an SD card for any of |
---|
94 | the beagle targets. |
---|
95 | |
---|
96 | Let's write one for the Beaglebone Black. Assuming your source tree is |
---|
97 | at $HOME/development/rtems/rtems-src and your bsp is built and linked |
---|
98 | with examples and installed at $HOME/development/rtems/4.11. |
---|
99 | |
---|
100 | % cd $HOME/development/rtems/rtems-src/c/src/lib/libbsp/arm/beagle/simscripts |
---|
101 | % sh sdcard.sh $HOME/development/rtems/4.11 $HOME/development/rtems/b-beagle/arm-rtems4.11/c/beagleboneblack/testsuites/samples/hello/hello.exe |
---|
102 | |
---|
103 | The script should give you a whole bunch of output, ending in: |
---|
104 | |
---|
105 | Result is in bone_hello.exe-sdcard.img. |
---|
106 | |
---|
107 | There you go. dd that to an SD card and boot! |
---|
108 | |
---|
109 | The script needs to know whether it's for a Beagleboard xM or one of the |
---|
110 | Beaglebones. This is to know which uboot to use. It will detect this |
---|
111 | from the path the executable is in (in the above example, it contains |
---|
112 | 'beagleboneblack'), so you have to specify the full path. |
---|
113 | |
---|
114 | |
---|
115 | Good luck & enjoy! |
---|
116 | |
---|
117 | Ben Gras |
---|
118 | beng@shrike-systems.com |
---|