Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Sep 2015 18:37:25 -0700
From:      Russell Haley <russ.haley@gmail.com>
To:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Building Less?
Message-ID:  <CABx9NuT=Gup6MfqrPxrBZhqtS5j5ewqhW=gMRKbT89=iwaiCig@mail.gmail.com>
In-Reply-To: <CABx9NuSTZaNAoc1pKZ0Wx7YHyGwaXrr-nm2xFqgqbRyZ_6CDug@mail.gmail.com>
References:  <CABx9NuRb5yOjrfM0i0pDmNzaEefdsTxByiggGm%2B-m0UW%2BK%2BbdA@mail.gmail.com> <1443104974.1224.269.camel@freebsd.org> <CABx9NuQ6pp3irW=7wjvkAEuJzmtrmNLa4fmw0XL5DKmDaC2r2A@mail.gmail.com> <CABx9NuSTZaNAoc1pKZ0Wx7YHyGwaXrr-nm2xFqgqbRyZ_6CDug@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
So I had a half success. Creating the memory disk and the using the minimum
build src.conf file reduced my build time to about 30 minutes! Everything
fell apart when I tried to dd the image to my sd card. It ran all night and
didn't complete.

da2s2 is my rootfs partition. My sd card looks like this:

fist 1mb raw uboot.











































*rhaley@Prescott:~% geom part list da2Geom name: da2modified: falsestate:
OKfwheads: 255fwsectors: 63last: 7716863first: 63entries: 4scheme:
MBRProviders:1. Name: da2s1   Mediasize: 52383744 (50M)   Sectorsize: 512
Stripesize: 0   Stripeoffset: 1064448   Mode: r0w0e0   attrib: active
rawtype: 11   length: 52383744   offset: 1064448   type: fat32   index: 1
end: 104390   start: 20792. Name: da2s2   Mediasize: 3897524736 (3.6G)
Sectorsize: 512   Stripesize: 0   Stripeoffset: 53480448   Mode: r1w1e1
rawtype: 165   length: 3897524736   offset: 53480448   type: freebsd
index: 2   end: 7716806   start: 104454Consumers:1. Name: da2   Mediasize:
3951034368 (3.7G)   Sectorsize: 512   Mode: r1w1e2*



Here is my build commands:
















*#PREPARE MEMDISKtruncate -s 1024M ~/imx6.img sudo mdconfig -f imx6.img -u0
sudo newfs /dev/md0 sudo mount /dev/md0 /usr/jails/Jailbird/mnt/memdisk
#IMX6make -DNO_CLEAN TARGET=arm TARGET_ARCH=armv6
srcconf=/usr/home/rhaley/src-minimal-build.conf -j10 buildworld make
-DNO_CLEAN TARGET=arm TARGET_ARCH=armv6 KERNCONF=IMX6
srcconf=/usr/home/rhaley/src-minimal-build.conf -j10 buildkernel
#INSTALLATIONmake TARGET=arm TARGET_ARCH=armv6 DESTDIR=/mnt/memdisk
installworld distributionmake -DNO_CLEAN TARGET=arm TARGET_ARCH=armv6
KERNCONF=IMX6 installkernel DESTDIR=/mnt/memdisk*

*#POST BUILD *











*sudo umount /dev/da2s2rhaley@Prescott:~% sudo umount
/usr/jails/Jailbird/mnt/memdiskrhaley@Prescott:~% sudo mdconfig -d
-u0rhaley@Prescott:~% sysctl kern.geom.debugflags=16kern.geom.debugflags:
0sysctl: kern.geom.debugflags=16: Operation not permittedrhaley@Prescott:~%
sudo sysctl kern.geom.debugflags=16kern.geom.debugflags: 0 ->
16rhaley@Prescott:~% dd if=imx6.img of=/dev/da2 bs=512
seek=104454^C1680103+0 records in1680102+0 records out860212224 bytes
transferred in 40541.360010 secs (21218 bytes/sec)*


The dd command at the end there just ran all night before I cancelled it.
The two things that stand out are:

1) I used a different block size in the dd than what was originally
suggested (512 vs the suggested 4096k)
2) Perhaps my seek is incorrect? I took this value from the previous geom
listing. I am hoping to preserve the existing fat partition preceding the
rootfs.

Any idea what I did wrong?

Thanks,

Russ


On Sat, Sep 26, 2015 at 9:49 PM, Russell Haley <russ.haley@gmail.com> wrote:

> Interestingly the man pages for build that are linked to the src.conf man
> pages don't seem to describe the srcconf variable. Or did I miss something?
>
>
> https://www.freebsd.org/cgi/man.cgi?query=build&sektion=7&apropos=0&manpath=FreeBSD+10.2-RELEASE
>
> Russ
>
> On Sat, Sep 26, 2015 at 9:07 PM, Russell Haley <russ.haley@gmail.com>
> wrote:
>
>> Awesome, thanks for the src.conf files Michael, and thank you Ian for the
>> description.  It's kind of like the secret recipe! Together with the
>> memdisk method that Ganbold has suggested I should be able to bring down my
>> turn-around time.
>>
>> Cheers,
>> Russ
>>
>> On Thu, Sep 24, 2015 at 7:29 AM, Ian Lepore <ian@freebsd.org> wrote:
>>
>>> On Wed, 2015-09-23 at 22:15 -0700, Russell Haley wrote:
>>> > Hi there,
>>> >
>>> > I've pivoted back to my ARM board again. I noticed that when I build
>>> world,
>>> > it builds all the man pages and languages and a whole bunch of other
>>> stuff.
>>> > That's not too bad because I have a decent computer, but when I run
>>> > installworld and install onto an sd card things get really slow.
>>> >
>>> > Is there a way to reduce what I am building and installing onto the sd
>>> card?
>>> >
>>> >
>>> > Current process:
>>> > make -DNO_CLEAN TARGET=arm TARGET_ARCH=armv6 -j10 buildworld
>>> >
>>> > make -DNO_CLEAN TARGET=arm TARGET_ARCH=armv6 KERNCONF=IMX6 -j10
>>> buildkernel
>>> >
>>> >  sudo mount /dev/da2s2 /usr/jails/Jailbird/mnt/ufspart
>>> >   make TARGET=arm TARGET_ARCH=armv6 DESTDIR=/mnt/ufspart installworld
>>> > distribution
>>> >
>>> >
>>> >
>>> > Thanks,
>>> >
>>> > Russ
>>>
>>> Add to your crossbuild command line "srcconf=/some/path/src.conf" and in
>>> that src.conf file put a bunch of WITHOUT_foo commands to eliminate the
>>> things you don't need in the target system.  Iirc, you need a fully-
>>> qualified pathname in the srcconf=.
>>>
>>> "man src.conf" gives you the list of WITH/WITHOUT controls you can set.
>>>
>>> Be sure to keep your crossbuild src.conf file(s) separate from your
>>> main /etc/src.conf file that's used when you build the host system.
>>>
>>> -- Ian
>>>
>>>
>>>
>>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABx9NuT=Gup6MfqrPxrBZhqtS5j5ewqhW=gMRKbT89=iwaiCig>