Fix vuart symlink udev rule

The rule was not creating the /dev/ttyVUART0 rule.

```
root@palmetto:~# udevadm info -q all /dev/ttyS0
P: /devices/platform/ahb/ahb:apb/1e787000.vuart/tty/ttyS0
N: ttyS0
E: DEVNAME=/dev/ttyS0
E: DEVPATH=/devices/platform/ahb/ahb:apb/1e787000.vuart/tty/ttyS0
E: MAJOR=4
E: MINOR=64
E: SUBSYSTEM=tty
E: TAGS=:systemd:
E: USEC_INITIALIZED=22674274
```

```
root@palmetto:~# systemctl status dev-ttyVUART0.device --no-pager
● dev-ttyVUART0.device
   Loaded: loaded
   Active: inactive (dead)

Nov 07 05:43:37 palmetto systemd[1]: dev-ttyVUART0.device: Job dev-ttyVUART0.device/start timed out.
Nov 07 05:43:37 palmetto systemd[1]: Timed out waiting for device dev-ttyVUART0.device.
Nov 07 05:43:37 palmetto systemd[1]: dev-ttyVUART0.device: Job dev-ttyVUART0.device/start failed with result 'timeout'.
```

This just sits there without returning:

```
root@palmetto:~# systemctl start dev-ttyVUART0.device
```

This is the reason udev does not trigger due to the lpc address on this system
being set to 0x417 when the rule expects 0x3f8:

```
root@palmetto:~# cat /sys/devices/platform/ahb/ahb\:apb/1e787000.vuart/lpc_address
0x417
```

- `obmc-console-server` is launched when `/dev/ttyVUART0` is created.
- `/dev/ttyVUART0` is created when a device with `lpc_address` of `0x3f8` is created
- `lpc_address` is configured by obmc-console-server.
- GOTO 10;

A fix would be to match the udev rule on the address of the peripheral. This is
what Cedric's original patch did:

```
SUBSYSTEM=="tty", ATTR{iomem_base}=="0x1E787000", SYMLINK+="tty-host"
```

Use the iomem_base in place of the lpc_address condition. The rule was
not matching with the driver==aspeed_vuart condition, so that was removed
as well.

Fixes: openbmc/openbmc#749
Fixes: openbmc/openbmc#718
Fixes: openbmc/openbmc#706

Change-Id: Ia55f47a84d657ab9572a8b0495420b1f56e16c02
Signed-off-by: Joel Stanley <joel@jms.id.au>
1 file changed
tree: a3ff815b255a9c0096a38a198f09dd223d154327
  1. import-layers/
  2. meta-openbmc-bsp/
  3. meta-openbmc-machines/
  4. meta-phosphor/
  5. .gitignore
  6. .gitreview
  7. .templateconf
  8. openbmc-env
  9. README.md
README.md

OpenBMC

Build Status

Building

OpenBMC uses Yocto/Open-Embedded for a build system, which supports an out-of-tree build. It is recommended that you create an empty directory somewhere to hold the build. This directory will get big.

On Ubuntu 14.04 the following packages are required to build the default target

sudo apt-get install -y git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat

On Fedora 23 the following packages are required to build the default target:

sudo dnf install -y git patch diffstat texinfo chrpath SDL-devel bitbake
sudo dnf groupinstall "C Development Tools and Libraries"

To start a build:

cd <builddir>
. <repodir>/openbmc-env
bitbake obmc-phosphor-image