<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>

Installing slackwarearm on a odroid XU4/HC2.

slacwarearm containes all of the needed userspace binaries, but it doesn’t have a kernel for the odroid. I have made 4 packages to address this:

Option 1 (use the magic script)

Just download the script and call it:

wget http://mirrors.aptalaska.net/slackware/people/schu/slackwarearm/installSlackware.sh
chmod 755 installSlackware.sh
sudo ./installSlackware.sh /dev/<SDCARDDEV>

Option 2 (pretend to know what you are doing)

Get the files and install manually. Where /dev/sdf is the name of your SD card:

Step 1. Grab some files

wget http://mirrors.aptalaska.net/slackware/slackwarearm/slackwarearm-devtools/minirootfs/roots/slack-current-miniroot_14Jan20.tar.xz
wget http://mirrors.aptalaska.net/slackware/people/schu/slackwarearm/kernel-odroidxu4-4.14.y/kernel-odroidxu4-4.14.165-arm-1.tgz
wget http://mirrors.aptalaska.net/slackware/people/schu/slackwarearm/kernel-odroidxu4-4.14.y/kernel-odroidxu4-firmware-20200122-noarch-1.tgz
wget http://mirrors.aptalaska.net/slackware/people/schu/slackwarearm/kernel-odroidxu4-4.14.y/xu4-boot.tar.gz

Step 2. Partition and format

Partition the disk:

parted -s -a optimal /dev/sdf "mklabel msdos mkpart primary fat32 2048s 266239s mkpart primary ext4 266240s -0"

Now format it:

mkfs.msdos -F 16 -I -n BOOT /dev/sdf1
mke2fs -t ext4 /dev/sdf2

Step 3. Install the Samsung SoC boot loader stuffs

Extract and install binary bootloader code

tar xvf xu4-boot.tar.gz
cd xu4-boot
./xu4boot.sh /dev/sdf
cd ..

Step 4. Mount.

Mount the new filesystems to ./mnt

mkdir -p mnt
mount /dev/sdf2 mnt
mkdir mnt/boot
mount /dev/sdf1 mnt/boot

Step 5. Extract rootfs.

Extract the new slackware miniroot to the larger ext4 partition

cd mnt
tar xvf ../slack-current-miniroot_14Jan20.tar.xz

Step 6. Install kernel and firmware

Install the custom kernel and firmware packages

tar xvf ../kernel-odroidxu4-4.14.165-arm-1.tgz
sh install/doinst.sh
rm -rf install
tar xvf ../kernel-odroidxu4-firmware-20200122-noarch-1.tgz
sh install/doinst.sh
rm -rf install

Step 7. Fix a few things:

vi etc/fstab (delete everything and make it look like this)

/dev/mmcblk1p1         /boot           vfat    defaults                         0   1
/dev/mmcblk1p2         /               ext4    errors=remount-ro                0   1
devpts                 /dev/pts        devpts  gid=5,mode=620                   0   0
proc                   /proc           proc    defaults                         0   0
tmpfs                  /dev/shm        tmpfs   defaults                         0   0

Fix the serial line since ttyS0 doesn’t exist on the odroid but ttySAC2 does.

sed -i'' 's/115200 ttyS0 vt100/115200 ttySAC2 vt100/' etc/inittab

Tell the dhcp client to wait 30 seconds on eth0 since it takes longer than the default timeout to get an address.

--- etc/rc.d/rc.inet1.conf.orig
+++ etc/rc.d/rc.inet1.conf
@@ -19,6 +19,7 @@

Add ntp on boot since we don’t have a clock.

echo "ntpdate pool.ntp.org" >> etc/rc.d/rc.local

If you are going to be headless, then you might want to allow root to ssh

Change “PermitRootLogin” to “yes” in etc/ssh/sshd_config

Step 8. Cleanup.

That’s it, you’re done, so umount, put the sd card in your odroid and give it a go.

cd ..
umount mnt/boot
umount mnt
rm -rf mnt

Step 9. Configure system.

Boot up and ssh to your new system. The password is listed in the text file for the miniroot:


Setup slackpkg

slackpkg update

Change root password


Install some useful packages

slackpkg install curl diffutils infozip glibc smartmontools hdparm

Check for updates

slackpkg upgrade-all

Now install the shutdownDisk-odroidHC2 package to prevent it from whacking your disk.

See notes at: https://forum.odroid.com/viewtopic.php?t=29069

wget http://mirrors.aptalaska.net/slackware/people/schu/slackwarearm/packages/shutdownDisk-odroidHC2/shutdownDisk-odroidHC2-0.1-noarch-1.tgz
installpkg shutdownDisk-odroidHC2-0.1-noarch-1.tgz

Deal with stupid JMicon USB<->SATA controller

Get updated firmware, flash it, and set the spin-down timer to 0 because it’s dumb

See notes at https://wiki.odroid.com/odroid-xu4/software/jms578_fw_update

wget https://wiki.odroid.com/_media/odroid-xu4/software/bin-16028_jms578_std_v00.04.01.04_self_power_odd_20190611.zip
unzip bin-16028_jms578_std_v00.04.01.04_self_power_odd_20190611.zip
wget https://wiki.odroid.com/_media/odroid-xu4/software/jms578fwupdater.tgz
tar xvf jms578fwupdater.tgz
JMS578FwUpdater/JMS578FwUpdate -d /dev/sda -f JMS578_STD_v00.04.01.04_Self\ Power\ +\ ODD.bin -b backup.bin -t 0

Now install hd-idle to deal with the disk spin-down in a more sensible way

wget http://mirrors.aptalaska.net/slackware/people/schu/slackwarearm/packages/hd-idle/hd-idle-1.04-arm-1.tgz
installpkg hd-idle-1.04-arm-1.tgz
echo "/usr/sbin/hd-idle" >> /etc/rc.d/rc.local

Configure a disk

This installs the hard drive as /data.

parted -s -a optimal /dev/sda "mklabel msdos mkpart primary ext4 2048s -0"
mke2fs -t ext4 /dev/sda1
echo "/dev/sda1                /data           ext4    errors=remount-ro                0   1" >> /etc/fstab
mkdir /data
mount /data