backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: cross compile backports?
       [not found]   ` <51FA8ECD.7070401@lenbrook.com>
@ 2013-08-01 17:47     ` Solomon Peachy
  2013-08-01 19:03       ` Luis R. Rodriguez
  2013-08-01 19:12       ` cross compile backports with LTIB Jonathan Bagg
  0 siblings, 2 replies; 10+ messages in thread
From: Solomon Peachy @ 2013-08-01 17:47 UTC (permalink / raw)
  To: Jonathan Bagg; +Cc: linux-wireless, backports

[-- Attachment #1: Type: text/plain, Size: 1449 bytes --]

On Thu, Aug 01, 2013 at 12:37:33PM -0400, Jonathan Bagg wrote:
> I've been cross compiling compat-wireless and now I'm trying
> backports.  It looks like conf.c and zconf.tab.c are being compiled
> as arm and then the build process is trying to run conf on my x86
> host.  Results using the below make parameters I was using for
> compat-wireless......

Howdy.  :)

(btw, I'm CC'ing the backports mailing list, which is a better place to 
 ask these sorts of questions)

I found that the backports cross-compile process worked much the same 
way as building compat-wireless.  This is what I'm doing currently in my 
build script:  (This is using a backports package generated last night 
using the backports git HEAD code with the cw1200 driver integrated)

 set -a
 CROSS_COMPILE=${CROSS_COMPILE} 
 ARCH=${TARGET_CPU}
 KLIB_BUILD=${DEV_PATH}/${LINUX_DIR}
 KLIB=${TARGET_ROOT_ON_HOST}
 set +a
 make oldconfig  # menuconfig worked here too
 make
 make install

That said, the 'make install' target isn't currently sane for 
cross-builds due to the bacport_firmware_install script not respecting 
prefixes.  I just commented that script (and a few others like initrd 
updates) out of the Makefiles, and I had a successful build/install.

 - Solomon
-- 
Solomon Peachy        		       pizza at shaftnet dot org
Delray Beach, FL                          ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum viditur.

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: cross compile backports?
  2013-08-01 17:47     ` cross compile backports? Solomon Peachy
@ 2013-08-01 19:03       ` Luis R. Rodriguez
  2013-08-01 19:36         ` Solomon Peachy
  2013-08-01 19:12       ` cross compile backports with LTIB Jonathan Bagg
  1 sibling, 1 reply; 10+ messages in thread
From: Luis R. Rodriguez @ 2013-08-01 19:03 UTC (permalink / raw)
  To: Solomon Peachy; +Cc: Jonathan Bagg, linux-wireless, backports@vger.kernel.org

On Thu, Aug 1, 2013 at 10:47 AM, Solomon Peachy <pizza@shaftnet.org> wrote:
> On Thu, Aug 01, 2013 at 12:37:33PM -0400, Jonathan Bagg wrote:
>> I've been cross compiling compat-wireless and now I'm trying
>> backports.  It looks like conf.c and zconf.tab.c are being compiled
>> as arm and then the build process is trying to run conf on my x86
>> host.  Results using the below make parameters I was using for
>> compat-wireless......
>
> Howdy.  :)
>
> (btw, I'm CC'ing the backports mailing list, which is a better place to
>  ask these sorts of questions)
>
> I found that the backports cross-compile process worked much the same
> way as building compat-wireless.  This is what I'm doing currently in my
> build script:  (This is using a backports package generated last night
> using the backports git HEAD code with the cw1200 driver integrated)
>
>  set -a
>  CROSS_COMPILE=${CROSS_COMPILE}
>  ARCH=${TARGET_CPU}
>  KLIB_BUILD=${DEV_PATH}/${LINUX_DIR}
>  KLIB=${TARGET_ROOT_ON_HOST}
>  set +a
>  make oldconfig  # menuconfig worked here too
>  make
>  make install
>
> That said, the 'make install' target isn't currently sane for
> cross-builds due to the bacport_firmware_install script not respecting
> prefixes.  I just commented that script (and a few others like initrd
> updates) out of the Makefiles, and I had a successful build/install.

Thanks, now:

https://backports.wiki.kernel.org/index.php/Documentation#Cross_compiling

Patches welcome to help improve the cross compile install target.

  Luis

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: cross compile backports with LTIB
  2013-08-01 17:47     ` cross compile backports? Solomon Peachy
  2013-08-01 19:03       ` Luis R. Rodriguez
@ 2013-08-01 19:12       ` Jonathan Bagg
  2013-08-01 19:17         ` Jonathan Bagg
  2013-08-07 19:55         ` Issue reading kernel config Jonathan Bagg
  1 sibling, 2 replies; 10+ messages in thread
From: Jonathan Bagg @ 2013-08-01 19:12 UTC (permalink / raw)
  To: backports; +Cc: Solomon Peachy, linux-wireless

On 13-08-01 01:47 PM, Solomon Peachy wrote:
> On Thu, Aug 01, 2013 at 12:37:33PM -0400, Jonathan Bagg wrote:
>> I've been cross compiling compat-wireless and now I'm trying
>> backports.  It looks like conf.c and zconf.tab.c are being compiled
>> as arm and then the build process is trying to run conf on my x86
>> host.  Results using the below make parameters I was using for
>> compat-wireless......
Learned some things....Problem was LTIB (ltib = Freescale tool) 
environment.  Outside of LTIB, backports cross compiles fine.  To get 
backports happy in LTIB need to use UNSPOOF/SPOOF_PATH to switch between 
host and cross environment....

%Build
export PATH=$UNSPOOF_PATH

make defconfig-cw1200 make prefix=%{_prefix} 
CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} ARCH=$LINTARCH 
KLIB=${TOP}/rootfs/lib/modules/%{kversion} KLIB_BUILD=${TOP}/rpm/BUILD/linux

export PATH=$SPOOF_PATH

make prefix=%{_prefix} 
CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} ARCH=$LINTARCH 
KLIB=${TOP}/rootfs/lib/modules/%{kversion} KLIB_BUILD=${TOP}/rpm/BUILD/linux

Jon

> Howdy.  :)
>
> (btw, I'm CC'ing the backports mailing list, which is a better place to
>   ask these sorts of questions)
>
> I found that the backports cross-compile process worked much the same
> way as building compat-wireless.  This is what I'm doing currently in my
> build script:  (This is using a backports package generated last night
> using the backports git HEAD code with the cw1200 driver integrated)
>
>   set -a
>   CROSS_COMPILE=${CROSS_COMPILE}
>   ARCH=${TARGET_CPU}
>   KLIB_BUILD=${DEV_PATH}/${LINUX_DIR}
>   KLIB=${TARGET_ROOT_ON_HOST}
>   set +a
>   make oldconfig  # menuconfig worked here too
>   make
>   make install
>
> That said, the 'make install' target isn't currently sane for
> cross-builds due to the bacport_firmware_install script not respecting
> prefixes.  I just commented that script (and a few others like initrd
> updates) out of the Makefiles, and I had a successful build/install.
>
>   - Solomon


-- 
Jonathan Bagg
Software Developer
NAD Electronics | Lenbrook Industries Limited
633 Granite Court, Pickering, Ontario, Canada L1W 3K1 | 905-831-0799 ext 4478 | http://www.nadelectronics.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: cross compile backports with LTIB
  2013-08-01 19:12       ` cross compile backports with LTIB Jonathan Bagg
@ 2013-08-01 19:17         ` Jonathan Bagg
  2013-08-07 19:55         ` Issue reading kernel config Jonathan Bagg
  1 sibling, 0 replies; 10+ messages in thread
From: Jonathan Bagg @ 2013-08-01 19:17 UTC (permalink / raw)
  To: backports; +Cc: Solomon Peachy, linux-wireless

On 13-08-01 03:12 PM, Jonathan Bagg wrote:
> On 13-08-01 01:47 PM, Solomon Peachy wrote:
>> On Thu, Aug 01, 2013 at 12:37:33PM -0400, Jonathan Bagg wrote:
>>> I've been cross compiling compat-wireless and now I'm trying
>>> backports.  It looks like conf.c and zconf.tab.c are being compiled
>>> as arm and then the build process is trying to run conf on my x86
>>> host.  Results using the below make parameters I was using for
>>> compat-wireless......
> Learned some things....Problem was LTIB (ltib = Freescale tool) 
> environment.  Outside of LTIB, backports cross compiles fine.  To get 
> backports happy in LTIB need to use UNSPOOF/SPOOF_PATH to switch 
> between host and cross environment....
>
(this is for the LTIBs spec file for backports = 
dist/lfs-5.1/backports/backports.spec - forgot to mention in previous post)
> %Build
> export PATH=$UNSPOOF_PATH
>
> make defconfig-cw1200 make prefix=%{_prefix} 
> CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} ARCH=$LINTARCH 
> KLIB=${TOP}/rootfs/lib/modules/%{kversion} 
> KLIB_BUILD=${TOP}/rpm/BUILD/linux
>
> export PATH=$SPOOF_PATH
>
> make prefix=%{_prefix} 
> CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} ARCH=$LINTARCH 
> KLIB=${TOP}/rootfs/lib/modules/%{kversion} 
> KLIB_BUILD=${TOP}/rpm/BUILD/linux
>
> Jon 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: cross compile backports?
  2013-08-01 19:03       ` Luis R. Rodriguez
@ 2013-08-01 19:36         ` Solomon Peachy
  0 siblings, 0 replies; 10+ messages in thread
