Short-form notes on rebuilding the MooresCloud Holiday Lights from scratch and making the lights work.
This is part 3/3, it covers building the fresh OS onto a memory card.
You will need:
- A set of the lights with serial port access (from part 1)
- The flattened devicetree blob imx23-holiday.dtb created in part 2
- A Linux computer (sorry Bash on Ubuntu on Windows 10 won’t cut it this time), with a serial terminal (Putty, Screen, Minicom, Cutecom, etc)
- A microSD port or adapter for the computer (e.g. full-size SD adapter, USB microSD adapter, etc)
- An extra memory card (microSD, 2GB or greater, Class 4 or better recommended)
- A wireless network to which you can connect the Holiday
- The latest Arch Linux ARM (‘ALARM’) for ARMv5 (http://os.archlinuxarm.org/os/ArchLinuxARM-armv5-latest.tar.gz)
- The following packages from the ALARM package repository for the ‘arm’ architecture:
- dialog
- iw
- libnl
- sudo
- uboot-olinuxino
- wpa_supplicant
Process:
- Remove the original memory card from the lights and put it somewhere safe, you know, just in case
- Follow the OLinuXino installation guide to install the base OS onto your new memory card
- Before dismounting the memory card
- copy the downloaded packages to /root on the card
- copy the devicetree blob to /boot/dtbs/imx23-holiday.dtb
- edit /boot/uEnv.txt file and add the following line:
fdtfile=imx23-holiday.dtb
- Connect your serial interface to the holiday and start your terminal (115200,8N1 no flow control)
- Power On!
- Let everything settle and login as user ‘root’ password ‘root’
- Set a new hostname
hostnamectl set-hostname 'festum' # or another holiday name
- Install the packages
pacman -U /root/dialog* pacman -U /root/libnl* pacman -U /root/iw* pacman -U /root/sudo* pacman -U /root/uboot* pacman -U /root/wpa_supplicant*
- You may need to set your terminal window size
stty rows 50 columns 132 # substitute your terminal size
- Set up the wireless connection
wifi-menu -o # Select your wireless network, enter your password, etc netctl start wlan0-YourSSID netctl enable wlan0-YourSSID visudo # remove "# " from the line "%wheel ALL=(ALL) NOPASSWD: ALL" reboot
- Log back in as user ‘alarm’ password ‘alarm’, and test sudo
sudo -i
- Change the root password and lock it from normal login
passwd passwd --lock root exit
- Change the alarm user password
passwd exit
- Test logging back in as user ‘alarm’ and your new password
That’s it! You have a fresh, clean Arch Linux ARM install, ready for anything. 🙂
I haven’t done much more than this at present, other than recompile the programs from the original Holiday-Dist repository and show that the lights work.
My versions, which use the iMX23 hardware SPI port and use less processor time than the originals can be found in my Github fork: https://github.com/Froosh/holiday-dist