compile fails without BLK_DEV_INITRD

Bug #193507 reported by James Troup on 2008-02-19
4
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Tim Gardner

Bug Description

Binary package hint: linux-source-2.6.24

If you try to compile without BLK_DEV_INITRD, you get this:

  LD .tmp_vmlinux1
init/built-in.o: In function `start_kernel':
(.init.text+0x8d7): undefined reference to `early_populate_rootfs'
make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory `/home/james/kernel/linux-source-2.6.24'
make: *** [debian/stamp-build-kernel] Error 2

Hi James,

One workaround is to also disable CONFIG_ACPI which will allow the build to finish, just not sure if that's something you want disabled or not.

If you take a peek at the Makefile:

ogasawara@yoji:~$ head linux-2.6.24/init/Makefile
#
# Makefile for the linux kernel.
#

obj-y := main.o version.o mounts.o
ifneq ($(CONFIG_BLK_DEV_INITRD),y)
obj-y += noinitramfs.o
else
obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o
endif

You can see that since you've disabled BLK_DEV_INITRD, initramfs.o is not being built and thus "early_populate_rootfs" is not defined. As a hack to get the compile to finish, you can comment out the "early_populate_rootfs" call from linux-2.6.24/init/main.c with something like:

ogasawara@yoji:~$ diff -Naur ubuntu-hardy/init/main.c linux-2.6.24/init/main.c
--- ubuntu-hardy/init/main.c 2007-12-09 15:11:22.000000000 -0800
+++ linux-2.6.24/init/main.c 2008-02-19 21:47:33.000000000 -0800
@@ -644,7 +644,9 @@

  check_bugs();

+#ifdef CONFIG_BLK_DEV_INITRD
  early_populate_rootfs(); /* For DSDT override from initramfs */
+#endif
  acpi_early_init(); /* before LAPIC and SMP init */

  /* Do the rest non-__init'ed, we're now alive */

Since BLK_DEV_INITRD is enabled by default for the Ubuntu kernels, you're really building your own custom kernel by disabling this option. I'm not sure how much attention the kernel team will devote to this bug because of that fact but I'll ask them to take a peek anyways. Thanks.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Tim Gardner (timg-tpi) wrote :

Leann - you make my job easy.
James - I have not compile tested this fix as it appears quite simple. I'm relying on you to tell me if its fubar.

Changed in linux:
assignee: ubuntu-kernel-team → timg-tpi
milestone: none → hardy-alpha-6
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.24-10.16

---------------
linux (2.6.24-10.16) hardy; urgency=low

  [Alessio Igor Bogani]

  * rt: Synchronized with upstream (2.6.24.2-rt2)
  * rt: Updated configuration files

  [Eric Piel]

  * SAUCE: ACPI: Allow custom DSDT tables to be loaded from initramfs
    Amit Kucheria consolidated the DSDT patch with another fix that
    ifdefs symbols required when BLK_DEV_INITR is disabled.

  [Stefan Bader]

  * Add Optiarc DVD drive to audio quirks list.
    - LP: #186664
  * Update drm and i915 drm driver to fix suspend issues.
    - LP: #189260

  [Tim Gardner]

  * Fix FTBS without BLK_DEV_INITRD
    - LP: #193507
  * 64 bit CPA cache attribute bug
    - LP: #193736
  * Implemented default EDD control

  [Upstream Kernel Changes]

  * bonding: fix NULL pointer deref in startup processing
  * dlm: bind connections from known local address when using TCP
  * dlm: proper prototypes
  * dlm: don't print common non-errors
  * dlm: use dlm prefix on alloc and free functions
  * dlm: close othercons
  * dlm: align midcomms message buffer
  * dlm: swap bytes for rcom lock reply
  * dlm: use fixed errno values in messages
  * dlm: clear ast_type when removing from astqueue
  * dlm: recover locks waiting for overlap replies
  * dlm: another call to confirm_master in receive_request_reply
  * dlm: reject messages from non-members
  * dlm: validate messages before processing
  * dlm: reject normal unlock when lock is waiting for lookup
  * dlm: limit dir lookup loop
  * dlm: fix possible use-after-free
  * dlm: change error message to debug
  * dlm: keep cached master rsbs during recovery
  * dlm: Sanity check namelen before copying it
  * dlm: clean ups
  * dlm: static initialization improvements
  * dlm: use proper C for dlm/requestqueue stuff (and fix alignment bug)
  * dlm: dlm_process_incoming_buffer() fixes
  * dlm: do not byteswap rcom_lock
  * dlm: do not byteswap rcom_config
  * dlm: use proper type for ->ls_recover_buf
  * dlm: missing length check in check_config()
  * dlm: validate data in dlm_recover_directory()
  * dlm: verify that places expecting rcom_lock have packet long enough
  * dlm: receive_rcom_lock_args() overflow check
  * dlm: make find_rsb() fail gracefully when namelen is too large
  * dlm: fix overflows when copying from ->m_extra to lvb
  * dlm: fix dlm_dir_lookup() handling of too long names
  * dlm: dlm/user.c input validation fixes
  * dlm: proper types for asts and basts
  * dlm: eliminate astparam type casting
  * dlm: add __init and __exit marks to init and exit functions
  * virtio: Use PCI revision field to indicate virtio PCI ABI version

 -- Tim Gardner <email address hidden> Tue, 19 Feb 2008 09:57:18 -0700

Changed in linux:
status: Fix Committed → Fix Released
deliveri (delivery-web) wrote :

Hi .

I have the same problem.

I turn off the ACPI into the kernel (make menuconfig and Power Management option/ Power Management support), as Ogasawara suggested, and make command works well after that.

Thx.

Dave Gilbert (ubuntu-treblig) wrote :

I was just helping 'irgendwer4711' on #ubuntu-devel who had hit a similar case to this.

In the 2.6.24-29.93.diff the early_populate_rootfs is guarded by CONFIG_ACPI_CUSTOM_DSDT_INITRD
yet the call is guarded by CONFIG_BLK_DEV_INITRD and he had config'd CONFIG_ACPI_CUSTOM_DSDT_INITRD off.

(I don't run 2.6.24 and don't know the history of whether this was really the fix that should have gone in here or if the ifdef around early_populate_rootfs changed after this bug fix).

Dave

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers