Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2019 16:18:10 +0200 (CEST)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        Jeffrey Bowers <khantroll@gmail.com>
Cc:        Per Hedeland <per@hedeland.org>, Russell Haley <russ.haley@gmail.com>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: building ports-mgmt/pkg - Re: svn timeout - Re: Espressobin anyone ?
Message-ID:  <695531275.4.1566915490187@localhost>
In-Reply-To: <CAAkMUSVtTioaKf=ER1E0WNqEUcUrsY0xv9COGBzFHW9CUBMwvg@mail.gmail.com>
References:  <E73AFF5D-43CA-41A7-BDBA-ADEF2D342479@deepcore.dk> <CAAkMUSXd2zQQcYWDZnmibTQzLe%2BUV8rH6pk5fr=oZvevAY%2BHOQ@mail.gmail.com> <6DA8E736-8031-4BF7-8B20-CF8B0E8A7FEF@gmail.com> <CAAkMUSVRxbDBYtX0g7xbu4kLtiYQiZhjh0bdSwbCahF%2BjmTUXg@mail.gmail.com> <CAAkMUSVWWjYviHbOUXuHPxJYoahUnitdNazyusH=zGvbW1RAnw@mail.gmail.com> <ABB6B2F0-7771-49CD-84CF-B00D061EEF60@gmail.com> <CAAkMUSUfKN8Jqe7U40z9O1ypb=WuMWfgGtbnq7jLFPjp5qQfqQ@mail.gmail.com> <CAAkMUSV4p1uQOi%2Bt7b-z0uG8kjVY3qZhFd4B7fP1BjOWVRYqTA@mail.gmail.com> <BC161A1F-DC68-4AD3-BD28-1028E4BF7CCD@gmail.com> <CAAkMUSVGZCxgoTc%2BfBgsuR-DKiwUm8gKe49W-2%2BhH2PqRc%2Bg2A@mail.gmail.com> <CAAkMUSW6Oa-RE4MFMKghn3XfMN5tL0MQE=z1h5jO8H7=XS8%2BXA@mail.gmail.com> <2002575095.53.1566305166664@localhost> <CAAkMUSWv%2B0m29Epy0ZA1rnbLTJ2XkNTG2aSN7e11eGxE-3tYXw@mail.gmail.com> <op.z6t4g5ajkndu52@sjakie> <CAAkMUSUr56Dv8S6syPtf=yfUkiiykJxoVNexaVv5KHwRvJ29yg@mail.gmail.com> <op.z65emajykndu52@sjakie> <CABx9NuTWYM4j1wwLEEqcyftyV=bRaPSm4a9GjiwV4OfneXqQSg@mail.gmail.com> <4168768c-3c9d-f813-97b8-fe0d0538fef2@hedeland.org> <CAAkMUSVtTioaKf=ER1E0WNqEUcUrsY0xv9COGBzFHW9CUBMwvg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I have /usr/ports/Templates/BSD.local.dist. Sorry, I don't know what is wrong building pkg.

BTW: next to svn checkout you can also use portsnap to get a /usr/ports tree.

# Fetch and extract the ports tree:
portsnap auto

I think this needs to work on an empty /usr/ports directory.


And if you run '/usr/sbin/pkg update' it will automaticly install net-mgmt/pkg from pkgs and use that afterwards.


But maybe you have your reasons to build this from scratch.

Regards,
Ronald.

 
Van: Jeffrey Bowers <khantroll@gmail.com>
Datum: dinsdag, 27 augustus 2019 04:21
Aan: Per Hedeland <per@hedeland.org>
CC: Russell Haley <russ.haley@gmail.com>, Ronald Klop <ronald-lists@klop.ws>, freebsd-arm <freebsd-arm@freebsd.org>
Onderwerp: Re: svn timeout - Re: Espressobin anyone ?
> 
> Using SVN instead of HTTP did it. Thanks guys! 
> Now I'm on to a new problem. After the checkout finished, I navigated to "usr/ports/ports-mgmt/pkg" and ran "make install clean" to compile pkg. However, it exited with error one and said "/usr/ports/templates/bsd.local.dist: no such file or directory" 
>  
> Any idea what bsd.local.dist is, and how I can get it? 
>  
> On Mon, Aug 26, 2019 at 7:09 PM Per Hedeland <per@hedeland.org> wrote:
>> On 2019-08-26 23:58, Russell Haley wrote:
>> > On Mon, Aug 26, 2019 at 2:15 PM Ronald Klop <ronald-lists@klop.ws> wrote:
>> >
>> >> On Fri, 23 Aug 2019 00:27:00 +0200, Jeffrey Bowers <khantroll@gmail.com>
>> >> wrote:
>> >>
>> >>> No, unfortunately it still ends in an E000060: Operation timed out.
>> >>> However, there are files and directories in my local ports directory,
>> >>>> so it's downloading at least some things.
>> >>
>> >>
>> >> One more option I can think of.
>> >>    svn checkout svn://svn.freebsd.org/ports/head
>> >
>> >
>> > I reverted to using the svn protocol many moons ago because http wouldn't
>> > work at all. The svn protocol still fails a few times on any given
>> > checkout, but re-starting the checkout picks up where it left off. I always
>> > build on a PC so it's not a slow SD card problem, it seems to be a long
>> > standing issue retrieving source code.
>> >
>> > Just my observation,
>> > Russ
>> >
>> >>
>> >>
>> >> So not svn+ssh://, but only svn://. I just noticed my RPI3 uses that for
>> >> sources.
>> >>
>> >> Something else I have seen in the past is that the local disk (like a
>> >> cheap SD-card) can be too slow and causes timeouts because SVN can't
>> >> write
>> >> fast enough to keep the network busy. Which might happen earlier if you
>> >> checkout using https compared to the svn-protocol.
>> 
>> Just another data point - I encountered this exact problem recently,
>> while trying to checkout (base, not ports) directly onto a USB stick,
>> using https. It was very slow, and eventually svn reported an error
>> regarding the reception of data (unfortunately I didn't record the
>> exact code or message). Did the checkout to a directory on a SATA disk
>> instead, still using https - worked fine - and then tarred the tree
>> over to the USB stick - took forever, but also worked fine. So clearly
>> the server may lose patience if the transfer is too slow...:-) I
>> haven't retried the checkout-directly-to-USB-stick using svn instead
>> of https, though.
>> 
>> --Per
>> 
>> >> 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"> 
From owner-freebsd-arm@freebsd.org  Tue Aug 27 18:45:23 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 A5C9BDC33E
 for <freebsd-arm@mailman.nyi.freebsd.org>;
 Tue, 27 Aug 2019 18:45:23 +0000 (UTC)
 (envelope-from ronald-lists@klop.ws)
Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl
 [195.190.28.88])
 (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 46HyVV1kCmz4Bwf
 for <freebsd-arm@freebsd.org>; Tue, 27 Aug 2019 18:45:21 +0000 (UTC)
 (envelope-from ronald-lists@klop.ws)
Received: from smtp.greenhost.nl ([213.108.110.112])
 by smarthost1.greenhost.nl with esmtps
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89)
 (envelope-from <ronald-lists@klop.ws>)
 id 1i2gSU-0006km-4d; Tue, 27 Aug 2019 20:45:18 +0200
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
To: "Ricky Zhang" <zhangchaowang@gmail.com>
Cc: freebsd-arm@freebsd.org
Subject: Re: How to change rootfs from official RPI3 image
References: <0FC8815E-58D7-4196-BF7E-0D6B127B314D@gmail.com>
 <1668312327.7.1566381369480@localhost>
 <C5D66D8B-05F2-445A-92A5-CD463B393EEA@gmail.com>
 <61580006.14.1566389702495@localhost>
 <D815D0C1-E17A-412F-AEF0-772E7B1DE857@gmail.com>
Date: Tue, 27 Aug 2019 20:44:46 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: Quoted-Printable
From: "Ronald Klop" <ronald-lists@klop.ws>
Message-ID: <op.z662cwh9kndu52@sjakie>
In-Reply-To: <D815D0C1-E17A-412F-AEF0-772E7B1DE857@gmail.com>
User-Agent: Opera Mail/12.16 (FreeBSD)
X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1
X-Virus-Scanned: by clamav at smarthost1.samage.net
X-Spam-Level: /
X-Spam-Score: -0.2
X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,
 BAYES_50 autolearn=disabled version=3.4.2
X-Scan-Signature: 022391b6662f8d3d3651bc2c02bd3aec
X-Rspamd-Queue-Id: 46HyVV1kCmz4Bwf
X-Spamd-Bar: ---
Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none;
 spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates
 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws
X-Spamd-Result: default: False [-3.45 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[];
 TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain];
 DMARC_NA(0.00)[klop.ws]; TO_MATCH_ENVRCPT_SOME(0.00)[];
 NEURAL_HAM_SHORT(-0.94)[-0.936,0]; RCPT_COUNT_TWO(0.00)[2];
 RCVD_IN_DNSWL_NONE(0.00)[88.28.190.195.list.dnswl.org : 127.0.10.0];
 IP_SCORE(-0.71)[ip: (-1.07), ipnet: 195.190.28.0/24(-0.37), asn: 47172(-2.14),
 country: NL(0.01)]; FREEMAIL_TO(0.00)[gmail.com];
 FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[];
 MID_RHS_NOT_FQDN(0.50)[];
 ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL];
 MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[];
 RCVD_COUNT_TWO(0.00)[2]
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, 27 Aug 2019 18:45:23 -0000

