Bug 10786 - Linux fails to build unless make linux-menuconfig is run first
Summary: Linux fails to build unless make linux-menuconfig is run first
Status: RESOLVED WORKSFORME
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2017.08
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-20 20:01 UTC by adyke
Modified: 2018-02-25 21:38 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
defconfig (1.45 KB, application/octet-stream)
2018-02-20 20:01 UTC, adyke
Details
linux_defconfig (7.80 KB, text/plain)
2018-02-20 20:13 UTC, adyke
Details

Note You need to log in before you can comment on or make changes to this bug.
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.