On 21:53 Sun 03 Aug , Antony Pavlov wrote: > > On Sun, 03 Aug 2014 18:17:45 +0200 > Jan Lübbe <jlu@xxxxxxxxxxxxxx> wrote: > > > Hi, > > > > On Sat, 2014-08-02 at 09:45 +0400, Antony Pavlov wrote: > > > > > > compatlen=$($FDTGET -t s "$dtb" / compatible | wc -c) > > > - echo ".int 0x640c8005" > > > - echo ".int " $compatlen > > > + echo ".byte 0x05, 0x80, 0x0c, 0x64" > > > + python -c "print(\".byte 0x%02x, 0x%02x, 0x%02x, 0x%02x\\n\" % ($compatlen & 0xff, ($compatlen >> 8) & 0xff, ($compatlen >> 16) & 0xff, ($compatlen >> 24) & 0xff))" > > > > Rather than adding a build-time dependency on python, maybe we should > > just handle this in C? > > We use sphinx for documentation generation so we already have dependency on python. not a fan of python and this will make it mandatory for build as it's only for doc today for me no Best Regards, J. > > Here is an another solution: > > - echo ".int " $compatlen > + echo ".byte " $(printf "%08x" $compatlen | sed "s/\(..\)/0x\1\n/g" | tac | xargs | sed "s/ /, /g") > > -- > Best regards, > Antony Pavlov > > _______________________________________________ > barebox mailing list > barebox@xxxxxxxxxxxxxxxxxxx > http://lists.infradead.org/mailman/listinfo/barebox _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox