Advertisement
Guest User

Buildroot and Ideas...

a guest
Jun 26th, 2022
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.02 KB | None | 0 0
  1. Okay. So, I am going to make some notes here to help you, me, and anyone else looking over these items of interest.
  2.  
  3. wget https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--glibc--bleeding-edge-2021.11-1.tar.bz2
  4.  
  5. tar -xvf armv7-eabihf--glibc--bleeding-edge-2021.11-1
  6. cd u-boot
  7. make ARCH=arm CROSS_COMPILE=~/YOUR_DIR/armv7-eabihf--glibc--bleeding-edge-2021.11-1/bin/arm-buildroot-linux-gnueabihf- distclean
  8. make ARCH=arm CROSS_COMPILE=~/YOUR_DIR/armv7-eabihf--glibc--bleeding-edge-2021.11-1/bin/arm-buildroot-linux-gnueabihf- am335x_evm_defconfig
  9. make ARCH=arm CROSS_COMPILE=~/YOUR_DIR/armv7-eabihf--glibc--bleeding-edge-2021.11-1/bin/arm-buildroot-linux-gnueabihf- menuconfig if needed?
  10.  
  11. Go to / in the u-boot prompt
  12. Type in CMD_EXTENSION
  13. Find in the GUI where exactly CMD_EXTENSION is located in the menuconfig
  14. We need to have CONFIG_EXENTION_CMD=y and we can now build u-boot
  15. make ARCH=arm CROSS_COMPILE=~/YOUR_DIR/armv7-eabihf--glibc--bleeding-edge-2021.11-1/bin/arm-buildroot-linux-gnueabihf-
  16. cp MLO u-boot.img /media/$USER/boot/
  17.  
  18. Now, for the building of zImage, dtbs, and modules...
  19.  
  20. wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.197.tar.xz
  21.  
  22. tar -xvf linux-5.4.197.tar.xz
  23. cd linux-5.4.197
  24. make ARCH=arm CROSS_COMPILE=~/YOUR_DIR/armv7-eabihf--glibc--bleeding-edge-2021.11-1/bin/arm-buildroot-linux-gnueabihf- omap2plus_defconfig
  25. make ARCH=arm CROSS_COMPILE=~/YOUR_DIR/armv7-eabihf--glibc--bleeding-edge-2021.11-1/bin/arm-buildroot-linux-gnueabihf- menuconfig if needed?
  26.  
  27. Within the GUI find, by /, OF_OVERLAY.
  28. a. Also, the rootfs.cpio build needs to be put in INITRAMFS_SOURCE by searching with /
  29. b. So, something like ../rootfs.cpio goes in the box in the GUI after the download
  30. make ARCH=arm CROSS_COMPILE=YOUR_DIR/armv7-eabihf--glibc--bleeding-edge-2021.11-1/bin/arm-buildroot-linux-gnueabihf- zImage modules dtbs
  31. cp zImage /media/$USER/boot/
  32. zImage can be found once the kernel has been built in /arch/arm/boot/
  33. cp am335x-boneblack.dtb /media/$USER/boot/
  34. am335x-boneblack.dtb can be found in /arch/arm/boot/dts/
  35.  
  36. Now, if anyone wants to chime in here, please do. B/c, for some reason, I have not got this specific build to work just yet.
  37. Seth
  38. P.S. Everything builds correctly but I think my toolchain is outdated. For Bullseye, there is an updated gcc for cross-compilation. Anyway...this is the update so far. It may or may not work due to dependencies.
  39. OKAY. I see what works and does not work so far. With the current bleeding-edge toolchain from bootlin, their respective kernel to use, I THINK, is 5.4.x and u-boot needs to be newer than the kernel. BUT...the info. here, https://beagleboard.org/blog/2022-06-06-using-the-u-boot-extension-board-manager-beaglebone-boards-example, was not ported to u-boot until very recently b/c of beagleboard.org.
  40.  
  41. @gpioblink ,
  42. Hello Again...Seth here. So, I think in fact it is the course of the partition making that is in the way.
  43. I have done some research and I think using /dev/mmcblk1 for instance over /dev/sda1 for instance is preferable.
  44. I will test tonight and reply once I configure something worth sharing.
  45. Seth
  46. P.S. If you have made it past this phase in your development, please disregard what I am typing. This link says differently, https://forum.digikey.com/t/debian-getting-started-with-the-beaglebone-black/12967 . So, I will keep trying to support this cause. BBL! https://toolchains.bootlin.com/ may help too...
  47.  
  48. Okay...so.
  49. In Buildroot, try to use these commands:
  50.  
  51. cd buildroot
  52. cd configs
  53. nano BONE_defconfig
  54. C & P https://bootlin.com/pub/2022/u-boot-extension-mgr/src/buildroot-2021.02.5.config in BONE_defconfig
  55. make ARCH=arm CROSS_COMPILE=your_toolchain BONE_defconfig
  56. go to /buildroot/output/images/
  57. There should be a bunch of files for your disposal
  58. Add those files to the /boot and /rootfs files in your partitioned SD Card.
  59. WIP
  60.  
  61. I am still working on the finalization of this process. Bear w/ me.
  62. Seth
  63. P.S. Okay, so. I now have a rootfs file to show off but I am not sure exactly what to do w/ it thus far:
  64.  
  65.  
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement