Bug 10786

Summary: Linux fails to build unless make linux-menuconfig is run first
Product: buildroot Reporter: adyke
Component: OtherAssignee: unassigned
Status: RESOLVED WORKSFORME    
Severity: normal CC: adyke, buildroot
Priority: P5    
Version: 2017.08   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: defconfig
linux_defconfig

Description adyke 2018-02-20 20:01:08 UTC
Created attachment 7476 [details]
defconfig

When selecting BR2_TARGET_ROOTFS_ISO9660 and BR2_TARGET_SYSLINUX_ISOLINUX, Linux fails to build until "make linux-menuconfig" is run. It would seem that the kernel is expecting output/images/rootfs.cpio to exist, but it does not unless linux-menuconfig is run.

Once linux-menuconfig has been run once, the problem disappears until I rm -rf everything in output/images. Then running linux-menuconfig again solves the issue. 

Obviously the workaround is to run linux-menuconfig, but trying to build in a freshly checked out copy of our repo always fails.


A branch of our repo that is identical except it does not have BR2_TARGET_ROOTFS_ISO9660 and BR2_TARGET_SYSLINUX_ISOLINUX set does not see this issue.
Comment 1 adyke 2018-02-20 20:13:42 UTC
Created attachment 7481 [details]
linux_defconfig

linux_defconfig used when bug was discovered
Comment 2 Thomas Petazzoni 2018-02-21 22:56:51 UTC
I'm indeed able to reproduce, I'll try to have a look. Thanks for the bug report.
Comment 3 Thomas Petazzoni 2018-02-25 21:38:06 UTC
You have CONFIG_INITRAMFS_SOURCE defined in your linux_defconfig, but you have not enabled initramfs support in Buildroot. So obviously this cannot work.

If you enable initramfs support in Buildroot, then Buildroot will make sure to have a dummy rootfs.cpio when the kernel is first built, will make sure to set CONFIG_INITRAMFS_SOURCE to the correct value, and will rebuild the kernel image at the end of the build with the final rootfs.cpio.

Therefore, there is no bug per se: there is just a mis-use of the initramfs support.