Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] Kernel panic - not syncing: Attempted to kill init!
Date: Fri, 11 Sep 2009 12:34:38 +0200	[thread overview]
Message-ID: <20090911103438.GB29175@mx.loc> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901CBED29@mi8nycmail19.Mi8.com>

On Thu, Sep 10, 2009 at 07:57:29PM -0400, H Hartley Sweeten wrote:

>I was able to get the compiler to work correctly at one point but still had
>problems with the linker.  I verified this by doing a clean "make V=1" and
>then examining all the output.  I would see the -march=armv4t in all the
>compile steps but it was missing in some of the link steps.  I think this 
>was happening due to the following in TARGET_CONFIGURE_OPTS:
>
>		AR="$(TARGET_AR)" \
>		AS="$(TARGET_AS)" \
>		LD="$(TARGET_LD)" \
>		NM="$(TARGET_NM)" \
>		CC="$(TARGET_CC) $(TARGET_CFLAGS)" \
>		GCC="$(TARGET_CC) $(TARGET_CFLAGS)" \
>		CPP="$(TARGET_CPP) $(TARGET_CFLAGS)" \
>		CXX="$(TARGET_CXX) $(TARGET_CXXFLAGS)" \
>		FC="$(TARGET_FC) $(TARGET_FCFLAGS)" \
>
>If the package build used CC (or equiv.) for the link it would get the
>necessary flags.  But if it used LD, no flags.

So whatever buildroot you're using it's handling flags in an incomplete
way (this is nothing new; see archives).
My tree does:

AUTO_CONFIGURE_TARGET=\
        $(TARGET_CONFIGURE_OPTS) \
        $(TARGET_CONFIGURE_ARGS) \
        $(TARGET_CONFIGURE_ENV) \
        $(if $(THIS_SRCDIR),$(THIS_SRCDIR)/,./)configure \
        --cache-file="$(PROJECT_BUILD_DIR)/tgt-config.cache" \
        --target=$(REAL_GNU_TARGET_NAME) \
        --host=$(REAL_GNU_TARGET_NAME) \
        --build=$(GNU_HOST_NAME)

TARGET_CONFIGURE_OPTS=\
        PATH=$(TARGET_PATH) \
        AR="$(TARGET_AR)" \
        AS="$(TARGET_AS)" \
        LD="$(TARGET_LD)$(if $(TARGET_LD_FLAGS), $(TARGET_LD_FLAGS))" \
        NM="$(TARGET_NM)" \
        CC="$(TARGET_CC)$(if $(TARGET_CC_FLAGS), $(TARGET_CC_FLAGS))" \
        GCC="$(TARGET_CC)$(if $(TARGET_CC_FLAGS), $(TARGET_CC_FLAGS))" \
        CPP="$(TARGET_CPP)$(if $(TARGET_CC_FLAGS), $(TARGET_CC_FLAGS))"
\
        CXX="$(if $(BR2_GCC_CROSS_CXX),$(TARGET_CXX)$(if
$(TARGET_CXXFLAGS), $(TARGET_CXXFLAGS)))" \
        GCJ="$(if $(BR2_GCC_CROSS_GCJ),$(TARGET_GCJ)$(if
$(TARGET_GCJFLAGS), $(TARGET_GCJFLAGS)))" \
        FC="$(TARGET_FC)$(if $(TARGET_FC_FLAGS), $(TARGET_FC_FLAGS))" \
        RANLIB="$(TARGET_RANLIB)" \

>
>Then there are the packages that just use CROSS=$(TARGET_CROSS).  For
>those packages none of the flags are getting passed.
>
>Also, I'm not sure having the $(TARGET_CFLAGS) directly in CC, GCC, etc.

care must be taken which stuff you put into CC (see above).
I think that i resorted to only putting the bare necessities in it.
Again, my tree:

ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
TARGET_CFLAGS=
TARGET_LDFLAGS=
# flags that are inherent part of the tool
TARGET_CC_FLAGS=
TARGET_LD_FLAGS=

ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
TARGET_CC_FLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT) -I=/usr/include
TARGET_LD_FLAGS+= $(BR2_SYSROOT)
else
# for old gcc's, as fallback
TARGET_CC_FLAGS+= -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
endif
ifeq ($(BR2_ENABLE_MULTILIB),y)
TARGET_LD_FLAGS+= -L$(STAGING_DIR)/lib64 -L$(STAGING_DIR)/usr/lib64
endif
TARGET_LD_FLAGS+= -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
TARGET_CFLAGS += $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)

