Boot issue with ti-linux-4.1.y + TFTP + NFS

I was using vanilla 4.1.0 kernel with minimal busybox as rootfs. I built the kernel with omap2plus_defconfig and was successfully able to boot.
Below is my setup:

  1. UBOOT on EMMC: U-Boot 2013.10 (Nov 28 2013 - 06:36:11)
  2. kernel image via TFTP
  3. Rootfs over NFS
    Below were command which worked fine:
    setenv bootargs root=/dev/nfs ip=192.168.0.100 console=ttyO0 nfsroot=192.168.0.1:/home/xxx/nfsroot
    tftp 0x81000000 uImage
    tftp 0x82000000 am335x-boneblack.dtb
    bootm 0x81000000 - 0x82000000

But since I want to have PM(s2ram) support, I was suggested to move to TI BSP.
I followed the guide by Robert here : https://eewiki.net/display/linuxonarm/BeagleBone+Black
Only exception was I did not switch my UBOOT, its remains U-Boot 2013.10.
After build was over I copied the zImage and am335x-boneblack.dtb to /var/lib/tftpboot as I was doing with Vanilla kernel case.
But I am not going beyond “Starting kernel …” which is printed by UBOOT.
Am I missing something ? Can someone help me …

Bootup Logs:

`
U-Boot SPL 2013.10 (Nov 28 2013 - 06:36:11)
reading args
spl: error reading image args, err - -1
reading u-boot.img
reading u-boot.img

U-Boot 2013.10 (Nov 28 2013 - 06:36:11)

I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net: cpsw, usb_ether
Hit any key to stop autoboot: 0
U-Boot#
U-Boot#
U-Boot# tftp 0x82000000 zImage
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.0.1; our IP address is 192.168.0.100
Filename ‘zImage’.
Load address: 0x82000000
Loading: #################################################################

okay… so I got it partially resolved. The board was booting earlier as well, but since console was not there, I thought its not booting at all.
Error was that I forgot to make change in /etc/inittab from ttyO0 to ttyS0. in addition to the bootargs

So now I am able to get serial console.

But I need to enable the bootup console logs. Can someone help how to do it ?

I tried comparing .config of TI BSP and that of omap2plus_defconfig generated by vanilla kernel.
Looks like TI BSP uses
CONFIG_SERIAL_8250_OMAP=y
CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y

while omap2plus_defconfig uses:

CONFIG_SERIAL_OMAP=y
CONFIG_SERIAL_OMAP_CONSOLE=y

Cheers
nagla

okay... so I got it partially resolved. The board was booting earlier as
well, but since console was not there, I thought its not booting at all.
Error was that I forgot to make change in /etc/inittab from ttyO0 to ttyS0.
in addition to the bootargs

So now I am able to get serial console.

But I need to enable the bootup console logs. Can someone help how to do it
?

U-Boot# setenv bootargs root=/dev/nfs rw ip=192.168.0.100
console=ttyO0 nfsroot=192.168.0.1:/home/xxx/nfsroot

Well, if you want a serial boot log, you should add it:

U-Boot# setenv bootargs console=ttyO0,115200n8 root=/dev/nfs rw
ip=192.168.0.100 console=ttyO0 nfsroot=192.168.0.1:/home/xxx/nfsroot

I tried comparing .config of TI BSP and that of omap2plus_defconfig
generated by vanilla kernel.
Looks like TI BSP uses
CONFIG_SERIAL_8250_OMAP=y
CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y

while omap2plus_defconfig uses:

CONFIG_SERIAL_OMAP=y
CONFIG_SERIAL_OMAP_CONSOLE=y

"CONFIG_SERIAL_OMAP" is on it's way out being replaced by
"CONFIG_SERIAL_8250_OMAP"..

Regards,

Thanks Robert.

But I do not quite follow it. You mean I should switch back my bootargs to ttyO0 while /etc/inittab should be ttyS0 ?
While in omap2plus_defconfig case I had ttyO0 at both places(bootargs and inittab). Why this has to be this way ?

Regards
nagla

Ah crap, sorry:

U-Boot# setenv bootargs console=ttyS0,115200n8 root=/dev/nfs rw
ip=192.168.0.100 nfsroot=192.168.0.1:/home/xxx/nfsroot

( i had to deal with the 2.6.33: ttyS2 -> ttyO2 migration so my head
will never be sane again with omap serial drivers... )

CONFIG_SERIAL_8250_OMAP=y needs "ttyS0,115200n8"
CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y replaces old u-boot/bootloaders
"ttyO0,115200n8" -> automatically to "ttyS0,115200n8"

CONFIG_SERIAL_OMAP=y needs "ttyO0,115200n8"
CONFIG_SERIAL_OMAP_CONSOLE=y (this just special for
CONFIG_SERIAL_OMAP=y as CONFIG_SERIAL_8250_xyz just assumes)

systemd will span a console based on /proc/cmdline

non-systemd/udev will need this rule:
https://github.com/rcn-ee/repos/blob/master/bb-customizations/suite/jessie/debian/60-omap-tty.rules

which will automatically create /dev/ttyOx based on /dev/ttySx for
compatibility:

Regards,

I guess I have already tried out this yesterday, with no bootup logs printed on console. Although at later stage after logging into buildroot, I can use dmesg.

Below was the bootargs, I tried:

setenv bootargs root=/dev/nfs rw ip=192.168.0.100 console=ttyS0 nfsroot=192.168.0.1:/home/xxx/nfsroot

I’ve triggered a build to recheck it.

BTW, I’m on a slow machine(almost biblical era… 1GB ram) and a single change starts 1 hr of module building. Which I do not use anyway :frowning:
Is there anyway I can avoid and just build the kernel. A small defconfig like omap2plus_defconfig.

Cheers
nagla

I guess I have already tried out this yesterday, with no bootup logs printed
on console. Although at later stage after logging into buildroot, I can use
dmesg.

Below was the bootargs, I tried:

setenv bootargs root=/dev/nfs rw ip=192.168.0.100 console=ttyS0
nfsroot=192.168.0.1:/home/xxx/nfsroot

add the baud rate: (don't remember what it's default is)
,115200n8

I've triggered a build to recheck it.

BTW, I'm on a slow machine(almost biblical era... 1GB ram) and a single
change starts 1 hr of module building. Which I do not use anyway :frowning:
Is there anyway I can avoid and just build the kernel. A small defconfig
like omap2plus_defconfig.

Regards,

ohhh yes… ,115200n8 did the trick.

I every time missed it because the older driver CONFIG_SERIAL_OMAP worked just with console=ttyO0.
Looks default baud is not 115200n8 in CONFIG_SERIAL_8250_OMAP. However, other TI driver CONFIG_SERIAL_OMAP seem to have default set to 115200n8.

Thanks for help.

Last question to complele this post:
In case of CONFIG_DEBUG_LL which config option should I use out of below for BBB:
CONFIG_DEBUG_OMAP2UART1
DEBUG_AM33XXUART1
CONFIG_DEBUG_LL_UART_8250

Cheers
Nagla

I usually leave it disabled..

https://github.com/RobertCNelson/ti-linux-kernel-dev/blob/ti-linux-4.1.y/patches/defconfig#L6203

with the transition to multi-platform, it's more pain when you have 2+
target's (am335x/am43xx/am57xx)

Regards,

sorry, but I do not seem to understand your point here.

Do you mean I can not use earlyprintk and low level bootup messages on BBB?
Or since the kernel is multiplatform, so you can not possibly decide which platform it’ll be used and enable that particular early console.

But as a user should not I have option ? I just want to know which uart port option I can use for BBB. Possibly : DEBUG_AM33XXUART1 ?

Regards
Nagla

Sure give that config a shot..

Regards,

yes it does …
thanks for help.

regards
nagla

Hi Robert,

Can you elaborate on your statement:

“CONFIG_SERIAL_OMAP” is on it’s way out being replaced by
“CONFIG_SERIAL_8250_OMAP”…

Is there active development to have the 8250 emulation support all the OAMP serial port features ?

I am trying to get RS485 to work with the serial cape, and the 8250_omap driver does not support the RS485 ioctl. The old omap-serial does.

Do you know if anyone is working on this ?

Thanks,

Colin…

Colin,

Did you get resolution to this? I’ve been trying for a couple of days to get an example python script to work. When it first runs I see the entire message transmitted while transmit enable is high. Subsequent attempts show transmit enable going low after the first byte is written.

Thanks,
Jay

Hi Jay,
The quick answer is no.
If I remember correctly, I hacked the device tree fragment to set the GPIOs correctly, but found that cape would not work for my application. Using RTS to set the transmit enable is very slow for turn around. I needed to receive right away.

My solution was to use a USB RS-485 that supports HW transmit enable and get rid of the serial cape.

Colin…