linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: davem@davemloft.net, sparclinux@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fail to build tftpboot.img
Date: Tue, 9 Jun 2020 17:41:35 +0200	[thread overview]
Message-ID: <20200609154135.GB30571@Red> (raw)
In-Reply-To: <20200605110535.GA9025@Red>

On Fri, Jun 05, 2020 at 01:05:35PM +0200, Corentin Labbe wrote:
> Hello
> 
> For reinstalling an old SPARC machine , I need a netboot image.
> I tried to create it via make tftpboot.img but got:
> BUILD: sparc to /home/compile/crossbuild/next/sparc/sparc64/defconfig
> make[1]: Entering directory '/usr/src/crossbuild/next/sparc/sparc64/defconfig'
>   GEN     Makefile
> scripts/kconfig/conf  --syncconfig Kconfig
>   GEN     Makefile
>   CALL    /linux-next/scripts/atomic/check-atomics.sh
>   CALL    /linux-next/scripts/checksyscalls.sh
> <stdin>:1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
>   CHK     include/generated/compile.h
>   GZIP    kernel/config_data.gz
>   CC      kernel/configs.o
>   AR      kernel/built-in.a
>   GEN     .version
>   CHK     include/generated/compile.h
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   AR      init/built-in.a
>   LD      vmlinux.o
>   MODPOST vmlinux.symvers
> WARNING: modpost: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned.
>   MODINFO modules.builtin.modinfo
>   GEN     modules.builtin
>   LD      .tmp_vmlinux.kallsyms1
>   KSYM    .tmp_vmlinux.kallsyms1.o
>   LD      .tmp_vmlinux.kallsyms2
>   KSYM    .tmp_vmlinux.kallsyms2.o
>   LD      vmlinux
>   SYSMAP  System.map
>   MODPOST Module.symvers
>   STRIP   arch/sparc/boot/image
>   kernel: arch/sparc/boot/image is ready
>   ELFTOAOUT arch/sparc/boot/tftpboot.img
> PT 0 Entry: Loadable to 0x400000[0x5288d0] from 0x0[0x4ca694] align 0x100000
> PT 1 Entry: Note
> PT 2 Entry: unknown
>   PIGGY   arch/sparc/boot/tftpboot.img
> lseek: Invalid argument
> make[2]: *** [/linux-next/arch/sparc/boot/Makefile:72: arch/sparc/boot/tftpboot.img] Error 1
> make[2]: *** Deleting file 'arch/sparc/boot/tftpboot.img'
> make[1]: *** [arch/sparc/Makefile:76: tftpboot.img] Error 2
> make[1]: Leaving directory '/usr/src/crossbuild/next/sparc/sparc64/defconfig'
> make: *** [Makefile:185: __sub-make] Error 2
> 
> I got this result on both linux-next and 5.6.15
> 
> I have straced the process:
> 22495 openat(AT_FDCWD, "arch/sparc/boot/tftpboot.img", O_RDWR) = 3              
> 22495 read(3, "\1\3\1\7\0\0\0\0\0Lf\224\0\0\0\0\0\0\0\0\0\0\0\0\0\5\342<\0\0\0\0"..., 512) = 512
> 22495 lseek(3, 0, SEEK_SET)             = 0                                     
> 22495 read(3, "\1\3\1\7\0\0\0\0\0Lf\224\0\0\0\0\0\0\0\0\0\0\0\0\0\5\342<\0\0\0\0"..., 1024) = 1024
> 22495 lseek(3, -480, SEEK_SET)          = -1 EINVAL (Argument invalide)         
> 22495 dup(2)                            = 4                                     
> 22495 fcntl(4, F_GETFL)                 = 0x402 (flags O_RDWR|O_APPEND)         
> 22495 fstat(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1a), ...}) = 0    
> 22495 write(4, "lseek: Invalid argument\n", 24) = 24                            
> 22495 close(4)                          = 0                                     
> 
> Regards

The problem was a too old elftoaout binary.
I will send a patch for printing a better error message.

Regards

      reply	other threads:[~2020-06-09 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 11:05 Fail to build tftpboot.img Corentin Labbe
2020-06-09 15:41 ` Corentin Labbe [this message]

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=20200609154135.GB30571@Red \
    --to=clabbe.montjoie@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).