What platform do you use?

Sulev-Madis Silber (ketas) madis555 at hot.ee
Sat Aug 9 00:16:57 UTC 2014


On 2014-08-08 17:57, Mattia Rossi wrote:
> 
> Am 08.08.2014 15:35, schrieb Paul Mather:
>> On Aug 7, 2014, at 5:34 PM, Warner Losh <imp at bsdimp.com> wrote:
>>
>>> On Aug 7, 2014, at 2:34 PM, Sulev-Madis Silber (ketas)
>>> <madis555 at hot.ee> wrote:
>>>
>>>> On 2014-08-05 21:24, John-Mark Gurney wrote:
>>>>> I also have a BBW that I occasionally test w/ but since I haven't got
>>>>> it netbooting, the cost of building an entire image and writing it to
>>>>> SLOW microsd prevents me from testing as much...
>>>> I wonder why people like to update their embedded systems by taking
>>>> card
>>>> out, completely overwriting it with new data and putting card back in.
>>>> No wonder that it's slow, complex & heedlessly wears out your flash.
>>>>
>>>> If I do this in my BBB I would get myself pissed very soon because of
>>>> the effort required. I never bothered to netboot too, because I wanted
>>>> to test it in insecure network conditions.
>>>> I mean, I don't remember a case where I needed to take HDD to another
>>>> machine for upgrade. The issue where it's not practical to compile
>>>> something locally is completely unrelated with this, too.
>>> make installworld works too, as does extracting the binary sets. The
>>> new installer
>>> should work, but I’ve not tried it.
>> It would be handy for those of us wanting to cross-build FreeBSD/arm
>> for someone who is familiar with the build process to give a quick
>> example of how to update a FreeBSD/arm installation that is cross-built
>> on another system.  In the past, I've had the impression that the build
>> infrastructure on the target system sometimes needs to be in alignment
>> with the new kernel/world you're trying to install, and so NFS-mounting
>> /usr/src and /usr/obj or copying it to the target system fails to yield
>> a successful "make installworld" on the target system.  Maybe this is
>> no longer the case, as I believe great strides have been made in the
>> realm of cross-building.
>>
>> Up to now, I have largely used Crochet to build images for my R-PI and
>> BBB.  That's okay for initial install, but I'm much more familiar with
>> updating from source and would like to do that from then on.  In the
>> past, FreeBSD/arm has been too flaky for me to do a native build (I've
>> posted here about that in the past), but, besides that, it would be
>> nice to cut down the long native build times by cross-building on a
>> much faster system.
>>
>> I have an R-PI and BBB and would like to cross-build (for update
>> purposes) on my FreeBSD/amd64 10-STABLE system.  Could you post a known
>> way to do this?  I can NFS-mount from the FreeBSD/amd64 or else have it
>> put /usr/src and /usr/obj on an USB external hard drive that I can then
>> connect to my R-PI or BBB for updating.  Either is okay with me.
>>
>> Thanks in advance.
>>
>>
> The way I do it is cross-compiling everything needed on an ssh enabled
> remote machine, and installing it into a folder on that machine with
> DESTDIR=
> On my arm machine then as root I do
> "cd /"
> and
> "chflags -R noschg *"
> and
> "ssh user at host tar -cpf - /destdirfolder/* | tar -xpf - "
> And voilà, world is installed.
> I then copy the kernel from the obj dir to my boot partition via scp and
> reboot.
> Usually this works.
> 
> Cheers,
> 
> Mat

I use rsync for this. Avoids unneeded writes and is much faster in any
way. You want rsync with file flags patch for proper permissions sync
(and it's still bit buggy, so I created workaround). Since I don't make
any changes inside embedded system, I can just create full system
locally and have exact copy of it in another system where it actually
runs. I found that best way to create that locally is to unionfs-mount
all the dirs together, however it blows up when you have overlay 30
levels deep. Especially if you try to run rsync on this impressive onion
(workaround was to use tar to make copy of it first). You can bring your
directory trees together with just tar too, however I didn't like how
directory mtimes changed there. Those multiple dirs would contain things
like result of installworld, your config, your ports, etc...

What runs inside my BBB now and how I upgrade it, is largely described
here: http://ketas.si.pri.ee/bbb/


More information about the freebsd-arm mailing list