Hello everyone,
I've recently purchased the Odroid-Xu4 and have been following this thread to install
Fedora 24 on it. I now have the system fully booting with the exception that Xorg is not
working. I am running the Fedora Mate Spin. I even performed a "dnf update" to
get the latest 4.4.6 kernel and package fixes, but no luck with booting into graphical
mode via Xorg.
Here's what I did to get there.
1. Downloaded the latest Fedora 24 Mate Spin, Fedora-Mate-armhfp-24-1.2-sda.raw.xz, onto
my raspberry pi2. The raspberry pi 2, runs the raspberry pi 2 kernel 4.4.7+ with
Fedora-Mate-armhfp-24-1.2-sda.raw.xz layered on top. This is I suspect, similar to what
Andreas is doing with the Ubuntu kernel. In any event, a Fedora (or derivative i.e.
Centos, Redhat, etc.) install on an ARMv7 based system is required to do the following
tasks.
2. I too found the same issues as Ali in that using the u-boot install script to install
u-boot.bin makes the the boot partition unreadable if you use either the Fedora install
script or install the partitions yourself. However, if you begin the boot partition on
starting disk block "3072" instead of the default "2048", you can get
around this.
I used fdisk to create my boot partition starting at block "3072". I also found
I needed to set the length of this partition to 400M or more (I use 400M). I set this
partition as a FAT partition just to see if I could get the system working, based on
everyone's comments in this thread. I will, in the near future try to use and EXT4
partition here and see if it works as well. But other things first, like trying to get
Xorg working.
**note: I have now rebuilt the boot partition as ext4 and following this procedure,
everything except Xorg works.
I then added a swap partition as partition 2 with a length of 200M, and partition 3 as my
root partition (EXT4), taking up the rest of my 32GB SD card.
3. I then created the filesystems, vFAT or EXT4 (your choice) for the boot partition, EXT4
for the root partition. Once done, I mounted them on the raspberry pi 2.
4 I copied the root partition of the Fedora Spin image to the mounted root partition on
the raspberry pi and similarly for the boot partition. If you require exact commands
here, I can provide them to you later. But I suspect you already know how to do this.
5. I downloaded the appropriate u-boot pieces Peter suggested and which Andreas used from
the Odroid website specified, along with the SD install script. I also copied into this
directory, the u-boot.bin and u-boot.dtb files from /usr/share/uboot/odroid-xu3 of the
mounted root partition on the raspberry pi. This is the Fedora supported u-boot.bin.
Then I flashed the SD card using the Odroid SD install script.
6. At this point, you have everything on your mounted SD card. The problem now is you
run into the issues that Ali ran into if you try to boot the Odroid from it, namely, the
kernel (4.5.5-300) cannot find the root partition from which to boot and dracut fails
because of it. This is because key drivers (as Dennis eluded) seem to be missing from the
kernel AND the initramfs image. Therefore, the following steps are required to get past
this.
7. While your SD card is still mounted (both boot and root partitions), perform the
following tasks:
a) execute the command "blkid -s UUID /dev/xxxx" where "xxxx" is
your mounted SD card root partition. This will provide the UUID of that disk partition.
Do the same thing for your mounted SD card boot partition.
b) execute the chroot command to your mounted SD root partition.
c) add any users you need by executing "useradd" and add/set the root passwd
so you can login through and alternate counsel if needed. Also, you can set up your
network configuration here too if you know your system's ethernet MAC address (if you
use static addresses) or you know what IP address will be assigned to your network devices
via DHCP. As well, edit the /etc/selinux/config file and change
"SELINUX=enforcing" to "SELINUX=disabled". This will allow you to
login at an alternate console or remotely via ssh.
d) edit the /etc/fstab file and replace the UUIDs for each partition with what you
obtained in step "7a". Also, ensure that vFAT is the type of partition being
mounted for the boot partition and ext4 is the type for the root partition. If not, then
change the fstab file so that they are, respectively.
e) edit the /boot/extlinux/extlinux.conf file and on the "Append" line,
replace the root=UUID value with that which you obtained from step "7a". You
also need to add the need kernel drivers to this line such that your line looks like the
following with your root's UUID instead of mine:
Append rd.driver.pre=dw_mmc-exynos,exynosdrm,ehci-exynos,ohci-exynos ro
root=UUID=4237819f-e48e-46c8-8b6a-7832e7e351b5
f) Delete the original initramfs and rebuild the new initramfs image by executing the
following commands:
rm -f /boot/initramfs-4.5.5-300.fc24.armv7hl.img
dracut --add-drivers "dw_mmc-exynos exynosdrm ehci-exynos ohci-exynos"
/boot/initramfs-4.5.5-300.fc24.armv7hl.img 4.5.5-300.fc24.armv7hl
g) exit from chroot back to your normal root window.
8. Unmount all of your SD card partitions and try to boot from the SD card in your
Odroid.
9. At this point, the system should boot using the 4.5.5-300 kernel but it will fail in
XORG to get to graphical mode. It does at this point however, support SSH. So you can
connect via SSH if your network is set up correctly.
10. If you login to your Odroid and your network is working, you can then update to the
latest kernel (4.6.5-300) and packages using the "dnf update" command. However,
if you do this, you will then again have to rebuild the initramfs image because although
the updates provide the correct driver parameters on the Append line in the updated
/boot/extlinux/extlinux.conf file, the 4.6.5 initramfs image does not contain them. As a
result, the system will fail to boot in dracut, once again looking for the root partition.
To build the correct initramfs for 4.6.5-300 execute the following commands:
rm -f /boot/initramfs-4.6.5-300.fc24.armv7hl.img
dracut --add-drivers "dw_mmc-exynos exynosdrm ehci-exynos ohci-exynos"
/boot/initramfs-4.6.5-300.fc24.armv7hl.img 4.6.5-300.fc24.armv7hl
**Note, if you want to boot from the 4.6.5 kernel, then remember to edit the
/boot/extlinux/extlinux.conf file and change the "default" line to use the
4.6.5-300 entry.
11. Reboot your Odroid if you ran "dnf update" and made the suggested changes
in step 10. At this point, you should be where I am currently ... with a system that
boots completely but fails to boot into graphics mode. And yes, executing "systemctl
get-default" displays "graphical.target".
Anyway, that's it. Hope this helps.
Stewart Samuels
P.S. @Peter or @Dennis, any help with the XORG problem would be greatly appreciated.
What do you need me to do to get you information on this? Post the XORG.0.LOG here? What
files/logs do you need, etc.?
Also, on another note. I notice now that when the system boots (either 4.5.5-300 or
4.6.5-300 kernel), it only boots 5 cpus. If fails to start the remaining 3. Is there a
limit that is being exceeded somewhere?