[OpenWrt-Devel] [PATCH 2/2 v4] linux: add support of Synopsys ARC770-based boards

Alexey Brodkin Alexey.Brodkin at synopsys.com
Wed Nov 11 07:38:47 EST 2015

Hi Jonas,

On Wed, 2015-11-11 at 12:19 +0100, Jonas Gorski wrote:
> Hi Alexey,
> On Tue, Nov 10, 2015 at 5:40 PM, Alexey Brodkin
> <Alexey.Brodkin at synopsys.com> wrote:
> > Hi Jonas,
> > 
> > On Tue, 2015-11-10 at 12:02 +0100, Jonas Gorski wrote:

> > > Hi Alexey,
> I see what you want, but the way you are doing it is quite error prone
> and inefficient. If you insist on using the compatible, i suggest:
> 1. Extract the first one instead of grepping through the full
> compatible set, so you don't need to invoke grep for each comparison
> (also dropping the misuse of cat ;p).

The problem is how multientry compatible string is presented in /proc fs:
$ cat /proc/device-tree/compatible 

You see there's no delimiter between "snps,axs101" and "snps,arc-sdp".
So how should I extract "snps,arc-sdp" from /proc/device-tree/compatible?

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list