CentOS 7 for an Odroid HC1





Installing the image

This page presents the steps to get a CentOS7 image up and running on an Odroid HC1.  It is specific to the HC1.

This guide was developed from experience gained from:

https://blog.christophersmart.com/2018/04/28/fedora-on-odroid-hc1-mini-nas-armv7
As noted on the above blog, Hardkernel uses a proprietary bootloader on the uSD card rather than putting NAND or other storage on the board.  It is this bootloader that makes the Odroid a special case, but well worth it for what you get in a server platform.

There is a special image (probably until Centos 7.7) with the 4.19 kernel that supports the Odroid HC1:
https://armv7.dev.centos.org/repos/images/CentOS-Userland-7-armv7hl-generic-Minimal-419-v26-1810-sda.raw.xz
Using this image, follow the standard steps for installing the CentOS image on the uSD card.  Leave the boot and rootfs partitions mounted as you will need them for the following steps.

The Hardkernel bootloader plus uboot is rumored to take more than the 2048KB alloted.  Since the first partition on the image is specifically for Raspberry PIs, we can delete it with fdisk or similar tool *BEFORE* running the following script.  Later will be instructions to edit /etc/fstab.

First make a working directory and get the Hardkernel bootloader and install script:

mkdir hardkernel ; cd hardkernel

wget https://raw.githubusercontent.com/hardkernel/u-boot/odroidxu4-v2017.05/sd_fuse/sd_fusing.sh \
https://raw.githubusercontent.com/hardkernel/u-boot/odroidxu4-v2017.05/sd_fuse/bl1.bin.hardkernel \
https://raw.githubusercontent.com/hardkernel/u-boot/odroidxu4-v2017.05/sd_fuse/bl2.bin.hardkernel.720k_uboot \
https://raw.githubusercontent.com/hardkernel/u-boot/odroidxu4-v2017.05/sd_fuse/tzsw.bin.hardkernel

Then add the uboot from the mounted rootfs on the uSD and run the bootloader install script (below assumes uSD is /dev/sdb).

cp /mnt/__/usr/share/uboot/odroid-xu3/u-boot.bin .

chmod a+x sd_fusing.sh

./sd_fusing.sh /dev/sdb

Finally modify the kernel boot options.  I got these options from the above referenced blog.  I cannot tell you what each does or if they are still needed.  But they work and don't seem to hurt.

sed -i "s|append|& cpuidle.off=1 \
console=tty1 console=ttySAC2,115200n8 \
rd.driver.pre=ledtrig-heartbeat,xhci-plat-hcd no_bL_switcher|" \
/mnt/__boot/extlinux/extlinux.conf



Delete the /boot/fw entry from /mnt/__/etc/fstab, as we deleted that partition before installing the bootloader and uboot.

At this point, enlarge the rootfs (I am lazy and use gparted), insert the uSD in the HC1, connect the serial console and power up!

***WARNING***

DO NOT use a "standard" 3.3v TTY/USB adapter.  YOU MUST use a 1.8v adapter or you will ruin your board!  Hardkernel went with 1.8v as a power saving design decision.

Moving the Rootfs and swap to the Sata drive

Currently, only the swap and rootfs partitions can be moved from the uSD to the Sata drive.  To do this, use a tool like fdisk to delete these partitions from the uSD card (still delete the Raspberry Pi fw partition).  Install the CentOS image on the Sata drive, delete the boot and Raspberry PI fw partitions, then grow the rootfs partition.

Remember to delete the /boot/fw line from /mnt/__/etc/fstab on the sata drive.  Insert the uSD and Sata drives in the HC1 and boot up!  It is that simple.



That pesty Blue Light

The heartbeat blue LED can be enabled or disabled as desired:

Off:

echo none | sudo tee /sys/class/leds/blue\:heartbeat/trigger

On:

echo heartbeat | sudo tee /sys/class/leds/blue\:heartbeat/trigger



The above does not survive a reboot.  It is only a temporary change.  To turn off the blue LED at power up, add the following @reboot cron command.

cat > /etc/cron.d/blueled << EOF
@reboot root echo none > /sys/class/leds/blue\:heartbeat/trigger

EOF



You can EMail Robert at mailto:rgm at htt-consult.com  his desk...

Updated


© Robert G. Moskowitz -- 2019