[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:
-------------------->8------------------------
$ cat /proc/device-tree/compatible 
snps,axs101snps,arc-sdp
-------------------->8------------------------

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?

-Alexey
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list