Background:
Custom board
Processor: AM4379BZDNA100
Linux distro: TI PROCESSOR-SDK-LINUX-AM437X v2.00.00.00 (Linux v4.1.6)
Main com port: UART1
Boot mode[4:0]: 10111b EMAC1, SPI, QSPI, MMC1
UniFlash: Running on Win7 PC
Linux build environment: Ubuntu 14.04.1 VM
Situation:
I have made necessary modifications to u-boot to operate on UART1 instead of UART0.
My end game for now, is to load an initramfs version of linux for use in formating the eMMC1 device for eventual system bootup - using the following reference as a rough guide: http://processors.wiki.ti.com/index.php/Sitara_Linux_Program_the_eMMC_on_Beaglebone_Black
I am using CCS UniFlash (Win7 PC) to load u-boot-spl.bin and u-boot.img into the processor via EMAC1 and u-boot starts successfully - u-boot messages shown below. I am now trying to use the u-boot command "run netboot" to manually load a linux uImage and device tree binary via tftp with UniFlash as the server. The files are transferred successfully via tftp but on kernel startup I get absolutely no output and I suspect that it may be because we are trying to use UART1 instead of UART0 but not certain.
I modified the kernel to add "low-level" debug messages to the output on UART2 hoping this might provide more info but no change in the results.
Anything I am missing here? Is it not showing output simply because we are not using uart0? if so, how do I modify the kernel to use uart1 (u-boot console env setting already changed to /dev/ttyO1)? Is netboot trying to start from an uncompressed image?
Thanks in advance. I hope I've provided all the pertinent information needed below...
Tim
U-boot output after loading from UniFlash
U-Boot SPL 2015.07-00114-gf8d68d1-dirty (Nov 05 2015 - 16:02:14) Using default environment mac addr: c4:be:84:cc:78:f4 <ethaddr> not set. Validating first E-fuse MAC Registering cpsw_data... cpsw cpsw Waiting for PHY auto negotiation to complete.... done link up on port 0, speed 100, full duplex BOOTP broadcast 1 BOOTP broadcast 2 Using cpsw device TFTP from server 192.168.2.1; our IP address is 192.168.2.2 Filename 'u-boot-restore.img'. Load address: 0x807fffc0 Loading: #################### 1.2 MiB/s done Bytes transferred = 279228 (442bc hex) U-Boot 2015.07-00114-gf8d68d1-dirty (Nov 05 2015 - 16:02:14 -0500) I2C: ready DRAM: 1 GiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 ** Unable to use mmc 1:1 for loading the env ** Using default environment Net: mac addr: c4:be:84:cc:78:f4 <ethaddr> not set. Validating first E-fuse MAC Registering cpsw_data... cpsw, usb_ether Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc1(part 0) is current device SD/MMC found on device 1 Failed to mount ext2 filesystem... ** Unrecognized filesystem type ** Card did not respond to voltage select! ** Bad device mmc 0 ** starting USB... USB0: Register 2000440 NbrPorts 2 Starting the controller USB XHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found USB device 0: unknown device U-Boot#
"run netboot" output
U-Boot# run netboot
Booting from network ...
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.2.2 (7 ms)
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.2.1; our IP address is 192.168.2.2
Filename 'uImage'.
Load address: 0x82000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##################################
3.1 MiB/s
done
Bytes transferred = 52978528 (3286360 hex)
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.2.1; our IP address is 192.168.2.2
Filename 'am437x-ndct.dtb'.
Load address: 0x88000000
Loading: ###
2.2 MiB/s
done
Bytes transferred = 36426 (8e4a hex)
Kernel image @ 0x82000000 [ 0x000000 - 0x3286360 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8fff4000, end 8ffffe49 ... OK
Starting kernel ...
printenv from u-boot
U-Boot# printenv
arch=arm
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
baudrate=115200
board=am43xx
board_name=am43xx
bootcmd=run findfdt; run mmcboot;run usbboot;
bootdelay=1
bootdir=/boot
bootenv=uEnv.txt
bootfile=zImage
bootm_size=0x10000000
bootpart=0:2
console=ttyO1,115200n8
cpu=armv7
devnum=0
devtype=usb
dfu_alt_info_emmc=MLO raw 0x100 0x100 mmcpart 0;u-boot.img raw 0x300 0x1000 mmcpart 0
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
dfu_bufsiz=0x10000
eth1addr=c4:be:84:cc:78:f6
ethact=cpsw
ethaddr=c4:be:84:cc:78:f4
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtfile=am437x-ndct.dtb
findfdt=setenv fdtfile am437x-ndct.dtb
finduuid=part uuid mmc ${mmcdev}:2 uuid
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
kernel_addr_r=0x82000000
loadaddr=0x82000000
loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz
mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${devnum};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run loadfdt; echo Booting from mmc${mmcdev} ...; run args_mmc; bootz ${loadaddr} - ${fdtaddr}; fi;fi;
mmcdev=1
mmcrootfstype=ext4 rootwait
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
netloadfdt=tftp ${fdtaddr} ${fdtfile}
netloadimage=tftp ${loadaddr} ${bootfile}
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
ramdisk_addr_r=0x88080000
ramroot=/dev/ram0 rw
ramrootfstype=ext2
rdaddr=0x88080000
rootpath=/export/rootfs
soc=am33xx
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
usbargs=setenv bootargs console=${console} ${optargs} root=${usbroot} rootfstype=${usbrootfstype}
usbboot=setenv devnum ${usbdev}; setenv devtype usb; usb start ${usbdev}; if usb dev ${usbdev}; then if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run loadfdt; echo Booting from usb ${usbdev}...; run usbargs;bootz ${loadaddr} - ${fdtaddr}; fi;fi
usbdev=0
usbnet_devaddr=c4:be:84:cc:78:f6
usbroot=/dev/sda2 rw
usbrootfstype=ext4 rootwait
vendor=ti
ver=U-Boot 2015.07-00114-gf8d68d1-dirty (Nov 05 2015 - 16:02:14 -0500)
Environment size: 3325/65532 bytes
U-Boot#
DTS file am437x-ndct.dts
/*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include "am4372.dtsi"
#include <dt-bindings/pinctrl/am43xx.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
model = "Generic AM43 (Flattened Device Tree)";
compatible = "ti,am4372","ti,am43"; //"ti,am437x-gp-evm",
// gpio_keys: gpio_keys {
// compatible = "gpio-keys";
// pinctrl-names = "default";
// pinctrl-0 = <&gpio_keys_pins_default>;
// #address-cells = <1>;
// #size-cells = <0>;
// switch@0 {
// label = "power-button";
// linux,code = <KEY_POWER>;
// gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
// };
// Uncomment this section if we want to use gpio-keys driver instead of sysfs GPIO
// oled@0 {
// label = "oled-button";
// linux,code = <0>; // select a more appropriate key value than 0!
// gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
// };
// Uncomment this section if we want to use gpio-keys driver instead of sysfs GPIO
// profi-int@0 {
// label = "profi-interrupt";
// linux,code = <0>; // select a more appropriate key value than 0!
// gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
// };
// };
};
&am43xx_pinmux {
// gpio_keys_pins_default: gpio_keys_pins_default {
// pinctrl-single,pins = <
// 0xb8 (PIN_INPUT | MUX_MODE7) /* (C20) dss_data6.gpio2[12] - Profibus INT input */
// 0x180 (PIN_INPUT | MUX_MODE7) /* (K21) udart1.rxd.gpio0[14] - OLED button input */
// 0x1b8 (PIN_INPUT | MUX_MODE7) /* cam0_field.gpio4_2 - User switch SW1 on IDK */
// >;
// };
i2c0_pins_default: i2c0_pins_default {
pinctrl-single,pins = <
0x188 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */
0x18c (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_scl.i2c0_scl */
>;
};
i2c0_pins_sleep: i2c0_pins_sleep {
pinctrl-single,pins = <
0x188 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x18c (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
i2c1_pins_default: i2c1_pins_default {
pinctrl-single,pins = <
0x20c (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam0_data1.i2c1_scl */
0x208 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam0_data0.i2c1_sda */
>;
};
i2c1_pins_sleep: i2c1_pins_sleep {
pinctrl-single,pins = <
0x20c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x208 (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
mmc1_pins_default: pinmux_mmc1_pins_default {
pinctrl-single,pins = <
0x80 (PIN_INPUT | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
0x84 (PIN_INPUT | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
0x3c (PIN_INPUT | MUX_MODE2) /* gpmc_ad15.mmc1_dat7 */
0x38 (PIN_INPUT | MUX_MODE2) /* gpmc_ad14.mmc1_dat6 */
0x34 (PIN_INPUT | MUX_MODE2) /* gpmc_ad13.mmc1_dat5 */
0x30 (PIN_INPUT | MUX_MODE2) /* gpmc_ad12.mmc1_dat4 */
0x2c (PIN_INPUT | MUX_MODE2) /* gpmc_ad11.mmc1_dat3 */
0x28 (PIN_INPUT | MUX_MODE2) /* gpmc_ad10.mmc1_dat2 */
0x24 (PIN_INPUT | MUX_MODE2) /* gpmc_ad9.mmc1_dat1 */
0x20 (PIN_INPUT | MUX_MODE2) /* gpmc_ad8.mmc1_dat0 */
// 0x (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
>;
};
mmc1_pins_sleep: pinmux_mmc1_pins_sleep {
pinctrl-single,pins = <
0x80 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn1.mmc1_clk */
0x84 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn2.mmc1_cmd */
0x3c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad15.mmc1_dat7 */
0x38 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad14.mmc1_dat6 */
0x34 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad13.mmc1_dat5 */
0x30 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad12.mmc1_dat4 */
0x2c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad11.mmc1_dat3 */
0x28 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad10.mmc1_dat2 */
0x24 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad9.mmc1_dat1 */
0x20 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad8.mmc1_dat0 */
>;
};
uart1_pins_default: uart1_pins_default {
pinctrl-single,pins = <
0x178 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0)
0x17C (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0)
0x180 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart1_rxd.uart1_rxd */
0x184 (PIN_INPUT | PULL_DISABLE | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart1_txd.uart1_txd */
>;
};
uart1_pins_sleep: uart1_pins_sleep {
pinctrl-single,pins = <
0x178 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
0x17C (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
0x180 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart1_rxd.uart1_rxd */
0x184 (PIN_INPUT_PULLDOWN | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart1_txd.uart1_txd */
>;
};
cpsw_default: cpsw_default {
pinctrl-single,pins = <
0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td2 */
0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td3 */
0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rmii1_rclk */
0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */
0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd2 */
0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd3 */
>;
};
cpsw_sleep: cpsw_sleep {
pinctrl-single,pins = <
0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
davinci_mdio_default: davinci_mdio_default {
pinctrl-single,pins = <
/* MDIO */
0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
>;
};
davinci_mdio_sleep: davinci_mdio_sleep {
pinctrl-single,pins = <
/* MDIO reset value */
0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
/* These pinmux settings are piggy-backed onto the normal mmc1 pinmuxes just to get these setup properly for the ICSS0_PRU1 to drive the OLED display using memory mapped driver in userspace */
// pruoled_pins_default: pruoled_pins_default {
// pinctrl-single,pins = <
// 0xe0 (PIN_INPUT | DS0_PULL_UP_DOWN_EN | MUX_MODE7) /* dss.vsync gpio2[12] - Yellow LED */
// 0x1d0 (PIN_INPUT | DS0_PULL_UP_DOWN_EN | MUX_MODE3) /* Reset */
// 0x1d4 (PIN_INPUT | DS0_PULL_UP_DOWN_EN | MUX_MODE3) /* SPI Clk */
// 0x1f4 (PIN_INPUT | DS0_PULL_UP_DOWN_EN | MUX_MODE4) /* SPI dout */
// 0x1fc (PIN_INPUT | DS0_PULL_UP_DOWN_EN | MUX_MODE4) /* SPI CS */
// 0x204 (PIN_INPUT | DS0_PULL_UP_DOWN_EN | MUX_MODE4) /* C/D */
// >;
// };
};
&i2c0 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c0_pins_default>;
pinctrl-1 = <&i2c0_pins_sleep>;
clock-frequency = <100000>;
// at24@50 {
// compatible = "at24,24c256";
// pagesize = <64>;
// reg = <0x50>;
// };
};
&i2c1 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_default>;
pinctrl-1 = <&i2c1_pins_sleep>;
clock-frequency = <100000>;
};
&epwmss0 {
status = "okay";
};
//&ecap0 {
// status = "okay";
// pinctrl-names = "default";
// pinctrl-0 = <&ecap0_pins_default>;
//};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio4 {
status = "okay";
};
&gpio5 {
status = "okay";
};
&uart1 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart1_pins_default>;
pinctrl-1 = <&uart1_pins_sleep>;
};
&mmc1 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc1_pins_default>;//,<&pruoled_pins_default>;
pinctrl-1 = <&mmc1_pins_sleep>;//,<&pruoled_pins_default>;
bus-width = <8>;
// cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
};
&mac {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
status = "okay";
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
};
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
phy-mode = "rgmii";
};
&rtc {
status = "okay";
ext-clk-src;
};
&wdt {
status = "okay";
};
&cpu {
// cpu0-supply = <&tps>;
};
//&sgx {
// status = "okay";
//};