[llvmlinux] llvmlinux: v3.14 checkpoint does not boot on Ubuntu/precise AMD64

Sedat Dilek sedat.dilek at gmail.com
Wed Mar 4 07:22:14 UTC 2015


Hi David,

I am playing with llvmlinux again and tried to boot with a Linux v3.10
and v3.14 by applying the projects patches from the so-called
"checkpoints".
Both generated Linux-kernels do not boot.
Now, I focus on Linux v3.14.

My toolchain is an unmodified llvm-toolchain v3.6.0 (see attached files).

$ LC_ALL=C clang -v
clang version 3.6.0 (tags/RELEASE_360/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

I am not sure if all your "16-bit" fixes are included in Linux v3.14.

x86, boot: Use .code16 instead of .code16gcc
x86: Remove duplication of 16-bit CFLAGS
( x86, boot: Use __attribute__((used)) to ensure videocard structs are emitted )
x86, boot: Fix word-size assumptions in has_eflag() inline asm
x86, build: Build 16-bit code with -m16 where possible

With the patches from
<targets/x86_64/checkpoints/v3.14/patches/kernel/series> I cannot
boot.
Adding "text" to my command-line shows no messages (here: Ubuntu/precise AMD64).
Not sure how can I give you more precise informations.

Reverting this patch...

Temporarily disable M16_CFLAGS

...did not help.

One additional patch is needed with clang-3.6...

mm: Apply the section attribute to the variable, not its type

What informations do you need?
I have attached my kernel-config, build-log, the last all-in-one (AIO)
patchset and build-scripts (toolchain and kernel).

Can you give some help on how to dig into this?

Do you have "working" kernel-config and a patchset for me (which you
know is good and boots on bare metal)?

Thanks in advance.

Regards,
- Sedat -

P.S.: Apply llvmlinux patchset from v3.14 checkpoint.

$ checkpoint_path=~/src/llvmlinux/llvmlinux-git/targets/x86_64/checkpoints/v3.14/patches/kernel

$ for p in $(cat $checkpoint_path/series) ; do echo [ $p ] ; LC_ALL=C
git am $checkpoint_path/$p ; done
[ kbuild-clang.patch ]
Applying: kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang
[ disable-clang-integrated-as.patch ]
Applying: Kbuild: LLVMLinux: Disable the use of the Integrated
Assembler when compiling with Clang
[ warnings-clang.patch ]
Applying: kbuild: LLVMLinux: Adapt warnings for compilation with clang
[ dontdiff.patch ]
Applying: Documentation: LLVMLinux: Update Documentation/dontdiff
[ cc-version.patch ]
Applying: kbuild: LLVMLinux: Fix LINUX_COMPILER definition script for
compilation with clang
[ aligned-attribute.patch ]
Applying: crypto: LLVMLinux: aligned-attribute.patch
[ cmpxchg-local-fix-uninitialized-return-code.patch ]
Applying: LLVMLinux: Remove warning about returning an uninitialized variable
[ compiler-clang.patch ]
Applying: LLVMLinux: Add support for clang to compiler.h and new
compiler-clang.h
[ vlais-dm-crypt.patch ]
Applying: crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt
[ vlais-hmac.patch ]
Applying: crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c
[ vlais-libcrc32c.patch ]
Applying: crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c
[ vlais-mac80211.patch ]
Applying: mac80211: LLVMLinux: Remove VLAIS usage from mac80211
[ vlais-netfilter.patch ]
Applying: net: netfilter: LLVMLinux: vlais-netfilter
[ vlais-testmgr.patch ]
Applying: crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c
[ vlais-apparmor.patch ]
Applying: apparmor: LLVMLinux: Remove VLAIS
[ vlais-btrfs.patch ]
Applying: btrfs: LLVMLinux: Remove VLAIS
[ dwarf2.patch ]
Applying: all: LLVMLinux: Change DWARF flag to support gcc and clang
[ boot-workaround-PR18415.patch ]
Applying: x86, boot: Work around clang PR18415.
[ hweight-x86.patch ]
Applying: LLVMLinux: Clang doesn't support the gcc flags set by
CONFIG_ARCH_HWEIGHT_CFLAGS
[ export-memcpy-clang-x86_64.patch ]
Applying: x86: LLVMLinux: Add option for clang in export of memcpy.
[ current_stack_pointer_x86_64.patch ]
Applying: x86: LLVMLinux: Reimplement current_stack_pointer without
register usage.
[ thinkpad-nested-functions.patch ]
Applying: x86, acpi: LLVMLinux: Remove nested functions from Thinkpad ACPI
[ no-ia-realmode.patch ]
Applying: kbuild, x86: LLVMLinux: Ad no-integrated-as to
arch/x86/realmode/rm/Makefile.
[ no-ia-code16.patch ]
Applying: Kbuild: LLVMLinux: Add no-integrated-as to
arch/x86/boot/Makefile for compilation with clang
[ kbuild-clang-x86.patch ]
Applying: x86 kbuild: LLVMLinux: More cc-options added for clang
[ support-older-versions-of-clang.patch ]
Applying: NOUPSTREAM - support older versions of clang (<=3.4)
[ incomplete_type_for_struct_x86cpu_device_id.patch ]
Applying: x86: LLVMLinux: Fix "incomplete type const struct x86cpu_device_id"
[ WORKAROUND-NON-UPSTREAM-Temporarily-disable-M16_CFLA.patch ]
Applying: Temporarily disable M16_CFLAGS

- EOT -
-------------- next part --------------
  CHK     include/config/kernel.release
make KBUILD_SRC=
make[3]: Nothing to be done for `all'.
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[3]: Nothing to be done for `relocs'.
  CALL    scripts/checksyscalls.sh
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported
clang: warning: optimization flag '-fno-inline-functions-called-once' is not supported
  CHK     include/generated/compile.h
  AS      arch/x86/realmode/rm/header.o
  CHK     kernel/config_data.h
  AS      arch/x86/realmode/rm/trampoline_64.o
  AS      arch/x86/realmode/rm/stack.o
  AS      arch/x86/realmode/rm/reboot.o
  AS      arch/x86/realmode/rm/wakeup_asm.o
  CC      arch/x86/realmode/rm/wakemain.o
  CC      arch/x86/realmode/rm/video-mode.o
  VDSOSYM arch/x86/vdso/vdso-syms.lds
  VDSOSYM arch/x86/vdso/vdsox32-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-syscall-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-syms.lds
  LD      arch/x86/vdso/built-in.o
  AS      arch/x86/realmode/rm/copy.o
  AS      arch/x86/realmode/rm/bioscall.o
  CC      arch/x86/realmode/rm/regs.o
  CC      arch/x86/realmode/rm/video-vga.o
  CC      arch/x86/realmode/rm/video-vesa.o
  CC      arch/x86/realmode/rm/video-bios.o
  PASYMS  arch/x86/realmode/rm/pasyms.h
  LDS     arch/x86/realmode/rm/realmode.lds
  LD      arch/x86/realmode/rm/realmode.elf
  RELOCS  arch/x86/realmode/rm/realmode.relocs
  OBJCOPY arch/x86/realmode/rm/realmode.bin
  AS      arch/x86/realmode/rmpiggy.o
  LD      arch/x86/realmode/built-in.o
  LD      arch/x86/built-in.o
  CHK     include/generated/uapi/linux/version.h
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `relocs'.
  LINK    vmlinux
  LD      vmlinux.o
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported
clang: warning: optimization flag '-fno-inline-functions-called-once' is not supported
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported
clang: warning: optimization flag '-fno-inline-functions-called-once' is not supported
  LD      init/built-in.o
  KSYM    .tmp_kallsyms1.o
  KSYM    .tmp_kallsyms2.o
  LD      vmlinux
  SORTEX  vmlinux
  SYSMAP  System.map
  Building modules, stage 2.
  CC      arch/x86/boot/a20.o
  AS      arch/x86/boot/bioscall.o
  CC      arch/x86/boot/cmdline.o
  AS      arch/x86/boot/copy.o
  CC      arch/x86/boot/cpu.o
  CC      arch/x86/boot/cpuflags.o
  MODPOST 108 modules
  CC      arch/x86/boot/cpucheck.o
  CC      arch/x86/boot/early_serial_console.o
  CC      arch/x86/boot/edd.o
  VOFFSET arch/x86/boot/voffset.h
  CC      arch/x86/boot/main.o
  CC      arch/x86/boot/mca.o
  CC      arch/x86/boot/memory.o
  CC      arch/x86/boot/pm.o
  AS      arch/x86/boot/pmjump.o
  CC      arch/x86/boot/printf.o
  OBJCOPY arch/x86/boot/compressed/vmlinux.bin
  CC      arch/x86/boot/regs.o
  CC      arch/x86/boot/string.o
  GZIP    arch/x86/boot/compressed/vmlinux.bin.gz
  CC      arch/x86/boot/tty.o
  CC      arch/x86/boot/video.o
  CC      arch/x86/boot/video-mode.o
  CC      arch/x86/boot/version.o
  CC      arch/x86/boot/video-vga.o
  CC      arch/x86/boot/video-vesa.o
  CC      arch/x86/boot/video-bios.o
  MKPIGGY arch/x86/boot/compressed/piggy.S
  AS      arch/x86/boot/compressed/piggy.o
  LD      arch/x86/boot/compressed/vmlinux
  ZOFFSET arch/x86/boot/zoffset.h
  OBJCOPY arch/x86/boot/vmlinux.bin
  AS      arch/x86/boot/header.o
  LD      arch/x86/boot/setup.elf
  OBJCOPY arch/x86/boot/setup.bin
  BUILD   arch/x86/boot/bzImage
Setup is 13068 bytes (padded to 13312 bytes).
System is 4442 kB
CRC 2bbb9cb1
Kernel: arch/x86/boot/bzImage is ready  (#2)
  BUILDDEB
make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
  INSTALL Documentation/connector/cn_test.ko
  INSTALL arch/x86/crypto/aes-x86_64.ko
  INSTALL arch/x86/crypto/aesni-intel.ko
  INSTALL arch/x86/crypto/crc32c-intel.ko
  INSTALL arch/x86/crypto/ghash-clmulni-intel.ko
  INSTALL arch/x86/crypto/glue_helper.ko
  INSTALL arch/x86/kernel/cpu/microcode/microcode.ko
  INSTALL arch/x86/kvm/kvm-intel.ko
  INSTALL arch/x86/kvm/kvm.ko
  INSTALL crypto/ablk_helper.ko
  INSTALL crypto/arc4.ko
  INSTALL crypto/ccm.ko
  INSTALL crypto/cryptd.ko
  INSTALL crypto/ctr.ko
  INSTALL crypto/gf128mul.ko
  INSTALL crypto/lrw.ko
  INSTALL crypto/seqiv.ko
  INSTALL crypto/xts.ko
  INSTALL drivers/acpi/ac.ko
  INSTALL drivers/acpi/battery.ko
  INSTALL drivers/acpi/button.ko
  INSTALL drivers/acpi/fan.ko
  INSTALL drivers/acpi/processor.ko
  INSTALL drivers/acpi/thermal.ko
  INSTALL drivers/acpi/video.ko
  INSTALL drivers/block/loop.ko
  INSTALL drivers/char/lp.ko
  INSTALL drivers/char/ppdev.ko
  INSTALL drivers/cpufreq/acpi-cpufreq.ko
  INSTALL drivers/gpu/drm/drm.ko
  INSTALL drivers/gpu/drm/drm_kms_helper.ko
  INSTALL drivers/gpu/drm/i915/i915.ko
  INSTALL drivers/hwmon/coretemp.ko
  INSTALL drivers/i2c/algos/i2c-algo-bit.ko
  INSTALL drivers/i2c/i2c-mux.ko
  INSTALL drivers/input/joydev.ko
  INSTALL drivers/input/serio/serio_raw.ko
  INSTALL drivers/media/dvb-core/dvb-core.ko
  INSTALL drivers/media/i2c/ir-kbd-i2c.ko
  INSTALL drivers/media/rc/rc-core.ko
  INSTALL drivers/media/tuners/mc44s803.ko
  INSTALL drivers/media/tuners/mt20xx.ko
  INSTALL drivers/media/tuners/tda18271.ko
  INSTALL drivers/media/tuners/tda827x.ko
  INSTALL drivers/media/tuners/tda8290.ko
  INSTALL drivers/media/tuners/tda9887.ko
  INSTALL drivers/media/tuners/tea5761.ko
  INSTALL drivers/media/tuners/tea5767.ko
  INSTALL drivers/media/tuners/tuner-simple.ko
  INSTALL drivers/media/tuners/tuner-types.ko
  INSTALL drivers/media/tuners/tuner-xc2028.ko
  INSTALL drivers/media/tuners/xc4000.ko
  INSTALL drivers/media/tuners/xc5000.ko
  INSTALL drivers/media/usb/uvc/uvcvideo.ko
  INSTALL drivers/media/v4l2-core/v4l2-common.ko
  INSTALL drivers/media/v4l2-core/v4l2-dv-timings.ko
  INSTALL drivers/media/v4l2-core/videobuf2-core.ko
  INSTALL drivers/media/v4l2-core/videobuf2-memops.ko
  INSTALL drivers/media/v4l2-core/videobuf2-vmalloc.ko
  INSTALL drivers/media/v4l2-core/videodev.ko
  INSTALL drivers/mfd/lpc_ich.ko
  INSTALL drivers/mfd/mfd-core.ko
  INSTALL drivers/net/ethernet/realtek/r8169.ko
  INSTALL drivers/net/mii.ko
  INSTALL drivers/net/wireless/iwlwifi/dvm/iwldvm.ko
  INSTALL drivers/net/wireless/iwlwifi/iwlwifi.ko
  INSTALL drivers/parport/parport.ko
  INSTALL drivers/parport/parport_pc.ko
  INSTALL drivers/platform/x86/samsung-laptop.ko
  INSTALL drivers/platform/x86/wmi.ko
  INSTALL drivers/thermal/thermal_sys.ko
  INSTALL drivers/thermal/x86_pkg_temp_thermal.ko
  INSTALL drivers/usb/host/xhci-hcd.ko
  INSTALL drivers/usb/storage/usb-storage.ko
  INSTALL fs/binfmt_misc.ko
  INSTALL net/mac80211/mac80211.ko
  INSTALL net/packet/af_packet.ko
  INSTALL net/wireless/cfg80211.ko
  INSTALL sound/core/oss/snd-mixer-oss.ko
  INSTALL sound/core/oss/snd-pcm-oss.ko
  INSTALL sound/core/seq/oss/snd-seq-oss.ko
  INSTALL sound/core/seq/snd-seq-device.ko
  INSTALL sound/core/seq/snd-seq-dummy.ko
  INSTALL sound/core/seq/snd-seq-midi-event.ko
  INSTALL sound/core/seq/snd-seq-midi.ko
  INSTALL sound/core/seq/snd-seq-virmidi.ko
  INSTALL sound/core/seq/snd-seq.ko
  INSTALL sound/core/snd-hwdep.ko
  INSTALL sound/core/snd-pcm.ko
  INSTALL sound/core/snd-rawmidi.ko
  INSTALL sound/core/snd-timer.ko
  INSTALL sound/core/snd.ko
  INSTALL sound/drivers/snd-virmidi.ko
  INSTALL sound/pci/hda/snd-hda-codec-analog.ko
  INSTALL sound/pci/hda/snd-hda-codec-ca0110.ko
  INSTALL sound/pci/hda/snd-hda-codec-ca0132.ko
  INSTALL sound/pci/hda/snd-hda-codec-cirrus.ko
  INSTALL sound/pci/hda/snd-hda-codec-cmedia.ko
  INSTALL sound/pci/hda/snd-hda-codec-conexant.ko
  INSTALL sound/pci/hda/snd-hda-codec-generic.ko
  INSTALL sound/pci/hda/snd-hda-codec-hdmi.ko
  INSTALL sound/pci/hda/snd-hda-codec-idt.ko
  INSTALL sound/pci/hda/snd-hda-codec-realtek.ko
  INSTALL sound/pci/hda/snd-hda-codec-si3054.ko
  INSTALL sound/pci/hda/snd-hda-codec-via.ko
  INSTALL sound/pci/hda/snd-hda-codec.ko
  INSTALL sound/pci/hda/snd-hda-intel.ko
  INSTALL sound/soundcore.ko
  DEPMOD  3.14.0-1-llvmlinux-small
make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
  CHK     include/generated/uapi/linux/version.h
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `relocs'.
make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
  CHK     include/generated/uapi/linux/version.h
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `relocs'.
  INSTALL include/asm-generic (35 files)
  INSTALL include/drm (18 files)
  INSTALL include/linux/byteorder (2 files)
  INSTALL include/linux/caif (2 files)
  INSTALL include/linux/can (5 files)
  INSTALL include/linux/dvb (8 files)
  INSTALL include/linux/hdlc (1 file)
  INSTALL include/linux/hsi (1 file)
  INSTALL include/linux/isdn (1 file)
  INSTALL include/linux/mmc (1 file)
  INSTALL include/linux/netfilter/ipset (4 files)
  INSTALL include/linux/netfilter (85 files)
  INSTALL include/linux/netfilter_arp (2 files)
  INSTALL include/linux/netfilter_bridge (18 files)
  INSTALL include/linux/netfilter_ipv4 (10 files)
  INSTALL include/linux/netfilter_ipv6 (12 files)
  INSTALL include/linux/nfsd (5 files)
  INSTALL include/linux/raid (2 files)
  INSTALL include/linux/spi (1 file)
  INSTALL include/linux/sunrpc (1 file)
  INSTALL include/linux/tc_act (8 files)
  INSTALL include/linux/tc_ematch (4 files)
  INSTALL include/linux/usb (10 files)
  INSTALL include/linux/wimax (1 file)
  INSTALL include/linux (392 files)
  INSTALL include/mtd (5 files)
  INSTALL include/rdma (6 files)
  INSTALL include/scsi/fc (4 files)
  INSTALL include/scsi (3 files)
  INSTALL include/sound (11 files)
  INSTALL include/video (3 files)
  INSTALL include/xen (4 files)
  INSTALL include/uapi (0 file)
  INSTALL include/asm (64 files)
dpkg-deb: building package `linux-headers-3.14.0-1-llvmlinux-small' in `../linux-headers-3.14.0-1-llvmlinux-small_3.14.0-1~precise+dileks1_amd64.deb'.
dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_3.14.0-1~precise+dileks1_amd64.deb'.
dpkg-deb: building package `linux-image-3.14.0-1-llvmlinux-small' in `../linux-image-3.14.0-1-llvmlinux-small_3.14.0-1~precise+dileks1_amd64.deb'.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-3.14.0-1-llvmlinux-small
Type: application/octet-stream
Size: 103263 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20150304/dc5d01b0/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.14.0-1-llvmlinux-amd64-small.patch
Type: text/x-diff
Size: 32231 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20150304/dc5d01b0/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_llvm-toolchain.sh
Type: application/x-sh
Size: 1591 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20150304/dc5d01b0/attachment-0002.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_llvmlinux.sh
Type: application/x-sh
Size: 4508 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20150304/dc5d01b0/attachment-0003.sh>


More information about the LLVMLinux mailing list