34
Linux 4 TI ARM SBC8018 Duy-Ky Nguyen 2015-03-04 1. Introduction The system, CPU, runs strictly under our instructions come from program we created. The location where to get instruction is stored in its unique and special device called program counter (PC) which is under control of different host during system up time. After powered up, we must set the DIP switch to tell SBC8018 where to get the very first program. The PC is under internal boot engine in this stage NAND : regular boot where the next program (bootloader) stored in NAND SPI : regular boot where the next program (bootloader) stored in SPI flash UART : special boot used to store bootloader to NAND or SPI flash. We now have 2 types : (1) regular boot for NAND and SPI (2) special UART boot. The bootloader, u-boot in this case, is program for regular boot boot, but not in case of UART boot where it’s just a file to stored somewhere. So we have to provide program for UART boot, say UART bootloader. The UART bootloader is of INI file where a Windows serial flashing tool will read instructions from to know what to do in storing the boot file u-boot at the right place.

Linux 4 TI ARM SBC8018 - unitedthc.comunitedthc.com/ELS/Linux4SBC8018.pdfTI internal boot engine has its own requirement to start-up. This boot engine starts u-boot, so its requirement

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

  • Linux 4 TI ARM SBC8018 Duy-Ky Nguyen 2015-03-04

    1. Introduction The system, CPU, runs strictly under our instructions come from program we created. The location where to get instruction is stored in its unique and special device called program counter (PC) which is under control of different host during system up time. After powered up, we must set the DIP switch to tell SBC8018 where to get the very first program. The PC is under internal boot engine in this stage

    NAND : regular boot where the next program (bootloader) stored in NAND SPI : regular boot where the next program (bootloader) stored in SPI flash UART : special boot used to store bootloader to NAND or SPI flash.

    We now have 2 types : (1) regular boot for NAND and SPI (2) special UART boot. The bootloader, u-boot in this case, is program for regular boot boot, but not in case of UART boot where it’s just a file to stored somewhere. So we have to provide program for UART boot, say UART bootloader. The UART bootloader is of INI file where a Windows serial flashing tool will read instructions from to know what to do in storing the boot file u-boot at the right place.

  • TI internal boot engine has its own requirement to start-up. This boot engine starts u-boot, so its requirement must be added into u-boot using TI AIS tool, in particular the entry point, the very first instruction of u-boot.. Actually this info is in UART boot INI file. UART boot stores u-boot into the right place and exit, nothing to discuss further. So we need to discuss only regular boot Up to this point, PC is under internal boot engine. U-boot initializes all required peripherals to copy u-boot binary from flash (either NAND or SPI) to DDR starting from address specified by entry point mentioned above. Up to this point, PC is under u-boot control at the end of u-boot where it starts kernel. Kernel will initialize all peripherals, known as hardware device, device for short, in Linux world, specified during kernel config, even those were initialized by u-boot. Kernel manages each device based on info from its own file known as device driver in a unified manner for different HW device, seen as a file in Linux, regardless it is RAM, ROM, DDR, Network, USB, Bluetooth, ,,, Up to this point, PC is under kernel control, known as kernel space in Linux. All accesses to HW devices must go through kernel device driver, so it’s called kernel mode or privilege mode or kernel space. At the end, kernel starts operating system at the entry point known as “sys_init” with filesystem, There are filesystem types, say compressed JFFS2 for limit size of flash, or popular EXT2, EXT, EXT4, … for hard dirve or SD card. Kernel starts “sys_init” in transfer from kernel space to user space, it requires a file “inittab” under root folder “/etc” in filesystem and reads content in this file as instructions what to do for the transfer. It also requires another file “rcS”, also mentioned in “inittab” file with full path, normally “/etc/init.d/rcS”. The difference is “iniitab” is a regular file, while “rcS” is a script file, known as “run control Script”, with commands to be executed. So only “rcS” can be used for debugging purpose, but not “inittab” Another script “profile” continues after “rcS” where “rcS” is for system init and “profile” for user init NOTE “inittab” is a regular file and cannot be used for debugging, say “echo” won’t work in this file “rcS” and “profile” are script files and can be used for debugging, they must be set for executable

    permission We can move “command” from “inittab” to “rcS’ for debugging, but different format

    o “inittab: “null::sysinit:/bin/mount ‐t proc proc /proc” o “rcS” : “mount ‐n ‐t proc /proc /proc”

    Filesystem must have a folder “/dev” for Linux know how to access devices. There’re 2 types : (1) static dev : all device nodes must be created in advanced (2) dynamic dev : kernel knows all required devices and creates device node accordingly. However it does require 2 device nodes available before populating the rest. Device node format mat is “name type major minor” where (1) “name” is standard name, cannot be any name, say console (2) “type” is either character type “c” or block type “b” (3) major and minor are standard numbers for standard device name

    console c 5 1 null c 1 3

  • 2. Working with Pre-Installed / Pre-Built Linux This Single Board Computer SBC8018 could be found here. It has the same Linux features as those on PowerPC Linux I worked on commercial product, all Linux images in NAND flash : (2) bootloader Uboot, (2) kernel (3) compressed filesystem JFFS2. SBC8018 has TI AM1808 bootable from SPI flash. This board has a footprint for SPI flash, but not populated. So I use this board to improve my embedded e-Linux by exercising Linux with new CPU and new SPI flash by populating SPI flash to its empty footprint. In addition it has SD Card. The main pros of NAND flash is high density as it use only ONE FET for one bit storage, so its main cons is the problem of “bad sector” as in harddrive. It looks scary during boot-up from NAND flash with a lot of flash error!

    Image Original New u-boot NAND flash SPI flash kernel NAND flash

    NFS boot : YES SPI flash NFS boot : YES

    filesystem JFFS2 in NAND flash Build Ext2 filesystem from scratch using BuildRoot for SD Card Both uboot and kernel source code will be modified for SPI flash support. NOTE The pre-built u-boot cannot be tested as it’s for NAND flash while we’re after SLI one. The pre-built kernel cannot be tested as it does not support NFS boot! Below is a capture of boot-up from original NAND flash with many NAND flash error U‐Boot 2009.11‐svn ( 1? 12 2012 ‐ 15:22:55)  I2C:   ready DRAM:  128 MB NAND:  128 MiB MMC:   davinci: 0 Bad block table not found for chip 0 Bad block table not found for chip 0 Bad block table written to 0x000007fe0000, version 0x01 Bad block table written to 0x000007fc0000, version 0x01 *** Warning ‐ bad CRC or NAND, using default environment  In:    serial Out:   serial Err:   serial ARM Clock : 300000000 Hz DDR Clock : 150000000 Hz Net:   No ETH PHY detected!!!  Hit any key to stop autoboot:  0 U‐Boot > pri bootargs=console=ttyS2,115200n8 root=/dev/mtdblock4 rootfstype=jffs2 vpif_capture.ch0_bufsize=831488 vpif_display.ch2_bufsize=831488 bootcmd=nandecc sw;nand read 0xc0700000 0x200000 0x280000;bootm 0xc0700000 bootdelay=3 baudrate=115200 bootfile="uImage" ethaddr=00:01:02:B4:36:56 

    http://www.element14.com/community/docs/DOC-42312/l/element14-quick-start-guide-for-ti-am1808-based-sbc8018-evaluation-board

  • ipaddr=192.192.192.215 serverip=192.192.192.154 stdin=serial stdout=serial stderr=serial ver=U‐Boot 2009.11‐svn ( 1? 12 2012 ‐ 15:22:55)  Environment size: 419/131068 bytes U‐Boot > run bootcmd SW ECC selected  NAND read: device 0 offset 0x200000, size 0x280000  2621440 bytes read: OK ## Booting kernel from Legacy Image at c0700000 ...    Image Name:   Linux‐2.6.33‐rc4    Image Type:   ARM Linux Kernel Image (uncompressed)    Data Size:    2454624 Bytes =  2.3 MB    Load Address: c0008000    Entry Point:  c0008000    Verifying Checksum ... OK    Loading Kernel Image ... OK OK  Starting kernel ...  Uncompressing Linux... done, booting the kernel. Linux version 2.6.33‐rc4 (yanglsh@TIOP) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1‐203) ) #14 PREEMPT Fri Jan 6 09:37:17 CST 2012 CPU: ARM926EJ‐S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: DaVinci DA850/OMAP‐L138/AM18xx EVM Memory policy: ECC disabled, Data cache writeback On node 0 totalpages: 32768 free_area_init_node: node 0, pgdat c04ee3c0, node_mem_map c0511000   DMA zone: 256 pages used for memmap   DMA zone: 0 pages reserved   DMA zone: 32512 pages, LIFO batch:7 DaVinci da850/omap‐l138/am18xx variant 0x1 Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512 Kernel command line: console=ttyS2,115200n8 root=/dev/mtdblock4 rootfstype=jffs2 vpif_capture.ch0_bufsize=831488 vpif_display.ch2_bufsize=831488 PID hash table entries: 512 (order: ‐1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode‐cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 128MB = 128MB total Memory: 124600KB available (4628K code, 359K data, 164K init, 0K highmem) SLUB: Genslabs=11, HWalign=32, Order=0‐3, MinObjects=0, CPUs=1, Nodes=1 Hierarchical RCU implementation. NR_IRQS:245 Console: colour dummy device 80x30 Calibrating delay loop... 149.50 BogoMIPS (lpj=747520) Mount‐cache hash table entries: 512 CPU: Testing write buffer coherency: ok DaVinci: 144 gpio irqs regulator: core version 0.5 NET: Registered protocol family 16 bio: create slab  at 0 SCSI subsystem initialized libata version 3.00 loaded. usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub 

  • usbcore: registered new device driver usb regulator: VDCDC1: 3200  3300 mV at 3300 mV regulator: VDCDC2: 1750  3300 mV at 3300 mV regulator: VDCDC3: 950  1375 mV at 1200 mV regulator: LDO1: 1800 mV regulator: LDO2: 1150  1300 mV at 1200 mV i2c‐gpio i2c‐gpio.1: using pins 20 (SDA) and 21 (SCL) vpif vpif: vpif probe success cfg80211: Calling CRDA to update world regulatory domain Switching to clocksource timer0_1 musb_hdrc: version 6.0, cppi4.1‐dma, otg (peripheral+host), debug=0 Waiting for USB PHY clock good... musb_hdrc: ConfigData=0x06 (UTMI‐8, dyn FIFOs, SoftConn) musb_hdrc: MHDRC RTL version 1.800 musb_hdrc: setup fifo_mode 2 musb_hdrc: 8/9 max ep, 3904/4096 memory musb_hdrc: USB OTG mode controller at fee00000 using DMA, IRQ 58 musb_hdrc musb_hdrc: MUSB HDRC host driver musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1 hub 1‐0:1.0: USB hub found hub 1‐0:1.0: 1 port detected NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) 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 udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. EMAC: MII PHY configured, RMII PHY will not be functional JFFS2 version 2.2. (NAND) © 2001‐2006 Red Hat, Inc. msgmni has been set to 243 alg: No test for stdrng (krng) io scheduler noop registered (default) da8xx_lcdc da8xx_lcdc.0: GLCD: Found Sharp_LK043T1DG01 panel Console: switching to colour frame buffer device 60x34 Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A console [ttyS2] enabled brd: module loaded loop: module loaded ahci ahci: version 3.0 ahci ahci: forcing PORTS_IMPL to 0x1 ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc scsi0 : ahci ata1: SATA max UDMA/133 irq 67 NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8‐bit) Bad block table not found for chip 0 Bad block table not found for chip 0 Scanning device for bad blocks Bad eraseblock 426 at 0x000003540000 Bad block table written to 0x000007fe0000, version 0x01 Bad block table written to 0x000007fc0000, version 0x01 Creating 5 MTD partitions on "davinci_nand.1": 

  • 0x000000000000‐0x000000020000 : "u‐boot env" 0x000000020000‐0x000000040000 : "UBL" 0x000000040000‐0x0000000c0000 : "u‐boot" 0x000000200000‐0x000000600000 : "kernel" 0x000000600000‐0x000007fc0000 : "filesystem" davinci_nand davinci_nand.1: controller rev. 2.5 PPP generic driver version 2.4.2 PPP Deflate Compression module registered PPP BSD Compression module registered PPP MPPE Compression module registered NET: Registered protocol family 24 PPPoL2TP kernel driver, V1.0 console [netcon0] enabled netconsole: network logging started ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver ohci ohci.0: DA8xx OHCI ohci ohci.0: new USB bus registered, assigned bus number 2 ohci ohci.0: irq 59, io mem 0x01e25000 hub 2‐0:1.0: USB hub found hub 2‐0:1.0: 1 port detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb‐storage USB Mass Storage support registered. g_ether gadget: using random self ethernet address g_ether gadget: using random host ethernet address usb0: MAC 72:33:14:da:43:18 usb0: HOST MAC 7e:a3:9e:fe:0f:4d g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 g_ether gadget: g_ether ready musb_hdrc musb_hdrc: MUSB HDRC host driver musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 3 hub 3‐0:1.0: USB hub found hub 3‐0:1.0: 1 port detected input: gpio‐keys as /devices/platform/gpio‐keys/input/input0 input: TPS6507x Touchscreen as /devices/platform/i2c‐gpio.1/i2c‐1/1‐0048/input/input1 omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0 omap_rtc: RTC power up reset detected i2c /dev entries driver Linux video capture interface: v2.00 tvp514x 1‐005d: tvp514x 1‐005d decoder driver registered !! vpif_capture vpif_capture: registered sub device tvp514x‐0 tvp514x 1‐005c: tvp514x 1‐005c decoder driver registered !! vpif_capture vpif_capture: registered sub device tvp514x‐1 vpif_capture vpif_capture: VPIF Capture driver initialized ata1: SATA link down (SStatus 0 SControl 300) usbcore: registered new interface driver uvcvideo USB Video Class driver (v0.1.0) watchdog watchdog: heartbeat 60 sec hub 3‐0:1.0: activate ‐‐> ‐22 cpuidle: using governor ladder cpuidle: using governor menu davinci_mmc davinci_mmc.0: Using DMA, 4‐bit mode Registered led device: led1 Registered led device: led2 Registered led device: led3 usbcore: registered new interface driver usbhid usbhid: USB HID core driver Advanced Linux Sound Architecture Driver Version 1.0.21. usbcore: registered new interface driver snd‐usb‐audio No device for DAI tlv320aic3x asoc: tlv320aic3x  davinci‐i2s mapping ok 

  • ALSA device list:   #0: DA850/OMAP‐L138 EVM (tlv320aic3x) TCP cubic registered NET: Registered protocol family 17 Clocks: disable unused emac Clocks: disable unused spi1 regulator_init_complete: incomplete constraints, leaving LDO2 on regulator_init_complete: incomplete constraints, leaving LDO1 on regulator_init_complete: incomplete constraints, leaving VDCDC3 on regulator_init_complete: incomplete constraints, leaving VDCDC2 on regulator_init_complete: incomplete constraints, leaving VDCDC1 on davinci_emac_probe: using random MAC addr: 9a:09:e9:da:5b:cf emac‐mii: probed omap_rtc omap_rtc: setting system clock to 2000‐01‐01 00:00:00 UTC (946684800) CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0 Empty flash at 0x0000fffc ends at 0x00010000 CLEANMARKER node found at 0x00010000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00020000 has totlen 0xc != normal 0x0 Empty flash at 0x0002fffc ends at 0x00030000 CLEANMARKER node found at 0x00030000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00040000 has totlen 0xc != normal 0x0 Empty flash at 0x0004fffc ends at 0x00050000 CLEANMARKER node found at 0x00050000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00060000 has totlen 0xc != normal 0x0 Empty flash at 0x0006fffc ends at 0x00070000 CLEANMARKER node found at 0x00070000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00080000 has totlen 0xc != normal 0x0 Empty flash at 0x0008fffc ends at 0x00090000 CLEANMARKER node found at 0x00090000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x000a0000 has totlen 0xc != normal 0x0 Empty flash at 0x000afffc ends at 0x000b0000 CLEANMARKER node found at 0x000b0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x000c0000 has totlen 0xc != normal 0x0 Empty flash at 0x000cfffc ends at 0x000d0000 CLEANMARKER node found at 0x000d0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x000e0000 has totlen 0xc != normal 0x0 Empty flash at 0x000efffc ends at 0x000f0000 CLEANMARKER node found at 0x000f0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00100000 has totlen 0xc != normal 0x0 Empty flash at 0x0010fffc ends at 0x00110000 CLEANMARKER node found at 0x00110000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00120000 has totlen 0xc != normal 0x0 Empty flash at 0x0012ffe4 ends at 0x00130000 CLEANMARKER node found at 0x00130000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00140000 has totlen 0xc != normal 0x0 Empty flash at 0x0014fffc ends at 0x00150000 CLEANMARKER node found at 0x00150000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00160000 has totlen 0xc != normal 0x0 Empty flash at 0x0016fffc ends at 0x00170000 CLEANMARKER node found at 0x00170000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00180000 has totlen 0xc != normal 0x0 Empty flash at 0x0018fffc ends at 0x00190000 CLEANMARKER node found at 0x00190000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x001a0000 has totlen 0xc != normal 0x0 Empty flash at 0x001afffc ends at 0x001b0000 CLEANMARKER node found at 0x001b0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x001c0000 has totlen 0xc != normal 0x0 Empty flash at 0x001cfffc ends at 0x001d0000 CLEANMARKER node found at 0x001d0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x001e0000 has totlen 0xc != normal 0x0 Empty flash at 0x001effdc ends at 0x001f0000 

  • CLEANMARKER node found at 0x001f0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00200000 has totlen 0xc != normal 0x0 Empty flash at 0x0020fffc ends at 0x00210000 CLEANMARKER node found at 0x00210000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00220000 has totlen 0xc != normal 0x0 Empty flash at 0x0022fffc ends at 0x00230000 CLEANMARKER node found at 0x00230000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00240000 has totlen 0xc != normal 0x0 Empty flash at 0x0024fffc ends at 0x00250000 CLEANMARKER node found at 0x00250000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00260000 has totlen 0xc != normal 0x0 Empty flash at 0x0026ffa8 ends at 0x00270000 CLEANMARKER node found at 0x00270000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00280000 has totlen 0xc != normal 0x0 Empty flash at 0x0028fffc ends at 0x00290000 CLEANMARKER node found at 0x00290000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x002a0000 has totlen 0xc != normal 0x0 Empty flash at 0x002afffc ends at 0x002b0000 CLEANMARKER node found at 0x002b0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x002c0000 has totlen 0xc != normal 0x0 Empty flash at 0x002cfffc ends at 0x002d0000 CLEANMARKER node found at 0x002d0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x002e0000 has totlen 0xc != normal 0x0 Empty flash at 0x002efffc ends at 0x002f0000 CLEANMARKER node found at 0x002f0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00300000 has totlen 0xc != normal 0x0 Empty flash at 0x0030fffc ends at 0x00310000 CLEANMARKER node found at 0x00310000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00320000 has totlen 0xc != normal 0x0 Empty flash at 0x0032fffc ends at 0x00330000 CLEANMARKER node found at 0x00330000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00340000 has totlen 0xc != normal 0x0 Empty flash at 0x0034fffc ends at 0x00350000 CLEANMARKER node found at 0x00350000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00360000 has totlen 0xc != normal 0x0 Empty flash at 0x0036fffc ends at 0x00370000 CLEANMARKER node found at 0x00370000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00380000 has totlen 0xc != normal 0x0 Empty flash at 0x0038fffc ends at 0x00390000 CLEANMARKER node found at 0x00390000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x003a0000 has totlen 0xc != normal 0x0 Empty flash at 0x003afffc ends at 0x003b0000 CLEANMARKER node found at 0x003b0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x003c0000 has totlen 0xc != normal 0x0 Empty flash at 0x003cfffc ends at 0x003d0000 CLEANMARKER node found at 0x003d0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x003e0000 has totlen 0xc != normal 0x0 Empty flash at 0x003efffc ends at 0x003f0000 CLEANMARKER node found at 0x003f0000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00400000 has totlen 0xc != normal 0x0 Empty flash at 0x0040fffc ends at 0x00410000 CLEANMARKER node found at 0x00410000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00420000 has totlen 0xc != normal 0x0 Empty flash at 0x0042ffb8 ends at 0x00430000 CLEANMARKER node found at 0x00430000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00440000 has totlen 0xc != normal 0x0 Empty flash at 0x0044ffe8 ends at 0x00450000 CLEANMARKER node found at 0x00450000 has totlen 0xc != normal 0x0 CLEANMARKER node found at 0x00460000 has totlen 0xc != normal 0x0 Empty flash at 0x0046fffc ends at 0x00470000 CLEANMARKER node found at 0x00470000 has totlen 0xc != normal 0x0 

  • Empty flash at 0x0047ac88 ends at 0x0047b000 Empty flash at 0x0178e0ac ends at 0x0178e800 VFS: Mounted root (jffs2 filesystem) on device 31:4. Freeing init memory: 164K INIT: version 2.86 booting Starting udevudevd version 124 started  uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock1, sector 0 Buffer I/O error on device mtdblock1, logical block 0 uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock1, sector 8 Buffer I/O error on device mtdblock1, logical block 1 uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock1, sector 16 Buffer I/O error on device mtdblock1, logical block 2 uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock1, sector 24 Buffer I/O error on device mtdblock1, logical block 3 uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock1, sector 0 Buffer I/O error on device mtdblock1, logical block 0 uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock2, sector 0 Buffer I/O error on device mtdblock2, logical block 0 uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock2, sector 8 Buffer I/O error on device mtdblock2, logical block 1 uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock2, sector 16 Buffer I/O error on device mtdblock2, logical block 2 uncorrectable error : uncorrectable error : Remounting root file system...  end_request: I/O error, dev mtdblock2, sector 24 Buffer I/O error on device mtdblock2, logical block 3 uncorrectable error : uncorrectable error : end_request: I/O error, dev mtdblock2, sector 0 Buffer I/O error on device mtdblock2, logical block 0 Setting up IP spoofing protection: rp_filter. Configuring network interfaces... udhcpc (v1.13.2) started Sending discover... Sending select for 10.0.0.26... Lease of 10.0.0.26 obtained, lease time 86400 adding dns 10.0.0.1 done. Tue Apr 14 20:24:00 UTC 2009 /etc/init.d/rc: /etc/rcS.d/S90led.sh: line 3: /bin/led_acc: not found INIT: Entering runlevel: 5 Starting telnet daemon. Starting syslogd/klogd: done  

  • .‐‐‐‐‐‐‐. |       |                  .‐. |   |   |‐‐‐‐‐.‐‐‐‐‐.‐‐‐‐‐.| |   .‐‐‐‐..‐‐‐‐‐.‐‐‐‐‐. |       |     | __  |  ‐‐‐'| '‐‐.|  .‐'|     |     | |   |   |  |  |     |‐‐‐  ||  ‐‐'|  |  |  '  | | | | '‐‐‐'‐‐‐'‐‐'‐‐'‐‐.  |‐‐‐‐‐''‐‐‐‐''‐‐'  '‐‐‐‐‐'‐'‐'‐'                 ‐'  |                 '‐‐‐'  The Angstrom Distribution 2011.09 sbc8018 ttyS2  sbc8018 login: root root@sbc8018:~#  NOTE Standard login “root” with no password required. 3. U-Boot : uboot-03.20.00.14 make distclean : clean up make da850evm_config make  Mod to include/configs/da850evm.h #define CONFIG_SPI_FLASH_MACRONIX  #define  CONFIG_USE_SPIFLASH #undef CONFIG_USE_NAND  There’re 2 types of actions in UBoot terminal “uboot_cmd” to run UBoot cmd, like “pri” for “printenv” “run spi.ubt” to run UBoot env_var define in “da850evm.h” Some most used uboot commands are h – help : to see all uboot commands available pri – printenv : to see all uboot env-var available set – setenv : to set uboot variable, like ipaddr, serverip, gatewayip, … ping : to check network run : to run uboot env var, like “run spi.ubt” to update uboot image over network Below is some useful uboot env-var bootdelay=3 baudrate=115200 ethaddr=00:12:34:56:78:01 ipaddr=10.0.0.22 serverip=10.0.0.15 rootpath="/home/dkn/TFTP" gatewayip=10.0.0.1 bootfile="_uImg_" loadaddr=0xC2000000 consDev=ttyS2,115200n8 rfsAddr=0xC1180000 

  • ubtSize=0x050000 lnxBase=0x050000 lnxSize=0x260000 rfsBase=0x2b0000 rfsSize=0x540000 moreBtArgs=ip=dhcp ignore_loglevel nfsOpts=wsize=1500,rsize=1500 rfspath=/home/dkn/_NFS/_RFS spi.ubt=sf probe 0; sf erase 0 $ubtSize; tftp  $loadaddr _ubt_AIS; sf write  $loadaddr 0 $filesize spi.lnx=sf probe 0; sf erase $lnxBase $lnxSize; tftp  $loadaddr ${bootfile}; sf write  $loadaddr $lnxBase $filesize spi.rfs=sf probe 0; sf erase $rfsBase $rfsSize; tftp $loadaddr _rfs_GZ; sf write  $loadaddr $rfsBase $filesize spi.args=setenv bootargs mem=32M console=$consDev rootfs=/dev/ram0 rw initrd=${rfsAddr},6M spi.mfs=sf probe 0; sf read $rfsAddr $rfsBase $rfsSize; sf read $loadaddr $lnxBase $lnxSize; bootm $loadaddr spi.boot=run spi.args; run spi.mfs nfs.args=setenv bootargs console=$consDev root=/dev/nfs rw nfsroot=$serverip:$rfspath,$nfsOpts ip=dhcp $moreBtArgs nfs.boot=run nfs.args; tftp ${loadaddr} ${bootfile}; bootm ${loadaddr} mmc.args=setenv bootargs root=/dev/mmcblk0p1 rw console=$consDev rootdelay=5 mmc.boot=run mmc.args; sf probe 0; sf read $loadaddr $lnxBase $lnxSize; bootm $loadaddr bootcmd=run nfs.boot stdin=serial stdout=serial stderr=serial ver=U‐Boot 2009.11 (Jun 12 2015 ‐ 20:23:59)  Environment size: 1411/65532 bytes  For SDcard boot, we need the following mmc.args=setenv bootargs root=/dev/mmcblk0p1 rw console=$consDev rootdelay=5 mmc.boot=run mmc.args; sf probe 0; sf read $loadaddr $lnxBase $lnxSize; bootm $loadaddr  3.1. Boot Device Every CPU has its own boot engine to define what kind of device it supports : parallel / serial interface, NOR / NAND flash, SPI flash, SD card, PC UART, … TI CPU has its own boot engine based on boot header requiring “u-boot.bin” converted into its own format for proper booting : interface (NAND, SPI, …), entry point, sanity check, … There are, unfortunately, no such tools for Linux, so TFTP should be used to send back and forth between Linux and PC. I’m not able to run PC tool on Linux using Mono-Framework, unfortunately! To get u-boot.bin from Linux tftp ‐i 10.0.0.15 get u‐boot.bin To put “u-boot.ais” on Linux tftp ‐i 10.0.0.15 put u‐boot.ais TI AISGen converts “u-boot.bin” into “u-boot.ais” to boot from SPI, NAND, …

    3.1.1. SPI Boot Device HexAIS_OMAP‐L138.exe ‐ini OMAP‐L138.ini ‐o u‐boot‐spi.ais ‐entrypoint 0xc1080000 u‐boot.bin@0xc1080000

  • 3.1.2. NAND Boot Device HexAIS_OMAP‐L138.exe ‐ini OMAP‐L138_nand_D800K002.ini ‐o u‐boot‐nand.ais ‐entrypoint 0xc1080000 u‐boot.bin@0xc1080000 3.2. Flashing Device For TI board AM1808 and OMAP-L138, the bootable image “u-boot.ais” is flashed via PC serial comm. Using the TI utility sfh_OMAP-L138.exe. The board must be set to boot in UART mode, so on-board DIP-switch must be set in UART-boot.

    SW7 1 2 3 4 Serial Down Load OFF OFF ON ON NAND Boot ON OFF OFF OFF SPI Boot OFF OFF OFF OFF

    3.2.1. SPI Boot Device sfh_OMAP‐L138.exe ‐flash_noubl u‐boot‐spi.ais

    3.2.2. NAND Boot Device sfh_OMAP‐L138.exe ‐targetType AM1808 ‐flashType NAND ‐flash_noubl u‐boot‐nand.ais Below is capture of new uboot with SPI flash support. NEW are (1) SF: Detected MX25L3205D with page size 256, total 4194304 bytes (2) No scary NAND error (3) Size 167 KB (old 207 KB) U‐Boot 2009.11 (Jun 12 2015 ‐ 20:23:59)  I2C:   ready DRAM:  128 MB MMC:   davinci: 0 SF: Detected MX25L3205D with page size 256, total 4194304 bytes  In:    serial Out:   serial Err:   serial ARM Clock : 300000000 Hz DDR Clock : 132000000 Hz Net:   No ETH PHY detected!!!  Hit any key to stop autoboot:  0 U‐Boot >  pri bootdelay=3 baudrate=115200   ethaddr=00:12:34:56:78:01 ipaddr=10.0.0.22 serverip=10.0.0.15 rootpath="/home/dkn/TFTP" 

    mailto:u-boot.bin@0xc1080000mailto:u-boot.bin@0xc1080000

  • gatewayip=10.0.0.1 bootfile="_uImg_" loadaddr=0xC2000000 consDev=ttyS2,115200n8 rfsAddr=0xC1180000 ubtSize=0x050000 lnxBase=0x050000 lnxSize=0x260000 rfsBase=0x2b0000 rfsSize=0x540000 moreBtArgs=ip=dhcp ignore_loglevel nfsOpts=wsize=1500,rsize=1500 rfspath=/home/dkn/_NFS/_RFS spi.ubt=sf probe 0; sf erase 0 $ubtSize; tftp  $loadaddr _ubt_AIS; sf write  $loadaddr 0 $filesize spi.lnx=sf probe 0; sf erase $lnxBase $lnxSize; tftp  $loadaddr ${bootfile}; sf write  $loadaddr $lnxBase $filesize spi.rfs=sf probe 0; sf erase $rfsBase $rfsSize; tftp $loadaddr _rfs_GZ; sf write  $loadaddr $rfsBase $filesize spi.args=setenv bootargs mem=32M console=$consDev rootfs=/dev/ram0 rw initrd=${rfsAddr},6M spi.mfs=sf probe 0; sf read $rfsAddr $rfsBase $rfsSize; sf read $loadaddr $lnxBase $lnxSize; bootm $loadaddr spi.boot=run spi.args; run spi.mfs mmc.args=setenv bootargs root=/dev/mmcblk0p1 rw console=$consDev rootdelay=5 nfs.args=setenv bootargs console=$consDev root=/dev/nfs rw nfsroot=$serverip:$rfspath,$nfsOpts ip=dhcp $moreBtArgs nfs.boot=run nfs.args; tftp ${loadaddr} ${bootfile}; bootm ${loadaddr} mmc.boot=run mmc.args; sf probe 0; sf read $loadaddr $lnxBase $lnxSize; bootm $loadaddr bootcmd=run nfs.boot stdin=serial stdout=serial stderr=serial ver=U‐Boot 2009.11 (Jun 12 2015 ‐ 20:23:59)  Environment size: 1411/65532 bytes U‐Boot >  4. Linux : linux-03.20.00.14 The NFS boot of the pre-built kernel is here : sbc8018_NFS.txt make distclean make sbc8018_defconfig make uImage  Config : Correct with Davicom PHY Network Device support   Ethernet (10 or 100 Mbit) : uncheck all but “TI DaVinvci EMAC support”   PHY : Uncheck all but “Davicom” for onboard DM9161  The NFS boot of newly configured is here : am18_NFS.txt NOTE Both look similar Both stops at “Freeing init memory: 164K” as there’s no filesystem for kernel to start “sys_init”

  • 5. Filesystem : buildroot-2012.02 (BR) All big CPU makers provide finance support to Linux development for their CPUs. It’s too costly to do regression test and maintain compatibility in all realease. So it’s wise to keep using the same Linux suite release for specific CPU. For example I have to keep Linux CentOS-5 for my PowerPC MPC82xx/83xx Linux. My very first problem in eLinux was failure in compiling PCI driver on SUSE Linux, I had to use RedHat box. SBC-X86 : linux-2.6.16, busybox-1.2.2 MPC-8272 : uboot-1.3.2, linux-2.6.25, busybox-1.1.3 MPC-8313 : uboot-1.2.0, linux-2.6.24, busybox-1.1.3 MPC-8308 : uboot-2009, linux-2.6.29, busybox-1.11.2 I use RedHat/Centos-5 for x86 & PowerPC Linux, Debian Ubuntu for ARM Linux. Recently in exploring BeagleBone Linux, I had to use different compiler for uboot/kernel and busybox, until I found BuildRoot (BR) to provide a single tool-chain for the whole : Uboot, kernel and filesystem (busybox, shared glibc, …) Below is my procedure in working with BR

    Use Uboot & Linux kernel provided from CPU vendor, TI AM180x in this case Select BR based on toolchain (TC) used in Linux package from vendor Use BR to create ONLY filesystem : busybox, share lib, and any package if so required, say “ntpdate”,

    (BR Package Selection) BR config : make xconfig

    o Target Architecture : “arm” and variant “arm926t” o Toolchain : External ARM2009q1 (Download automatically OR set Toolchain PATH) o Busybox config : make busybox-xconfig

    set Cross-Compliler prefix : arm-non-linux-gnueabi-, just in case to compile it alone network : telnetd

    o Create filesystem : make; make target clean (if so required) o Replace “dev” and “etc” with custom ones (not using mdev, leave mdev as-is by BR)

    BR creates folder “output” o output//build : busybox-1.19.4 o output/host : toolchain (download or copy from host) o output/target : filesystem

    NOTE BR “make xconfig” does require QT3, and ONLT “QT3”, so “QT4” must be REMOVED, if exists!! BR always does cross-compling, so copy over from PATH provided from user, but select from BR list of

    compilers DON’T over-config, keep default as much as possible, otherwise problem down the road Some helpful buildroot commands are make uboot‐build make uboot‐rebuild make linux‐build make linux‐rebuild make linux‐xconfig make linux‐rebuild 

  • make linux‐rebuild uImage  make target clean  make telnetd‐build  6. Debugging Linux System using NFS Boot 6.1. Default BR settings with correct target & toolchain We start with all BR default settings with right selections : target arch (arm, arm926t) and toolchain(arm-2009q1). We first to make sure “dev” contains “dev/console” for debugging messages. Unfortunately, BR generates wrong device nodes, they look like a regular file, NOT a device file # BR dev : regular file with single number for file size 

    ‐rw‐rw‐rw‐ 1 dkn root    0 2015‐06‐15 16:16 console . . .  We use MDEV to generate device node, but still need provide “/dev/console” to have it available early on to debug sys_init process. So, delete all and create 2 nodes like below “sudo mknod console 5 1” “sudo mknod null 1 3”  # correct device file with 2 numbers : major & minor ID crw‐‐‐‐‐‐‐  1 root root      5,   1 2015‐06‐15 09:04 console crw‐‐‐‐‐‐‐  1 root root      1,   3 2015‐06‐15 09:04 null  With NFS-bootable kernel, it “stops” at the boundary transfer control from kernel to OS “Freeing init memory: 160K” So, it’s NOT able to transfer control to “sys_init” of the Linux OS (/etc/inittab rcS), Busybox sys_init in this case. “sys_init” loads the file “/etc/inittab” to know what to do in the “rc script rcS”. “inittab” is just a file, not an executable script, so cannot be used for debugging purpose. # /etc/inittab # Startup the system null::sysinit:/bin/mount ‐t proc proc /proc null::sysinit:/bin/mount ‐o remount,rw / # REMOUNT_ROOTFS_RW null::sysinit:/bin/mkdir ‐p /dev/pts null::sysinit:/bin/mkdir ‐p /dev/shm null::sysinit:/bin/mount ‐a null::sysinit:/bin/hostname ‐F /etc/hostname  # now run any rc scripts ::sysinit:/etc/init.d/rcS  # Put a getty on the serial port ttyS0::respawn:/sbin/getty ‐L ttyS0 115200 vt100 # GENERIC_SERIAL  

  • # Stuff to do for the 3‐finger salute ::ctrlaltdel:/sbin/reboot  # Stuff to do before rebooting null::shutdown:/etc/init.d/rcK null::shutdown:/bin/umount ‐a ‐r null::shutdown:/sbin/swapoff –a  # /etc/init.d/init.d  for i in /etc/init.d/S??* ;do       # Ignore dangling symlinks (if any).      [ ! ‐f "$i" ] && continue       case "$i" in   *.sh)       # Source shell script for speed.       (     trap ‐ INT QUIT TSTP     set start     . $i       )       ;;   *)       # No sh extension, so fork subprocess.       $i start       ;;     esac done  To ease debugging, we modify those 2 scripts like below in using “echo” to mintor the status for debugging # /etc/inittab # now run any rc scripts ::sysinit:/etc/init.d/rcS  ############################################################################### # Fix It for Busybox sys_init to work properly # No need for regular “sys_init” # Start an "askfirst" shell on the serial port ## console::askfirst:‐/bin/ash ###############################################################################  # Put a getty on the serial port ttyS0::respawn:/sbin/getty ‐L ttyS0 115200 vt100 # GENERIC_SERIAL  # Stuff to do for the 3‐finger salute ::ctrlaltdel:/sbin/reboot  # Stuff to do before rebooting null::shutdown:/etc/init.d/rcK null::shutdown:/bin/umount ‐a ‐r null::shutdown:/sbin/swapoff –a  # /etc/init.d/init.d  #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ #   Prints execution status for debugging purpose 

  • #   arg1 : Execution status #   arg2 : Continue (0) or Abort (1) on error #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ status () {   if [ $1 ‐eq 0 ] ; then     echo "[SUCCESS]"        else     echo "[FAILED]"      if [ $2 ‐eq 1 ] ; then       echo "... System init aborted."       exit 1     fi        fi } ############################################################################### # In INITTAB previously  echo ‐n " Mounting /proc             : " mount ‐n ‐t proc /proc /proc status $? 1  echo ‐n " Mounting /sys              : " mount ‐n ‐t sysfs sysfs /sys status $? 1  echo ‐n " Mounting /dev              : " mount ‐n ‐t tmpfs mdev /dev status $? 1  echo ‐n " Mounting /dev/pts          : " mkdir /dev/pts mount ‐t devpts devpts /dev/pts status $? 1  echo ‐n " Enabling hot‐plug          : " echo "/sbin/mdev" > /proc/sys/kernel/hotplug status $? 0  echo ‐n " Populating /dev            : " mkdir –p /dev/input mkdir –p /dev/snd  mdev ‐s status $? 0  #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ #   Mount the default file systems #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ echo ‐n " Mounting other filesystems fstab : " mount ‐a status $? 0  #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ #   Start network #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ echo ‐n " Starting network                   : "  # Must be checked to make sure NOT to get new IPaddr in case NFS boot;  # otherwise the operation gets hang 

  • if [ $(ifconfig eth0 | awk '/HWaddr / {print $5}') == "00:00:00:00:00:00" ]; then   echo ‐n "Do uDHCPc"   /sbin/udhcpc ‐q ‐i eth0 fi status $? 0  #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ #   Start telnet daemon #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ echo ‐n " Starting telnet daemon             : " telnetd status $? 0  ############################################################################### for i in /etc/init.d/S??* ;do       # Ignore dangling symlinks (if any).      [ ! ‐f "$i" ] && continue       case "$i" in   *.sh)       # Source shell script for speed.       (     trap ‐ INT QUIT TSTP     set start     . $i       )       ;;   *)       # No sh extension, so fork subprocess.       $i start       ;;     esac done  6.2. DHCP Client NOTE During NFS boot, kernel does DHCP to get dynamic IP addr. In SD card boot, we have to request dynamic IPaddr using Busybox command “udhcpc”. However, we cannot do “udhcpc” for new IPaddr in NFS boot as the new IPP address will interfere with NFS operation! Do it if network interface is not up yet, and its MACaddr (HWaddrr) is ZERO. 6.3. Deploying telnet server Linux is “network-born”, so it’s wise to add telnet-server to see how new system behave. We just simply check “telnet server / tenet daemon: telnetd” in Busybox and update the BR filesystem. Unfortunately, it keeps asking for login 3:DKN/home/DKN # telnet 10.0.0.46 Trying 10.0.0.46... Connected to 10.0.0.46. Escape character is '^]'.  10.0.0.46 login: root Login incorrect 10.0.0.46 login: 

  • FIX IT : make busybox-xconfig Uncheck “etc/noggin” Uncheck “etc/securetty” make Now, it’s happy with login, but it asks for password. A quick solution is to modify “/etc/passwd” to bypass this step #/etc/passwd root:x:0:0:root:/root:/bin/sh daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:100:sync:/bin:/bin/sync mail:x:8:8:mail:/var/spool/mail:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh www‐data:x:33:33:www‐data:/var/www:/bin/sh backup:x:34:34:backup:/var/backups:/bin/sh operator:x:37:37:Operator:/var:/bin/sh haldaemon:x:68:68:hald:/:/bin/sh dbus:x:81:81:dbus:/var/run/dbus:/bin/sh ftp:x:83:83:ftp:/home/ftp:/bin/sh nobody:x:99:99:nobody:/home:/bin/sh sshd:x:103:99:Operator:/var:/bin/sh default:x:1000:1000:Default non‐root user:/home/default:/bin/sh  Just change the first line for root passwd by delete ‘x’ between “:x:” root::0:0:root:/root:/bin/sh  We’re supposed to have a successful telnet from other host, like windows. Improving System Behavior with new “profile” All system behaviors come from “/etc/profile” # /etc/profile # ~/.bashrc: executed by bash(1) for non‐login interactive shells.  export PATH=\ /bin:\ /sbin:\ /usr/bin:\ /usr/sbin:\ /usr/bin/X11:\ /usr/local/bin  # If running interactively, then: if [ "$PS1" ]; then      if [ "$BASH" ]; then   export PS1="[\u@\h \W]\\$ "   alias ll='/bin/ls ‐‐color=tty ‐laFh'   alias ls='/bin/ls ‐‐color=tty ‐F'   export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=0

  • 1;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:';     else       if [ "`id ‐u`" ‐eq 0 ]; then    export PS1='# '       else   export PS1='$ '       fi     fi      export USER=`id ‐un`     export LOGNAME=$USER     export HOSTNAME=`/bin/hostname`     export HISTSIZE=1000     export HISTFILESIZE=1000     export PAGER='/bin/more '     export EDITOR='/bin/vi'     export INPUTRC=/etc/inputrc     export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile      ### Some aliases     alias ps2='ps facux '     alias ps1='ps faxo "%U %t %p %a" '     alias af='ps af'     alias cls='clear'     alias df='df ‐h'     alias indent='indent ‐bad ‐bap ‐bbo ‐nbc ‐br ‐brs ‐c33 ‐cd33 ‐ncdb ‐ce ‐ci4 ‐cli0 ‐cp33 ‐cs ‐d0 ‐di1 ‐nfc1 ‐nfca ‐hnl ‐i4 ‐ip0 ‐l75 ‐lp ‐npcs ‐npsl ‐nsc ‐nsob ‐nss ‐ts4 '     #alias bc='bc ‐l'     alias minicom='minicom ‐c on'     alias calc='calc ‐Cd '     alias bc='calc ‐Cd ' fi;  # Source configuration files from /etc/profile.d for i in /etc/profile.d/*.sh ; do     if [ ‐r "$i" ]; then         . $i     fi done  New /etc/profile . . .  # If running interactively, then: ## if [ "$PS1" ]; then  ############################################################################### echo " Set HostName "  HOSTNAME=$(ifconfig | awk ‐F. '/inet / {if(NR==2) print $4}' | awk '{printf "am18_%d", $1}')  hostname $HOSTNAME  PS1="${HOSTNAME}:\w % "  HOME=/home  # Adjust TimeZone 

  • TZ="PST+7"  export PATH PS1 HOME TZ  umask 022  ###############################################################################      alias ll='/bin/ls ‐‐color=tty ‐laFh'     alias ls='/bin/ls ‐‐color=tty ‐F'     export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:'; . . .  NOTE AWK syntax is “awk ‘/pattern/ {action} [file]’” where “ “ is default separator echo $(/sbin/ifconfig eth0 | awk '/HWaddr / {print $5}')  # field $5 of default separator ' ' echo $(/sbin/ifconfig eth0 | awk ‐F: '/HWaddr / {print $5}')  # field $5 of separator ':'  The old prompt is

  • Note the new prompt matched with IPaddr using new /etc/profile file with

  • 6.4. Deploying HTTP Server Just check http-daemon in Busybox and do the following mkdir /home/http     # chmod 757 mkdir /home/http/cgi‐bin  # chmod 757 httpd –h /home/http       AM18 Web Server with Linux 2.6.33       body   {     color:#000000;     font‐family:sans‐serif;   }       AM18 Web Server with Linux 2.6.33   

      

      Features    

  • 6.5. NFS Boot Capture Now, it’s time to start “telnetd” and “httpd” in “rcS” script #/etc/init.d/rcS  . . .  #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ #   Start network #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ echo ‐n " Starting network                   : "  # Must be checked to make sure NOT to get new IPaddr in case NFS boot;  # otherwise the operation gets hang if [ $(ifconfig eth0 | awk '/HWaddr / {print $5}') == "00:00:00:00:00:00" ]; then 

  •   echo ‐n "Do uDHCPc"   /sbin/udhcpc ‐q ‐i eth0 fi status $? 0  #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ #   Start telnet daemon #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ echo ‐n " Starting telnet daemon             : " telnetd status $? 0  #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ #   Start http daemon #   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ echo ‐n " Starting http daemon               : " httpd ‐h /home/http status $? 0   U‐Boot 2009.11 (Jun 12 2015 ‐ 20:23:59)  I2C:   ready DRAM:  128 MB MMC:   davinci: 0 SF: Detected MX25L3205D with page size 256, total 4194304 bytes In:    serial Out:   serial Err:   serial ARM Clock : 300000000 Hz DDR Clock : 132000000 Hz Net:   No ETH PHY detected!!!  Hit any key to stop autoboot:  0 Using  device TFTP from server 10.0.0.15; our IP address is 10.0.0.22 Filename '_uImg_'. Load address: 0xc2000000 Loading: #################################################################          #################################################################          ########################## done Bytes transferred = 2283712 (22d8c0 hex) ## Booting kernel from Legacy Image at c2000000 ...    Image Name:   Linux‐2.6.33‐rc4    Image Type:   ARM Linux Kernel Image (uncompressed)    Data Size:    2283648 Bytes =  2.2 MB    Load Address: c0008000    Entry Point:  c0008000    Verifying Checksum ... OK    Loading Kernel Image ... OK OK  Starting kernel ...  Uncompressing Linux... done, booting the kernel. Linux version 2.6.33‐rc4 (dkn@dkn‐ubuntu‐10) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1‐202) ) #4 PREEMPT Fri Jun 12 22:38:18 PDT 2015 CPU: ARM926EJ‐S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache 

  • Machine: DaVinci DA850/OMAP‐L138/AM18xx EVM Memory policy: ECC disabled, Data cache writeback On node 0 totalpages: 32768 free_area_init_node: node 0, pgdat c04992b8, node_mem_map c04bc000   DMA zone: 256 pages used for memmap   DMA zone: 0 pages reserved   DMA zone: 32512 pages, LIFO batch:7 DaVinci da850/omap‐l138/am18xx variant 0x1 Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512 Kernel command line: console=ttyS2,115200n8 root=/dev/nfs rw nfsroot=10.0.0.15:/home/dkn/_NFS/_RFS,wsize=1500,rsize=1500 ip=dhcp ip=dhcp ignore_loglevel debug: ignoring loglevel setting. PID hash table entries: 512 (order: ‐1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode‐cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 128MB = 128MB total Memory: 124956KB available (4328K code, 323K data, 160K init, 0K highmem) SLUB: Genslabs=11, HWalign=32, Order=0‐3, MinObjects=0, CPUs=1, Nodes=1 Hierarchical RCU implementation. NR_IRQS:245 Console: colour dummy device 80x30 Calibrating delay loop... 149.50 BogoMIPS (lpj=747520) Mount‐cache hash table entries: 512 CPU: Testing write buffer coherency: ok DaVinci: 144 gpio irqs regulator: core version 0.5 NET: Registered protocol family 16 bio: create slab  at 0 SCSI subsystem initialized libata version 3.00 loaded. usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb regulator: VDCDC1: 3200  3300 mV at 3300 mV regulator: VDCDC2: 1750  3300 mV at 3300 mV regulator: VDCDC3: 950  1375 mV at 1200 mV regulator: LDO1: 1800 mV regulator: LDO2: 1150  1300 mV at 1200 mV i2c‐gpio i2c‐gpio.1: using pins 20 (SDA) and 21 (SCL) vpif vpif: vpif probe success Switching to clocksource timer0_1 musb_hdrc: version 6.0, cppi4.1‐dma, otg (peripheral+host), debug=0 Waiting for USB PHY clock good... musb_hdrc: ConfigData=0x06 (UTMI‐8, dyn FIFOs, SoftConn) musb_hdrc: MHDRC RTL version 1.800 musb_hdrc: setup fifo_mode 2 musb_hdrc: 8/9 max ep, 3904/4096 memory musb_hdrc: USB OTG mode controller at fee00000 using DMA, IRQ 58 musb_hdrc musb_hdrc: MUSB HDRC host driver musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1 hub 1‐0:1.0: USB hub found hub 1‐0:1.0: 1 port detected NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) 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 udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. EMAC: MII PHY configured, RMII PHY will not be functional JFFS2 version 2.2. (NAND) © 2001‐2006 Red Hat, Inc. msgmni has been set to 244 io scheduler noop registered (default) da8xx_lcdc da8xx_lcdc.0: GLCD: Found Sharp_LK043T1DG01 panel Console: switching to colour frame buffer device 60x34 Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A console [ttyS2] enabled brd: module loaded loop: module loaded ahci ahci: version 3.0 ahci ahci: forcing PORTS_IMPL to 0x1 ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc scsi0 : ahci ata1: SATA max UDMA/133 irq 67 NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8‐bit) Bad block table found at page 65472, version 0x01 Bad block table found at page 65408, version 0x01 nand_read_bbt: Bad block at 0x000006ea0000 Creating 5 MTD partitions on "davinci_nand.1": 0x000000000000‐0x000000020000 : "u‐boot env" 0x000000020000‐0x000000040000 : "UBL" 0x000000040000‐0x0000000c0000 : "u‐boot" 0x000000200000‐0x000000600000 : "kernel" 0x000000600000‐0x000007fc0000 : "filesystem" davinci_nand davinci_nand.1: controller rev. 2.5 console [netcon0] enabled netconsole: network logging started ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver ohci ohci.0: DA8xx OHCI ohci ohci.0: new USB bus registered, assigned bus number 2 ohci ohci.0: irq 59, io mem 0x01e25000 hub 2‐0:1.0: USB hub found hub 2‐0:1.0: 1 port detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb‐storage USB Mass Storage support registered. g_ether gadget: using random self ethernet address g_ether gadget: using random host ethernet address usb0: MAC 5e:50:ba:2a:67:1e usb0: HOST MAC 36:47:0b:83:90:e5 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 g_ether gadget: g_ether ready musb_hdrc musb_hdrc: MUSB HDRC host driver musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 3 hub 3‐0:1.0: USB hub found hub 3‐0:1.0: 1 port detected input: gpio‐keys as /devices/platform/gpio‐keys/input/input0 input: TPS6507x Touchscreen as /devices/platform/i2c‐gpio.1/i2c‐1/1‐0048/input/input1 omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0 omap_rtc: RTC power up reset detected i2c /dev entries driver Linux video capture interface: v2.00 tvp514x 1‐005d: tvp514x 1‐005d decoder driver registered !! 

  • vpif_capture vpif_capture: registered sub device tvp514x‐0 tvp514x 1‐005c: tvp514x 1‐005c decoder driver registered !! vpif_capture vpif_capture: registered sub device tvp514x‐1 vpif_capture vpif_capture: VPIF Capture driver initialized usbcore: registered new interface driver uvcvideo USB Video Class driver (v0.1.0) watchdog watchdog: heartbeat 60 sec hub 3‐0:1.0: activate ‐‐> ‐22 cpuidle: using governor ladder cpuidle: using governor menu davinci_mmc davinci_mmc.0: Using DMA, 4‐bit mode ata1: SATA link down (SStatus 0 SControl 300) Registered led device: led1 Registered led device: led2 Registered led device: led3 usbcore: registered new interface driver usbhid usbhid: USB HID core driver Advanced Linux Sound Architecture Driver Version 1.0.21. usbcore: registered new interface driver snd‐usb‐audio No device for DAI tlv320aic3x asoc: tlv320aic3x  davinci‐i2s mapping ok ALSA device list:   #0: DA850/OMAP‐L138 EVM (tlv320aic3x) TCP cubic registered NET: Registered protocol family 17 Clocks: disable unused emac Clocks: disable unused spi1 regulator_init_complete: incomplete constraints, leaving LDO2 on regulator_init_complete: incomplete constraints, leaving LDO1 on regulator_init_complete: incomplete constraints, leaving VDCDC3 on regulator_init_complete: incomplete constraints, leaving VDCDC2 on regulator_init_complete: incomplete constraints, leaving VDCDC1 on davinci_emac_probe: using random MAC addr: a6:e6:8b:21:57:92 emac‐mii: probed omap_rtc omap_rtc: setting system clock to 2000‐01‐01 00:00:00 UTC (946684800) Sending DHCP requests .. DHCP/BOOTP: Ignoring delayed packet , OK IP‐Config: Got DHCP answer from 10.0.0.1, my address is 10.0.0.87 IP‐Config: Complete:      device=eth0, addr=10.0.0.87, mask=255.255.255.0, gw=10.0.0.1,      host=10.0.0.87, domain=, nis‐domain=(none),      bootserver=10.0.0.1, rootserver=10.0.0.15, rootpath= Looking up port of RPC 100003/2 on 10.0.0.15 Looking up port of RPC 100005/1 on 10.0.0.15 VFS: Mounted root (nfs filesystem) on device 0:13. Freeing init memory: 160K DEBUG >> rcS 1 >> Mounting /proc                   : [SUCCESS] >> Mounting /sys                    : [SUCCESS] >> Mounting /dev                    : [SUCCESS] >> Mounting /dev/pts                : [SUCCESS] >> Enabling hot‐plug                : [SUCCESS] >> MDEV Populating /dev             : [SUCCESS] >> Re‐mounting root FS for writable : [SUCCESS] >> Mounting other filesystems       : [SUCCESS] DEBUG >> rcS : 2  Starting network                   : [SUCCESS]  Starting telnet daemon             : [SUCCESS] Starting logging: OK Initializing random number generator... read‐only file system detected...done 

  • Starting network... ip: RTNETLINK answers: File exists DEBUG >> rcS : 3  Please press Enter to activate this console. DEBUG >> profile : 1 >> Set HostName DEBUG >> profile : 2 am18_87:/ %  7. SD Card Boot 7.1. SD Card The filesystem “EXT2” must be used for SD Card due to limit support from BUSYBOX. The SD card should be formatted in Linux type Ext2. The tested filesystem then is copied over. Below is the procedure to store the tested filesystem on SD Card, let “_RFS” is root FS on the host On the Host,use “sudo” to make sure all covered

    o cd _RFS o sudo tar –czf ../am18‐rfs.gz *  # Use mode supported by Busybox, nothing else o chmod 757 mnt        # to make it writable in target during NFS o sudo cp ../../am8‐rfs.gz  # copy tar rfs here for storing to SD card  

    On the target after NFS boot o ll /mnt # make sure am18‐rfs.gz there o mkdir –p mmc o mount /dev/mmcblk0p1 mmc o cd mmc o tar –xvf ../am18‐rfs.gz    # ONLY file, note there’s NO destination folder o cd ..    # get out of mmc o umount mmc 

    To test SDcar boot, we do the following Hit a key at Uboot prompt “Hit any key to stop autoboot:” run mmc.boot Both telnet and http work after SDcard boot 7.2. SDcard Boot Capture Note there’s IPaddr assigned by “udhcpc” in the capture below U‐Boot 2009.11 (Jun 12 2015 ‐ 20:23:59)  I2C:   ready DRAM:  128 MB MMC:   davinci: 0 SF: Detected MX25L3205D with page size 256, total 4194304 bytes In:    serial Out:   serial Err:   serial ARM Clock : 300000000 Hz DDR Clock : 132000000 Hz Net:   No ETH PHY detected!!!  Hit any key to stop autoboot:  0 Using  device TFTP from server 10.0.0.15; our IP address is 10.0.0.22 

  • Filename '_uImg_'. Load address: 0xc2000000 Loading: #################################################################          #################################################################          ########################## done Bytes transferred = 2283712 (22d8c0 hex) ## Booting kernel from Legacy Image at c2000000 ...    Image Name:   Linux‐2.6.33‐rc4    Image Type:   ARM Linux Kernel Image (uncompressed)    Data Size:    2283648 Bytes =  2.2 MB    Load Address: c0008000    Entry Point:  c0008000    Verifying Checksum ... OK    Loading Kernel Image ... OK OK  Starting kernel ...  Uncompressing Linux... done, booting the kernel. Linux version 2.6.33‐rc4 (dkn@dkn‐ubuntu‐10) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1‐202) ) #4 PREEMPT Fri Jun 12 22:38:18 PDT 2015 CPU: ARM926EJ‐S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: DaVinci DA850/OMAP‐L138/AM18xx EVM Memory policy: ECC disabled, Data cache writeback On node 0 totalpages: 32768 free_area_init_node: node 0, pgdat c04992b8, node_mem_map c04bc000   DMA zone: 256 pages used for memmap   DMA zone: 0 pages reserved   DMA zone: 32512 pages, LIFO batch:7 DaVinci da850/omap‐l138/am18xx variant 0x1 Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512 Kernel command line: console=ttyS2,115200n8 root=/dev/nfs rw nfsroot=10.0.0.15:/home/dkn/_NFS/_RFS,wsize=1500,rsize=1500 ip=dhcp ip=dhcp ignore_loglevel debug: ignoring loglevel setting. PID hash table entries: 512 (order: ‐1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode‐cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 128MB = 128MB total Memory: 124956KB available (4328K code, 323K data, 160K init, 0K highmem) SLUB: Genslabs=11, HWalign=32, Order=0‐3, MinObjects=0, CPUs=1, Nodes=1 Hierarchical RCU implementation. NR_IRQS:245 Console: colour dummy device 80x30 Calibrating delay loop... 149.50 BogoMIPS (lpj=747520) Mount‐cache hash table entries: 512 CPU: Testing write buffer coherency: ok DaVinci: 144 gpio irqs regulator: core version 0.5 NET: Registered protocol family 16 bio: create slab  at 0 SCSI subsystem initialized libata version 3.00 loaded. usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb regulator: VDCDC1: 3200  3300 mV at 3300 mV regulator: VDCDC2: 1750  3300 mV at 3300 mV regulator: VDCDC3: 950  1375 mV at 1200 mV regulator: LDO1: 1800 mV 

  • regulator: LDO2: 1150  1300 mV at 1200 mV i2c‐gpio i2c‐gpio.1: using pins 20 (SDA) and 21 (SCL) vpif vpif: vpif probe success Switching to clocksource timer0_1 musb_hdrc: version 6.0, cppi4.1‐dma, otg (peripheral+host), debug=0 Waiting for USB PHY clock good... musb_hdrc: ConfigData=0x06 (UTMI‐8, dyn FIFOs, SoftConn) musb_hdrc: MHDRC RTL version 1.800 musb_hdrc: setup fifo_mode 2 musb_hdrc: 8/9 max ep, 3904/4096 memory musb_hdrc: USB OTG mode controller at fee00000 using DMA, IRQ 58 musb_hdrc musb_hdrc: MUSB HDRC host driver musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1 hub 1‐0:1.0: USB hub found hub 1‐0:1.0: 1 port detected NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) 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 udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. EMAC: MII PHY configured, RMII PHY will not be functional JFFS2 version 2.2. (NAND) © 2001‐2006 Red Hat, Inc. msgmni has been set to 244 io scheduler noop registered (default) da8xx_lcdc da8xx_lcdc.0: GLCD: Found Sharp_LK043T1DG01 panel Console: switching to colour frame buffer device 60x34 Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A console [ttyS2] enabled brd: module loaded loop: module loaded ahci ahci: version 3.0 ahci ahci: forcing PORTS_IMPL to 0x1 ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc scsi0 : ahci ata1: SATA max UDMA/133 irq 67 NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8‐bit) Bad block table found at page 65472, version 0x01 Bad block table found at page 65408, version 0x01 nand_read_bbt: Bad block at 0x000006ea0000 Creating 5 MTD partitions on "davinci_nand.1": 0x000000000000‐0x000000020000 : "u‐boot env" 0x000000020000‐0x000000040000 : "UBL" 0x000000040000‐0x0000000c0000 : "u‐boot" 0x000000200000‐0x000000600000 : "kernel" 0x000000600000‐0x000007fc0000 : "filesystem" davinci_nand davinci_nand.1: controller rev. 2.5 console [netcon0] enabled netconsole: network logging started ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver ohci ohci.0: DA8xx OHCI 

  • ohci ohci.0: new USB bus registered, assigned bus number 2 ohci ohci.0: irq 59, io mem 0x01e25000 hub 2‐0:1.0: USB hub found hub 2‐0:1.0: 1 port detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb‐storage USB Mass Storage support registered. g_ether gadget: using random self ethernet address g_ether gadget: using random host ethernet address usb0: MAC a6:38:0f:0e:26:33 usb0: HOST MAC ea:44:ea:c1:97:b9 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 g_ether gadget: g_ether ready musb_hdrc musb_hdrc: MUSB HDRC host driver musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 3 hub 3‐0:1.0: USB hub found hub 3‐0:1.0: 1 port detected input: gpio‐keys as /devices/platform/gpio‐keys/input/input0 input: TPS6507x Touchscreen as /devices/platform/i2c‐gpio.1/i2c‐1/1‐0048/input/input1 omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0 omap_rtc: RTC power up reset detected omap_rtc: already running i2c /dev entries driver Linux video capture interface: v2.00 tvp514x 1‐005d: tvp514x 1‐005d decoder driver registered !! vpif_capture vpif_capture: registered sub device tvp514x‐0 tvp514x 1‐005c: tvp514x 1‐005c decoder driver registered !! vpif_capture vpif_capture: registered sub device tvp514x‐1 vpif_capture vpif_capture: VPIF Capture driver initialized usbcore: registered new interface driver uvcvideo USB Video Class driver (v0.1.0) watchdog watchdog: heartbeat 60 sec hub 3‐0:1.0: activate ‐‐> ‐22 cpuidle: using governor ladder cpuidle: using governor menu davinci_mmc davinci_mmc.0: Using DMA, 4‐bit mode Registered led device: led1 ata1: SATA link down (SStatus 0 SControl 300) Registered led device: led2 Registered led device: led3 usbcore: registered new interface driver usbhid usbhid: USB HID core driver Advanced Linux Sound Architecture Driver Version 1.0.21. usbcore: registered new interface driver snd‐usb‐audio No device for DAI tlv320aic3x asoc: tlv320aic3x  davinci‐i2s mapping ok ALSA device list:   #0: DA850/OMAP‐L138 EVM (tlv320aic3x) TCP cubic registered NET: Registered protocol family 17 Clocks: disable unused emac Clocks: disable unused spi1 regulator_init_complete: incomplete constraints, leaving LDO2 on regulator_init_complete: incomplete constraints, leaving LDO1 on regulator_init_complete: incomplete constraints, leaving VDCDC3 on regulator_init_complete: incomplete constraints, leaving VDCDC2 on regulator_init_complete: incomplete constraints, leaving VDCDC1 on davinci_emac_probe: using random MAC addr: 5e:71:66:cf:fc:1b mmc0: host does not support reading read‐only switch. assuming write‐enable. mmc0: new high speed SDHC card at address e624 mmcblk0: mmc0:e624 SS08G 7.40 GiB 

  •  mmcblk0: p1 emac‐mii: probed omap_rtc omap_rtc: setting system clock to 2000‐01‐01 00:02:28 UTC (946684948) Sending DHCP requests .., OK IP‐Config: Got DHCP answer from 10.0.0.1, my address is 10.0.0.82 IP‐Config: Complete:      device=eth0, addr=10.0.0.82, mask=255.255.255.0, gw=10.0.0.1,      host=10.0.0.82, domain=, nis‐domain=(none),      bootserver=10.0.0.1, rootserver=10.0.0.15, rootpath= Looking up port of RPC 100003/2 on 10.0.0.15 Looking up port of RPC 100005/1 on 10.0.0.15 VFS: Mounted root (nfs filesystem) on device 0:13. Freeing init memory: 160K DEBUG >> rcS 1 >> Mounting /proc                   : [SUCCESS] >> Mounting /sys                    : [SUCCESS] >> Mounting /dev                    : [SUCCESS] >> Mounting /dev/pts                : [SUCCESS] >> Enabling hot‐plug                : [SUCCESS] >> MDEV Populating /dev             : [SUCCESS] >> Re‐mounting root FS for writable : [SUCCESS] >> Mounting other filesystems       : [SUCCESS] DEBUG >> rcS : 2  Starting network                   : [SUCCESS]  Starting telnet daemon             : [SUCCESS]  Starting http daemon               : [SUCCESS] Starting logging: OK Initializing random number generator... read‐only file system detected...done Starting network... ip: RTNETLINK answers: File exists DEBUG >> rcS : 3  Please press Enter to activate this console. DEBUG >> profile : 1 >> Set HostName DEBUG >> profile : 2 am18_82:/ % am18_82:/ % ifconfig eth0      Link encap:Ethernet  HWaddr 5E:71:66:CF:FC:1B           inet addr:10.0.0.82  Bcast:10.0.0.255  Mask:255.255.255.0           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:2226 errors:0 dropped:0 overruns:0 frame:0           TX packets:2202 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:2178106 (2.0 MiB)  TX bytes:346000 (337.8 KiB)           Interrupt:33  lo        Link encap:Local Loopback           inet addr:127.0.0.1  Mask:255.0.0.0           UP LOOPBACK RUNNING  MTU:16436  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  am18_82:/ % 

  • 8. System Maintenance During system is up with SDcard, it’s occasionally to do some file transfer using TFTP tool, or do some test. It’ wise to create a folder “/home/bin” to store these tools # ESC + ZZ : save vi on target  mkdir /home/bin  # on target  # ggff : get file from host tftp ‐g ‐r AM18/$1 ‐l ./$1 10.0.0.15  ## ppff : put file on host tftp ‐p ‐r AM18/$1 ‐l ./$1 10.0.15  9. Summary 9.1. UBoot Compile for uboot.BIN Use TI HexAIS tool for conversion to uboot.AIS Set UART_Boot mode (Sw7) and Use TI SerialFlash to flash uboot.AIS “run spi.ubt” to flash uboot over NW “run spi.lnx” to flash kernel over NW “set bootcmd run nfs.boot” “set bootcmd run mmc.boot”

    1. Introduction2. Working with Pre-Installed / Pre-Built Linux3. U-Boot : uboot-03.20.00.143.1. Boot Device3.1.1. SPI Boot Device3.1.2. NAND Boot Device

    3.2. Flashing Device3.2.1. SPI Boot Device3.2.2. NAND Boot Device

    4. Linux : linux-03.20.00.145. Filesystem : buildroot-2012.02 (BR)6. Debugging Linux System using NFS Boot6.1. Default BR settings with correct target & toolchain6.2. DHCP Client6.3. Deploying telnet server6.4. Deploying HTTP Server6.5. NFS Boot Capture

    7. SD Card Boot7.1. SD Card7.2. SDcard Boot Capture

    8. System Maintenance9. Summary9.1. UBoot