Changes between Version 57 and Version 58 of buildroot
- Timestamp:
- 03/16/2024 12:08:59 AM (8 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
buildroot
v57 v58 250 250 [=#venice] 251 251 == Venice (IMX8M) 252 The following details pertain to buildroot 202 3.02 although newer versions will likely be similar if not the same.253 254 The Venice product family is based on the i.MX8MM, i.MX8MN, and i.MX8MP SoCs which have 4x Cortex-A53 CPU cores. Therefore the 'BR2_aarch64' is really the only important configuration whichproduces binaries executable on arm64 CPU's.252 The following details pertain to buildroot 2024.02 although newer versions will likely be similar if not the same. 253 254 The Venice product family is based on the i.MX8MM, i.MX8MN, and i.MX8MP SoCs which have 4x Cortex-A53 CPU cores. Therefore the 'BR2_aarch64' is really the only important configuration to produces binaries executable on arm64 CPU's. 255 255 256 256 To build a root filesystem only: 257 257 {{{#!bash 258 cat << EOF > configs/ venice_minimal_defconfig258 cat << EOF > configs/arm64_minimal_rootfs_defconfig 259 259 # arm64 arch 260 260 BR2_aarch64=y 261 261 # filesystem options 262 BR2_TARGET_ROOTFS_CPIO=y 263 BR2_TARGET_ROOTFS_CPIO_XZ=y 264 BR2_TARGET_ROOTFS_EXT2=y 265 BR2_TARGET_ROOTFS_EXT2_XZ=y 262 266 BR2_TARGET_ROOTFS_TAR_XZ=y 263 267 EOF 264 make venice_minimal_defconfig268 make arm64_minimal_rootfs_defconfig 265 269 make -j8 266 270 }}} 267 271 268 This builds output/images/root.tar.xz consisting of a ~1.7MiB root filesystem (when uncompressed) in 5 to 10minutes of building on a typical Linux desktop.269 270 If 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 use the following:272 This builds a ~1.3MiB output/images/{root.tar,rootfs.cpio,rootfs.ext2}.xz consisting of a ~3.6MiB root filesystem (when uncompressed) in a couple of minutes of building on a typical Linux desktop. 273 274 If you also want buildroot to build a kernel with a minimal kernel config as well as the minimal root filesystem you could use the following: 271 275 {{{#!bash 272 276 cat << EOF > configs/venice_kernel_defconfig … … 274 278 BR2_aarch64=y 275 279 # kernel 280 BR2_KERNEL_HEADERS_6_6=y 276 281 BR2_LINUX_KERNEL=y 277 BR2_KERNEL_HEADERS_6_1=y278 282 BR2_LINUX_KERNEL_CUSTOM_GIT=y 279 283 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/Gateworks/linux-venice.git" 280 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v6. 1.11-venice"284 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v6.6.8-venice" 281 285 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y 282 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="venice_minimal_kernel_6. 1_defconfig"286 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="venice_minimal_kernel_6.6_defconfig" 283 287 # filesystem options 284 BR2_TARGET_ROOTFS_INITRAMFS=y 288 BR2_TARGET_ROOTFS_CPIO=y 289 BR2_TARGET_ROOTFS_CPIO_XZ=y 290 BR2_TARGET_ROOTFS_EXT2=y 291 BR2_TARGET_ROOTFS_EXT2_XZ=y 285 292 BR2_TARGET_ROOTFS_TAR_XZ=y 286 293 EOF 294 287 295 # fetch minimal kernel config for venice 288 wget http://dev.gateworks.com/buildroot/venice/minimal/venice_minimal_kernel_6.1_defconfig 296 wget http://dev.gateworks.com/buildroot/venice/minimal/venice_minimal_kernel_6.6_defconfig 297 298 # build 289 299 make venice_kernel_defconfig 290 300 make -j8 291 cp output/build/linux-v6.1.11-venice/arch/arm64/boot/dts/freescale/imx8m*venice*dtb output/images/ # manually copy venice DTB's to output dir 292 }}} 293 294 This produces a ~10MB 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. 295 296 Perhaps an even more useful image would contain tools for provisioning a FLASH emmc device: 301 302 # copy venice DTB's to output dir (buildroot does not do this for you) 303 cp output/build/linux-v6.6.8-venice/arch/arm64/boot/dts/freescale/imx8m*venice*dtb output/images/ 304 }}} 305 306 This builds a ~1.3MiB output/images/{root.tar,rootfs.cpio,rootfs.ext2}.xz consisting of a ~3.6MiB root filesystem (when uncompressed) and a ~15MiB kernel Image and dtbs in a couple of minutes of building on a typical Linux desktop. This is a kernel Image, dtbs, and separate ramdisk based rootfs. This is a really easy way to get a read-only minimal Linux image that boots fast and does not access flash storage. 307 308 Perhaps an even more useful image would contain a basic tools for provisioning a FLASH emmc device: 297 309 {{{#!bash 298 310 cat << EOF > configs/venice_example_defconfig … … 302 314 BR2_TOOLCHAIN_BUILDROOT_CXX=y 303 315 # kernel 316 BR2_KERNEL_HEADERS_6_6=y 304 317 BR2_LINUX_KERNEL=y 305 BR2_KERNEL_HEADERS_6_1=y306 318 BR2_LINUX_KERNEL_CUSTOM_GIT=y 307 319 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/Gateworks/linux-venice.git" 308 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v6. 1.11-venice"320 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v6.6.8-venice" 309 321 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y 310 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="venice_minimal_kernel_6. 1_defconfig"322 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="venice_minimal_kernel_6.6_defconfig" 311 323 # extra utils needed for basic testing and provisioning emmc 312 324 BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y 313 325 BR2_PACKAGE_PV=y 314 326 BR2_PACKAGE_STRESS=y 327 BR2_PACKAGE_AUTOFS=y 315 328 BR2_PACKAGE_E2FSPROGS=y 316 329 BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y 330 BR2_PACKAGE_CRYPTSETUP=y 317 331 BR2_PACKAGE_EVTEST=y 318 BR2_PACKAGE_GPTFDISK=y319 BR2_PACKAGE_GPTFDISK_SGDISK=y320 332 BR2_PACKAGE_I2C_TOOLS=y 321 333 BR2_PACKAGE_MEMTESTER=y … … 327 339 BR2_PACKAGE_LIBUSB=y 328 340 BR2_PACKAGE_TCPDUMP=y 341 BR2_PACKAGE_WGET=y 329 342 BR2_PACKAGE_SCREEN=y 330 343 BR2_PACKAGE_COREUTILS=y 331 344 BR2_PACKAGE_TAR=y 345 BR2_PACKAGE_TPM2_ABRMD=y 346 BR2_PACKAGE_TPM2_TOOLS=y 332 347 BR2_PACKAGE_UTIL_LINUX_BINARIES=y 333 348 # filesystem options 334 349 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y 350 BR2_TARGET_ROOTFS_CPIO=y 335 351 BR2_TARGET_ROOTFS_CPIO_XZ=y 336 BR2_TARGET_ROOTFS_INITRAMFS=y 352 BR2_TARGET_ROOTFS_EXT2=y 353 BR2_TARGET_ROOTFS_EXT2_XZ=y 337 354 BR2_TARGET_ROOTFS_TAR_XZ=y 338 355 EOF … … 340 357 # fetch minimal kernel config 341 358 wget http://dev.gateworks.com/buildroot/venice/minimal/venice_minimal_kernel_6.1_defconfig 359 360 # build 342 361 make venice_example_defconfig 343 362 make -j8 344 cp output/build/linux-v6.1.11-venice/arch/arm64/boot/dts/freescale/imx8m*venice*dtb output/images/ # manually copy venice DTB's to output dir 345 }}} 346 * Note you can easily add your own files and scripts to this image by setting BR2_ROOTFS_OVERLAY to a directory or directories where your files are 347 348 This produces a ~15MiB 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 has the tools necessary to create a partition table and filesystems 363 364 # copy venice DTB's to output dir (buildroot does not do this for you) 365 cp output/build/linux-v6.6.8-venice/arch/arm64/boot/dts/freescale/imx8m*venice*dtb output/images/ 366 }}} 367 368 This builds a ~12MiB output/images/{root.tar,rootfs.cpio,rootfs.ext2}.xz consisting of a ~57MiB root filesystem (when uncompressed) and a ~15MiB kernel Image and dtbs in a couple of minutes of building on a typical Linux desktop. This is a kernel Image, dtbs, and separate ramdisk based rootfs. 369 370 You can easily add your own files and scripts to the rootfs image by setting BR2_ROOTFS_OVERLAY to a directory or directories where your files are. 371 372 Additionally you could enable BR2_TARGET_ROOTFS_INITRAMFS to link the rootfs into the kernel itself resulting in a larger kernel with no need to load a separate ramdisk. 349 373 350 374 If you need to add back or modify kernel features you can do so with: … … 354 378 # save and update the defconfig once you are happy with it 355 379 make linux-savedefconfig linux-update-defconfig 356 }}} 357 358 You can boot a Kernel+ramdisk via U-Boot like this: 380 # probably a good idea to remove the build kernel to force it to build again if you made changes 381 rm -rf output/build/linux- 382 # and rebuild 383 make -j8 384 # copy venice DTB's to output dir (buildroot does not do this for you) 385 cp output/build/linux-v6.6.8-venice/arch/arm64/boot/dts/freescale/imx8m*venice*dtb output/images/ 386 }}} 387 388 You can boot a Kernel+dtb+ramdisk via U-Boot like this: 359 389 * load from network tftpserver 360 390 {{{#!bash 361 391 setenv fsload tftpboot 362 run loadfdt && tftpboot $kernel_addr_r Image && booti $kernel_addr_r - $fdt_addr_r 363 }}} 392 run loadfdt && tftpboot $kernel_addr_r Image && tftpboot $ramdisk_addr_r && booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdt_addr_r 393 }}} 394 - Note that the ramdisk argument needs the ramdisk size so be sure to load that last as tftpboot/load will set filesize to the thing it loaded 364 395 * load from microSD with ext/fat filesystem 365 396 {{{#!bash … … 375 406 376 407 A prebuilt image can be found [http://dev.gateworks.com/buildroot/venice/minimal here] which contains an image built from the above venice_example_defconfig 377 - Gateworks Venice Linux 6. 1kernel378 - glibc with wide-char, locale, and g++ support408 - Gateworks Venice Linux 6.6 kernel 409 - glibc with wide-char, locale, and c++ support 379 410 - screen (BR2_PACKAGE_SCREEN) 380 411 - pciutils (BR2_PACKAGE_PCIUTILS) … … 386 417 - parted/gdisk/sgdisk disk partitioning tools 387 418 - ext filesystem support mkfs/resize2fs (BR2_PACKAGE_E2FSPROGS_RESIZE2FS) 419 - cryptsetup (BR2_PACKAGE_CRYPTSETUP) for using dm-crypt with LUKS for disk encryption 388 420 - u-boot image creation tools (mkimage/fw_setenv/fw_printenv) 389 421