Changes between Version 38 and Version 39 of buildroot


Ignore:
Timestamp:
12/12/2020 03:54:48 AM (20 months ago)
Author:
Tim Harvey
Comment:

updated newport examples for 5.4.45 minimal kernel config

Legend:

Unmodified
Added
Removed
Modified
  • buildroot

    v38 v39  
    288288[=#newport]
    289289== Newport (CN80XX)
    290 The following details pertain to buildroot 2017.11 although newer versions will likely be similar if not the same.
    291 
    292 To configure buildroot for the Cavium CN80XX/CN81XX SoC found on the Newport product family:
    293  - interactive menu options:
    294   * Target options -> Target Architecture -> AArch64 (little endian) (BR2_aarch64)
    295   * Filesystem images -> tar the root filesystem -> Compression method (xz) (BR2_TARGET_ROOTFS_CPIO_XZ)
    296   * Filesystem images -> cpio the root filesystem (BR2_TARGET_ROOTFS_CPIO)
    297   * Filesystem images -> Compression method (xz) (BR2_TARGET_ROOTFS_TAR_XZ)
    298  - defconfig:
    299 {{{#!bash
    300 cat << EOF > configs/my_defconfig
     290The following details pertain to buildroot 2020.08 although newer versions will likely be similar if not the same.
     291
     292The Newport product family is based on the CN80xx SoC which has 4x Cortex-A53 like compatible CPU cores. Therefore the 'BR2_aarch64' is really the only important configuration which produces binaries executable on arm64 CPU's.
     293
     294To build a root filesystem only:
     295{{{#!bash
     296cat << EOF > configs/arm64_minimal_defconfig
     297# arm64 arch
    301298BR2_aarch64=y
    302 BR2_TARGET_ROOTFS_CPIO=y
    303 BR2_TARGET_ROOTFS_CPIO_XZ=y
     299# filesystem options
    304300BR2_TARGET_ROOTFS_TAR_XZ=y
    305301EOF
    306 make my_defconfig
    307 }}}
    308 
    309 This builds a ~500KiB output/images/root.tar.xz in less than 5 minutes on a typical Linux desktop.
    310 
    311 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 aarch64 and booting via U-Boot {{{booti}}}:
    312  * Kernel -> Linux Kernel (BR2_LINUX_KERNEL)
    313  * Kernel -> Kernel configuration (Using a custom (def)config file) -> newport_defconfig
    314  * Filesystem images -> initial RAM filesystem linked into linux kernel
    315 
    316 Adding the kernel build produces a ~21MB Image in less than 10 minutes on a typical Linux desktop.
    317 
    318 To boot this on a Newport bootloader:
    319 {{{#!bash
    320 tftpboot ${kernel_addr_r} newport/buildroot/Image && booti ${kernel_addr_r} - ${fdtcontroladdr}
    321 }}}
    322 
    323 Now you have a minimal Linux OS that booted in about 6 seconds.
    324 
    325 A prebuilt image can be found [http://dev.gateworks.com/buildroot/newport/minimal here] which contains:
    326  * Linux 4.14 kernel with ThunderX periperhals enabled
     302make arm64_minimal_defconfig
     303make -j8
     304}}}
     305
     306This 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.
     307
     308If you also want buildroot to build a Gateworks v5.4.45 kernel with a minimal kernel config attached as an initrd you can use this:
     309{{{#!bash
     310cat << EOF > configs/newport_kernel_defconfig
     311# arm64 arch
     312BR2_aarch64=y
     313# toolchain
     314BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
     315# kernel
     316BR2_LINUX_KERNEL=y
     317BR2_LINUX_KERNEL_CUSTOM_GIT=y
     318BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/Gateworks/linux-newport.git"
     319BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.4.45-newport"
     320BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
     321BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="newport_minimal_kernel_defconfig"
     322# filesystem options
     323BR2_TARGET_ROOTFS_TAR_XZ=y
     324BR2_TARGET_ROOTFS_INITRAMFS=y
     325EOF
     326# fetch minimal kernel config
     327wget http://dev.gateworks.com/buidlroot/newport/minimal/newport_minimal_kernel_defconfig
     328make newport_kernel_defconfig
     329make -j8
     330}}}
     331
     332This produces a ~9MiB output/images/Image in 10 to 15 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.
     333
     334You can boot a Kernel+ramdisk via U-Boot like this:
     335 * load from network tftpserver
     336{{{#!bash
     337tftpboot $kernel_addr_r Image && booti $kernel_addr_r - $fdtcontroladdr
     338}}}
     339 * load from microSD with ext/fat filesystem
     340{{{#!bash
     341load mmc 1:1 $kernel_addr_r Image && booti $kernel_addr_r - $fdtcontroladdr
     342}}}
     343 * load from USB with ext/fat filesystem
     344{{{#!bash
     345usb start; load usb 0:1 $kernel_addr_r Image && booti $kernel_addr_r - $fdtcontroladdr
     346}}}
     347
     348A prebuilt image can be found ​here which contains:
     349 * Gateworks Linux 5.4.45 kernel
    327350 * resize2fs (BR2_PACKAGE_E2FSPROGS_RESIZE2FS)
     351 * uclibc
    328352 * screen (BR2_PACKAGE_SCREEN)
    329353 * pciutils (BR2_PACKAGE_PCIUTILS)
    330354 * libusb (BR2_PACKAGE_LIBUSB)
    331  * eudev (BR2_PACKAGE_HAS_UDEV)
    332  * usbutils (BR2_PACKAGE_USBUTILS)
    333  * disk partitioning tools
     355 * eudev (BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV) (required for usbutils)
     356 * usbutils (BR2_PACKAGE_USBUTILS)
     357 * gdisk/sgdisk disk partitioning tools:
     358 * gdisk/sgdisk (BR2_PACKAGE_GPTFDISK/BR2_PACKAGE_GPTFDISK_SGDISK)
     359 * stress (BR2_PACKAGE_STRESS)
     360 * evtest (BR2_PACKAGE_EVTEST)
    334361
    335362