Forums » Software Development »
Problems with custom board
Added by Mary Frantz over 11 years ago
I built a new kernel based on MDK_2012-08-10 starting with baseboard-industrialio.c and making a new baseboard file for our hardware. I mainly cut what we don't need and added support for SPI1, CS1.
I booted on the industrial io board and booted ok with the following exception. After adding a script to init.d and rebooting, the boot log showed the following:
Starting sys9000.service... nfsserver[1311]: starting statd: done sys9000[2253]: Changing cpu clock to 456MHz sys9000[2253]: /etc/init.d/sys9000: line 3: can't create /sys/devices/system/cpu /cpu0/cpufreq/scaling_setspeed: nonexistent directory
The script file contains:
#!/bin/sh echo "Changing cpu clock to 456MHz" echo 456000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed echo "Inserting cmem module" insmod /lib/modules/3.2.0/extra/cmemk.ko pools=1x33554432 phys_start=0xC4000000 phys_end=0xC5FFFFFF echo "Inserting dsplink module" insmod /lib/modules/3.2.0/extra/dsplinkk.ko exit 0
After booting, indeed /sys/devices/system/cpu/cpu0/ contains only cpuidle.
Second problem:
Attempting to boot on our hardware yields the bootlog below. We did not pullup any of the MII_RXDn lines on the board.
U-Boot 2009.11 (Mar 31 2011 - 19:39:18) I2C: ready DRAM: 128 MB NAND: 256 MiB MMC: davinci: 0 In: serial Out: serial Err: serial ARM Clock : 300000000 Hz DDR Clock : 150000000 Hz EMIFA CLock : 100000000 Hz DSP Clock : 300000000 Hz ASYNC3 Clock : 150000000 Hz Enet config : 2 MMC 0 Enable : 0 Resetting ethernet phy Net: Ethernet PHY: GENERIC @ 0x01 [0x2] Hit any key to stop autoboot: 0 U-Boot > printenv bootdelay=3 baudrate=115200 bootfile="uImage" flashuboot=tftp 0xc0700000 mityomap/u-boot-ubl.bin; sf probe 0; sf erase 0x10000 0x80000; sf write 0xc0700000 0x10000 ${filesize} flashkernel=tftp 0xc0700000 mityomap/uImage; sf probe 0; sf erase 0x100000 0x280 000; sf write 0xc0700000 0x100000 ${filesize} flashubl=tftp 0xc0700000 mityomap/UBL_SPI_MEM.ais; sf probe 0; sf erase 0 0x1000 0; sf write 0xc0700000 0 0x10000 flashrootfs=tftp 0xc2000000 mityomap/mityomap-base-mityomapl138.jffs2; nand eras e 0 0x08000000; nand write.jffs2 0xc2000000 0 ${filesize} mtdids=nand0=nand mtdparts=mtdparts=nand:128M(rootfs),-(userfs) bootargsbase=mem=96M console=ttyS1,115200n8 flashargs=setenv bootargs ${bootargsbase} ${mtdparts} root=/dev/mtdblock0 rw,noa time rootfstype=jffs2 autoload=no filesize=26E198 fileaddr=C0700000 ipaddr=192.168.1.120 serverip=10.0.0.23 bootcmd=sf probe 0; sf read 0xC0700000 0x100000 0x280000;bootm 0xC0700000 stdin=serial stdout=serial stderr=serial ethaddr=00:50:c2:bf:8c:0d ver=U-Boot 2009.11 (Mar 31 2011 - 19:39:18) Environment size: 1034/65532 bytes U-Boot > print bootcmd bootcmd=sf probe 0; sf read 0xC0700000 0x100000 0x280000;bootm 0xC0700000 U-Boot > print bootargs ## Error: "bootargs" not defined U-Boot > setenv bootargs mem=64M console=ttyS1,115200n8 mtdparts=nand:128M(rootf s),-(userfs) root=/dev/mtdblock0 rw,noatime rootfstype=jffs2 ip=dhcp U-Boot > print bootargs bootargs=mem=64M console=ttyS1,115200n8 mtdparts=nand:128M(rootfs),-(userfs) roo t=/dev/mtdblock0 rw,noatime rootfstype=jffs2 ip=dhcp U-Boot > saveenv Saving Environment to SPI Flash... Erasing SPI flash...Writing to SPI flash...done U-Boot > run bootcmd 8192 KiB M25P64 at 0:0 is now current device ## Booting kernel from Legacy Image at c0700000 ... Image Name: Linux-3.2.0 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2548056 Bytes = 2.4 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 3.2.0 (mitydsp@mitydsp-dev) (gcc version 4.5.4 20120305 (prereleas e) (GCC) ) #2 PREEMPT Thu Jul 25 10:31:32 EDT 2013 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: MityDSP-L138/MityARM-1808 Ignoring unrecognised tag 0x42000101 Memory policy: ECC disabled, Data cache writethrough DaVinci da850/omap-l138/am18x variant 0x1 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: mem=64M console=ttyS1,115200n8 mtdparts=nand:128M(rootfs),- (userfs) root=/dev/mtdblock0 rw,noatime rootfstype=jffs2 ip=dhcp PID hash table entries: 256 (order: -2, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 64MB = 64MB total Memory: 58872k/58872k available, 6664k reserved, 0K highmem Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) vmalloc : 0xc4800000 - 0xfea00000 ( 930 MB) lowmem : 0xc0000000 - 0xc4000000 ( 64 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .text : 0xc0008000 - 0xc0535920 (5303 kB) .init : 0xc0536000 - 0xc055e000 ( 160 kB) .data : 0xc055e000 - 0xc05bdf80 ( 384 kB) .bss : 0xc05bdfa4 - 0xc05ea9b0 ( 179 kB) NR_IRQS:245 Console: colour dummy device 80x30 Calibrating delay loop... 148.88 BogoMIPS (lpj=744448) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok devtmpfs: initialized DaVinci: 144 gpio irqs print_constraints: dummy: NET: Registered protocol family 16 baseboard_pre_init: Entered mityomapl138_setup_nand: using 16 bit data baseboard_init [System9000]... bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb i2c_davinci i2c_davinci.1: controller timed out i2c_davinci i2c_davinci.1: initiating i2c bus recovery set_machine_constraints: VDCDC1: failed to enable tps65023 1-0048: failed to register tps65023 tps65023: probe of 1-0048 failed with error -110 Advanced Linux Sound Architecture Driver Version 1.0.24. Switching to clocksource timer0_1 musb-hdrc: version 6.0, ?dma?, otg (peripheral+host) NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) 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. JFFS2 version 2.2. (NAND) B) 2001-2006 Red Hat, Inc. msgmni has been set to 114 io scheduler noop registered (default) start plist test end plist test 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 console [ttyS1] enabled serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A brd: module loaded at24 1-0050: 256 byte 24c02 EEPROM, read-only, 0 bytes/write i2c_davinci i2c_davinci.1: controller timed out i2c_davinci i2c_davinci.1: initiating i2c bus recovery i2c_davinci i2c_davinci.1: controller timed out i2c_davinci i2c_davinci.1: initiating i2c bus recovery MityOMAPL138: Read Factory Config Failed: -110 ahci ahci: forcing PORTS_IMPL to 0x1 ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc scsi0 : ahci_platform ata1: SATA max UDMA/133 mmio [mem 0x01e18000-0x01e19fff] port 0x100 irq 67 NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bi t) Bad block table found at page 131008, version 0x01 Bad block table found at page 130944, version 0x01 nand_read_bbt: bad block at 0x000000ce0000 Creating 2 MTD partitions on "davinci_nand.1": 0x000000000000-0x000008000000 : "rootfs" 0x000008000000-0x000010000000 : "homefs" davinci_nand davinci_nand.1: controller rev. 2.5 spi_davinci spi_davinci.1: DMA: supported spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0 m25p80 spi1.0: m25p64-nonjedec (8192 Kbytes) Creating 8 MTD partitions on "m25p80": 0x000000000000-0x000000010000 : "ubl" 0x000000010000-0x000000090000 : "u-boot" 0x000000090000-0x0000000a0000 : "u-boot-env" 0x0000000a0000-0x0000000b0000 : "periph-config" MII PHY configured 0x0000000b0000-0x000000100000 : "reserved" 0x000000100000-0x000000400000 : "kernel" 0x000000400000-0x000000600000 : "fpga" 0x000000600000-0x000000800000 : "spare" spi_davinci spi_davinci.1: Controller at 0xfef0e000 CAN device driver interface davinci_mdio davinci_mdio.0: davinci mdio revision 1.5 davinci_mdio davinci_mdio.0: detected phy mask fffffffd davinci_mdio.0: probed davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver 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 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 cpuidle: using governor ladder cpuidle: using governor menu usbcore: registered new interface driver usbhid usbhid: USB HID core driver ata1: SATA link down (SStatus 0 SControl 300) ALSA device list: No soundcards found. TCP cubic registered NET: Registered protocol family 17 can: controller area network core (rev 20090105 abi 8) NET: Registered protocol family 29 can: raw protocol (rev 20090105) ------------[ cut here ]------------ WARNING: at arch/arm/mach-davinci/da850.c:1096 da850_regulator_init+0x30/0x54() Unable to obtain voltage regulator for CVDD; voltage scaling unsupported Modules linked in: [<c000d518>] (unwind_backtrace+0x0/0xe0) from [<c001cdc0>] (warn_slowpath_common +0x4c/0x64) [<c001cdc0>] (warn_slowpath_common+0x4c/0x64) from [<c001ce58>] (warn_slowpath_f mt+0x2c/0x3c) [<c001ce58>] (warn_slowpath_fmt+0x2c/0x3c) from [<c0013c34>] (da850_regulator_in it+0x30/0x54) [<c0013c34>] (da850_regulator_init+0x30/0x54) from [<c00145b8>] (davinci_cpu_ini t+0x34/0xbc) [<c00145b8>] (davinci_cpu_init+0x34/0xbc) from [<c0223ca0>] (cpufreq_add_dev+0x1 20/0x220) [<c0223ca0>] (cpufreq_add_dev+0x120/0x220) from [<c0193a0c>] (sysdev_driver_regi ster+0xb0/0x128) [<c0193a0c>] (sysdev_driver_register+0xb0/0x128) from [<c02230a8>] (cpufreq_regi ster_driver+0xd0/0x17c) [<c02230a8>] (cpufreq_register_driver+0xd0/0x17c) from [<c019609c>] (platform_dr v_probe+0x14/0x18) [<c019609c>] (platform_drv_probe+0x14/0x18) from [<c0194f8c>] (driver_probe_devi ce+0xd4/0x198) [<c0194f8c>] (driver_probe_device+0xd4/0x198) from [<c01950b0>] (__driver_attach +0x60/0x84) [<c01950b0>] (__driver_attach+0x60/0x84) from [<c0194220>] (bus_for_each_dev+0x4 c/0x78) [<c0194220>] (bus_for_each_dev+0x4c/0x78) from [<c0194898>] (bus_add_driver+0x98 /0x214) [<c0194898>] (bus_add_driver+0x98/0x214) from [<c0195614>] (driver_register+0xa0 /0x120) [<c0195614>] (driver_register+0xa0/0x120) from [<c01964a8>] (platform_driver_pro be+0x18/0x98) [<c01964a8>] (platform_driver_probe+0x18/0x98) from [<c000887c>] (do_one_initcal l+0x90/0x168) [<c000887c>] (do_one_initcall+0x90/0x168) from [<c05367e8>] (kernel_init+0x78/0x 11c) [<c05367e8>] (kernel_init+0x78/0x11c) from [<c0009cb8>] (kernel_thread_exit+0x0/ 0x8) ---[ end trace 056dabec374b0ca5 ]--- console [netcon0] enabled netconsole: network logging started davinci_emac davinci_emac.1: using random MAC addr: 8a:7c:a7:16:cd:a5 omap_rtc omap_rtc: setting system clock to 2000-01-01 00:03:27 UTC (946685007) PHY 0:03 not found net eth0: could not connect to phy 0:03 Sending DHCP requests ...... timed out! IP-Config: Reopening network devices... PHY 0:03 not found net eth0: could not connect to phy 0:03
U-Boot works fine and connects to ethernet. I was able to transfer files via tftp from my development host.
Attached is our baseboard file.
Mary
baseboard-sys9000.c (4.36 KB) baseboard-sys9000.c | Baseboard file for custom hw |
Replies (8)
RE: Problems with custom board - Added by Jonathan Cormier over 11 years ago
According to your bootlog the following errors would cause the cpufreq directory to be missing as cvdd is needed.
set_machine_constraints: VDCDC1: failed to enable tps65023 1-0048: failed to register tps65023 tps65023: probe of 1-0048 failed with error -110
This is enabled in mityomapl138_init() via pmic_tps65023_init(). I'm unclear how your changes to the baseboard file would create this problem but perhaps one of the GPIO pins you changed was needed for this?
-Jonathan
RE: Problems with custom board - Added by Michael Williamson over 11 years ago
You may not have the proper configuration options set for the Power Management and Voltage Regulators set in the kernel configuration. If those options aren't set, the voltage regulators won't be found and dynamic scaling will not work. Or, if dynamic frequency scaling isn't enabled, same thing.
Can you post you kernel .config file?
-Mike
RE: Problems with custom board - Added by Mary Frantz over 11 years ago
Thanks for the reply. We fixed the ethernet problem with a pullup on MII_RXD0, as was done on the industrial io board.
Attached is the .config file (renamed config).
Mary
RE: Problems with custom board - Added by Jonathan Cormier over 11 years ago
diff arch/arm/configs/industrialio_defconfig ~/Downloads/config 287c287,288 < CONFIG_BASEBOARD_INDUSTRIALIO=y --- > # CONFIG_BASEBOARD_INDUSTRIALIO is not set > CONFIG_BASEBOARD_SYS9000=y 290a292,293 > # CONFIG_BASEBOARD_WIU is not set > # CONFIG_BASEBOARD_CIS10XX is not set 828c831 < CONFIG_SATA_PMP=y --- > # CONFIG_SATA_PMP is not set 1914a1918 > # CONFIG_AUFS_FS is not set
RE: Problems with custom board - Added by Mary Frantz over 11 years ago
The two baseboard entries don't sound like a problem:
> # CONFIG_BASEBOARD_WIU is not set > # CONFIG_BASEBOARD_CIS10XX is not set
These are other baseboard choices that I'm not using.
The SATA entries are OK. This is needed to enable the SATA.
< CONFIG_SATA_PMP=y --- > # CONFIG_SATA_PMP is not set 1914a1918
What does the last one mean?
> # CONFIG_AUFS_FS is not set
Mary
RE: Problems with custom board - Added by Jonathan Cormier over 11 years ago
Mary,
AUFS is a filesystem. It isn't a problem. Your .config file matches ours so doesn't appear to be the issue.
-Jonathan
RE: Problems with custom board - Added by Mary Frantz over 11 years ago
The problem was the GPIO. We had set the two I2C io pins as GPIO. I removed these from the list in the custom board support file, and it boots normally.
Thanks,
Mary
RE: Problems with custom board - Added by Jonathan Cormier over 11 years ago
Thanks for the update.
-Jonathan