While making these notes I was following a debootstrap tutorial written for Olimex and did not bother repeating a lot of the details. I debootstrap the new rootfs on a spare card, using the same Sabre Lite board (running Debian Wheezy) as a host. The instructions on the Olimex blog include the details needed to bootstrap on a host of different architecture than the target.
I perform the installation with distro=jessie and use the following configuration of /etc/apt/sources.list to set my package sources to US servers:
cat << EOT >
deb http://ftp.us.debian.org/debian/ $distro main contrib non-free
deb http://ftp.us.debian.org/debian/ $distro-updates main contrib non-free
deb http://security.debian.org/ $distro/updates main contrib non-free
EOT
My locale is en_US.UTF-8
While creating the RFS, I add a user in the standard way i.e. adduser debian.
Creation of /etc/fstab is absent from the instructions in the blog ... I use the following setup, which allows me to easily delete and re-install the RFS at a whim (important requirement for development), while keeping /home isolated from the RFS on it's own partition:
/dev/mmcblk0p1 / auto errors=remount-ro 0 1
/dev/mmcblk0p2 /home auto defaults 0 2
For Debian (see below for Ubuntu), the serial console login is enabled on Sabre Lite with the following line added to /etc/inittab:Creation of /etc/fstab is absent from the instructions in the blog ... I use the following setup, which allows me to easily delete and re-install the RFS at a whim (important requirement for development), while keeping /home isolated from the RFS on it's own partition:
/dev/mmcblk0p1 / auto errors=remount-ro 0 1
/dev/mmcblk0p2 /home auto defaults 0 2
T1:23:respawn:/sbin/getty -L ttymxc1 115200 vt102
One problem emerged with the first boot on the new RFS - the system failed to spawn a login process on the serial port (/dev/ttymxc1), although the login was working fine through the attached monitor/keyboard ... the following messages were observed on the serial console:
[ TIME ] Timed out waiting for device dev-ttymxc1.device.
[DEPEND] Dependency failed for Serial Getty on ttymxc1.
After enabling CONFIG_FHANDLE in my kernel (boundary-imx_3.10.17_1.0.0_ga) and rebuilding, I could login on the serial port.
With ethernet working and openssh-server already installed during the debootstrap process, I could get busy updating the system and installing some essential software packages:
apt-get install curl vim sudo gcc make bzip2 python lzop bc git libncurses5-dev
apt-get install flex libtool automake pkg-config bison
There is one (apparently harmless) quirk observed with the new system:
[FAILED] Failed to start Login Service.
See 'systemctl status systemd-logind.service' for details.
This is possibly related to a bug in jessie. It seems that "standard system utilities" is not installed in the minimal debootstrap process - the bug report states that there is no negative effect on the boot process so long as the "System-V" init package is installed. A little more web crawling seems to indicate that there is something to do with tasksel, but I'm relatively new to Debian so leave it alone for now. (Update 1/22/2015 GN: noticed there is not a complete inittab installed so getty is not being called on tty[1-4])
Atheros WLAN working after firmware install:
usb 2-1.2: ath9k_htc: Failed to get firmware htc_9271.fw
(apt-get install firmware-atheros)
Here is some guidance on the u-boot parameters:
setenv bootargs console=${console},${baudrate} root=/dev/mmcblk0p1 rootfstype=ext4 rootwait video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off video=mxcfb4:off video=mxcfb5:off video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB16 fbmem=48M vmalloc=400 mxc_hdmi.only_cea=1 coherent_pool=48M
ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdt_file}
ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}
bootz ${loadaddr} - ${fdt_addr}
For Ubuntu, the instructions are practically identical ... just a few differences.
sudo debootstrap --arch armhf saucy rootfs/
Here is some guidance on the u-boot parameters:
setenv bootargs console=${console},${baudrate} root=/dev/mmcblk0p1 rootfstype=ext4 rootwait video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off video=mxcfb4:off video=mxcfb5:off video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB16 fbmem=48M vmalloc=400 mxc_hdmi.only_cea=1 coherent_pool=48M
ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdt_file}
ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}
bootz ${loadaddr} - ${fdt_addr}
For Ubuntu, the instructions are practically identical ... just a few differences.
sudo debootstrap --arch armhf saucy rootfs/
# etc/apt/sources.list:
deb http://ports.ubuntu.com/ubuntu-ports saucy main
#deb http://ports.ubuntu.com/ubuntu-ports/ saucy-updates main universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports saucy universe # mesa-utils
Serial port is enabled as follows:
# /etc/init/serial.conf
start on stopped rc RUNLEVEL=[
2345
]
stop on runlevel [!
2345
]
respawn
exec /sbin/getty
115200
ttymxc1
Jury is still out as to which distro is better to get the GPU stuff working on i.MX6..
No comments:
Post a Comment