This project was solely designed with a view to help users and developers bootstrap Linux on their supported devices. It is our aim, that in time, users will be able to take generic Linux distribution installers and use them directly to install Linux on these devices. In the meantime, we provide the parts required to trial specific distributions so users can get a feel.
We take no responsibility for any damage caused as a result of its use/abuse of any of the information or artifacts provided by this project. The software here is not locked down, hardened or tested to any commercially viable level. Any issues that arise (deletion of critical partitions, Windows no longer bootable, damage of sensitive or critial data as a result of exposed UFS partitions, etc) are solely the responsibility of the user and the user alone.
Have a question? Fancy a chat? You can find us on the OFTC IRC network at #aarch64-laptops
OFTC is linked with Matrix. Find us here: https://matrix.to/#/#_oftc_#aarch64-laptops:matrix.org
Updates and announcements are sent to the Mailing List. Sign-up HERE
Normal Mode
Normal Mode
Normal Mode
[x] Boots into Grub Normal Mode
[x] Boots Linux kernel from rootfs' /boot partition (using Device Tree)
[x] Boots to text Ubuntu login prompt/shell
[x] USB
[x] GUI Desktop (using Framebuffer)
[x] Keyboard
[x] Touchpad
[x] Touchscreen
[x] On-board Storage (UFS based)
[x] WiFi (UFS based)
[x] Bluetooth
[ ] LTE
[ ] Accelerated Graphics
[x] Camera
[x] Audio
this works with recent kernels and instructions.
In recent months, various laptop manufacturers (Asus, HP, Lenovo, etc) have released devices based on Qualcomm's Snapdragon 835 and 845. The devices are delivered with Windows 10 pre-installed, but are able to run Linux. Unfortunately, due to some pretty serious obstacles, simply running the AArch64 version of the Ubuntu (or any distro for that matter) installer is not enough (even with Secure Boot disabled).
This project provides the user/owner some options to install Linux on these devices. The choices are as follows:
quick-start.sh
script to build your own imageThe only Ubuntu LTS pre-built image currently available is Ubuntu 18.04 (Bionic).
Download THIS IMAGE and head to the Flashing the image then Booting into Ubuntu sections below.
Note: The default credentials for this image are; username: ubuntu
and password ubuntu
.
gnome-disks
'Restore Disk Image' optionbcdedit /set {bootmgr} path \EFI\ubuntu\grubaa64.efi
This option is helpful if you want to create bespoke images, or if you want to see how the build process works.
Note: Whichever method of building your own images you choose, please be aware that a lot of disk space will be required. The VM image, which will become the final image will be around 8GB and the Linux kernel source is around 1.5GB. On top of this, if one of the docker methods are selected, space will be required for the Docker images. Docker images are usually located in /var/lib/docker
. It would be worth checking firstly where this is located/mounted and secondly how much free space is left on that partition.
There are more choices to make:
Note: Even the automatic method requires user input at the Ubuntu Installer stage.
quick-start.sh
script (uses Docker containers)
apt
based distros (and only tested on Ubuntu)quick-start.sh
scriptNote: This option uses Docker containers.
Firstly you will need to initialise the repository's sub-modules. See the Initialising the repository below.
Now issue the following command:
$ ./quick-start.sh
Note: Image creation using the quick-start.sh
script is not a completely automated process. The user will still be required to manually go through the Ubuntu Installer and to enter their chosen username & password (twice - once for upload and the other to run the setup-vm.sh
script with escalated privileges) during the package upload (to the VM) process.
IMPORTANT: It is of the utmost importance that SSH is installed as part of this process, or you will have to find a way to install it retroactively (it is possible, but is a pain). SSH is used to transport the package archive and configure scripts into the VM for installation/execution.
If successful an image named aarch64-laptops-ubuntu.img
should be located in the output
directory.
If it's present, head to the Flashing the image then Booting into Ubuntu sections below.
Firstly you will need to initialise the repository's sub-modules. See the Initialising the repository below.
Building these images within containers is the least intrusive method to build your own image presented here. The only prerequisite is that Docker is installed on the host (for help with this, please refer to your distro's documentation). All other requirements pertain only to the running image/container, ensuring the host machine is kept as clean as possible.
Note: Something to bear in mind/read-up on; Running LibVirt in Docker requires the --privileged
flag for networking purposes.
This stage requires the most amount of user interaction. Once the installer starts you will be required to go through each stage to install your bespoke version of Ubuntu Bionic.
IMPORTANT: It is of the utmost importance that SSH is installed as part of this process, or you will have to find a way to install it retroactively (it is possible, but is a pain). SSH is used to transport the package archive and configure scripts into the VM for installation/execution.
If it is likely that you will be building more than one image, the same image multiple times or you think there is a chance of build failure, it is recommended that a base image is installed using the provided Dockerfile. This will ensure the following, time consuming actions only take place once:
$ docker build -t aarch64-laptops-build-env:0.1 .
$ docker run -ti --privileged --name aarch64-laptops-ubuntu-vm \
-v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts \
-v $PWD/src:/src -v $PWD/output:/var/lib/libvirt/images \
aarch64-laptops-build-env:0.1 /scripts/make-image.sh --install-ubuntu
If however, you just want to go for it, hope for the best and not install the pre-configured build environment, use the raw ubuntu:bionic
image instead.
Note: Using the containerised build environment is advised. If anything goes wrong during the install, you will have to upgrade the system and re-install all of the prerequisites again. This all takes quite a lot of time.
$ docker run -ti --privileged --name aarch64-laptops-ubuntu-vm \
-v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts \
-v $PWD/src:/src -v $PWD/output:/var/lib/libvirt/images \
ubuntu:bionic /scripts/make-image.sh --install-ubuntu
To save this container (required for further steps) do:
$ docker commit aarch64-laptops-ubuntu-vm aarch64-laptops-ubuntu-vm:0.1
# Optionally, remove the unused container
$ docker rm aarch64-laptops-ubuntu-vm
The Linux kernel is built from source. It should have been checked out during the initialisation stage (if you did not see the Initialising the repository section below and carry out the actions, please do so before executing this step). The Linux kernel source is located in src/linux
.
$ docker run -ti --rm --name aarch64-laptops-kernel \
-v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts -v $PWD/src:/src \
aarch64-laptops-build-env:0.1 /scripts/make-image.sh --build-kernel
The Grub bootloader is built from source. It should have been checked out during the initialisation stage (if you did not see the Initialising the repository section below and carry out the actions, please do so before executing this step). The Grub bootloader source is located in src/grub
.
$ docker run -ti --rm --name aarch64-laptops-grub \
-v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts -v $PWD/src:/src \
aarch64-laptops-build-env:0.1 /scripts/make-image.sh --build-grub
$ docker run -ti --rm --privileged --name aarch64-laptops-ubuntu-vm-setup \
-v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts \
-v $PWD/src:/src -v $PWD/output:/var/lib/libvirt/images \
aarch64-laptops-ubuntu-vm:0.1 /scripts/make-image.sh --setup-vm
If successful an image named aarch64-laptops-ubuntu.img
should be located in the output
directory.
If it's present, head to the Flashing the image then Booting into Ubuntu sections below.
Note: Only works on apt
based distros (and only tested on Ubuntu).
Firstly you will need to initialise the repository's sub-modules. See the Initialising the repository below.
If there is a compelling reason preventing the use of Docker, the scripts/make-image.sh
script can be executed directly on the host. It requires escalated privileges and will firstly upgrade the current system, then install packages directly onto the host.
$ scripts/make-image.sh --install-ubuntu
$ scripts/make-image.sh --build-kernel
$ scripts/make-image.sh --build-grub
$ scripts/make-image.sh --setup-vm
If successful an image named aarch64-laptops-ubuntu.img
should be located in the /var/lib/libvirt/images
directory.
If it's present, head to the Flashing the image then Booting into Ubuntu sections below.
Note: An 8G MicroSD card or USB flash drive (or larger if you plan on installing packages) will be required.
The final image may be in one of two states; raw
or xz compressed
. If the image is compressed you will require xz
utilities to extract the image before flashing can commence. Please check your Distro's documentation to find out which package they reside.
If the image has an *.xz
file extension it is xz compressed
. These images are firstly extracted using xzcat
and flashed to the MicroSD card or USB flash drive using dd
:
Use the provided scripts/flash-prebuilt.sh
script.
For example, if you want to boot the image on the Lenovo Yoga C630:
$ ./scripts/flash-prebuilt.sh lenovo-yoga-c630 /dev/<DEVICE> <IMAGE>
Note: /dev/sda
and NOT /dev/sda1
.
Note: See the help for more options/devices.
Manually copy the image to the boot media.
If the image has an *.xz
file extension it is an XZ compressed
image. This images are flashed using a combination of xcat
and dd
:
$ xzcat <IMG>.xz | sudo dd of=/dev/<DEVICE> oflag=direct bs=1M status=progress iflag=fullblock
If the image has an *.img
file extension it is a raw
image. These images are flashed using dd
only:
$ sudo dd if=<IMG>.img of=/dev/<DEVICE> oflag=direct bs=1M status=progress
Note: /dev/sda
and NOT /dev/sda1
.
If you created a generic image (i.e. not using ./quick-start.sh <MODEL>
), then you will need to mount the boot device and link laptops.dtb
with the specific DTB for your hardware.
For example, if you have the Lenovo Yoga C630:
$ sudo mount /dev/<DEVICE>2/ /mnt
$ cd /mnt/boot
$ ln -s laptop-lenovo-yoga-c630.dtb laptop.dtb
$ cd -
$ umount /mnt
This project doesn't yet support Secure Boot. Thus it needs to be disabled before we can boot into this project's resultant Linux image.
1 Disable Secure Boot
option and press return6 Shutdown
option (same method as above)Note: The HP Envy x2 does not appear to boot from the MicroSD Card automatically.
Clear All Secure Boot Keys
to boot LinuxNote: While you are in the BIOS, another option you might wish to toggle is under Configuration / Hotkey Mode. This lets you change the row of function keys, so that they behave as F1-F12 by default, rather than having to press 'Fn' first.
The MicroSD card is inserted into a small plastic (fragile) receiver/slide which is pushed into the side of the laptop chassis. To eject it you will require a paperclip or similar thin, stiff implement. Push your tool of choice into the tiny hole and the receiver/slide should protrude out. Simply, but very carefully insert the MicroSD card into the receiver/slide and gently push it back into the machine - it should lay flush.
Now power up the machine. It should boot to a Ubuntu login prompt. The credentials of which you set-up during the install stage.
Note: The HP Envy x2 does not appear to boot from the MicroSD Card automatically.
Boot Device Options
Boot From EFI File
VenHw*HD(Part1
devices)
<EFI>
should be present.<EFI> -> <BOOT> -> BOOTAA64.EFI
Now power up the machine. It should boot to a Ubuntu login prompt. The credentials of which you set-up during the install stage.
Now power up the machine. It should boot to a Ubuntu login prompt. The credentials of which you set-up during the install stage.
Since this project uses pre-built images, the root partition is limited to around 7GB. If you have used a larger device and wish to expand the partition please search the internet for something along the lines of "reclaim SD card space". There are literally 100s of articles on how to do this, mostly pertaining to the Raspberry Pi.
Note: We found that simply opening it up in gparted
was the simplest option.
Seeing as this option requires the image to be built from source, the Linux kernel and Grub bootloader source is required. Fortunately, this project includes them as sub-modules. To pull down the source issue the following commands:
$ git submodule init
$ git submodule update # 1.5GB takes around 20 minutes on a 10Mb connection to checkout the Linux kernel
If there have been updates since the submodules were initialised, issues these commands to pull down the changes:
git submodule update --remote src/linux
git submodule update --remote src/grub
Please see the GPU README
Please see the WiFi README.
Note: An older image will contain a v5.0.1 kernel
$ uname -r
5.0.1-laptops0.1-generic
If at all possible, please reinstall using the latest installer using these instructions
Note: Doing so will save lots of messing around with kernel versions
Note: Only choose this option if you can't reinstall or used the new image/installer
WARNING: This option will require a little messing around
$ sudo fuser -vki /var/lib/dpkg/lock
$ sudo apt remove snapd
$ sudo apt update && sudo apt dist-upgrade
$ sudo apt remove *5.0.1-laptops* *5.2.0-99* linux-generic \
linux-headers-generic linux-image-generic
$ sudo apt install linux-generic
$ sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="efi=novamap /' \
/etc/default/grub
$ sudo sed -i s/Prompt=lts/Prompt=normal/ /etc/update-manager/release-upgrades
$ sudo do-release-upgrade
$ sudo reboot
$ sudo apt install snapd