ifeq ($(BR2_bfin),y)
CC_TARGET_CPU_SUB_:=$(strip $(subst ",,$(BR2_bfin_sirevision)))
#"))
CC_TARGET_CPU_SUB_:=$(if $(CC_TARGET_CPU_SUB_),-$(CC_TARGET_CPU_SUB_))
endif

##############################################################################
#disabled
ifneq (XXX,XXX)
# gcc configury --with-foo
CC_TARGET_CPU_:=$(strip $(subst ",,$(BR2_GCC_TARGET_CPU)))
#"))
CC_TARGET_TUNE_:=$(strip $(subst ",,$(BR2_GCC_TARGET_TUNE)))
#"))
CC_TARGET_ARCH_:=$(strip $(subst ",,$(BR2_GCC_TARGET_ARCH)))
#"))
CC_TARGET_ABI_:=$(strip $(subst ",,$(BR2_GCC_TARGET_ABI)))
#"))

# fixup for MOTOROLA
ifeq ($(BR2_m68k),y)
CC_TARGET_ARCH_:=$(filter-out cf m68k,$(CC_TARGET_ARCH_))
endif

ifneq ($(strip $(CC_TARGET_CPU_)),)
TARGET_CFLAGS+=-mcpu=$(CC_TARGET_CPU_)$(CC_TARGET_CPU_SUB_)
endif
ifneq ($(strip $(CC_TARGET_TUNE_)),)
TARGET_CFLAGS+=-mtune=$(CC_TARGET_TUNE_)
endif
ifneq ($(strip $(CC_TARGET_ARCH_)),)
TARGET_CFLAGS+=-march=$(CC_TARGET_ARCH_)
endif
ifneq ($(strip $(CC_TARGET_ABI_)),)
TARGET_CFLAGS+=-mabi=$(CC_TARGET_ABI_)
endif

endif


>is correct.  At one point I got an error during the ./configure for one
>of the packages due to a -V option passed to the compiler.  I think this
>had something to due with determining the version of the compiler.  It
>appears that the -V option must come at the start of the command line
>with gcc.  Of course this could also be a problem with the ./configure
>stuff.

gcc: '-V' must come at the start of the command line
so yes.

HTH,

  reply	other threads:[~2009-09-11 10:34 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19 18:32 [Buildroot] Kernel panic - not syncing: Attempted to kill init! H Hartley Sweeten
2009-08-19 19:42 ` Thomas Petazzoni
2009-08-19 20:19   ` H Hartley Sweeten
2009-08-19 21:30     ` Thomas Petazzoni
2009-08-19 22:28       ` H Hartley Sweeten
2009-08-20  2:29         ` H Hartley Sweeten
     [not found]           ` <48ab7e010908191938n3577c9eem76c04a5bb2f3bd20@mail.gmail.com>
2009-08-20  2:48             ` H Hartley Sweeten
2009-08-20 12:35         ` Thomas Petazzoni
2009-08-20 16:59           ` H Hartley Sweeten
2009-08-20 18:45             ` H Hartley Sweeten
2009-08-21  0:53               ` H Hartley Sweeten
2009-08-21  9:44                 ` Thomas Petazzoni
2009-08-21 16:37                   ` H Hartley Sweeten
2009-08-21 23:19                     ` Thomas Petazzoni
2009-08-22  3:08                       ` H Hartley Sweeten
2009-08-22  8:55                         ` Thomas Petazzoni
2009-08-22 22:53                           ` H Hartley Sweeten
2009-08-23  6:17                             ` Thomas Petazzoni
2009-08-24 16:19                               ` H Hartley Sweeten
2009-08-24 16:53                               ` H Hartley Sweeten
2009-08-24 17:11                                 ` H Hartley Sweeten
2009-08-25  0:53                                   ` H Hartley Sweeten
2009-08-25 17:48                                     ` H Hartley Sweeten
2009-08-25 19:01                                       ` Bernhard Reutner-Fischer
2009-08-26 16:45                                         ` H Hartley Sweeten
2009-08-26 20:44                                           ` Peter Korsgaard
2009-08-26 21:50                                             ` H Hartley Sweeten
2009-08-27  7:49                                               ` Bernhard Reutner-Fischer
2009-08-28 23:09                                                 ` H Hartley Sweeten
2009-08-30 11:03                                                   ` Bernhard Reutner-Fischer
2009-09-10 23:57                                                     ` H Hartley Sweeten
2009-09-11 10:34                                                       ` Bernhard Reutner-Fischer [this message]
2009-09-11 22:04                                                         ` H Hartley Sweeten
2009-09-12  6:02                                                           ` Peter Korsgaard
2009-08-20  0:30       ` H Hartley Sweeten
2009-08-19 22:13     ` Daniel Mack
2009-08-19 22:19       ` H Hartley Sweeten
2009-08-20  8:56         ` Daniel Mack
  -- strict thread matches above, loose matches on Subject: below --
2011-11-22 20:51 [Buildroot] equivalent of a 'make modules' Jeff Krasky
2011-12-01 22:56 ` [Buildroot] LIBFOO_SITE in .mk file Jeff Krasky
2011-12-02  7:50   ` Thomas De Schampheleire
2011-12-02 13:33     ` Michael S. Zick
2011-12-02 15:57       ` Jeff Krasky
2011-12-02 16:09         ` Quotient Remainder
2011-12-02 16:51           ` [Buildroot] Kernel panic - not syncing: Attempted to kill init! Jeff Krasky
2011-12-02 16:59             ` Jeff Krasky
2011-12-02 17:33             ` Tim Judd
2011-12-02 18:02               ` Jeff Krasky
2011-12-02 18:21                 ` Aleksander Dutkowski
2011-12-02 18:30                   ` Jeff Krasky
2011-12-03  0:25                     ` Aleksander Dutkowski
2011-12-02 18:31                   ` Tim Judd
2011-12-02 18:24                 ` Tim Judd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090911103438.GB29175@mx.loc \
    --to=rep.dot.nop@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox