2017-03-12 20:56:19 +01:00
|
|
|
+++
|
2017-03-12 21:10:19 +01:00
|
|
|
date = 2014-08-24T00:00:00+00:00
|
2017-03-12 20:56:19 +01:00
|
|
|
title = "Mini Xplus as a Server"
|
2017-03-12 21:40:00 +01:00
|
|
|
tags = ["devtools"]
|
2017-03-12 20:56:19 +01:00
|
|
|
+++
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
Random, incomplete notes on using a [Miniand
|
|
|
|
Tech](https://www.miniand.com/) [Mini Xplus
|
|
|
|
H24](https://www.miniand.com/products/Mini%C2%A0Xplus%20TV%20Box%20H24)
|
|
|
|
as a server machine.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
## v2
|
|
|
|
|
|
|
|
I've soldered up a serial port so doing things from scratch is much
|
|
|
|
easier.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
$ sudo cp -a hwpack/rootfs/* /media/removable/rootfs/
|
|
|
|
|
2017-03-12 20:46:14 +01:00
|
|
|
sun4i# set extraargs init=/bin/sh
|
|
|
|
sun4i# run bootcmd
|
2017-03-12 20:56:19 +01:00
|
|
|
|
2017-03-12 20:46:14 +01:00
|
|
|
# rm -rf /var/run
|
|
|
|
# ./debootstrap/debootstrap --second-stage
|
|
|
|
# passwd
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
## v1
|
|
|
|
|
|
|
|
Start with the Lubuntu image:
|
|
|
|
https://www.miniand.com/forums/forums/2/topics/1
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
I used
|
|
|
|
http://dl.miniand.com/allwinnera10/ubuntu/lubuntu-desktop-12.04-4-720p-512MB-miniand.com.img.7z
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
Turns out my board has 1 GB and the board probed for it just fine.
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
Writing the image to an SD card gives a boot and rootfs partition
|
|
|
|
similar to the OMAP series. The bootfs has a binary file and kernel
|
|
|
|
image.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
I don't have a keyboard. Fix the wifi interface by editing
|
|
|
|
`/etc/network/interfaces`:
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
auto wlan0
|
|
|
|
iface wlan0 inet dhcp
|
|
|
|
wpa-ssid "your network name"
|
|
|
|
wpa-psk your-network-key
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
The board doesn't seem to register the hostname with the DHCP server.
|
|
|
|
mDNS works though.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
The Lubuntu image is armel based. The hard float armhf Precise image
|
|
|
|
should be much faster for floating point workloads as the A8 takes some
|
|
|
|
time to shift values back and forth between the core and VFP unit.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
Grab the modules from `/lib/modules`. kpartx is your friend.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
Grab the most recent Precise release. I used
|
|
|
|
http://cdimage.ubuntu.com/releases/precise/release/ubuntu-12.04-preinstalled-server-armhf+omap4.img.gz
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
gunzip, `mkfs.ext4 -L rootfs -m 0.5 /dev/sdc2`, and tar across to the SD
|
|
|
|
card.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
Set a password for root by editing `/etc/shadow`.
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
Use QEMU to boot and `apt-get install wireless-tools wpasupplicant
|
|
|
|
openssh-server`. `adduser your-name`. `adduser your-name sudo`.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
You can now boot and login.
|
|
|
|
|
|
|
|
Set the default locale in `/etc/default/locale`
|
|
|
|
|
|
|
|
LANG=C
|
|
|
|
LANGUAGE=C
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
Add universe to `/etc/apt/sources.list`. Toast
|
|
|
|
/var/lib/preinstalled-pool/.
|
|
|
|
|