README.hardware 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. Poky Hardware README
  2. ====================
  3. This file gives details about using Poky with the reference machines
  4. supported out of the box. A full list of supported reference target machines
  5. can be found by looking in the following directories:
  6. meta/conf/machine/
  7. meta-yocto-bsp/conf/machine/
  8. If you are in doubt about using Poky/OpenEmbedded with your hardware, consult
  9. the documentation for your board/device.
  10. Support for additional devices is normally added by creating BSP layers - for
  11. more information please see the Yocto Board Support Package (BSP) Developer's
  12. Guide - documentation source is in documentation/bspguide or download the PDF
  13. from:
  14. http://yoctoproject.org/documentation
  15. Support for physical reference hardware has now been split out into a
  16. meta-yocto-bsp layer which can be removed separately from other layers if not
  17. needed.
  18. QEMU Emulation Targets
  19. ======================
  20. To simplify development, the build system supports building images to
  21. work with the QEMU emulator in system emulation mode. Several architectures
  22. are currently supported:
  23. * ARM (qemuarm)
  24. * x86 (qemux86)
  25. * x86-64 (qemux86-64)
  26. * PowerPC (qemuppc)
  27. * MIPS (qemumips)
  28. Use of the QEMU images is covered in the Yocto Project Reference Manual.
  29. The appropriate MACHINE variable value corresponding to the target is given
  30. in brackets.
  31. Hardware Reference Boards
  32. =========================
  33. The following boards are supported by the meta-yocto-bsp layer:
  34. * Texas Instruments Beagleboard (beagleboard)
  35. * Freescale MPC8315E-RDB (mpc8315e-rdb)
  36. * Ubiquiti Networks RouterStation Pro (routerstationpro)
  37. For more information see the board's section below. The appropriate MACHINE
  38. variable value corresponding to the board is given in brackets.
  39. Consumer Devices
  40. ================
  41. The following consumer devices are supported by the meta-yocto-bsp layer:
  42. * Intel Atom based PCs and devices (atom-pc)
  43. For more information see the device's section below. The appropriate MACHINE
  44. variable value corresponding to the device is given in brackets.
  45. Specific Hardware Documentation
  46. ===============================
  47. Intel Atom based PCs and devices (atom-pc)
  48. ==========================================
  49. The atom-pc MACHINE is tested on the following platforms:
  50. o Asus EeePC 901
  51. o Acer Aspire One
  52. o Toshiba NB305
  53. o Intel Embedded Development Board 1-N450 (Black Sand)
  54. and is likely to work on many unlisted Atom based devices. The MACHINE type
  55. supports ethernet, wifi, sound, and i915 graphics by default in addition to
  56. common PC input devices, busses, and so on.
  57. Depending on the device, it can boot from a traditional hard-disk, a USB device,
  58. or over the network. Writing generated images to physical media is
  59. straightforward with a caveat for USB devices. The following examples assume the
  60. target boot device is /dev/sdb, be sure to verify this and use the correct
  61. device as the following commands are run as root and are not reversable.
  62. USB Device:
  63. 1. Build a live image. This image type consists of a simple filesystem
  64. without a partition table, which is suitable for USB keys, and with the
  65. default setup for the atom-pc machine, this image type is built
  66. automatically for any image you build. For example:
  67. $ bitbake core-image-minimal
  68. 2. Use the "dd" utility to write the image to the raw block device. For
  69. example:
  70. # dd if=core-image-minimal-atom-pc.hddimg of=/dev/sdb
  71. If the device fails to boot with "Boot error" displayed, or apparently
  72. stops just after the SYSLINUX version banner, it is likely the BIOS cannot
  73. understand the physical layout of the disk (or rather it expects a
  74. particular layout and cannot handle anything else). There are two possible
  75. solutions to this problem:
  76. 1. Change the BIOS USB Device setting to HDD mode. The label will vary by
  77. device, but the idea is to force BIOS to read the Cylinder/Head/Sector
  78. geometry from the device.
  79. 2. Without such an option, the BIOS generally boots the device in USB-ZIP
  80. mode. To write an image to a USB device that will be bootable in
  81. USB-ZIP mode, carry out the following actions:
  82. a. Determine the geometry of your USB device using fdisk:
  83. # fdisk /dev/sdb
  84. Command (m for help): p
  85. Disk /dev/sdb: 4011 MB, 4011491328 bytes
  86. 124 heads, 62 sectors/track, 1019 cylinders, total 7834944 sectors
  87. ...
  88. Command (m for help): q
  89. b. Configure the USB device for USB-ZIP mode:
  90. # mkdiskimage -4 /dev/sdb 1019 124 62
  91. Where 1019, 124 and 62 are the cylinder, head and sectors/track counts
  92. as reported by fdisk (substitute the values reported for your device).
  93. When the operation has finished and the access LED (if any) on the
  94. device stops flashing, remove and reinsert the device to allow the
  95. kernel to detect the new partition layout.
  96. c. Copy the contents of the image to the USB-ZIP mode device:
  97. # mkdir /tmp/image
  98. # mkdir /tmp/usbkey
  99. # mount -o loop core-image-minimal-atom-pc.hddimg /tmp/image
  100. # mount /dev/sdb4 /tmp/usbkey
  101. # cp -rf /tmp/image/* /tmp/usbkey
  102. d. Install the syslinux boot loader:
  103. # syslinux /dev/sdb4
  104. e. Unmount everything:
  105. # umount /tmp/image
  106. # umount /tmp/usbkey
  107. Install the boot device in the target board and configure the BIOS to boot
  108. from it.
  109. For more details on the USB-ZIP scenario, see the syslinux documentation:
  110. http://git.kernel.org/?p=boot/syslinux/syslinux.git;a=blob_plain;f=doc/usbkey.txt;hb=HEAD
  111. Texas Instruments Beagleboard (beagleboard)
  112. ===========================================
  113. The Beagleboard is an ARM Cortex-A8 development board with USB, DVI-D, S-Video,
  114. 2D/3D accelerated graphics, audio, serial, JTAG, and SD/MMC. The xM adds a
  115. faster CPU, more RAM, an ethernet port, more USB ports, microSD, and removes
  116. the NAND flash. The beagleboard MACHINE is tested on the following platforms:
  117. o Beagleboard C4
  118. o Beagleboard xM rev A & B
  119. The Beagleboard C4 has NAND, while the xM does not. For the sake of simplicity,
  120. these instructions assume you have erased the NAND on the C4 so its boot
  121. behavior matches that of the xM. To do this, issue the following commands from
  122. the u-boot prompt (note that the unlock may be unecessary depending on the
  123. version of u-boot installed on your board and only one of the erase commands
  124. will succeed):
  125. # nand unlock
  126. # nand erase
  127. # nand erase.chip
  128. To further tailor these instructions for your board, please refer to the
  129. documentation at http://www.beagleboard.org.
  130. From a Linux system with access to the image files perform the following steps
  131. as root, replacing mmcblk0* with the SD card device on your machine (such as sdc
  132. if used via a usb card reader):
  133. 1. Partition and format an SD card:
  134. # fdisk -lu /dev/mmcblk0
  135. Disk /dev/mmcblk0: 3951 MB, 3951034368 bytes
  136. 255 heads, 63 sectors/track, 480 cylinders, total 7716864 sectors
  137. Units = sectors of 1 * 512 = 512 bytes
  138. Device Boot Start End Blocks Id System
  139. /dev/mmcblk0p1 * 63 144584 72261 c Win95 FAT32 (LBA)
  140. /dev/mmcblk0p2 144585 465884 160650 83 Linux
  141. # mkfs.vfat -F 16 -n "boot" /dev/mmcblk0p1
  142. # mke2fs -j -L "root" /dev/mmcblk0p2
  143. The following assumes the SD card partition 1 and 2 are mounted at
  144. /media/boot and /media/root respectively. Removing the card and reinserting
  145. it will do just that on most modern Linux desktop environments.
  146. The files referenced below are made available after the build in
  147. build/tmp/deploy/images.
  148. 2. Install the boot loaders
  149. # cp MLO-beagleboard /media/boot/MLO
  150. # cp u-boot-beagleboard.bin /media/boot/u-boot.bin
  151. 3. Install the root filesystem
  152. # tar x -C /media/root -f core-image-$IMAGE_TYPE-beagleboard.tar.bz2
  153. # tar x -C /media/root -f modules-$KERNEL_VERSION-beagleboard.tgz
  154. 4. Install the kernel uImage
  155. # cp uImage-beagleboard.bin /media/boot/uImage
  156. 5. Prepare a u-boot script to simplify the boot process
  157. The Beagleboard can be made to boot at this point from the u-boot command
  158. shell. To automate this process, generate a user.scr script as follows.
  159. Install uboot-mkimage (from uboot-mkimage on Ubuntu or uboot-tools on Fedora).
  160. Prepare a script config:
  161. # (cat << EOF
  162. setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
  163. setenv bootargs 'console=tty0 console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro'
  164. boot
  165. EOF
  166. ) > serial-boot.cmd
  167. # mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Core Minimal" -d ./serial-boot.cmd ./boot.scr
  168. # cp boot.scr /media/boot
  169. 6. Unmount the SD partitions, insert the SD card into the Beagleboard, and
  170. boot the Beagleboard
  171. Note: As of the 2.6.37 linux-yocto kernel recipe, the Beagleboard uses the
  172. OMAP_SERIAL device (ttyO2). If you are using an older kernel, such as the
  173. 2.6.34 linux-yocto-stable, be sure to replace ttyO2 with ttyS2 above. You
  174. should also override the machine SERIAL_CONSOLE in your local.conf in
  175. order to setup the getty on the serial line:
  176. SERIAL_CONSOLE_beagleboard = "115200 ttyS2"
  177. Freescale MPC8315E-RDB (mpc8315e-rdb)
  178. =====================================
  179. The MPC8315 PowerPC reference platform (MPC8315E-RDB) is aimed at hardware and
  180. software development of network attached storage (NAS) and digital media server
  181. applications. The MPC8315E-RDB features the PowerQUICC II Pro processor, which
  182. includes a built-in security accelerator.
  183. (Note: you may find it easier to order MPC8315E-RDBA; this appears to be the
  184. same board in an enclosure with accessories. In any case it is fully
  185. compatible with the instructions given here.)
  186. Setup instructions
  187. ------------------
  188. You will need the following:
  189. * NFS root setup on your workstation
  190. * TFTP server installed on your workstation
  191. * Straight-thru 9-conductor serial cable (DB9, M/F) connected from your
  192. PC to UART1
  193. * Ethernet connected to the first ethernet port on the board
  194. --- Preparation ---
  195. Note: if you have altered your board's ethernet MAC address(es) from the
  196. defaults, or you need to do so because you want multiple boards on the same
  197. network, then you will need to change the values in the dts file (patch
  198. linux/arch/powerpc/boot/dts/mpc8315erdb.dts within the kernel source). If
  199. you have left them at the factory default then you shouldn't need to do
  200. anything here.
  201. --- Booting from NFS root ---
  202. Load the kernel and dtb (device tree blob), and boot the system as follows:
  203. 1. Get the kernel (uImage-mpc8315e-rdb.bin) and dtb (uImage-mpc8315e-rdb.dtb)
  204. files from the tmp/deploy directory, and make them available on your TFTP
  205. server.
  206. 2. Connect the board's first serial port to your workstation and then start up
  207. your favourite serial terminal so that you will be able to interact with
  208. the serial console. If you don't have a favourite, picocom is suggested:
  209. $ picocom /dev/ttyUSB0 -b 115200
  210. 3. Power up or reset the board and press a key on the terminal when prompted
  211. to get to the U-Boot command line
  212. 4. Set up the environment in U-Boot:
  213. => setenv ipaddr <board ip>
  214. => setenv serverip <tftp server ip>
  215. => setenv bootargs root=/dev/nfs rw nfsroot=<nfsroot ip>:<rootfs path> ip=<board ip>:<server ip>:<gateway ip>:255.255.255.0:mpc8315e:eth0:off console=ttyS0,115200
  216. 5. Download the kernel and dtb, and boot:
  217. => tftp 1000000 uImage-mpc8315e-rdb.bin
  218. => tftp 2000000 uImage-mpc8315e-rdb.dtb
  219. => bootm 1000000 - 2000000
  220. Ubiquiti Networks RouterStation Pro (routerstationpro)
  221. ======================================================
  222. The RouterStation Pro is an Atheros AR7161 MIPS-based board. Geared towards
  223. networking applications, it has all of the usual features as well as three
  224. type IIIA mini-PCI slots and an on-board 3-port 10/100/1000 Ethernet switch,
  225. in addition to the 10/100/1000 Ethernet WAN port which supports
  226. Power-over-Ethernet.
  227. Setup instructions
  228. ------------------
  229. You will need the following:
  230. * A serial cable - female to female (or female to male + gender changer)
  231. NOTE: cable must be straight through, *not* a null modem cable.
  232. * USB flash drive or hard disk that is able to be powered from the
  233. board's USB port.
  234. * tftp server installed on your workstation
  235. NOTE: in the following instructions it is assumed that /dev/sdb corresponds
  236. to the USB disk when it is plugged into your workstation. If this is not the
  237. case in your setup then please be careful to substitute the correct device
  238. name in all commands where appropriate.
  239. --- Preparation ---
  240. 1) Build an image (e.g. core-image-minimal) using "routerstationpro" as the
  241. MACHINE
  242. 2) Partition the USB drive so that primary partition 1 is type Linux (83).
  243. Minimum size depends on your root image size - core-image-minimal probably
  244. only needs 8-16MB, other images will need more.
  245. # fdisk /dev/sdb
  246. Command (m for help): p
  247. Disk /dev/sdb: 4011 MB, 4011491328 bytes
  248. 124 heads, 62 sectors/track, 1019 cylinders, total 7834944 sectors
  249. Units = sectors of 1 * 512 = 512 bytes
  250. Sector size (logical/physical): 512 bytes / 512 bytes
  251. I/O size (minimum/optimal): 512 bytes / 512 bytes
  252. Disk identifier: 0x0009e87d
  253. Device Boot Start End Blocks Id System
  254. /dev/sdb1 62 1952751 976345 83 Linux
  255. 3) Format partition 1 on the USB as ext3
  256. # mke2fs -j /dev/sdb1
  257. 4) Mount partition 1 and then extract the contents of
  258. tmp/deploy/images/core-image-XXXX.tar.bz2 into it (preserving permissions).
  259. # mount /dev/sdb1 /media/sdb1
  260. # cd /media/sdb1
  261. # tar -xvjpf tmp/deploy/images/core-image-XXXX.tar.bz2
  262. 5) Unmount the USB drive and then plug it into the board's USB port
  263. 6) Connect the board's serial port to your workstation and then start up
  264. your favourite serial terminal so that you will be able to interact with
  265. the serial console. If you don't have a favourite, picocom is suggested:
  266. $ picocom /dev/ttyUSB0 -b 115200
  267. 7) Connect the network into eth0 (the one that is NOT the 3 port switch). If
  268. you are using power-over-ethernet then the board will power up at this point.
  269. 8) Start up the board, watch the serial console. Hit Ctrl+C to abort the
  270. autostart if the board is configured that way (it is by default). The
  271. bootloader's fconfig command can be used to disable autostart and configure
  272. the IP settings if you need to change them (default IP is 192.168.1.20).
  273. 9) Make the kernel (tmp/deploy/images/vmlinux-routerstationpro.bin) available
  274. on the tftp server.
  275. 10) If you are going to write the kernel to flash (optional - see "Booting a
  276. kernel directly" below for the alternative), remove the current kernel and
  277. rootfs flash partitions. You can list the partitions using the following
  278. bootloader command:
  279. RedBoot> fis list
  280. You can delete the existing kernel and rootfs with these commands:
  281. RedBoot> fis delete kernel
  282. RedBoot> fis delete rootfs
  283. --- Booting a kernel directly ---
  284. 1) Load the kernel using the following bootloader command:
  285. RedBoot> load -m tftp -h <ip of tftp server> vmlinux-routerstationpro.bin
  286. You should see a message on it being successfully loaded.
  287. 2) Execute the kernel:
  288. RedBoot> exec -c "console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2 board=UBNT-RSPRO"
  289. Note that specifying the command line with -c is important as linux-yocto does
  290. not provide a default command line.
  291. --- Writing a kernel to flash ---
  292. 1) Go to your tftp server and gzip the kernel you want in flash. It should
  293. halve the size.
  294. 2) Load the kernel using the following bootloader command:
  295. RedBoot> load -r -b 0x80600000 -m tftp -h <ip of tftp server> vmlinux-routerstationpro.bin.gz
  296. This should output something similar to the following:
  297. Raw file loaded 0x80600000-0x8087c537, assumed entry at 0x80600000
  298. Calculate the length by subtracting the first number from the second number
  299. and then rounding the result up to the nearest 0x1000.
  300. 3) Using the length calculated above, create a flash partition for the kernel:
  301. RedBoot> fis create -b 0x80600000 -l 0x240000 kernel
  302. (change 0x240000 to your rounded length -- change "kernel" to whatever
  303. you want to name your kernel)
  304. --- Booting a kernel from flash ---
  305. To boot the flashed kernel perform the following steps.
  306. 1) At the bootloader prompt, load the kernel:
  307. RedBoot> fis load -d -e kernel
  308. (Change the name "kernel" above if you chose something different earlier)
  309. (-e means 'elf', -d 'decompress')
  310. 2) Execute the kernel using the exec command as above.
  311. --- Automating the boot process ---
  312. After writing the kernel to flash and testing the load and exec commands
  313. manually, you can automate the boot process with a boot script.
  314. 1) RedBoot> fconfig
  315. (Answer the questions not specified here as they pertain to your environment)
  316. 2) Run script at boot: true
  317. Boot script:
  318. .. fis load -d -e kernel
  319. .. exec
  320. Enter script, terminate with empty line
  321. >> fis load -d -e kernel
  322. >> exec -c "console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2 board=UBNT-RSPRO"
  323. >>
  324. 3) Answer the remaining questions and write the changes to flash:
  325. Update RedBoot non-volatile configuration - continue (y/n)? y
  326. ... Erase from 0xbfff0000-0xc0000000: .
  327. ... Program from 0x87ff0000-0x88000000 at 0xbfff0000: .
  328. 4) Power cycle the board.