From: Solomon Peachy @ 2013-08-01 19:36 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: backports@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

On Thu, Aug 01, 2013 at 12:03:08PM -0700, Luis R. Rodriguez wrote:
> https://backports.wiki.kernel.org/index.php/Documentation#Cross_compiling
> 
> Patches welcome to help improve the cross compile install target.

I'm thinking the right way to proceed is that if CROSS_COMPILE is set, 
simply skip all of the stuff that is only relevant for local systems.  
(That and respecting a prefix for the udev rules)

I'll post a patch or two to that effect tonight.

 - Solomon
-- 
Solomon Peachy        		       pizza at shaftnet dot org
Delray Beach, FL                          ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum viditur.

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Issue reading kernel config
  2013-08-01 19:12       ` cross compile backports with LTIB Jonathan Bagg
  2013-08-01 19:17         ` Jonathan Bagg
@ 2013-08-07 19:55         ` Jonathan Bagg
  2013-08-07 20:33           ` Jonathan Bagg
  1 sibling, 1 reply; 10+ messages in thread
From: Jonathan Bagg @ 2013-08-07 19:55 UTC (permalink / raw)
  To: backports

Hello,

I am cross compiling backports successful using "alldefconfig".  I would 
like use menuconfig and have conf read in options from my kernel instead 
of the default.  (CONFIG_BT is not enabled in the default and I want to 
enable BT drivers in backports).  It looks like kconf/conf program is 
loading a kernel config from the root of backports called Kconfig.  When 
I replace this file with my kernel config (from 2.6.35-3) I get many....

Kconfig:1967: syntax error
Kconfig:1966: unknown statement "CONFIG_CRC_ITU_T"
Kconfig:1967: unknown statement "CONFIG_CRC32"
Kconfig:1971: syntax error
Kconfig:1970: unknown statement "CONFIG_ZLIB_INFLATE"
Kconfig:1971: unknown statement "CONFIG_ZLIB_DEFLATE"
Kconfig:1972: unknown statement "CONFIG_LZO_COMPRESS"
Kconfig:1973: unknown statement "CONFIG_LZO_DECOMPRESS"
Kconfig:1974: unknown statement "CONFIG_GENERIC_ALLOCATOR"
Kconfig:1975: unknown statement "CONFIG_HAS_IOMEM"
Kconfig:1976: unknown statement "CONFIG_HAS_IOPORT"
Kconfig:1977: unknown statement "CONFIG_HAS_DMA"
Kconfig:1978: unknown statement "CONFIG_NLATTR"
make[1]: *** [menuconfig] Error 1
make: *** [menuconfig] Error 2

What is the right way to do this?  I could add CONFIG_BT=y to the 
default Kconfig file, but that seems hackish.

Jon


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Issue reading kernel config
  2013-08-07 19:55         ` Issue reading kernel config Jonathan Bagg
@ 2013-08-07 20:33           ` Jonathan Bagg
  2013-08-08  6:37             ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Bagg @ 2013-08-07 20:33 UTC (permalink / raw)
  To: backports

So I had a look at the Kconfig file and realised it isn't a kernel 
config.  If I add

config BT
     def_bool y

under the "# some hacks ..." section, I can enable BT drivers in 
backports in the menuconfig.  So if a kconfig depends on an external 
config, there is no way to feed in a kernel config to backports?  you 
list external config under "# some hacks ..." section?

Jon