On Sat, 24 Aug 2019 12:15:35 +0200, Ricky Zhang <zhangchaowang@gmail.com=
>  =

wrote:

> Hi Ronald,
>
> After migrating to UFS, I read from BSD Journal May/2019  =

> (https://www.freebsdfoundation.org/past-issues/freebsd-for-makers/).  =

> RPI3 can boot from ZFS rootfs.
>
> So I tried it on my own (see the step details below in method 2):
>
> https://github.com/rickyzhang82/FreeBSDWiki/wiki/1.-Migrate-SD-card-ro=
otfs-to-SSD-for-RPI3#method-2-sd-card-kernel-boot--ssd-zfs-rootfs
>
> Unfortunately, it hangs when try to mount root from dataset tank/rootf=
s.
>
> I read between lines that the the author in the BSD Journal only mount=
  =

> /var and /usr from ZFS dataset. The rest of rootfs still comes from SD=
  =

> card ufs partition.
>
> My way moved the whole rootfs and home to tank/rootfs and tank/home  =

> dataset. When it boots, I saw my USB SSD LED is flashing periodically.=
  =

> The screen prints =E2=80=9CTry to mount root from tank/roofs[]...". It=
 seems to  =

> me that the kernel struggled to find the zpool from SSD. I saw that zf=
s  =

> module gets loaded properly from the screen. I have added two module i=
n  =

> /boot/loader.conf as Internet suggest:
>
> ...
> opensolaris_load=3D"YES"
> zfs_load=3D"YES=E2=80=9D
> ...
>
> If I unplug USB SSD without any settings change, hit Ctrl-C. I can  =

> override mount root from command line at run time with "ufs:ufs/rootfs=
=E2=80=9D  =

> rathe than =E2=80=9Czfs:tank/rootfs". Then I can boot from SD card as =
before.  =

> Once I login, I can run zfs list and show both tank/rootfs and tank/ho=
me  =

> data set. So that confirmed my ZFS pool can be found. But somehow the =
 =

> boot process messed up somewhere.
>
> Do you have any suggestion?
>
> thanks
> Ricky

Mmm, I'm not sure. It is a pretty trivial setup. I think the error is in=
  =

the details. Trying this question on the freebsd-fs@ mailinglist might  =

help.
Do you get an error? Or is it waiting indefinitely?

What is the output of 'zfs get mountpoint'?

If you set vfs.root.mountfrom=3D"zfs:tank/rootfs" than you don't need to=
  =

specify / in /etc/fstab.
And ZFS will automatically mount the subdirs of rootfs depending on the =
 =

mountpoint setting of the ZFS volumes.

You might need to set:
zfs set mountpoint=3Dlegacy tank/rootfs
zfs set mountpoint=3D/home tank/home

If you want to test this you can use 'zpool import -R /mnt/tank tank' to=
  =

temporarily mount everything under the /mnt/tank subdirs.

BTW opensolaris_load is not necessary. It is a dependency of zfs_load.

Ronald.


>
>
>> On Aug 21, 2019, at 8:15 AM, Ronald Klop <ronald-lists@klop.ws> wrote=
:
>>
>> Thanks. I will not take the credits for the idea though. :-)
>> The FreeBSD wiki has some more examples of similar setups:
>> https://wiki.freebsd.org/ZFSOnRoot describes how to do /boot on UFS a=
nd  =

>> the rest on ZFS, which is similar to /boot on SD-card and the rest on=
  =

>> SSD.
>> https://wiki.freebsd.org/RootOnZFS/UFSBoot
>>
>> Nice that you made a write up also. More exposure for FreeBSD is alwa=
ys  =

