Changes between Version 36 and Version 37 of buildroot


Ignore:
Timestamp:
12/12/2020 01:08:19 AM (4 years ago)
Author:
Tim Harvey
Comment:

updated ventana instructions for 5.4.45 kernel

Legend:

Unmodified
Added
Removed
Modified
  • buildroot

    v36 v37  
    3737
    3838For platform specific notes see below:
     39 * [#venice Gateworks Venice (imx8mm)]
     40 * [#newport Gateworks Newport (cn80xx)]
    3941 * [#ventana Gateworks Ventana (imx6)]
    40  * [#newport Gateworks Newport (cn80xx)]
    4142
    4243References:
     
    422423[=#ventana]
    423424== Ventana (IMX6)
    424 The following details pertain to buildroot 2017.08 although newer versions will likely be similar if not the same.
    425 
    426 To configure buildroot for the i.MX6 SoC found on the Ventana product family:
    427  * Target options -> Target Architecture -> ARM (little endian)
    428  * Target options -> Target Architecture Variant -> cortex-A9 (BR2_GCC_TARGET_CPU)
    429  * Target options -> Enable NEON SIMD extension support (BR2_ARM_ENABLE_NEON=y)
    430  * Target options -> Enable VFP extension support (BR2_ARM_ENABLE_VFP=y)
    431  * Target options -> Floating point strategy (NEON) (BR2_ARM_FPU_NEON=y)
    432  * Filesystem images -> tar the root filesystem -> Compression method (xz)
    433 
    434 This builds a ~500KiB output/images/rootfs.tar.xz in less than 5 minutes on a typical Linux desktop.
    435 
    436 If you also want buildroot to build a kernel provided from buildroot using the buildroot rootfs embedded as an initramfs then enable the following to create a kernel suitable for imx_v6_v7 and booting via U-Boot {{{bootm}}}:
    437  * Kernel -> Linux Kernel (BR2_LINUX_KERNEL)
    438  * Kernel -> Defconfig name (imx_v6_v7) (BR2_LINUX_KERNEL_DEFCONFIG)
    439  * Kernel -> Kernel binary format (uImage)
    440  * Kernel -> load address (0x10008000) (BR2_LINUX_KERNEL_UIMAGE_LOADADDR)
    441  * Kernel -> Device Tree Source file names (imx6dl-gw54xx imx6q-gw54xx imx6dl-gw53xx imx6q-gw53xx imx6dl-gw52xx imx6q-gw52xx imx6dl-gw51xx imx6q-gw51xx imx6dl-gw551x imx6q-gw551x imx6dl-gw552x imx6q-gw552x imx6dl-gw553x imx6q-gw553x imx6dl-gw5913) (BR2_LINUX_KERNEL_INTREE_DTS_NAME)
    442  * Filesystem images -> initial RAM filesystem linked into linux kernel
    443 
    444 Adding the kernel build produces a ~6MB uImage in less than 10 minutes on a typical Linux desktop.
    445 
    446 To boot this on a Ventana bootloader:
    447 {{{#!bash
    448 tftpboot ${loadaddr} ventana/uImage && tftpboot ${fdt_addr} ventana/${fdt_file2} && bootm ${loadaddr} - ${fdt_addr}
    449 }}}
    450 
    451 Now you have a minimal Linux OS that booted in about 6 seconds.
    452 
    453 A prebuilt image of this can be found at: http://dev.gateworks.com/buildroot/ventana/minimal
    454 
    455 Additional tools:
    456  * resize2fs
    457  * screen
     425The following details pertain to buildroot 2020.08 although newer versions will likely be similar if not the same.
     426
     427The Ventana product family is based on the i.MX6 SoC which has ARM Cortex-A9 CPU cores. Therefore we will tune the compiler to build arm32 code with support for ARM NEON and VFP.
     428
     429To build a root filesystem only:
     430{{{#!bash
     431cat << EOF > configs/imx6_minimal_defconfig
     432# arm cortex-a9 cpu
     433BR2_arm=y
     434BR2_cortex_a9=y
     435BR2_ARM_ENABLE_NEON=y
     436BR2_ARM_ENABLE_VFP=y
     437BR2_ARM_FPU_VFPV3=y
     438# filesystem options
     439BR2_TARGET_ROOTFS_CPIO_XZ=y
     440EOF
     441make imx6_minimal_defconfig
     442make -j8
     443}}}
     444
     445This 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.
     446
     447If you also want buildroot to build a Gateworks v5.4.45 kernel with a minimal kernel config and a self-contained minimal root filesystem you would add the following the your defconfig:
     448{{{#!bash
     449cat << EOF > configs/ventana_kernel_defconfig
     450# arm cortex-a9 cpu
     451BR2_arm=y
     452BR2_cortex_a9=y
     453BR2_ARM_ENABLE_NEON=y
     454BR2_ARM_ENABLE_VFP=y
     455BR2_ARM_FPU_VFPV3=y
     456# toolchain
     457BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
     458# kernel
     459BR2_LINUX_KERNEL=y
     460BR2_LINUX_KERNEL_CUSTOM_GIT=y
     461BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/Gateworks/linux-imx6.git"
     462BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="gateworks_5.4.45"
     463BR2_LINUX_KERNEL_DEFCONFIG="gwventana"
     464# filesystem options
     465BR2_TARGET_ROOTFS_TAR_XZ=y
     466EOF
     467# fetch minimal kernel config for ventana
     468wget http://dev.gateworks.com/buildroot/ventana/minimal/gwventana_minimal_kernel_defconfig
     469make ventana_kernel_defconfig
     470make -j8
     471}}}
     472
     473This produces a ~7MiB compressed kernel image in output/images/uImage containing the ~1.7MiB root filesystem in 15 to 20 minutes of building on a typical Linux desktop.
     474
     475If you need add back or modify kernel features you can do so with:
     476{{{#!bash
     477make linux-menuconfig # make your changes
     478make -j8
     479# save and update the defconfig once you are happy with it
     480make linux-savedefconfig linux-update-defconfig
     481}}}
     482
     483To boot a kernel+ramdisk on Ventana via the bootloader with a tftpserver copy output/images/uImage and output/images/*.dtb to your tftpserver and use:
     484 * load from network tftpserver
     485{{{#!bash
     486setenv bootargs console=ttymxc1,115200
     487setenv fsload tftpboot
     488setenv bootdir . # set this to the prefix of your tftp dir
     489run loadfdt && $fsload $kernel_addr_r $bootdir/uImage && bootm $loadaddr - $fdt_addr
     490}}}
     491 * load from microSD with ext/fat filesystem
     492{{{#!bash
     493setenv bootargs console=ttymxc1,115200
     494setenv fsload load mmc 0:1
     495setenv bootdir . # set this to the prefix of your tftp dir
     496run loadfdt && $fsload $kernel_addr_r $bootdir/uImage && bootm $loadaddr - $fdt_addr
     497}}}
     498 * load from USB with ext/fat filesystem
     499{{{#!bash
     500setenv bootargs console=ttymxc1,115200
     501setenv fsload load usb 0:1
     502usb start
     503setenv bootdir . # set this to the prefix of your tftp dir
     504run loadfdt && $fsload $kernel_addr_r $bootdir/uImage && bootm $loadaddr - $fdt_addr
     505}}}
     506
     507A prebuilt image can be found [http://dev.gateworks.com/buildroot/ventana/minimal here] which contains:
     508 * Gateworks Linux 5.4.45 kernel (minimal kernel features)
     509 * resize2fs (BR2_PACKAGE_E2FSPROGS_RESIZE2FS)
     510 * uclibc
     511 * screen (BR2_PACKAGE_SCREEN)
     512 * pciutils (BR2_PACKAGE_PCIUTILS)
     513 * libusb (BR2_PACKAGE_LIBUSB)
     514 * eudev (BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV) (required for usbutils)
     515 * usbutils (BR2_PACKAGE_USBUTILS)
     516 * gdisk/sgdisk disk partitioning tools:
     517  - gdisk/sgdisk (BR2_PACKAGE_GPTFDISK/BR2_PACKAGE_GPTFDISK_SGDISK)
     518 * stress (BR2_PACKAGE_STRESS)
     519 * evtest (BR2_PACKAGE_EVTEST)
    458520 * ubi/ubifs tools
    459  * pciutils usb-utils
    460  * disk partitioning tools
     521
    461522
    462523