All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ziegler <br015@umbiko.net>
To: Dan Jackson <dan@thejacksons.uk>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] Adding USB support to existing device on 2.6.39.3 kernel - possible?
Date: Wed, 30 Mar 2022 07:13:32 +0000	[thread overview]
Message-ID: <35c2351b33bcb44d81333adfa848d221@umbiko.net> (raw)
In-Reply-To: <AM6PR02MB4884A6522909A9322C4C9E2EDA1E9@AM6PR02MB4884.eurprd02.prod.outlook.com>

Hi Dan,

cutting some old content.

On 2022-03-29 19:19, Dan Jackson wrote:

<cut>

>> > However, now I have a new missing file error, and I can't seem to
>> > locate a suitable candidate:
>> >
>> > In file included from
>> > /home/danj/buildroot-2022.02/output/build/linux-
>> custom/arch/arm/include/asm/system.h:165,
>> >                  from
>> > /home/danj/buildroot-2022.02/output/build/linux-
>> custom/arch/arm/include/asm/bitops.h:27,
>> >                  from include/linux/bitops.h:22,
>> >                  from include/linux/kernel.h:17,
>> >                  from include/linux/sched.h:55,
>> >                  from arch/arm/kernel/asm-offsets.c:13:
>> > /home/danj/buildroot-2022.02/output/build/linux-
>> custom/arch/arm/include/asm/memory.h:19:10:
>> > fatal error: mach/memory.h: No such file or directory
>> >    19 | #include <mach/memory.h>
>> >       |          ^~~~~~~~~~~~~~~
>> > compilation terminated.
>> > /home/danj/buildroot-2022.02/output/build/linux-custom/./Kbuild:81:
>> > recipe for target 'arch/arm/kernel/asm-offsets.s' failed
>> > make[3]: *** [arch/arm/kernel/asm-offsets.s] Error 1
>> > Makefile:1009: recipe for target 'prepare0' failed
>> > make[2]: *** [prepare0] Error 2
>> > make[2]: *** Waiting for unfinished jobs....
>> >   HOSTCC  scripts/mod/modpost.o
>> >   HOSTCC  scripts/mod/sumversion.o
>> >   HOSTLD  scripts/mod/modpost
>> > make[2]: *** wait: No child processes. Stop.
>> > package/pkg-generic.mk:289: recipe for target
>> > '/home/danj/buildroot-2022.02/output/build/linux-custom/.stamp_built'
>> > failed
>> > make[1]: ***
>> > [/home/danj/buildroot-2022.02/output/build/linux-custom/.stamp_built]
>> > Error 2
>> > Makefile:84: recipe for target '_all' failed
>> > make: *** [_all] Error 2
>> 
>> This seems not to be the defconfig from above? It now uses 
>> linux-custom ...
>> The failure may be due to the default kernel configuration. Try to 
>> configure
>> the correct one and see if you get further.
>> 
>> > I think maybe I am still doing something wrong because it sure seems
>> > to be compiling a lot of stuff instead of letting me configure things.
>> 
>> It gets better once everything necessary is built.
> 
> Still no luck I'm afraid. Same error with mach/memory.h as above.
> 
> Buildroot defconfig now looks like this:
> 
> BR2_armeb=y
> BR2_STATIC_LIBS=y
> BR2_KERNEL_HEADERS_VERSION=y
> BR2_DEFAULT_KERNEL_VERSION="2.6.39.3"
> BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD=y
> BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
> BR2_PTHREAD_DEBUG=y
> BR2_BINUTILS_VERSION_2_37_X=y
> BR2_GCC_VERSION_9_X=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_PACKAGE_HOST_GDB=y
> BR2_GDB_VERSION_9_2=y
> BR2_LINUX_KERNEL=y
> BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.39.3"
> BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="/home/danj/DG3270_9.1.103FB/sourcecode/ti_linux/linux-2.6.39.3/src/.config"
> BR2_PACKAGE_DROPBEAR=y
> BR2_PACKAGE_DROPBEAR_LOCALOPTIONS_FILE="/home/danj/localoptions.h"
> BR2_PACKAGE_JOE=y
> 
> I forgot to mention this before but the buildroot manual page you
> mentioned said to create a local.mk file in order to use external
> source, this looks like this:
> 
> LINUX_OVERRIDE_SRCDIR =
> /home/danj/DG3270_9.1.103FB/sourcecode/ti_linux/linux-2.6.39.3/src/
> 
> For the kernel configuration I entered the kernel source dir and did
> "make menuconfig", I left everything at the defaults except for
> enabling the USB related items.
> 
> The resulting configuration file is attached as a text file.
> Unfortunately it's been literally decades since I last actually
> compiled a kernel, so I'm afraid I have no idea what bits would be
> suitable to disable/remove to get the results I want (I'm guessing
> this will be the most likely way to eliminate the error I'm getting?)

I did a compile test this morning, the Buildroot version was some early 
2022.02 version, not up-to-date.

You have a potential header mismatch, Select Toolchain -> Kernel Headers 
-> Same as kernel being built to use the vendor source also for the 
headers.

I could configure Linux with make menuconfig, did not encounter the 
missing memory.h error above, but the build stops during Linux kernel 
compilation with this error:

/tmp/ccSO8f6S.s: Assembler messages:
/tmp/ccSO8f6S.s:950: Error: .err encountered
make[3]: *** [scripts/Makefile.build:284: 
arch/arm/kernel/sys_oabi-compat.o] Error 1
make[2]: *** [Makefile:969: arch/arm/kernel] Error 2
make[1]: *** [package/pkg-generic.mk:292: 
/home/data/test/buildroot/output/build/linux-custom/.stamp_built] Error 
2
make: *** [Makefile:84: _all] Error 2

Full error log is here: https://pastebin.com/VrXqSVsD

You might now do some research:

https://stackoverflow.com/questions/61235299/gcc-8-3-arm-assembly-error-when-building-linux-kernel-3-14-17-in-buildroot-2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85745

or try to switch to an older compiler ...

--
Andreas

<cut>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-03-30  7:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.22068.1648533484.192135.buildroot@buildroot.org>
2022-03-29  9:40 ` [Buildroot] Adding USB support to existing device on 2.6.39.3 kernel - possible? Andreas Ziegler
2022-03-29 12:48   ` Dan Jackson
2022-03-29 15:13     ` Andreas Ziegler
2022-03-29 16:17       ` Dan Jackson
2022-03-29 17:52         ` Andreas Ziegler
2022-03-29 19:19           ` Dan Jackson
2022-03-30  7:13             ` Andreas Ziegler [this message]
2022-03-30 19:18               ` Dan Jackson
2022-03-31  5:57                 ` Andreas Ziegler
2022-03-31  6:19                   ` Dan Jackson
2022-03-31  6:50                     ` Andreas Ziegler
2022-03-29  5:57 Dan Jackson

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=35c2351b33bcb44d81333adfa848d221@umbiko.net \
    --to=br015@umbiko.net \
    --cc=buildroot@buildroot.org \
    --cc=dan@thejacksons.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.