Category:How to - Buildroot overo

From Gumstix User Wiki

Jump to: navigation, search

Officially Gumstix only supports building images for Overo devices using OpenEmbedded. But there are other ways of producing a root filesystem for an Overo device, for example Buildroot. Since OE is the only official build system, it remains the best, most up-to-date place to get your cross-development toolchain, kernel, bootloader, and MLO for Overo development.

For the remainder of this document I'm going to assume ${OEBASE} is where you have checked out OE and ${BRBASE} is the directory into which you have unpacked Buildroot.

  • Start off by following the official instructions for preparing your build system and checking out the OE code at Using the Open Embedded Build System for Overo Series. Follow those instructions right until the end but do not perform the last step (i.e. "$ bitbake omap3-console-image")
  • Replace the last instruction ("$ bitbake omap3-console-image") with the following:
 $ bitbake virtual/kernel
 $ bitbake x-load
 $ bitbake u-boot

With these commands OE has built a cross-development toolchain for you as well as a kernel, MLO, and u-boot bootloader. For the root filesystem we now make use of Buildroot.

  • Go to the location where you have unpacked Buildroot and issue:
 $ make menuconfig

(If you prefer you can use '$ make nconfig', '$ make xconfig', or '$ make gconfig' instead)

  • Under 'Target Architecture'
  * select 'arm'
  • Under 'Target Architecture Variant'
  select 'generic_arm'

