[Arm-dev] Centos aarch64 on Raspberry PI 3

Jim Perrin jperrin at centos.org
Tue Jan 10 14:07:26 UTC 2017



On 01/09/2017 07:02 PM, Paul R. Ganci wrote:

> I do have a question about how to use the distribution. I noticed that
> there are two directories containing things essential to the distro.
> Here is part of the directory tree which contains the images.
> 
> mirror.centos.org/altarch/7/isos/aarch64/CentOS-7-aarch64-Everything.iso
>                                         /CentOS-7-aarch64-NetInstall.iso
>                                         /CentOS-7-aarch64-rolling.img.xz
>                                        
> /CentOS-7-aarch64-rootfs-7.3.1611.tar.xz
>                                         /CentOS-7-aarch64.img.xz
>                                         /ReadMe.txt
> 
> mirror.centos.org/altarch/7/os/aarch64/images/boot.iso
>                                              /efiboot.img
>                                              /pxeboot/
> 
> In the ReadMe.txt file I found this documentation:
> 
>     ## Burning the image to disk
> 
>     You may simply dd this image to disk, however for the sake of ensuring 
>     that it is written correctly, we recommend the following command. Please 
>     replace the image-name and target device with the appropriate values for
>     your environment. 
> 
>     ```
>     dd if=<image-name.img> of=/dev/sdX bs=2M conv=fsync && sync;
>     ```
> 
> Which image should be burnt? I chose the CentOS-7-aarch64.img.xz and did
> the following from a CentOS 6.8 X86_64 system:

That is the proper image, however it's not meant for the rpi3, and not
all ARMv8/ARM64 systems are created equal.

>> unxz CentOS-7-aarch64.img.xz
>> dd if=CentOS-7-aarch64.img of=/dev/sdf bs=2M conv=fsync && sync;
>>sgdisk -e -d4 -n4:0:0 /dev/sdf

These steps are meant for systems based on Applied Micro, AMD, or Cavium
chipsets. They will not work for the rpi, because the rpi is built
differently.

> However, when I stuck the sdcard into the RPI3 it did not do a thing. I
> would have been giddy with joy even if it crashed on something while
> booting. However, absolutely nothing happened as if there was no boot
> record to be found.

The rpi3 wants uboot with a specific disk layout and device structure,
while the images we build expect UEFI(similar to modern x86_64 systems).
If you want the details (and are having trouble sleeping) I'd invite you
to read up on all the gossip surrounding the SBBR and SBSA standards.
The incredibly short version (not suitable for pedants) is that we
expect UEFI, pxe support, and would be REALLY happy with acpi support.
Without these, you often have to do custom hacks to partitioning, uboot,
or devicetree files to get each board to boot.

It's this hackery that's required for the rpi3. Once we have kernel
support enabled for it, we'll have to ship a custom 'rpi3-only' image
which includes all of these modifications, in a pre-built image.


> So my question is how do I make a bootable sdcard in this case? Did I
> chose the correct "img" file or do I have to work some magic somehow.
> For example do I have to use the efiboot.img to make an EFI boot
> directory? I would love to see the RPI3 crash trying to run the OS. :)

If only. The rpi3 doesn't support EFI. If we're *very* lucky, the newer
uboot efi emulation will be enough, but we're not far enough along to
test that yet.


> If there are some simple instructions so that I might know what I am
> doing I would be grateful. Again Thanks.


Once I have something worth kicking around, I will absolutely build this
documentation out.


-- 
Jim Perrin
The CentOS Project | http://www.centos.org
twitter: @BitIntegrity | GPG Key: FA09AD77


More information about the Arm-dev mailing list