[Arm-dev] centos 7 64 bit on raspberry Pi 3

Sun Dec 16 14:27:18 UTC 2018
Mark Verlinde <mark at havak.nl>

-----Oorspronkelijk bericht-----
> Afzender:Mark Verlinde <mark at havak.nl>
> Verstuurd: Zaterdag 15 December 2018 15:17
> Aan: Conversations around CentOS on ARM hardware <arm-dev at centos.org>
> Onderwerp: Re: [Arm-dev] centos 7 64 bit on raspberry Pi 3
> 
> -----Oorspronkelijk bericht-----
> > Afzender:Pablo Sebastián Greco <pablo at fliagreco.com.ar>
> > Verstuurd: Zaterdag 15 December 2018 14:06
> > Aan: Conversations around CentOS on ARM hardware <arm-dev at centos.org>
> > Onderwerp: Re: [Arm-dev] centos 7 64 bit on raspberry Pi 3
> > 
> > 
> > El 15/12/18 a las 08:58, Pablo Sebastián Greco escribió:
> > >
> > > That is my guess too, but we're providing this kernel also 
> > > (http://mirror.centos.org/altarch/7.6.1810/kernel/aarch64/Packages/), 
> > > which is pretty close to the Fedora kernel.
> > > So if you could create a ISO with that kernel, it "should" work.
> > >
> > I meant, to upstream kernel. The one that is close to Fedora is 4.19 
> > from here 
> > https://armv7.dev.centos.org/repodir/community-kernel-latest/kernel/4.19.7-300.el7/, 
> > but that is only built for armhfp at the moment.
> 
> Some while ago did some work on this, resulting in a prematurely image with a at the time of creation latest kernel 4.18.16-202. 

As you understood, I took the "uboot" route instead of tianocore

Updated the image to CentOS 7.6.1810 and kernel 4.19.7-300 with minor changes:
* SElinux is set to enforcing (did no testing sofar though..)
* included brcmfmac43430-sdio.txt and brcmfmac43455-sdio.txt for wifi RPI3(+)

> It was not my intention to make a aarch64 image for a RPI, nor will it be in the future;
> Just out of "academic curiosity " installed bcm283x-firmware and rpi3-u-boot.bin to try to boot it with a RPI. And it did :) 
> 
> _Note_ this is far from anything decent at least it boots :) (1)
> https://drive.google.com/open?id=1RIWYxPadxsf_M-igFxPaP8FmwKA3Jcki 

Link for updated img is unchanged

