Compile Ubuntu Image from Source Code

Preparations

  • An x86 computer running Ubuntu 22.04

Supported Boards

The current build environment supports these 4 boards:

  • mixtile-blade3
  • mixtile-core3588e-lp4
  • mixtile-core3588e-lp5-v2-nano
  • mixtile-edge2

Steps

  1. Install the required packages:
sudo apt-get install -y build-essential gcc-aarch64-linux-gnu bison \
  qemu-user-static qemu-system-arm qemu-efi u-boot-tools binfmt-support \
  debootstrap flex libssl-dev bc rsync kmod cpio xz-utils fakeroot parted \
  udev dosfstools uuid-runtime git-lfs device-tree-compiler python2 python3 \
  python-is-python3 fdisk bc debhelper python3-pyelftools python3-setuptools \
  python3-distutils python3-pkg-resources swig libfdt-dev libpython3-dev
  1. Check out the source and enter the project directory:
git clone https://github.com/mixtile-rockchip/mixtile-ubuntu-rockchip.git
cd mixtile-ubuntu-rockchip
  1. Build the full image.

If the build system uses the board name as the -b argument, supported board values are:

  • mixtile-blade3
  • mixtile-core3588e-lp4
  • mixtile-core3588e-lp5-v2-nano
  • mixtile-edge2

Example:

sudo ./build.sh -b mixtile-blade3 -s noble -f desktop

Replace mixtile-blade3 with the target board as needed.

  1. Only build the kernel:
sudo ./build.sh -b mixtile-blade3 -s noble -f desktop -ko
  1. Only build U-Boot:
sudo ./build.sh -b mixtile-blade3 -s noble -f desktop -uo
  1. Other build options:
Usage: ./build.sh --board=[mixtile-blade3|mixtile-core3588e-lp4|mixtile-core3588e-lp5-v2-nano|mixtile-edge2] --suite=[jammy|noble] --flavor=[server|desktop]

Required arguments:
  -b, --board=BOARD      target board
  -s, --suite=SUITE      ubuntu suite
  -f, --flavor=FLAVOR    ubuntu flavor

Optional arguments:
  -h, --help             show this help message and exit
  -c, --clean            clean the build directory
  -ko, --kernel-only     only compile the kernel
  -uo, --uboot-only      only compile uboot
  -ro, --rootfs-only     only build rootfs
  -l, --launchpad        use kernel and uboot from launchpad repo
  -v, --verbose          increase the verbosity of the bash script

For more information, see Mixtile ubuntu-rockchip wiki.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support