Running Ubuntu Linux on i.MX 8M SOM |
|
The procedure documented below describes how to create a bootable Ubuntu Bionic Beaver Linux SD Card and to boot the i.MX 8M SOM from this card.
Note that the Fedora or Ubuntu Linux should be installed on the development host PC.
Here is the procedure.
- Prepare a bootable SD Card following the instructions provided in Booting Linux from SD Card.
- Install the debootstrap tool on the host PC.
- Fedora:
[user@localhost ~]$ sudo dnf install debootstrap [user@localhost ~]$ sudo dnf install qemu-user-static
- Ubuntu:
[user@localhost ~]$ sudo apt-get install debootstrap [user@localhost ~]$ sudo apt-get install qemu-user-static
- Remount the rootfs partition of the SD card that can be mounted with limited rights by default, then clear the rootfs partition:
[user@localhost ~]$ sudo umount /dev/sdd2 [user@localhost ~]$ mkdir -p /mnt/sdd2 [user@localhost ~]$ sudo mount /dev/sdd2 /mnt/sdd2/ [user@localhost ~]$ sudo rm -rf /mnt/sdd2/*
- Run the debootstrap tool to populate the Ubuntu rootfs:
[user@localhost ~]$ sudo debootstrap --arch arm64 --foreign bionic /mnt/sdd2/
- Prepare the chroot environment for the second stage of the rootfs population procedure:
[user@localhost ~]$ sudo cp /usr/bin/qemu-aarch64-static /mnt/sdd2/usr/bin/ [user@localhost ~]$ sudo LANG=C.UTF-8 chroot /mnt/sdd2/ qemu-aarch64-static /bin/bash I have no name!@user:/#
- Start the second bootstrap stage:
I have no name!@user:/# /debootstrap/debootstrap --second-stage I: Installing core packages... I: Unpacking required packages... I: Unpacking libacl1:arm64... I: Unpacking libattr1:arm64... I: Unpacking libaudit-common... ..... I: Configuring tasksel-data... I: Configuring libc-bin... I: Configuring systemd... I: Base system installed successfully.
- Perform additional changes to complete installation:
I have no name!@user:/# apt-get install net-tools openssh-server I have no name!@user:/# echo -ne "network:\n version: 2\n renderer: networkd\n ethernets:\n eth0:\n dhcp4: yes\n" > /etc/netplan/eth0.yaml I have no name!@user:/# dpkg-reconfigure locales I have no name!@user:/# dpkg-reconfigure tzdata I have no name!@user:/# echo localhost.localdomain > /etc/hostname I have no name!@user:/# passwd -d root I have no name!@user:/# exit [user@localhost ~]$ sync
- Unmount the SD Card, then insert this card into the i.MX 8M BSB carrier board and reboot the board.
- At the Linux login prompt, enter root as the user name with an empty password:
Ubuntu 18.04 LTS localhost.localdomain ttymxc0 localhost login: root Last login: Wed Oct 17 06:03:23 PDT 2018 on ttymxc0 Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.9.88-imx8m-2.6.2 aarch64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage root@localhost:~# ping google.com -c 5 PING google.com (173.194.222.139) 56(84) bytes of data. 64 bytes from lo-in-f139.1e100.net (173.194.222.139): icmp_seq=1 ttl=43 time=18.3 ms From ocean.emcraft.com (172.17.0.1): icmp_seq=2 Redirect Host(New nexthop: quill.emcraft.com (172.17.0.137)) 64 bytes from lo-in-f139.1e100.net (173.194.222.139): icmp_seq=2 ttl=43 time=18.1 ms 64 bytes from lo-in-f139.1e100.net (173.194.222.139): icmp_seq=3 ttl=43 time=20.8 ms 64 bytes from lo-in-f139.1e100.net (173.194.222.139): icmp_seq=4 ttl=43 time=18.6 ms 64 bytes from lo-in-f139.1e100.net (173.194.222.139): icmp_seq=5 ttl=43 time=20.7 ms --- google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 18.194/19.336/20.806/1.193 ms root@localhost:~#
- Note that additional packets can be installed on the live system using the apt-get install command:
root@localhost:~# apt-get install vim
|