Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp536888pxj; Thu, 10 Jun 2021 06:55:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywGrsckJLKwjxmZIqhw/CXHQpZXiQt75M64zuuCW57Be/ckWxPDbfaPNw1wq7smloGljog X-Received: by 2002:a17:906:4d04:: with SMTP id r4mr4712080eju.76.1623333348527; Thu, 10 Jun 2021 06:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623333348; cv=none; d=google.com; s=arc-20160816; b=wbXkglzgN9w+OQw9xZJK8k4r0UATeLdKQQWtg+btLk9E/BGy6yuOMPXaNBg6yh29Uu T50o8Ng9dJpy5XZx/OCo65ZZsE4/kdnMui4LoBBx06ZmlM5+OXbpcO64MG9TfyyAI1BH JSBH5GDUdvwRb4r7/96WxpBRve4uvbomA5u1wgG34VaPy8WfQcmYCrizz1qoD+ZwdUY5 Q7GC+FncirLYNl497S/wrGwO0ITyuZhstdwzGIfbb+byN0GbSNybHf81a5sYMi/8+Lyj gbfSZi0+A95aEUKgd8/3/MdENgSQItF364vWF/4mWyfXZWFktvnvZJ4Qtj2zfRW41q4x W9kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=P8NSHu+JSQAsmsxdal/UWVc19Z2u8izzr8xan18QXAs=; b=kB+8xR73Z8Nu77BmlQ5IwyURwb2Csmv90Y2i3leay5LCy272QYwW85RYXuElzohZ80 3pbNN+DGdYsgrNRG6bhV73Oxfsmnu2MhkruyRowOlCinPqUBf5Dmmq9gWoZr4H/gNb+J hKML4bHG3Xkd2Se0WNJiIaOofGrjDXjRkEChCcYXFk8cUqTKrf9OMBTuIeMzUGrR3xaz KSGOHQRa4Z7ghnVW0PWvWImNcJjPSwgeAHQGl33fs9JDaJlTnQEVXs3mzrCerM4ioPCK k63oGOMzKn9/UNP0TNPQHQxpF3RRhDyv9dsjyljZdK8LF4y7HC/TwsmYUd1cgkIYDowd xGcQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y21si2391853ejb.616.2021.06.10.06.55.24; Thu, 10 Jun 2021 06:55:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231266AbhFJNyc convert rfc822-to-8bit (ORCPT + 99 others); Thu, 10 Jun 2021 09:54:32 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:52316 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230490AbhFJNyb (ORCPT ); Thu, 10 Jun 2021 09:54:31 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 48A4C6108195; Thu, 10 Jun 2021 15:52:33 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id mdb_2wIHQ5WY; Thu, 10 Jun 2021 15:52:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id DB88961081AE; Thu, 10 Jun 2021 15:52:32 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZFDMESNVU0ar; Thu, 10 Jun 2021 15:52:32 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id B7A756108195; Thu, 10 Jun 2021 15:52:32 +0200 (CEST) Date: Thu, 10 Jun 2021 15:52:32 +0200 (CEST) From: Richard Weinberger To: Pintu Agarwal Cc: linux-kernel , linux-mtd , linux-fsdevel , Miquel Raynal Message-ID: <361047717.98543.1623333152629.JavaMail.zimbra@nod.at> In-Reply-To: References: <295072107.94766.1623262940865.JavaMail.zimbra@nod.at> Subject: Re: qemu: arm: mounting ubifs using nandsim on busybox MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF78 (Linux)/8.8.12_GA_3809) Thread-Topic: qemu: arm: mounting ubifs using nandsim on busybox Thread-Index: FCBZQEPb3fuCAU5mJvWAQ23NQZd17Q== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pintu, ----- Ursprüngliche Mail ----- > Von: "Pintu Agarwal" >> nandsim works as expected. It creates a new and *erased* NAND for you. >> So you have no UBI volumes. Therfore UBIFS cannot be mounted. >> I suggest creating a tiny initramfs that creates UBI volumes before mounting >> UBIFS on >> one of the freshly created (and empty) volumes. >> > oh sorry I forgot to mention this. > I am able to create and update volumes manually after booting the > system with initramfs. > {{{ > Creating rootfs volume: > mknod /dev/ubi0 c 250 0 > mknod /dev/ubi0_0 c 250 1 > ubiattach /dev/ubi_ctrl -m 2 > ubimkvol /dev/ubi0 -N rootfs -m > ubiupdatevol /dev/ubi0_0 ubifs-rootfs.img > mount -t ubifs ubi0:rootfs ubi-root/ > }}} > > But I wanted to do all these automatically during boot time itself. > Also I wanted to use ubinize.cfg as is from the original system and > simulate everything using qemu and nadsim (if possible) > So I thought it must be possible by setting some parameters in qemu such as: > mtdparts=nand:, > -device nand,chip_id=0x39,drive=mtd0, > -drive if=mtd,file=./ubi-boot.img,id=mtd0, > anything else ? Well, this has nothing to do with nandsim. If qemu can emulate a NAND chip (plus a controller) all you need is a driver on the Linux side. Thanks, //richrd