Hi Huacai, On Thu, Jul 12, 2018 at 07:09:04AM +0800, Huacai Chen wrote: > >> It seems like some application use "uname" command's output to do > >> something different between big-endian and little-endian, so we make > >> UTS_MACHINE reflect both 32bit/64bit and big-endian/little-endian. > > > > Since UTS_MACHINE is exposed to userland (which is of course the point > > of your patch) I'm not comfortable changing it. If some piece of code > > checks whether uname -m gives "mips" then we'd break it by suddenly > > giving "mipsel". This is too risky. > > > > Which applications are you talking about that look for endianness in > > uname output? Since Linux on MIPS doesn't expose endianness information > > in this way these applications will always have been broken on MIPS > > systems, and it would make more sense to fix the applications than to > > change the kernel & probably break others. > > Hi, we are making Fedora on MIPS, we found that yum use uname's output > to adjust endianness compatibility. We haven't seen anything broken > while we changing mips64 to mips64el, do you know something about > "broken things with this changing". I also don't want to change > UTS_MACHINE, but if it is harmless, I think we can just do it. A quick GitHub code search find a ton of things which check uname -m, some of which expect the exact string "mips": https://github.com/search?l=&p=1&q=uname+-m+mips&type=Code UTS_MACHINE is not something to change. Can you just have yum detect endianness some other way? Wikipedia tells me yum is written in python, and a quick Google tells me there's a sys.byteorder variable which would indicate endianness. Can you just use that? Thanks, Paul