The following patch is from fedora aarch64 porting project. I have edited it with adding support for __AARCH64EB__.
The following patch is from fedora aarch64 porting project. I have edited it with adding support for __AARCH64EB__.