further down there is a 'cortex_a8' option but Buildroot says the cortex_a8 and cortex_a9 options require gcc > 4.4.x. Currently the OE toolchain is 4.3.x. 'generic_arm' seems to work fine

  • Under 'Toolchain'
    • Toolchain Type
  select 'External toolchain'
    • Toolchain
  'Custom toolchain'
    • Toolchain path
  enter '${OEBASE}/tmp/sysroots/x86_64-linux/usr/armv7a'
  (obviously if your build system is not x86 64-bit this path won't exist, look around and find your equivalent)
    • Toolchain prefix
  enter 'arm-angstrom-linux-gnueabi'
    • External toolchain C library
  select 'glibc'
    • Select
  Toolchain has C++ support
  • Under 'System configuration'
    • Port to run a getty (login prompt) on
  select 'ttyO2'
  (NOTE: that is: "tee-tee-why-(capital)Oh-two")

You can leave everything else as-is, or browse around and find other things to tweak.

  • Exit the Buildroot configuration system and
  $ make

Now when you assemble your Qemu image or SD card you will find your bootloader, MLO, and x-boot as usual in ${OEBASE}/tmp/deploy/glibc/images/overo but your root filesystem will be found in ${BRBASE}/images.

By way of comparison a Qemu image created for the Overo converted to VDI format uses:

  • 27MB for a buildroot-based image
  • 272MB for a completely OE-based image
# qemu-system-arm.linaro -M overo -m 256 -clock unix -serial stdio -sd br.HDD 

Texas Instruments X-Loader 1.5.1 (Nov 22 2011 - 09:58:25)
Board revision: 0
Reading boot sector
Loading u-boot.bin from mmc

U-Boot 2011.09 (Nov 22 2011 - 10:10:50)

OMAP35XX-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz
Gumstix Overo board + LPDDR/NAND
I2C:   ready
DRAM:  256 MiB
NAND:  256 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Board revision: 0
Direct connection on mmc2
No EEPROM on expansion board
Die ID #51454d5551454d555400000051454d55
Net:   smc911x-0
Hit any key to stop autoboot:  0 
reading boot.scr

** Unable to read "boot.scr" from mmc 0:1 **
reading uImage

3091316 bytes read
Booting from mmc ...
## Booting kernel from Legacy Image at 82000000 ...
    Image Name:   Angstrom/3.0/overo
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    3091252 Bytes = 2.9 MiB
    Load Address: 80008000
    Entry Point:  80008000
    Verifying Checksum ... OK
     Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
omap2_inth_read: Bad register 0x00000020
Linux version 3.0.0 (trevor@codei7) (gcc version 4.3.3 (GCC) ) #1 Mon Nov 21 17:37:48 EST 2011
CPU: ARMv7 Processor [412fc083] revision 3 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Gumstix Overo
Reserving 12582912 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP3430/3530 ES3.1 (iva sgx neon isp 720mhz )
SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
Clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
Reprogramming SDRC clock to 332000000 Hz
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 61952
Kernel command line: console=ttyO2,115200n8 mpurate=500 vram=12M omapfb.mode=dvi:1024x768MR-16@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 244MB = 244MB total
Memory: 240900k/240900k available, 21244k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc003b000   ( 204 kB)
      .text : 0xc003b000 - 0xc05ce764   (5710 kB)
      .data : 0xc05d0000 - 0xc061ea10   ( 315 kB)
       .bss : 0xc061ea34 - 0xc068291c   ( 400 kB)
IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
OMAP clockevent source: GPTIMER1 at 32768 Hz
sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
Console: colour dummy device 80x30
Calibrating delay loop... 435.38 BogoMIPS (lpj=1701888)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
omap_hwmod: gpt12_fck: missing clockdomain for gpt12_fck.
omap_hwmod: am35x_otg_hs: cannot be enabled (3)
print_constraints: dummy: 
NET: Registered protocol family 16
GPMC revision 5.0
OMAP GPIO hardware version 2.5
OMAP GPIO hardware version 2.5
OMAP GPIO hardware version 2.5
OMAP GPIO hardware version 2.5
OMAP GPIO hardware version 2.5
OMAP GPIO hardware version 2.5
omap_mux_init: Add partition: #1: core, flags: 0
Found NAND on CS0
Registering NAND on CS0
platform iva.0: Enabled OPP corresponding to 720MHz
hw-breakpoint: debug architecture 0x0 unsupported.
omap_device: omap-mcbsp.2: alias fck already exists
omap_device: omap-mcbsp.3: alias fck already exists
Switched to new clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
OMAP DMA hardware revision 4.0
bio: create slab <bio-0> at 0
print_constraints: vads7846: 3300 mV 
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
omap_i2c omap_i2c.1: bus 1 rev3.12 at 2600 kHz
twl4030: PIH (irq 7) chaining IRQs 368..375
twl4030: power (irq 373) chaining IRQs 376..383
twl4030: gpio (irq 368) chaining IRQs 384..401
print_constraints: VUSB1V5: 1500 mV normal standby
print_constraints: VUSB1V8: 1800 mV normal standby
print_constraints: VUSB3V1: 3100 mV normal standby
twl4030_usb twl4030_usb: Initialized TWL4030 USB module
print_constraints: VMMC1: 1850 <--> 3150 mV at 3150 mV normal standby
print_constraints: VDAC: 1800 mV normal standby
print_constraints: VDVI: 1800 mV normal standby
omap_i2c omap_i2c.3: bus 3 rev3.12 at 400 kHz
Advanced Linux Sound Architecture Driver Version 1.0.24.
Bluetooth: Core ver 2.16
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
Switching to clocksource 32k_counter
Switched to NOHz mode on CPU #0
musb-hdrc: version 6.0, musb-dma, host
musb-hdrc musb-hdrc: MUSB HDRC host driver
musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: MUSB HDRC host driver
usb usb1: Manufacturer: Linux 3.0.0 musb-hcd
usb usb1: SerialNumber: musb-hdrc
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
musb-hdrc musb-hdrc: USB Host mode controller at fa0ab000 using DMA, IRQ 92
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
platform iva.0: Enabled OPP corresponding to 720MHz
omap-iommu omap-iommu.0: isp registered
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Registering unionfs (for 3.0.0-rc4)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 470
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
OMAP DSS rev 2.0
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
console [ttyO2] enabled
brd: module loaded
loop: module loaded
omap2-nand driver initializing
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB 1,8V 16-bit)
Creating 5 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000080000 : "xloader"
0x000000080000-0x000000240000 : "uboot"
0x000000240000-0x000000280000 : "uboot environment"
0x000000280000-0x000000680000 : "linux"
0x000000680000-0x000010000000 : "rootfs"
smsc911x: Driver version 2008-10-21
smsc911x-mdio: probed
smsc911x smsc911x.0: eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
smsc911x smsc911x.0: eth0: MAC Address: 52:54:00:12:34:56
smsc911x: Driver version 2008-10-21
usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
cdc_ncm: 01-June-2011
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 2
ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
ehci-omap ehci-omap.0: USB 2.0 started, EHCI 0.00
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OMAP-EHCI Host Controller
usb usb2: Manufacturer: Linux 3.0.0 ehci_hcd
usb usb2: SerialNumber: ehci-omap.0
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 0 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
twl_rtc twl_rtc: Power up reset detected.
i2c /dev entries driver
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
Bluetooth: HCI UART driver ver 2.2
Bluetooth: HCI H4 protocol initialized
Bluetooth: HCI BCSP protocol initialized
Bluetooth: HCILL protocol initialized
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver snd-usb-audio
overo SoC init
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SD card at address 4567
mmcblk0: mmc0:4567 QEMU! 1.00 GiB 
 mmcblk0: p1 p2
asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok
ALSA device list:
  #0: overo
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
ThumbEE CPU extension supported.
omap_vp_forceupdate_scale: vdd_mpu_iva TRANXDONE timeout exceeded while tryingto clear the TRANXDONE status
omap_vp_forceupdate_scale: vdd_core TRANXDONE timeout exceeded while tryingto clear the TRANXDONE status
sr_init: No PMIC hook to init smartreflex
smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized
smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized
clock: disabling unused clocks to save power
fbcvt: 1024x768@60: CVT Name - .786M3-R
Console: switching to colour frame buffer device 128x48
regulator_init_complete: VDAC: incomplete constraints, leaving on
regulator_init_complete: vads7846: incomplete constraints, leaving on
twl_rtc twl_rtc: setting system clock to 2011-11-22 16:31:42 UTC (1321979502)
EXT3-fs: barriers not enabled
kjournald starting.  Commit interval 5 seconds
EXT3-fs (mmcblk0p2): using internal journal
EXT3-fs (mmcblk0p2): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing init memory: 204K
Starting logging: OK
Initializing random number generator... done.
Starting network...

Welcome to Buildroot
buildroot login:

This category currently contains no pages or media.

Personal tools