Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp621557ybg; Tue, 9 Jun 2020 08:44:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs4317TlwHJdysCem+1w8POJ1IFmYa0J7nP4CwnQ+Ocp2lh4HQ7GZgEZZE+vFshhezaFX5 X-Received: by 2002:a17:906:704c:: with SMTP id r12mr25649267ejj.308.1591717469666; Tue, 09 Jun 2020 08:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591717469; cv=none; d=google.com; s=arc-20160816; b=p9v1pQdd2JsYl2g0U57z848MI2wHZHx1/VPpmNgQ9hEbk3w/hRK6rGeKlACeL8r65H zKO/DPSm3YAT5Lj4Fih1pfftwlUzfe/hnMm2O6p4TL6efyL5hvWf+aRKUbs3la9YSJqK RhzPS6NTCg3ixdBS2q1w6Xrx1zlOPb4BW7ShHhpfunPnm0T+i9YqPc56Gw0O/GOcsA0b NEtkl2O9h34uEwPWizpnTW3IMA8o3S1KpXXyI+cLZQs+9Eo0wJSLga8sReufKLaLqezK 14dMqm/pkJMNTT/4C1C3xpZ9d5t1g5yH5jEOUhgxfDEtyb7FcqChKX//3ISxfDiBCsC6 cu9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=r7h76P0dKyHEx8WPlkV2onlEY1gE+C6vJU2/8YGmV8c=; b=qLdksU0Zs4zCs/lm3szfbDfTbLB/qNuVhb7NYgbwLwTQ8kopGwRlI3uCMEIuVLGqln GcatRMAKVejhLOZiUvW5aoWiAK18gkMsVGmPd4N9hsNYwW7azp3Z0eZ3RRXcf4qTLxBf /8YRCox9jzE902Ux2bsgRsL1EiSgLOqmbWyaAqwQUGcL1/FUMKe9WbYmgJQlM4D8OHy+ SzKkjABzVTdvsQ/JliskSp/1lRe56mKuJVg/uZgXI9AL6g7uUpZmUSyNKZF1Te8VYrJC vqb1Y9skgS+PBU7FZm/7wfF4eQq2XMgQWmrN4ZyuHBPeX0A0UkRncws0ZY1uqqwUuxeE rJgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jMCRLXqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si10847153edl.138.2020.06.09.08.44.06; Tue, 09 Jun 2020 08:44:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jMCRLXqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730852AbgFIPll (ORCPT + 99 others); Tue, 9 Jun 2020 11:41:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728533AbgFIPlk (ORCPT ); Tue, 9 Jun 2020 11:41:40 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56CE4C05BD1E; Tue, 9 Jun 2020 08:41:39 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id x14so21846847wrp.2; Tue, 09 Jun 2020 08:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=r7h76P0dKyHEx8WPlkV2onlEY1gE+C6vJU2/8YGmV8c=; b=jMCRLXqCC5n46nxhZSTRYiUOjijr53ShFSQrank/4QderFdAP2/dM57IcLxL6h0o+6 I6X6rAyGBx6ckaB8AvgDUru1yLbdP+Mj2S4xowMXTOSUotZqLlL/zudC10Kjkt7LkM9+ /FRI4CQBdyMz6K4Q4s1fPpmtujCprnM6Y9AN3ka1gSb65W4PnWxyuamcS3EsucC4TFfV B4LeYERziSVb0Y+fYu8WVZNQAO69o7gyXTCkeCAMHFVgtTjLzW846y/6gU1CWNrEeJNw JRpY2kiGzOczChzcQZC4yKiOtNmeOBOaGW5S9ZNN4DROd1AstiIBPl9ItGl/TtYKJKjV v7Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=r7h76P0dKyHEx8WPlkV2onlEY1gE+C6vJU2/8YGmV8c=; b=WYKXnxwkSUBhd/0jJwlpuTeqX+Be95I6mhiYNCTcOzaJml7As6uXkJvvpEIaPGo5c/ eJjDtyQ5oMd7pn+tyPWznH3a82LBB/nrDn+Qv2xITOqE7fVLbPslxHEtlLqpPMw7hgwf r8sauhjfxOCcU+tazmk8QX+Vpg1sV7CUUTyfz/mc504baKR+XtJFR5tWLB0gVUyyYcbK vyz3XnFIUQ2j+p9fi4JzeZJ9nAWYwLSDFFNBegkRU3nwSHDcDG2izs9Qj1arfG9xa5m2 m1F9kpTMn7VeBWwtgLI6/CdKM/b0qFwgZ0DpqqXir0C7d2cm8wgyIqM2OiS+DTx74EHe AkJQ== X-Gm-Message-State: AOAM530+CIK5RC6aXQNPqHuxxGB2Oi+TkeuuckTTSXD3I8VbOm8iwoB4 LCIsCQ/3CFuMMs9MwKD+oBemfroI X-Received: by 2002:adf:a491:: with SMTP id g17mr5486612wrb.132.1591717297973; Tue, 09 Jun 2020 08:41:37 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id v19sm3249259wml.26.2020.06.09.08.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 08:41:37 -0700 (PDT) Date: Tue, 9 Jun 2020 17:41:35 +0200 From: Corentin Labbe To: davem@davemloft.net, sparclinux@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: Re: Fail to build tftpboot.img Message-ID: <20200609154135.GB30571@Red> References: <20200605110535.GA9025@Red> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200605110535.GA9025@Red> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > :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