* [Buildroot] User mailing list? @ 2024-08-02 20:25 Zoltán Kócsi 2024-08-02 21:57 ` Thomas Petazzoni via buildroot 0 siblings, 1 reply; 4+ messages in thread From: Zoltán Kócsi @ 2024-08-02 20:25 UTC (permalink / raw) To: buildroot This mailing list seems to be for Buildroot developers and maintainers. Is there a list for the less illuminated, where stupid questions like "my build fails and I don't know why" and "I have no idea what I'm doing, anyone could guide me a bit" type questions can be asked? Thanks, Zoltan _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] User mailing list? 2024-08-02 20:25 [Buildroot] User mailing list? Zoltán Kócsi @ 2024-08-02 21:57 ` Thomas Petazzoni via buildroot 2024-08-03 2:50 ` Zoltán Kócsi 0 siblings, 1 reply; 4+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-08-02 21:57 UTC (permalink / raw) To: Zoltán Kócsi; +Cc: buildroot Hello Zoltán, On Sat, 3 Aug 2024 06:25:08 +1000 Zoltán Kócsi <zoltan@bendor.com.au> wrote: > This mailing list seems to be for Buildroot developers and maintainers. > > Is there a list for the less illuminated, where stupid questions like > "my build fails and I don't know why" and "I have no idea what I'm > doing, anyone could guide me a bit" type questions can be asked? This mailing list is actually used for both, so feel free to ask your user's questions. A second option to get support is to join the IRC channel. But really the mailing list is fine as well! Best regards, Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] User mailing list? 2024-08-02 21:57 ` Thomas Petazzoni via buildroot @ 2024-08-03 2:50 ` Zoltán Kócsi 2024-08-03 9:44 ` Thomas Petazzoni via buildroot 0 siblings, 1 reply; 4+ messages in thread From: Zoltán Kócsi @ 2024-08-03 2:50 UTC (permalink / raw) To: buildroot; +Cc: Thomas Petazzoni Hi there, On Fri, 2 Aug 2024 23:57:43 +0200 Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote: > This mailing list is actually used for both, so feel free to ask your > user's questions. In that case, I'll have some. Background: I live on Linux, I regularly cross-compile to bare-metal targets, write my own BSPs and target libs and all, know make. New board, with a Xilinx Zynq7 SoC (actually, SoM w/ DRAM). It's just an ARM Cortex-A9 with loads of peripherals and an FPGA. I can boot the board (with bare metal code), can load anything to RAM, configure all devices and all. But I want Linux on it. Not the Xilinx one, but the mainline version (the Zynq7 is old enough so that all relevant Xilinx drivers are already on the mainline), with the RT patches applied. Don't really want uboot or anything fancy, I can load a kernel image, device tree and rootfs into RAM myself and start the kernel. So all I need is the kernel, the DTB and the rootfs. Buildroot seems to be a perfect match for this. Alas, from here, user stupidity and ignorance to be expected... First step, let's make an SDK. Load a defconfig with a board using the same chip, then change the Buildroot config to use a mainline kernel + RT patch, disable everything that the manual says: busybox, init system, /bin/sh, and tar-ing the root file system. Type make sdk. It chugs along, then the kernel compilation fails with a prototype mismatch in the noveau video driver. Why would it need an nVidia driver for a headless board is a mystery, but ok. Let's configure the kernel. Turn off everything the board doesn't have and/or not needed. make sdk again. Cool! The kernel compiles. Then Buildroot starts to build rootfs.ext2. First, a warning about 64-bit filesystem support not being enabled, but it builds it anyway. Writing superblocks and filesystem accounting information: done. Hurray! Then: >>> Executing post-image script board/zynq/post-image.sh INFO: cmd: "mkdir -p "/usr/local/work/Linux/test/buildroot-2024.05/output/build/genimage.tmp"" (stderr): INFO: cmd: "rm -rf "/usr/local/work/Linux/test/buildroot-2024.05/output/build/genimage.tmp"/*" (stderr): INFO: cmd: "mkdir -p "/usr/local/work/Linux/test/buildroot-2024.05/output/build/genimage.tmp"" (stderr): INFO: cmd: "cp -a "/tmp/tmp.piKMAgmzhv" "/usr/local/work/Linux/test/buildroot-2024.05/output/build/genimage.tmp/root"" (stderr): ERROR: file(boot.bin): stat(/usr/local/work/Linux/test/buildroot-2024.05/output/images/boot.bin) failed: No such file or directory ERROR: vfat(boot.vfat): could not setup boot.bin make: *** [Makefile:826: target-post-image] Error 1 I guess what happened was that Buildroot wanted to invoke the Xilinx tool 'genimage' to create boot.bin, which is the FSBL for the Zynq7 chips. Boot.bin is built from bare-metal code source (probably from Xilinx) and the resulting elf file is massaged to boot.bin by the Xilinx genimage tool. But I don't need boot.bin (I have my own), just the kernel, rootfs and the dtb. Obviously, my gung-ho approach of reading the first few chapters of the manual and jumping on it is not the way to go. What I'd like to ask for is some advice about the correct way to have a new target board defined, the kernel configured *for that board* and building what I need (but not what I don't need). Pointers to information about the whole build process would also be appreciated. Thanks, Zoltan _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] User mailing list? 2024-08-03 2:50 ` Zoltán Kócsi @ 2024-08-03 9:44 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 4+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-08-03 9:44 UTC (permalink / raw) To: Zoltán Kócsi; +Cc: buildroot Hello, On Sat, 3 Aug 2024 12:50:13 +1000 Zoltán Kócsi <zoltan@bendor.com.au> wrote: > New board, with a Xilinx Zynq7 SoC (actually, SoM w/ DRAM). It's just > an ARM Cortex-A9 with loads of peripherals and an FPGA. I can boot the > board (with bare metal code), can load anything to RAM, configure all > devices and all. But I want Linux on it. > > Not the Xilinx one, but the mainline version (the Zynq7 is old enough > so that all relevant Xilinx drivers are already on the mainline), with > the RT patches applied. Don't really want uboot or anything fancy, I can > load a kernel image, device tree and rootfs into RAM myself and start > the kernel. So all I need is the kernel, the DTB and the rootfs. So far, sounds good. > Buildroot seems to be a perfect match for this. Absolutely :-) > Alas, from here, user stupidity and ignorance to be expected... > > First step, let's make an SDK. Load a defconfig with a board using the No, not an SDK. That's a first mistake on your side, running "make sdk" is not what you want to do. You need to just run "make". "make sdk" is to build a SDK, i.e Software Development Kit. In the context of Buildroot what this does is generate a tarball that contains the cross-compiler + sysroot, so that application developers can build applications/libraries using the Buildroot cross-compiler, but outside of Buildroot. In practice, doing "make sdk" builds everything, but I believe it is useful to clarify that building a SDK is not what you want to do here. > same chip, then change the Buildroot config to use a mainline kernel + > RT patch, disable everything that the manual says: busybox, init > system, /bin/sh, and tar-ing the root file system. Why do you disable everything? If you don't have busybox, if you don't have an init system, how do you expect user-space to start up? > Type make sdk. No, just "make" in your case. > It chugs along, then the kernel compilation fails with a prototype > mismatch in the noveau video driver. Why would it need an nVidia driver > for a headless board is a mystery, but ok. Let's configure the kernel. Where did you specify that you are using a headless platform? You didn't specify which defconfig you started from, so I can't really comment, but maybe Buildroot defconfigs use Linux kernel defconfigs, and kernel defconfigs are very often quite featureful, and include a lot of drivers. This is not Buildroot's fault: it's up to you to pick the right kernel configuration, and tune it to your needs. > Turn off everything the board doesn't have and/or not needed. > > make sdk again. Cool! The kernel compiles. Then Buildroot starts to > build rootfs.ext2. First, a warning about 64-bit filesystem support not > being enabled, but it builds it anyway. Which warning? > Writing superblocks and filesystem accounting information: done. > Hurray! > > Then: > > >>> Executing post-image script board/zynq/post-image.sh > INFO: cmd: "mkdir -p > "/usr/local/work/Linux/test/buildroot-2024.05/output/build/genimage.tmp"" (stderr): > INFO: cmd: "rm -rf > "/usr/local/work/Linux/test/buildroot-2024.05/output/build/genimage.tmp"/*" (stderr): > INFO: cmd: "mkdir -p > "/usr/local/work/Linux/test/buildroot-2024.05/output/build/genimage.tmp"" (stderr): > INFO: cmd: "cp -a "/tmp/tmp.piKMAgmzhv" > "/usr/local/work/Linux/test/buildroot-2024.05/output/build/genimage.tmp/root"" (stderr): > ERROR: file(boot.bin): > stat(/usr/local/work/Linux/test/buildroot-2024.05/output/images/boot.bin) > failed: No such file or directory > ERROR: vfat(boot.vfat): could not setup boot.bin > make: *** [Makefile:826: target-post-image] Error 1 Well, you've started from a defconfig, but then you've disabled random stuff without really understanding what you were doing, what did you expect? Here what happens is that at the end of the build, Buildroot uses the genimage utility to generate the final SD card image. The layout of the SD card image is defined by a genimage configuration file, and this SD card image layout expects to have a bootloader binary generated.. but I presume you disabled building the bootloader in your Buildroot configuration. > I guess what happened was that Buildroot wanted to invoke the Xilinx > tool 'genimage' to create boot.bin, which is the FSBL for the Zynq7 > chips. No, genimage does not generate boot.bin, it consumes it. boot.bin should have been generated by the U-Boot build... which you have presumably disabled. > Boot.bin is built from bare-metal code source (probably from Xilinx) and > the resulting elf file is massaged to boot.bin by the Xilinx genimage > tool. No. genimage is not a Xilinx tool. > But I don't need boot.bin (I have my own), just the kernel, rootfs and the dtb. Well, then adjust the genimage configuration file. However, to be honest, it is not very logical to not need a bootloader. In the vast majority of embedded Linux projects, you will definitely want to have a bootloader. Hope this helps! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-03 9:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-08-02 20:25 [Buildroot] User mailing list? Zoltán Kócsi 2024-08-02 21:57 ` Thomas Petazzoni via buildroot 2024-08-03 2:50 ` Zoltán Kócsi 2024-08-03 9:44 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox