I’ve just received my W2 and installed the Banana Pi’s Ubuntu 18.04 image. It perfectly works.
I now want to try installing CentOS on my board. Can I just dd the install DVD ISO of the ARM version of CentOS on my SD Card ? Or is it a little bit more complicated than that ?
I tried to read the wiki page about that subject but it clearly needs to be re-organised… Do I need to touch the bootloader or something ?
In theory you could use whatever distro you like … as long as your CPU / board is supported by the distro. It is essentially less a question of the distro as more a question of the kernel and it’s modules being compatible.
There exist effords to unify and imrpove the support of ARM architecture to the mainline kernel, but we are far from there. Think about X86 architecture you essentially only have to deal with Intel and AMD providing processors. For ARM architecture the are tons of more chip makers and each has different pin layouts, voltages, supported instruction set, mixed with different memory modules and graphic chips … etc.
So in reality you either have to compile the distro yourself to be compatible with your system or take one which was already compiled with the support enabled.
PS: Even if you get your distro of your choice somehow ‘running’, you may end up with a minimal system only working on a rudimentary shell, without WiFi, Ethernet or without graphical UI because your GPU wasn’t recognized.
Usually when talking about a distro (like CentOS), we mean the different applications and configurations packaged and provided by it (often also a question ofn licensing or support). A distro is running on a dedicated kernel (base OS, e.g. version 4.19), which is usually linked with a couple of modules to interact with hardware (e.g. memory modules, sound card, …) and a shell to interact. Some distros like Armbian are catered specifically to the ARM architecture and provide a larger support range of different hardware for this particular architecture, while Raspbian for example is specifically catered to run on PI infrastructure.
Thank you for your reply (and your time). In my case, there is an official ARM version of CentOS. Is there a way I can use the Banana Pi kernel (there is one provided in the wiki, right ?) on my CentOS ? Or I don’t even need it in theory ?
I’m not sure to understand : do I need to use the kernel provided by Banana Pi or a standard ARM kernel with kernel modules added later will do the job ?
PS : I just want to use my BPI W2 for NAS purpose, I don’t care about the GPU or Wi-Fi
Yes you can do that. You will need to replace the
/boot partition and also the kernel directory in the
I will try to get you details later.
Thanks a lot, I will try to do that
Here are the steps which can be used. Please use it on your own risk as these are generic step to make use a common rootfs with specific device dtb, boot environment and rootfs(as per that devices arch)
- Download a working centos rootfs for the same arch of your device.
- Download a working kernel file and directories.
- Create partitions on SD-card or USB Stick depending on which one is bootable by your device uboot. Normally sbc uses 1 or 2 paritions. In case of R2 it was 2 partitions, First fat32 for boot and second ext for rootfs
- Copy everything from CentOs rootfs to second ext4 partition in root.
- Copy “system, lib, usr, etc” directories from kernel file to root partition from the centos. if they’re present then overwritten should work but it should not remove the other files in the same directory.
- Copy the boot files from kernel file to boot partition.
- dd the bootloader or preloader which ever is required for your device.
- Try to boot with either sd-card or Usb stick
I hope this is clear enough. I haven’t got into much details of the process as it can change depending on how you obtain the rootfs and kernel package, also on the specific devices.
Thanks a lot. I will try as soon as I can
I’m not sure to understand the step 7. Which file should I dd to which partition for the bootloader ? Where can I find it ?
This is the link where they keep all the bootloader files, I am not sure which one is use for what purpose as I don’t have a W2. Also I didn’t come across any tutorial which explains W2 process in detail.
Maybe someone with more knowledge of W2 can help you out with that.
Thanks everyone !
I did manage to run CentOS on my BPI W2
Still a lot of work to do but I’m very happy
Can you share the steps with the link to the soruces.
This is what I made (no source tutorial, just tried random things) :
- Get out of the official tutorial on the wiki, it’s full of garbage
- You have to create two partitions “BPI-BOOT” (FAT32, >100MB) and "BPI-ROOT (ext4). Don’t try to create them by hand, it’s a waste of time. Just download one of the provided IMG on the wiki and burn it on your SD.
- Delete all the content of “BPI-ROOT” (NOT BOOT).
- Copy/paste in it all your directories of your wanted distro (just search on google “[your distro] + aarch64 rootfs tar”.
- That should be ok, just “sync” to flush cache on Linux and try to boot your BPI. Personnaly I didn’t manage to get HDMI port working on CentOS but I didn’t try to do so, I just wanted to SSH on it.
If you want to SSH on your system or anything else, you can chroot your SD on your host Linux system. You can use the “ch-mount” script provided on the wiki. BE CAREFUL : there’s a missing “#” at the beginning of the file. (#!/bin/bash). You also need to install the package qemu-user-static and copy it your SD at /bin/.
If you can turn that sd card into and img using dd then you can upload it on the forum and maybe someone would use it or update it.
Yes I’m planning to do that But I still have a bit of work to do on it, but be sure that I will share it
nicely done, and yes the
sync part can be one small but important step