Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1798468ybj; Sun, 22 Sep 2019 12:10:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4e8t3aXxbXCinDgUop5siLwY6uVV6PidCYYOx2rSE3H7LYtTztjx/o7tVdvx0b0F43818 X-Received: by 2002:a50:acc1:: with SMTP id x59mr33561909edc.278.1569179401572; Sun, 22 Sep 2019 12:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569179401; cv=none; d=google.com; s=arc-20160816; b=zUV8ZGfbhVftWuETov0FAtOJU627RFS3CBs8x0yhcQ0g0MRVeJbifhazijO7AXiI+9 UV5EgDy9qmKspLM2zKsBS9hewV3UibSN+xD8Sgu3Zlp2sHtp9Zn18CHPt5CXlHleg3l6 tIAj/ggRQntOQZSvdiJjafHjKZwIGQg/Nh1vJx54qU+/sBZXH/81bfWpw5eH8TOHtJ/m N+WrncH80OVJCVbzf4qCoOhaADHqEwfAYsEePn2gXvX/ysitW+524G5MviwgcXzBSLJm EHQoMm8Ki1T9TE2Ott33gwPzn+VqSEEpwMUHtnVQnPsv7WSbcvEUducgPrbflouDynIo WbDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=qpo1CPqc73MCadVo8iRju2Ls/5Qlein+jmhvtvLiZqY=; b=se8u7oUTl30jFEWfN7eWvBgd8cOohLW9YJCiUiLznLAzsYqqMa4FhvV+II8aKWFldO Q/w5ef1JpfLs9SKM1CvfNj3+rB9djnwQ0Zryh7FcZDsPuu5GlQm4tDbekMqwtSpDpdHx T/bBJgp7ZslP3ZPELynix0/oTGpagn5eFELrPJV/zpS1y0wGouAuqHWtpg0aANs2djli pXciXf9MFdfQnCP12YubPS7rry+5S8/JiEyYA0XCAuy33xeXzMg2kFiGOPb2Y8RoWxZ/ QYPZoMl8Yst8d6xTw9WDh0+xhpENt++TXB0SdS9/kNycCOhXY6yccmzIdJEUe7HB83C5 yqTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=OHCOK+V0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6si3946847ejr.274.2019.09.22.12.09.38; Sun, 22 Sep 2019 12:10:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=OHCOK+V0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392034AbfITWkb (ORCPT + 99 others); Fri, 20 Sep 2019 18:40:31 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40437 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390810AbfITWkb (ORCPT ); Fri, 20 Sep 2019 18:40:31 -0400 Received: by mail-pf1-f193.google.com with SMTP id x127so5462787pfb.7 for ; Fri, 20 Sep 2019 15:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=qpo1CPqc73MCadVo8iRju2Ls/5Qlein+jmhvtvLiZqY=; b=OHCOK+V0HKEyBFqOJ32B3ABP50mz0poRDGAM4/FfFIrfiImdUTCHk+RaUb6ter2Yl5 +Et1oYNNUkR+uOTJkaKKY0IEaojK2nUTV1L+l60d4hWIc/lqSm9GVJEkoHnfUvQyPi5M juollKtqCpYuPTpDCLlLKy0M/AmdwOSAHC1qg7bfTt+sxiwTWkJGxvx3SLVAPFsedxq4 EHXXoib7FuHxCyHCiAQ/xfZ8Ds7AMkJAtSbplkIfzN58pf74LUcPaguQeSs024cUPimZ Wzwg+bhFvXToTKCTuDJFkglFJfP4lH2p5Z7JOIFNLQe9AKKIrsXMrt6SqN9a+3288815 m55A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=qpo1CPqc73MCadVo8iRju2Ls/5Qlein+jmhvtvLiZqY=; b=k3pVNq2uhNqGEZF74KzQhNnSDlQItAoxzSCZW5sEO/Wcm+Ev7fIndZd9yoX0LevMtV UruiPZmzolRVKCk0usyw8GfXLnSSe3YdS5iDfB2GZQNcjpiMF2BJ4w4EJmKd5JYc/VBV lWjGsLcYgfVVoss3LjhIl1mJR59OWIe2iTkv9twAmkePremE0+wUroj5UeP4imIAGbM1 JR4YkmYqUOoDAZPic/+X78m0nsne1bFKGrq+7q29rffVRovVOZMD/WJpl3gwbkjKsX5P 6DL69oU9Dym2Llsrfj76H3Ig8gLnzc3bpfWdAo0HcBKUCILnpAPmlmjkeHZDUq0BOKVZ WDzQ== X-Gm-Message-State: APjAAAXtKAdAT0VsCyhCJdccWOIHJWOy9AW5ZsEgBJf8iX55bpZyJ8eX RCjTYpEhbG7T7EBPFch7+OopQg== X-Received: by 2002:a62:fc46:: with SMTP id e67mr20195478pfh.153.1569019230813; Fri, 20 Sep 2019 15:40:30 -0700 (PDT) Received: from localhost ([2607:fb90:5de:df7b:9794:c3bf:6169:a06c]) by smtp.gmail.com with ESMTPSA id b16sm5242640pfb.54.2019.09.20.15.40.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 15:40:29 -0700 (PDT) Date: Fri, 20 Sep 2019 15:40:29 -0700 (PDT) X-Google-Original-Date: Fri, 20 Sep 2019 15:35:11 PDT (-0700) Subject: RE: [RFC] buildtar: add case for riscv architecture In-Reply-To: CC: Anup Patel , Troy Benjegerdes , Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org From: Palmer Dabbelt To: mail@aurabindo.in Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Sep 2019 02:35:10 PDT (-0700), mail@aurabindo.in wrote: > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Sunday, September 15, 2019 12:57 AM, Palmer Dabbelt wrote: > >> On Sat, 14 Sep 2019 06:05:59 PDT (-0700), Anup Patel wrote: >> >> > > -----Original Message----- >> > > From: linux-kernel-owner@vger.kernel.org > > > owner@vger.kernel.org> On Behalf Of Palmer Dabbelt >> > > Sent: Saturday, September 14, 2019 6:30 PM >> > > To: mail@aurabindo.in >> > > Cc: Troy Benjegerdes troy.benjegerdes@sifive.com; Paul Walmsley >> > > paul.walmsley@sifive.com; aou@eecs.berkeley.edu; linux- >> > > riscv@lists.infradead.org; linux-kernel@vger.kernel.org; linux- >> > > kbuild@vger.kernel.org >> > > Subject: Re: [RFC] buildtar: add case for riscv architecture >> > > On Wed, 11 Sep 2019 05:54:07 PDT (-0700), mail@aurabindo.in wrote: >> > > >> > > > > None of the available RiscV platforms that I’m aware of use compressed >> > > > > images, unless there are some new bootloaders I haven’t seen yet. >> > > > >> > > > > >> > > > >> > > > I noticed that default build image is Image.gz, which is why I thought its a >> > > > good idea to copy it into the tarball. Does such a copy not make sense at this >> > > > point ? >> > > >> > > Image.gz can't be booted directly: it's just Image that's been compressed >> > > with the standard gzip command. A bootloader would have to decompress >> > > that image before loading it into memory, which requires extra bootloader >> > > support. >> > > Contrast that with the zImage style images (which are vmlinuz on x86), which >> > > are self-extracting and therefor require no bootloader support. The >> > > examples for u-boot all use the "booti" command, which expects >> > > uncompressed images. >> > > Poking around I couldn't figure out a way to have u-boot decompress the >> > > images, but that applies to arm64 as well so I'm not sure if I'm missing >> > > something. >> > > If I was doing this, I'd copy over arch/riscv/boot/Image and call it >> > > "/boot/image-${KERNELRELEASE}", as calling it vmlinuz is a bit confusing to >> > > me because I'd expect vmlinuz to be a self-extracting compressed >> > > executable and not a raw gzip file. >> > >> > On the contrary, it is indeed possible to boot Image.gz directly using >> > U-Boot booti command so this patch would be useful. >> > Atish had got it working on U-Boot but he has deferred booti Image.gz >> > support due to few more dependent changes. May be he can share >> > more info. >> >> Oh, great. I guess it makes sense to just put both in the tarball, then, as >> users will still need to use the Image format for now. >> > > Uncompressed vmlinux is already copied by default. This patch just adds the > Image.gz into the archive as vmlinuz. But as you said, since the name vmlinuz is > reserved for self extracting archives, should I keep the original name Image.gz ? vmlinux is not the same as Image: vmlinux is an ELF file that can't be loaded directly by most bootloaders, Image is a mostly-flat binary with a small header that we're expecting can be booted by most bootloaders.