Beagleboard
Links
- http://beagleboard.org
- Beagleboard bei Wikipedia
- Einkaufsliste
- Beagleboardbeschreibung auf eLinux.org
- Beagleboard im Webshop von Digi-Key
- Inbetriebnahme
- Getting Started auf Openismus - Sehr umfangreich, teilweise möglicherweise veraltet
- Beagleboard Beginners
- Beagleboard auf Google Code
- Can I build it
- Qt auf Beagleboard installieren
- Ångström Linux
- Open Embedded
- Posts in Google Groups
- Qt Embedded
U-Boot
Login
Mit Hilfe eines seriellen Kabels: IDC10 (Pfostenstecker) auf DB9M (Subd) Adapter + Nullmodemkabel
Printenv
bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi
bootdelay=10
baudrate=115200
loadaddr=0x82000000
console=ttyS2,115200n8
vram=12M
dvimode=1024x768MR-16@60
defaultdisplay=dvi
mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext3 rootwait
nandroot=/dev/mtdblock4 rw
nandrootfstype=jffs2
mmcargs=setenv bootargs console=${console} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.debug=y omapdss.def_disp=${defaultdisplay} root=${mmcroot} rootfstype=${mmcrootfstype}
nandargs=setenv bootargs console=${console} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.debug=y omapdss.def_disp=${defaultdisplay} root=${nandroot} rootfstype=${nandrootfstype}
loadbootscript=fatload mmc 0 ${loadaddr} boot.scr
bootscript=echo Running bootscript from mmc ...; source ${loadaddr}
loaduimage=fatload mmc 0 ${loadaddr} uImage
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${loadaddr}
nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} 280000 400000; bootm ${loadaddr}
stdin=serial
stdout=serial
stderr=serial
dieid#=542e0004000000000403a3810301300c
Hilfereiche Einstellungen
- Bildschirmauflösung (dvimode):
1024x768MR-16@60(default)hd720-16(HD 720p in 16 Bit - momentan keine höhere Farbtiefe möglich)
- Verzögerung beim Boot (
bootdelay): Zeit in Sekunden
Entwicklungs-VM
- 10GB Festplatte
- Ubuntu 11.04
- Zusätzlich installierte Pakete:
- keine
- Zusätzlich installierte Software:
- Angstrom SDK für Qt-Entwicklung auf Beagleboard (Download und Installationsanleitung: [1])
Ångström SDK
Alle Operationen als root ausführen
beagle@ubuntu:~$ sudo bash
Nach / entpacken und Umgebung initialisieren
root@ubuntu:~# tar -xjf beagleboard/Angstrom-2011.05-narcissus-beagleboard-i686-qt-development-image-sdk.tar.gz root@ubuntu:~# . /usr/local/angstrom/arm/environment-setup''
- Target RootFS liegt unter: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi
- Pakete ins RootFS des Targets installieren:
root@ubuntu:/root# opkg-target update root@ubuntu:/root# opkg-target install mtd-utils -o /media/Angstrom/ root@ubuntu:/root# opkg-target install mkfs-ubifs -o /media/Angstrom/
- Minimales UbiFS auf die SD-Karte kopieren:
root@ubuntu:/root# cp qt-development-image-beagleboard.ubifs /media/Angstrom/
Internes Flash verwenden
Die verschiedenen Flashbereiche:
root@beagleboard:~# cat /proc/mtd dev: size erasesize name mtd0: 00080000 00020000 "X-Loader" mtd1: 001e0000 00020000 "U-Boot" mtd2: 00020000 00020000 "U-Boot Env" mtd3: 00400000 00020000 "Kernel" mtd4: 0f980000 00020000 "File System"
Kernel installieren
- Kernel-Flash löschen
- Kernel-Image in Flash kopieren
root@beagleboard:~# flash_eraseall /dev/mtd3 Erasing 128 Kibyte @ 3e0000 -- 96 % complete. root@beagleboard:~# root@beagleboard:~# nandwrite -p /dev/mtd3 /media/mmcblk0p1/uImage Writing data to block 0 at offset 0x0 ...
RootFS im Flash erstellen
root@beagleboard:~# ubiformat /dev/mtd4 ubiformat: mtd4 (nand), size 261619712 bytes (249.5 MiB), 1996 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes libscan: scanning eraseblock 1995 -- 100 % complete ubiformat: 1971 eraseblocks have valid erase counter, mean value is 2 ubiformat: 25 bad eraseblocks found, numbers: 114, 269, 394, 421, 448, 528, 549, 631, 639, 739, 754, 770, 789, 795, 824, 851, 866, 895, 924, 966, 1288, 1605, 1850, 1909, 1912 ubiformat: formatting eraseblock 1995 -- 100 % complete root@beagleboard:~# ubiattach /dev/ubi_ctrl -m 4 [ 432.679565] UBI: attaching mtd4 to ubi0 [ 432.684295] UBI: physical eraseblock size: 131072 bytes (128 KiB) [ 432.690917] UBI: logical eraseblock size: 129024 bytes [ 432.696502] UBI: smallest flash I/O unit: 2048 [ 432.701568] UBI: sub-page size: 512 [ 432.706420] UBI: VID header offset: 512 (aligned 512) [ 432.712463] UBI: data offset: 2048 [ 433.190551] UBI: attached mtd4 to ubi0 [ 433.194335] UBI: MTD device name: "File System" [ 433.200347] UBI: MTD device size: 249 MiB [ 433.205566] UBI: number of good PEBs: 1971 [ 433.210296] UBI: number of bad PEBs: 25 [ 433.215576] UBI: max. allowed volumes: 128 [ 433.220428] UBI: wear-leveling threshold: 4096 [ 433.225158] UBI: number of internal volumes: 1 [ 433.229888] UBI: number of user volumes: 0 [ 433.234344] UBI: available PEBs: 1948 [ 433.239349] UBI: total number of reserved PEBs: 23 [ 433.244323] UBI: number of PEBs reserved for bad PEB handling: 19 [ 433.250457] UBI: max/mean erase counter: 3/3 [ 433.255004] UBI: image sequence number: 1125815993 [ 433.260009] UBI: background thread "ubi_bgt0d" started, PID 886 UBI device number 0, total 1971 LEBs (254306304 bytes, 242.5 MiB), available 1948 LEBs (251338752 bytes, 239.7 MiB), LEB size 129024 bytes (126.0 KiB) root@beagleboard:~# ubimkvol /dev/ubi0 -N rootfs -m Set volume size to 251338752 Volume ID 0, size 1948 LEBs (251338752 bytes, 239.7 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs", alignment 1 root@beagleboard:~# mount -t ubifs ubi0:rootfs /media/realroot [ 381.833190] UBIFS: mounted UBI device 0, volume 0, name "rootfs" [ 381.839355] UBIFS: file system size: 249790464 bytes (243936 KiB, 238 MiB, 1936 LEBs) [ 381.847442] UBIFS: journal size: 12515328 bytes (12222 KiB, 11 MiB, 97 LEBs) [ 381.855072] UBIFS: media format: w4/r0 (latest is w4/r0) [ 381.860961] UBIFS: default compressor: lzo [ 381.865112] UBIFS: reserved for root: 4952683 bytes (4836 KiB) root@beagleboard:~# tar -C /media/realroot -xzf /qt-development-image-beagleboard.tar.gz root@beagleboard:~# reboot
Wer möchte kann den beim Mounten des UbiFS eine stärkere Komprimierung einstellen:
root@beagleboard:~# mount -t ubifs ubi0:rootfs /media/realroot -o compr=zlib
UBoot rekonfigurieren
Die folgenden Einstellungen müssen in UBoot vorgenommen werden:
OMAP3 beagleboard.org # setenv nandrootfstype ubifs OMAP3 beagleboard.org # setenv nandroot ubi0:rootfs ubi.mtd=4 rootflags=compr=zlib OMAP3 beagleboard.org # saveenv OMAP3 beagleboard.org # reset
Qt Embedded nutzen
Vorbereitung auf dem Target
Zuerst muß die Datei /etc/init.d/matrix-gui-e angepasst werden, da als Default die Verwendung eines hochkant ausgerichteten Touchscreen vorgesehen ist:
GUI_OPTS="-qws /usr/share/matrix/html/menu_main.html" ... #export TSLIB_TSDEVICE=/dev/input/touchscreen0 #export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0