> 
> It boots very slow! Especially on a RPI going through bootcode.bin > uboot > grubaa64.efi > grub2 > kernel 
> The kernel is cross complied from the  equivalent  community-kernel source package Pablo made for armhfp with the command (in which you may ignore --define="dist .ns7") :
> rpmbuild --ba --target aarch64 --with=cross --without=perf --without=tools --without=debuginfo --define="dist .ns7" --define="_arch aarch64" --define="_build_arch aarch64" --define="__strip /usr/bin/aarch64-linux-gnu-strip" kernel.spec
> 
> cross tools installed:
> $ rpm -qa | grep aarch64
> binutils-aarch64-linux-gnu-2.27-9.el7.1.x86_64
> gcc-aarch64-linux-gnu-4.8.5-16.el7.1.x86_64
> gcc-c++-aarch64-linux-gnu-4.8.5-16.el7.1.x86_64
> 
> It's on my todo list to get this to a next level; 
> Maybe we can cooperate on this, though (as said before) it's not my intend to create (maintain) aarch64 RPI images. 
> 
> AFAIK now, are some of the issues to be dealt with:
> * uboot-images-armv8 carry a fedora specific patch causing uboot to look in /EFI/fedora for grubaa64.efi
> * obviously grubby has no understanding for the device-tree on aarch64 and most likely will never have this. 
> * livecd tools, used by the application tools to create images for armhfp has no aarch64 support. (2)
> * probably a lot more...
> 
> Grzt Mark
> 
> (1)l  link to kickstart file used to create image :
> https://github.com/markVnl/nethserver-createimg/blob/ks_wip/ks/Centos-Uboot-aarch64.ks
> 
> (2) patch to provide basic aarch64 support for  livecd tools / imgcreate, 
> _Note_ it does not provide full support, among other things EFI/centos/grub.cfg is not created...
> https://github.com/markVnl/nethserver-createimg/blob/master/SPEC-appliance-tools/livecd-tools/9999-Add-basic-aarch64-support-Nethserver.patch
> 
> > >
> > >
> > > Pablo.
> > >
> > > El 14/12/18 a las 19:57, Gordan Bobic escribió:
> > >> I'm hazarding a guess that the stock CentOS 7 aarch64 kernel isn't 
> > >> built to include support for the Pi.
> > >>
> > >> On Fri, 14 Dec 2018, 22:10 Steven Ellis <sellis at redhat.com 
> > >> <mailto:sellis at redhat.com> wrote:
> > >>
> > >>     Ok so I've tried the CentOS-7-aarch64-Minimal-1810.iso with the
> > >>     UEFI tools from
> > >>      - https://github.com/andreiw/RaspberryPiPkg
> > >>
> > >>     Can't get the ISO to boot. I've tried acpi=off but that hasn't
> > >>     made a difference.
> > >>
> > >>     Any other tips?
> > >>
> > >>     On Fri, 14 Dec 2018 at 18:39, Steven Ellis <sellis at redhat.com
> > >>     <mailto:sellis at redhat.com>> wrote:
> > >>
> > >>         Has anyone got this working on a Pi3+ and can provide guidance.
> > >>
> > >>         I've got UEFI working already but I haven't tried a generic
> > >>         aarch64 centos ISO yet
> > >>
> > >>         On Wed, 28 Nov 2018 at 12:48, R
> > >>         <riccardo.veraldi at presid.infn.it
> > >>         <mailto:riccardo.veraldi at presid.infn.it>> wrote:
> > >>
> > >>             so for example I could just dd this image after
> > >>             uncompressing it on the SD card and this would work I Suppose
> > >>
> > >>             http://vault.centos.org/altarch/7.4.1708/isos/aarch64/CentOS-7-aarch64.img.xz
> > >>
> > >>
> > >>             On 11/27/18 7:09 AM, Gordan Bobic wrote:
> > >>>             AFAIK the official installer only boots on UEFI aarch64.
> > >>>             Otherwise you'll have to get a working image from somewhere.
> > >>>
> > >>>
> > >>>             On Tue, Nov 27, 2018 at 5:44 AM R
> > >>>             <riccardo.veraldi at presid.infn.it
> > >>>             <mailto:riccardo.veraldi at presid.infn.it>> wrote:
> > >>>
> > >>>                 ok thank you.
> > >>>                 so does it mean that Pi 3 needs a UEFI firmware if I
> > >>>                 Want to run CentOS/aarch64 while it does not need if
> > >>>                 running CentOS/armhfp  ?
> > >>>                 thanks
> > >>>
> > >>>
> > >>>                 On 11/26/18 3:05 PM, Gordan Bobic wrote:
> > >>>>                 I haven't tried it yet, but you should be able to
> > >>>>                 get UEFI firmware for Pi 3 from here:
> > >>>>                 https://github.com/andreiw/RaspberryPiPkg
> > >>>>
> > >>>>                 If you can get that to boot off the ISO, you should
> > >>>>                 be able to use the installer.
> > >>>>
> > >>>>                 On Mon, Nov 26, 2018 at 11:01 PM R
> > >>>>                 <riccardo.veraldi at presid.infn.it
> > >>>>                 <mailto:riccardo.veraldi at presid.infn.it>> wrote:
> > >>>>
> > >>>>                     Hello,
> > >>>>
> > >>>>                     I was wondering if there is a procedure for
> > >>>>                     installing Centos 7 on the
> > >>>>                     Raspberry Pi 3 B+
> > >>>>
> > >>>>                     while installing Centos 7.5 on armhfp is very
> > >>>>                     clear and documented given
> > >>>>                     that a raw root image is provided and you just
> > >>>>                     "dd" it on the memory card,
> > >>>>
> > >>>>                     it is not clear to me how to do it with
> > >>>>                     aarch64. A ISO image is provided
> > >>>>                     but how to install it on the raspberry ?
> > >>>>
> > >>>>                     thank you
> > >>>>
> > >>>>                     Rick
> > >>>>
> > >>>>
> > >>>>                     _______________________________________________
> > >>>>                     Arm-dev mailing list
> > >>>>                     Arm-dev at centos.org <mailto:Arm-dev at centos.org>
> > >>>>                     https://lists.centos.org/mailman/listinfo/arm-dev
> > >>>>
> > >>>>
> > >>>>                 _______________________________________________
> > >>>>                 Arm-dev mailing list
> > >>>>                 Arm-dev at centos.org  <mailto:Arm-dev at centos.org>
> > >>>>                 https://lists.centos.org/mailman/listinfo/arm-dev
> > >>>
> > >>>
> > >>>
> > >>>             _______________________________________________
> > >>>             Arm-dev mailing list
> > >>>             Arm-dev at centos.org  <mailto:Arm-dev at centos.org>
> > >>>             https://lists.centos.org/mailman/listinfo/arm-dev
> > >>
> > >>
> > >>             _______________________________________________
> > >>             Arm-dev mailing list
> > >>             Arm-dev at centos.org <mailto:Arm-dev at centos.org>
> > >>             https://lists.centos.org/mailman/listinfo/arm-dev
> > >>
> > >>
> > >>
> > >>         -- 
> > >>
> > >>         Steven Ellis
> > >>
> > >>         APAC  PRINCIPAL PRODUCT  MANAGER - STORAGE
> > >>
> > >>         TECHNICAL PORTFOLIO EVANGELIST - APAC
> > >>
> > >>         Red Hat Asia Pacific - Auckland  NZ <https://www.redhat.com/>
> > >>
> > >>         sellis at redhat.com <mailto:sellis at redhat.com>            M:
> > >>         +64 21 321 673
> > >>
> > >>         <https://www.redhat.com/en>TRIED. TESTED. TRUSTED.
> > >>         <https://redhat.com/trusted>
> > >>
> > >>
> > >>
> > >>     -- 
> > >>
> > >>     Steven Ellis
> > >>
> > >>     APAC  PRINCIPAL PRODUCT  MANAGER - STORAGE
> > >>
> > >>     TECHNICAL PORTFOLIO EVANGELIST - APAC
> > >>
> > >>     Red Hat Asia Pacific - Auckland  NZ <https://www.redhat.com/>
> > >>
> > >>     sellis at redhat.com <mailto:sellis at redhat.com>            M: +64 21
> > >>     321 673
> > >>
> > >>     <https://www.redhat.com/en>TRIED. TESTED. TRUSTED.
> > >>     <https://redhat.com/trusted>
> > >>     _______________________________________________
> > >>     Arm-dev mailing list
> > >>     Arm-dev at centos.org <mailto:Arm-dev at centos.org>
> > >>     https://lists.centos.org/mailman/listinfo/arm-dev
> > >>
> > >>
> > >> _______________________________________________
> > >> Arm-dev mailing list
> > >> Arm-dev at centos.org
> > >> https://lists.centos.org/mailman/listinfo/arm-dev
> > >
> > > _______________________________________________
> > > Arm-dev mailing list
> > > Arm-dev at centos.org
> > > https://lists.centos.org/mailman/listinfo/arm-dev
> > _______________________________________________
> > Arm-dev mailing list
> > Arm-dev at centos.org
> > https://lists.centos.org/mailman/listinfo/arm-dev
> > 
> _______________________________________________
> Arm-dev mailing list
> Arm-dev at centos.org
> https://lists.centos.org/mailman/listinfo/arm-dev
>