| 204 | [=#venice] |
| 205 | == Venice (IMX8MM) |
| 206 | The following details pertain to buildroot 2018.10 although newer versions will likely be similar if not the same. |
| 207 | |
| 208 | The Venice product family is based on the i.MX8MM SoC which has 4x Cortex-A53 CPU cores. Therefore the 'BR2_aarch64' is really the only important configuration which produces binaries executable on arm64 CPU's. |
| 209 | |
| 210 | To build a root filesystem only: |
| 211 | {{{#!bash |
| 212 | cat << EOF > configs/venice_minimal_defconfig |
| 213 | # arm64 arch |
| 214 | BR2_aarch64=y |
| 215 | # filesystem options |
| 216 | BR2_TARGET_ROOTFS_TAR_XZ=y |
| 217 | EOF |
| 218 | make venice_minimal_defconfig |
| 219 | make |
| 220 | }}} |
| 221 | |
| 222 | This builds output/images/root.tar.xz consisting of a ~1.7MiB root filesystem (when uncompressed) in 5 to 10 minutes of building on a typical Linux desktop. |
| 223 | |
| 224 | If you also want buildroot to build a Gateworks v5.4.45 kernel with the minimal root filesystem attached as an initrd you would add the following the your defconfig: |
| 225 | {{{#!bash |
| 226 | cat << EOF > configs/venice_kernel_defconfig |
| 227 | # arm64 arch |
| 228 | BR2_aarch64=y |
| 229 | # toolchain |
| 230 | BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y |
| 231 | # kernel |
| 232 | BR2_LINUX_KERNEL=y |
| 233 | BR2_LINUX_KERNEL_CUSTOM_GIT=y |
| 234 | BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/Gateworks/linux-venice.git" |
| 235 | BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.4.45-venice" |
| 236 | BR2_LINUX_KERNEL_DEFCONFIG="imx8mm_venice" |
| 237 | # filesystem options |
| 238 | BR2_TARGET_ROOTFS_TAR_XZ=y |
| 239 | EOF |
| 240 | make venice_kernel_defconfig |
| 241 | make |
| 242 | }}} |
| 243 | |
| 244 | This produces a ~23MB output/images/Image in 5 to 10 minutes of building on a typical Linux desktop. This is a kernel Image containing the root filesystem in a ramdisk. This is a really easy way to get a read-only minimal Linux image that boots fast and does not access flash storage. |
| 245 | |
| 246 | To boot this kernel image on a Venice board via the bootloader with a tftpserver: |
| 247 | {{{#!bash |
| 248 | tftpboot $kernel_addr_r Image && booti $kernel_addr_r - $fdtcontroladdr |
| 249 | }}} |
| 250 | |
| 251 | Now you have a minimal Linux OS that booted in about 6 seconds. |
| 252 | |
| 253 | A prebuilt image can be found [http://dev.gateworks.com/buildroot/venice/minimal here] which contains: |
| 254 | * Gateworks Linux 5.4.45 kernel |
| 255 | * resize2fs (BR2_PACKAGE_E2FSPROGS_RESIZE2FS) |
| 256 | * uclibc |
| 257 | * screen (BR2_PACKAGE_SCREEN) |
| 258 | * pciutils (BR2_PACKAGE_PCIUTILS) |
| 259 | * libusb (BR2_PACKAGE_LIBUSB) |
| 260 | * eudev (BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV) (required for usbutils) |
| 261 | * usbutils (BR2_PACKAGE_USBUTILS) |
| 262 | * gdisk/sgdisk disk partitioning tools: |
| 263 | - gdisk/sgdisk (BR2_PACKAGE_GPTFDISK/BR2_PACKAGE_GPTFDISK_SGDISK) |
| 264 | * stress (BR2_PACKAGE_STRESS) |
| 265 | * evtest (BR2_PACKAGE_EVTEST) |
| 266 | |
| 267 | You can boot a Kernel+ramdisk via U-Boot like this: |
| 268 | * load from network tftpserver |
| 269 | {{{#!bash |
| 270 | tftpboot $kernel_addr_r Image && booti $kernel_addr_r - $fdtcontroladdr |
| 271 | }}} |
| 272 | * load from microSD with ext/fat filesystem |
| 273 | {{{#!bash |
| 274 | load mmc 1:1 $kernel_addr_r Image && booti $kernel_addr_r - $fdtcontroladdr |
| 275 | }}} |
| 276 | * load from USB with ext/fat filesystem |
| 277 | {{{#!bash |
| 278 | usb start; load usb 0:1 $kernel_addr_r Image && booti $kernel_addr_r - $fdtcontroladdr |
| 279 | }}} |
| 280 | |