On 13-08-07 03:55 PM, Jonathan Bagg wrote:
> Hello,
>
> I am cross compiling backports successful using "alldefconfig".  I 
> would like use menuconfig and have conf read in options from my kernel 
> instead of the default.  (CONFIG_BT is not enabled in the default and 
> I want to enable BT drivers in backports).  It looks like kconf/conf 
> program is loading a kernel config from the root of backports called 
> Kconfig.  When I replace this file with my kernel config (from 
> 2.6.35-3) I get many....
>
> Kconfig:1967: syntax error
> Kconfig:1966: unknown statement "CONFIG_CRC_ITU_T"
> Kconfig:1967: unknown statement "CONFIG_CRC32"
> Kconfig:1971: syntax error
> Kconfig:1970: unknown statement "CONFIG_ZLIB_INFLATE"
> Kconfig:1971: unknown statement "CONFIG_ZLIB_DEFLATE"
> Kconfig:1972: unknown statement "CONFIG_LZO_COMPRESS"
> Kconfig:1973: unknown statement "CONFIG_LZO_DECOMPRESS"
> Kconfig:1974: unknown statement "CONFIG_GENERIC_ALLOCATOR"
> Kconfig:1975: unknown statement "CONFIG_HAS_IOMEM"
> Kconfig:1976: unknown statement "CONFIG_HAS_IOPORT"
> Kconfig:1977: unknown statement "CONFIG_HAS_DMA"
> Kconfig:1978: unknown statement "CONFIG_NLATTR"
> make[1]: *** [menuconfig] Error 1
> make: *** [menuconfig] Error 2
>
> What is the right way to do this?  I could add CONFIG_BT=y to the 
> default Kconfig file, but that seems hackish.
>
> Jon
>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Issue reading kernel config
  2013-08-07 20:33           ` Jonathan Bagg
@ 2013-08-08  6:37             ` Johannes Berg
  2013-08-08 11:45               ` Jonathan Bagg
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2013-08-08  6:37 UTC (permalink / raw)
  To: Jonathan Bagg; +Cc: backports

On Wed, 2013-08-07 at 16:33 -0400, Jonathan Bagg wrote:
> So I had a look at the Kconfig file and realised it isn't a kernel 
> config.  If I add
> 
> config BT
>      def_bool y
> 
> under the "# some hacks ..." section, I can enable BT drivers in 
> backports in the menuconfig.  So if a kconfig depends on an external 
> config, there is no way to feed in a kernel config to backports?  you 
> list external config under "# some hacks ..." section?

The script should create a dummy Kconfig.kernel from your
kernel's .config, and read that for the dependencies from the kernel.

johannes


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Issue reading kernel config
  2013-08-08  6:37             ` Johannes Berg
@ 2013-08-08 11:45               ` Jonathan Bagg
  2013-08-08 12:16                 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Bagg @ 2013-08-08 11:45 UTC (permalink / raw)
  To: Johannes Berg; +Cc: backports

On 13-08-08 02:37 AM, Johannes Berg wrote:
> On Wed, 2013-08-07 at 16:33 -0400, Jonathan Bagg wrote:
>> So I had a look at the Kconfig file and realised it isn't a kernel
>> config.  If I add
>>
>> config BT
>>       def_bool y
>>
>> under the "# some hacks ..." section, I can enable BT drivers in
>> backports in the menuconfig.  So if a kconfig depends on an external
>> config, there is no way to feed in a kernel config to backports?  you
>> list external config under "# some hacks ..." section?
> The script should create a dummy Kconfig.kernel from your
> kernel's .config, and read that for the dependencies from the kernel.
I'd like to figure out why it isn't working.  Which script reads the 
kernel's .config?

Jon

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Issue reading kernel config
  2013-08-08 11:45               ` Jonathan Bagg
@ 2013-08-08 12:16                 ` Johannes Berg
  0 siblings, 0 replies; 10+ messages in thread
From: Johannes Berg @ 2013-08-08 12:16 UTC (permalink / raw)
  To: Jonathan Bagg; +Cc: backports

On Thu, 2013-08-08 at 07:45 -0400, Jonathan Bagg wrote:

> > The script should create a dummy Kconfig.kernel from your
> > kernel's .config, and read that for the dependencies from the kernel.

> I'd like to figure out why it isn't working.  Which script reads the 
> kernel's .config?

It's an inline script in the Makefile, this part:

        @set -e ; if [ "$$(cat .kernel_config_md5 2>/dev/null)" != "$(CONFIG_MD5)" ]    ;\
        then                                                                            \ 
                echo -n "Generating local configuration database from kernel ..."       ;\
...


johannes


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-08-08 12:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1375338204-2021-8-git-send-email-sujith@msujith.org>
     [not found] ` <1375370826-1387-1-git-send-email-sujith@msujith.org>
     [not found]   ` <51FA8ECD.7070401@lenbrook.com>
2013-08-01 17:47     ` cross compile backports? Solomon Peachy
2013-08-01 19:03       ` Luis R. Rodriguez
2013-08-01 19:36         ` Solomon Peachy
2013-08-01 19:12       ` cross compile backports with LTIB Jonathan Bagg
2013-08-01 19:17         ` Jonathan Bagg
2013-08-07 19:55         ` Issue reading kernel config Jonathan Bagg
2013-08-07 20:33           ` Jonathan Bagg
2013-08-08  6:37             ` Johannes Berg
2013-08-08 11:45               ` Jonathan Bagg
2013-08-08 12:16                 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).