Date: Tue, 20 Aug 2019 09:49:53 +0200 (CEST) From: Ronald Klop <ronald-lists@klop.ws> To: freebsd-arm@freebsd.org Subject: Re: How to change rootfs from official RPI3 image Message-ID: <1782739482.1.1566287393414@localhost> In-Reply-To: <CAB_OnHM7C39downB0QxUUtG3_sf8fiVu=2w91=q-gwczYBS9VQ@mail.gmail.com> References: <CAB_OnHM7C39downB0QxUUtG3_sf8fiVu=2w91=q-gwczYBS9VQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Van: Ricky Zhang <zhangchaowang@gmail.com> Datum: dinsdag, 20 augustus 2019 04:18 Aan: freebsd-arm@freebsd.org Onderwerp: How to change rootfs from official RPI3 image > > Hi, > > I dd a FreeBSD 12.0 RPI3 image to a SD card. Everything works like a charm > on my RPI3. > > But I want to switch rootfs to a larger USB hard drive. The boot partition > contains one configurable text file config.txt. I can't google how the > uboot load kernel from the rootfs partition. To my surprise, the FreeBSD > kernel is in the rootfs partition. > > Is this u-boot pieces open source? Where are the user guide documents? The > only document I could find provides no technical details in boot sequence. > > thanks, > Ricky > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > > > Hi, I have it arranged that the kernel is loaded from the SD card, but the rest of the system is from an SSD via USB. In /etc/fstab: /dev/gpt/ssdrootfs / ufs rw,noatime 1 1 /dev/ufs/rootfs /bootdir ufs rw,noatime 1 2 /dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 2 And a symlink from /boot -> /bootdir/boot In /boot/loader.conf: vfs.root.mountfrom="ufs:/dev/gpt/ssdrootfs" kern.cam.boot_delay="20000" My 2 cents. Regards, Ronald. From owner-freebsd-arm@freebsd.org Tue Aug 20 08:09:54 2019 Return-Path: <owner-freebsd-arm@freebsd.org> Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75A61CA5F4 for <freebsd-arm@mailman.nyi.freebsd.org>; Tue, 20 Aug 2019 08:09:54 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46CNkT1cQHz43B8 for <freebsd-arm@freebsd.org>; Tue, 20 Aug 2019 08:09:52 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Tue, 20 Aug 2019 10:09:51 +0200 (CEST) From: Ronald Klop <ronald-lists@klop.ws> To: freebsd-arm@freebsd.org Message-ID: <1006930075.14.1566288591351@localhost> In-Reply-To: <1782739482.1.1566287393414@localhost> References: <CAB_OnHM7C39downB0QxUUtG3_sf8fiVu=2w91=q-gwczYBS9VQ@mail.gmail.com> <1782739482.1.1566287393414@localhost> Subject: Re: How to change rootfs from official RPI3 image MIME-Version: 1.0 X-Mailer: Realworks (471.10.dac909626d7) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 46CNkT1cQHz43B8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.69 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[klop.ws]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; IP_SCORE(-0.06)[ipnet: 194.109.0.0/16(-0.16), asn: 3265(-0.13), country: NL(0.01)]; NEURAL_HAM_SHORT(-0.84)[-0.838,0]; RCVD_IN_DNSWL_NONE(0.00)[24.157.109.194.list.dnswl.org : 127.0.15.0]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; MIME_TRACE(0.00)[0:+,1:+,2:~] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." <freebsd-arm.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-arm>, <mailto:freebsd-arm-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arm/> List-Post: <mailto:freebsd-arm@freebsd.org> List-Help: <mailto:freebsd-arm-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-arm>, <mailto:freebsd-arm-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 20 Aug 2019 08:09:54 -0000 Van: Ronald Klop <ronald-lists@klop.ws> Datum: dinsdag, 20 augustus 2019 09:49 Aan: freebsd-arm@freebsd.org Onderwerp: Re: How to change rootfs from official RPI3 image > > > Van: Ricky Zhang <zhangchaowang@gmail.com> > Datum: dinsdag, 20 augustus 2019 04:18 > Aan: freebsd-arm@freebsd.org > Onderwerp: How to change rootfs from official RPI3 image > > > > Hi, > > > > I dd a FreeBSD 12.0 RPI3 image to a SD card. Everything works like a charm > > on my RPI3. > > > > But I want to switch rootfs to a larger USB hard drive. The boot partition > > contains one configurable text file config.txt. I can't google how the > > uboot load kernel from the rootfs partition. To my surprise, the FreeBSD > > kernel is in the rootfs partition. > > > > Is this u-boot pieces open source? Where are the user guide documents? The > > only document I could find provides no technical details in boot sequence. > > > > thanks, > > Ricky > > _______________________________________________ > > freebsd-arm@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > > > > > > > > Hi, I have it arranged that the kernel is loaded from the SD card, but the rest of the system is from an SSD via USB. > > In /etc/fstab: > /dev/gpt/ssdrootfs / ufs rw,noatime 1 1 > /dev/ufs/rootfs /bootdir ufs rw,noatime 1 2 > /dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 2 > > And a symlink from /boot -> /bootdir/boot > > In /boot/loader.conf: > vfs.root.mountfrom="ufs:/dev/gpt/ssdrootfs" > kern.cam.boot_delay="20000" > > My 2 cents. > > Regards, > Ronald. > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > > > BTW: Yes, u-boot is opensource: /usr/ports/sysutils/u-boot-rpi3 There are sysutils/u-boot-* ports for different system. With sysutils/u-boot-master as the main part of it. https://www.freshports.org/sysutils/u-boot-rpi3 http://www.denx.de/wiki/U-Boot Regards, Ronald. From owner-freebsd-arm@freebsd.org Tue Aug 20 11:38:36 2019 Return-Path: <owner-freebsd-arm@freebsd.org> Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63FACCF069 for <freebsd-arm@mailman.nyi.freebsd.org>; Tue, 20 Aug 2019 11:38:36 +0000 (UTC) (envelope-from per@hedeland.org) Received: from outbound1f.eu.mailhop.org (outbound1f.eu.mailhop.org [52.28.59.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46CTMG50gtz4FMv for <freebsd-arm@freebsd.org>; Tue, 20 Aug 2019 11:38:34 +0000 (UTC) (envelope-from per@hedeland.org) ARC-Seal: i=1; a=rsa-sha256; t=1566301112; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=h/09w8tuDcojQNxQqNds1hkTPD0OdxtcGsAJwVA2JmgU4fEJHSAO7j7ZDIU+cjekFTgTUCrUabj3O OXJP3hxDp0W5VaeimK15nnfpGuH4bWdP+qACkYMdXonjb0TqhtZReRj8PxVtXky/GF6CxezVpvy34i PRz3mpluel/KimVxLznfdVUBJj9S+2TuwXUxPRQUHfyuJSpCORAJh0lYPd2KCYR64nMcN4gYjIGzu8 /N/CEenF8U6WI0gJRlbbxgP4OGWBfYtXcrt+S+2K7k0edJcK9NXU1KJo9dImSx4PgkiBSG2SUVl7wG z8t3qhQG9sptrfS16gMv1d+Peh4/Saw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:cc:to:subject:dkim-signature:from; bh=bD9mFAOhMY3UWBI7gDewz93Le3Oym8Z+o1hmbUXepCw=; b=cEpuZCaRWvtR8R/Dlt2FsO2oOXoS41Q7mSamneFty09NkfSZp3kCAYvPEHDCYJX+NEA5sNHPQw0WS +zEwycAkVbLLBZUtGAz7NaNIAE63AHhkGwWU+QW3FkRhkq1VQ9HFPWejPCAmJYz3gOgRBWGEZZ1IeP TSBKu6nJP+fKRn0FtOD9TGDHFCIDwWQ32dPmWPmrJRmAS3Rbs8bkIDKEsI01tzkLzDr20nSHKgDgqb DVODm1Cz7Gdyca3ccSJY6reaPyEmEbPanvyQcX0ydlJi7bW7Rhw3MdTmVdYMcuPQpqWTbgKAXlTBoE Oh3aWiySN8haun7yt6OlMxxZiFkcsLQ== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=none smtp.mailfrom=hedeland.org smtp.remote-ip=81.228.157.209; dmarc=none header.from=hedeland.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:cc:to:subject:from; bh=bD9mFAOhMY3UWBI7gDewz93Le3Oym8Z+o1hmbUXepCw=; b=C1rpgfqt/8vg6HAcqW5V56XXHbgoaMGtLlKXcFbsYlnqvQqehDCLzd6Nl7N2DOQontbs+zeHtY7K/ rx82oNfPaIWEQDN3yg0GRkTMBO21zYuujAdjqYjIMPL1UlOmBYo0+8WvGGw1TGA9wpl+OSSmgfvfQx Pt1bSc3xUwqkOUNtADfbj/cO4hb6u9HV6/XM2e3JzSC+MCKZZ5bxTKh/rrwj37bquCcpjtAoy+dusy MDs9mKggFd8OLcqjpdSxWcH1NEoHPDK9p7Pio+LpuaHu4QUcrGDcWH19iLo1D6vZUCnwSz3EUH3/YR 1Lt2fYzgYn2SrBOsSAmeTvuD8a/GVVQ== X-MHO-RoutePath: cGVyaGVkZWxhbmQ= X-MHO-User: 079cd59a-c33f-11e9-a204-f5e3bb5d0a28 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 81.228.157.209 X-Mail-Handler: DuoCircle Outbound SMTP Received: from hedeland.org (unknown [81.228.157.209]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id 079cd59a-c33f-11e9-a204-f5e3bb5d0a28; Tue, 20 Aug 2019 11:38:29 +0000 (UTC) Received: from plutt.hedeland.org (82-209-140-38.cust.bredband2.com [82.209.140.38]) (authenticated bits=0) by tellus.hedeland.org (8.15.2/8.15.2) with ESMTPSA id x7KBcRK6062124 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 20 Aug 2019 13:38:28 +0200 (CEST) (envelope-from per@hedeland.org) X-Authentication-Warning: tellus.hedeland.org: Host 82-209-140-38.cust.bredband2.com [82.209.140.38] claimed to be plutt.hedeland.org Subject: Re: Is it a good idea to use a usb-serial adapter for PPS? Yes, it is. To: Hans Petter Selasky <hps@selasky.org>, Ian Lepore <ian@freebsd.org> Cc: freebsd-arm@freebsd.org References: <alpine.BSF.2.21.99999.352.1908071046410.98975@autopsy.pc.athabascau.ca> <69a9bed3-4d0a-f8f6-91af-a8f7d84ee307@hedeland.org> <345bae77417c2495f55799b4c7ca2784f4ece9ed.camel@freebsd.org> <7312032d-2908-9414-0445-6b442c3a02e5@hedeland.org> <523b6f0a0fa5f2aeec298fa74df25d3c4af66acc.camel@freebsd.org> <0426fc8b-5398-d8ab-561e-7823c24403a5@hedeland.org> <24b0eaf25b64d6098b390df092866c69e352d859.camel@freebsd.org> <16c91be1-6f2a-b26d-22c7-be8e4ba8eec0@hedeland.org> <72a964c78cbfc36be2345919633ca2196f0783e3.camel@freebsd.org> <fe2c2d77-3030-6734-e1d8-c1375f231a24@hedeland.org> <cd1b38bb0b8873af96a41bce1b03676f735ae3f9.camel@freebsd.org> <540c8b5f-5e81-b67b-4a00-49b86044efe0@selasky.org> From: Per Hedeland <per@hedeland.org> Message-ID: <8e28c96e-92c6-5beb-277f-0876a5aba272@hedeland.org> Date: Tue, 20 Aug 2019 13:38:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <540c8b5f-5e81-b67b-4a00-49b86044efe0@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46CTMG50gtz4FMv X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=outbound.mailhop.org header.s=dkim-high header.b=C1rpgfqt; dmarc=none; spf=none (mx1.freebsd.org: domain of per@hedeland.org has no SPF policy when checking 52.28.59.28) smtp.mailfrom=per@hedeland.org X-Spamd-Result: default: False [-5.53 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[outbound.mailhop.org:+]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; RECEIVED_SPAMHAUS_PBL(0.00)[209.157.228.81.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11,38.140.209.82.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(-1.00)[i=1]; IP_SCORE(-1.26)[ipnet: 52.28.0.0/16(-4.88), asn: 16509(-1.35), country: US(-0.05)]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[outbound.mailhop.org:s=dkim-high]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:16509, ipnet:52.28.0.0/16, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[hedeland.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[28.59.28.52.list.dnswl.org : 127.0.20.0]; R_SPF_NA(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." <freebsd-arm.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-arm>, <mailto:freebsd-arm-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arm/> List-Post: <mailto:freebsd-arm@freebsd.org> List-Help: <mailto:freebsd-arm-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-arm>, <mailto:freebsd-arm-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 20 Aug 2019 11:38:36 -0000 On 2019-08-19 09:20, Hans Petter Selasky wrote: > On 2019-08-18 23:57, Ian Lepore wrote: >> I think HPS reads the arm@ list, but I'll cc him directly on this >> reply, just in case he has time to weigh in on this stuff. > > Hi, > > I'm subscribed. > > The behaviour of BULK transfers depend on the actual USB host controller manufacturer. > > USB transfers are executed by priority, typically: > ISOCHRONOUS, INTERRUPT, CONTROL, BULK > > Depending on the endpoint descriptor, the service rate may vary. The minimum guarantee is to be serviced one time every 125us (for USB2.0). > > Completion interrupts are usually delayed a bit (63-125us for EHCI/XHCI, 1ms for USB 1.0 via UHCI/OHCI). > > The USB stack in FreeBSD does not have any memory allocations in the fast path and so is very quick to complete jobs. Also in user-space. I'm sorry, I'm afraid I still don't really understand... The question, at least in my mind, was whether polling was done in a "strictly periodic" fashion, at most once per 125 us for USB 2.0 - or whether the host controller would poll "as fast as it could", which could result in a *much* higher polling rate. As others too have pointed out, the size of the latency doesn't really matter for NTP as long as it is more or less constant (i.e. varies at most a few tens of us, preferably less). I can't see how polling with an interval of 125 us or more, based on the frequency of a crystal on the host, could achieve a variation that is smaller than the size of the polling interval. > Technically speaking, the time device could make predictions about when the packet is read from the USB buffer and when the USB host issues the completion interrupt. > > These adjustment values could be calibrated by some kind of ping protocol. This sounds like a method to determine a fixed latency - or am I misunderstanding? --Per
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1782739482.1.1566287393414>