>> a good thing. :-)
>>
>> Good luck and keep hacking.
>>
>> Ronald.
>> Van: Ricky Zhang <zhangchaowang@gmail.com>
>> Datum: woensdag, 21 augustus 2019 13:16
>> Aan: Ronald Klop <ronald-lists@klop.ws>
>> CC: freebsd-arm@freebsd.org
>> Onderwerp: Re: How to change rootfs from official RPI3 image
>>
>> Your idea is brilliant. It solved the dilemma.
>>
>> Ricky@router ~ $ sudo cat /etc/fstab
>> # Custom /etc/fstab for FreeBSD embedded images
>> /dev/ufs/rootfs   /bootdir       ufs     rw      1       1
>> /dev/label/gpt/ssdrootfs   /       ufs     rw      1       1
>> /dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0
>> tmpfs /tmp tmpfs rw,mode=3D1777,size=3D50m 0 0
>>
>> Ricky@router ~ $ mount
>> /dev/label/gpt/ssdrootfs on / (ufs, local, soft-updates)
>> devfs on /dev (devfs, local, multilabel)
>> /dev/ufs/rootfs on /bootdir (ufs, local, soft-updates)
>> /dev/msdosfs/MSDOSBOOT on /bootdir/boot/msdos (msdosfs, local, noatim=
e)
>> tmpfs on /tmp (tmpfs, local)
>>
>> I wrote the whole thing down in my wiki:  =

>> https://github.com/rickyzhang82/FreeBSDWiki/wiki/1.-Migrate-SD-card-r=
ootfs-to-SSD-for-RPI3
>>
>> Thanks
>>
>> Ricky
>>
>> On Aug 21, 2019, at 5:56 AM, Ronald Klop <ronald-lists@klop.ws> wrote=
:
>>
>> Sorry, I did only reply to the mailinglist. I will use reply-all now.=

>>
>> You are right about uboot finding /boot/kernel and /boot/loader.conf.=

>>
>> What you need to do is mount the SD-card on /bootdir; in fstab:
>> /dev/yoursdcard /bootdir ufs rw,noatime 1 2
>>
>> And a symlink from /boot -> /bootdir/boot on your SSD.
>>
>> Then installworld/installkernel will do the proper thing.
>> So the complete /boot stays on the SD-card.
>>
>> Regards,
>>
>> Ronald.
>> Van: Ricky Zhang <zhangchaowang@gmail.com>
>> Datum: woensdag, 21 augustus 2019 04:58
>> Aan: freebsd-arm@freebsd.org
>> Onderwerp: Re: How to change rootfs from official RPI3 image
>>
>> > 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  =

>> <https://www.freshports.org/sysutils/u-boot-rpi3>;
>> > http://www.denx.de/wiki/U-Boot <http://www.denx.de/wiki/U-Boot>;
>> >
>> > Regards,
>> > Ronald.
>>
>>
>> Hi Ronald,
>>
>> Sorry, if I messed up the mailing list thread. I didn=E2=80=99t recei=
ve your  =

>> email directly. Instead, I got your reply from daily digest. I have t=
o  =

>> copy subject and quote your reply manually in my email client. I have=
  =

>> no idea how to fix it after reading all FAQ  =

>> (https://www.freebsd.org/doc/en_US.ISO8859-1/articles/mailing-list-fa=
q/article.html#etiquette  =

>> <https://www.freebsd.org/doc/en_US.ISO8859-1/articles/mailing-list-fa=
q/article.html#etiquette>).  =

>> Any other mailing list I subscribed didn=E2=80=99t work this way...
>>
>> In any case, the magic works. I did rsync:
>>
>> rsync -aAXvr --progress --delete /* /mnt/USB \
>>     --exclude=3D'/boot/msdos/*' \
>>     --exclude=3D'/dev/*' \
>>     --exclude=3D'/proc/*' \
>>     --exclude=3D'/net/*' \
>>     --exclude=3D'/tmp/*' \
>>     --exclude=3D'/mnt/*' \
>>     --exclude=3D'/media/*'
>>
>> I confirmed that it mount ssd as rootfs:
>>
>> Ricky@router ~ $ df -h
>> Filesystem                  Size    Used   Avail Capacity  Mounted on=

>> /dev/label/gpt/ssdrootfs    407G    5.5G    369G     1%    /
>> devfs                       1.0K    1.0K      0B   100%    /dev
>> /dev/msdosfs/MSDOSBOOT       50M     13M     37M    26%    /boot/msdo=
s
>> tmpfs                        50M    4.0K     50M     0%    /tmp
>>
>> As you said, kernel still comes from SD card. I don=E2=80=99t fully u=
nderstand  =

>> the FreeBSD boot process. Neither am I familiar with UEFI.
>>
>> - I guess /boot/msdos/uboot.bin finds the SD card roofs system. Load =
 =

>> the kernel from /boot/kernel in SD card and scan /boot/loader.conf to=
  =

>> find the rootfs. Please correct me if I=E2=80=99m wrong.
>> - Should I remove /boot folder from SSD to avoid confusion?
>> - Are there any guide how to compile and deploy kernel?
>>
>>
>>
>>
>> _______________________________________________
>> 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=
"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695531275.4.1566915490187>