Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jun 2014 14:58:12 -0400
From:      Jason Hellenthal <jhellenthal@dataix.net>
To:        Alfred Perlstein <bright@mu.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Upgrading an i386 machine from amd64.
Message-ID:  <50E51CBE-7F7B-4093-86A5-320ACE81072E@dataix.net>
In-Reply-To: <538B761C.7060300@mu.org>
References:  <538B61EC.9000403@mu.org> <5B82C892-12A4-4251-B3D2-A6D3EAAF90F9@dataix.net> <538B6FCC.9090301@mu.org> <B007D0DE-EFC1-49D8-9E6A-F4A24B66DB8C@dataix.net> <538B761C.7060300@mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]


> On Jun 1, 2014, at 14:51, Alfred Perlstein <bright@mu.org> wrote:
> 
> 
>> On 6/1/14, 11:42 AM, Jason Hellenthal wrote:
>> That would be nice. Could've swore there was something similar to that but memory escapes me as I haven't done backwards cross compiles in awhile.
>> 
>> Curious have you done a svn status on your src tree in a while to see if there are any stale depends laying around that may affect the compilation ?
> 
> I use git. :)  But the build tree was completely clean.
>> 
>> Also ALWAYS_CHECK_MAKE=YES defined in make.conf ? 
> No, what does that do? 

Instructs the top-level Makefile to check if make(1) is up-to-date. Not sure if it really would have an effect on a cross build but worth a shot.
make.conf(5) holds a better definition of it.

> 
> I think once I get this sorted I will make a blog post on it, right now that blog post is basically:
> 
> export TARGET=i386
> make buildworld -j36
> make buildkernel -j36
> mkdir -p /mnt/target.local /mnt/target
> make installkernel installworld DESTDIR=/mnt/target.local
> mount i386target:/ /mnt/target
> rsync -avvH /mnt/target.local /mnt/target
> 
> I thought though there was a way to get this to work, obviously there is a bug here that we lose "chflags" bits on install.  I wonder if there's a way to restore or preserve them?

rsync(1) can be build from ports with the chflags patch that should aid in preserving them.

rsync --fileflags  . . . 

> 
> -Alfred
> 
> 
> 
> 
> 
> 
> 
> 
> 
>> 
>> -- 
>>  Jason Hellenthal
>>  Voice: 95.30.17.6/616
>>  JJH48-ARIN
>> 
>> On Jun 1, 2014, at 14:24, Alfred Perlstein <bright@mu.org> wrote:
>> 
>>> 
>>>> On 6/1/14, 10:34 AM, Jason Hellenthal wrote:
>>>> What if you just NFS mount the obj directory from the 386 to the amd64 build world for 386 the mount the src on the i386 and just rebuild strip and friends ?
>>>> 
>>>> A little more of a hack i know but would get the job done.
>>> 
>>> I tried that using install(1), then it broke with strip(1), then I basically was like, "this is a rabbit hole, forget it" and used rsync.
>>> 
>>> I was really looking for a "buildinstalltools" or something target (as you suggest), but I couldn't find one.
>>> 
>>> Is there an "buildinstalltools" target? 
>>> 
>>> -Alfred
>>>> 
>>>> -- 
>>>>  Jason Hellenthal
>>>>  Voice: 95.30.17.6/616
>>>>  JJH48-ARIN
>>>> 
>>>> On Jun 1, 2014, at 13:25, Alfred Perlstein <bright@mu.org> wrote:
>>>> 
>>>>> Hello hackers.
>>>>> 
>>>>> Is there a way to build on amd64 and then mount over nfs the build and src and installworld from an i386 machine?
>>>>> 
>>>>> The problem seems to be that "install" and "strip" and etc are built as amd64 binaries so that the installworld will fail.
>>>>> 
>>>>> Below I have a solution I was going to do a blog post about, but then realized maybe I'd be leading people down the wrong path.
>>>>> 
>>>>> Can someone verify that I need to use rsync as opposed to installworld for this to work?
>>>>> 
>>>>> I have an old i386 based soekris geode box called "soekris":
>>>>> CPU: Geode(TM) Integrated Processor by AMD PCS (499.91-MHz 586-class CPU)
>>>>>  Origin = "AuthenticAMD"  Id = 0x5a2  Family = 0x5  Model = 0xa Stepping = 2
>>>>> Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
>>>>>  AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>
>>>>> real memory  = 536870912 (512 MB)
>>>>> avail memory = 502792192 (479 MB)
>>>>> 
>>>>> Building on this machine is difficult because of the speed and lack of space, so I decided to use my more powerful amd64 machine "spigot":
>>>>> CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (3392.37-MHz K8-class CPU)
>>>>>  Origin="GenuineIntel"  Id=0x206a7  Family=0x6  Model=0x2a Stepping=7
>>>>> ...
>>>>> real memory  = 17179869184 (16384 MB)
>>>>> avail memory = 16585228288 (15816 MB)
>>>>> FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 SMT threads
>>>>> 
>>>>> So I've built an 10-stable on the amd64 machine using:
>>>>> 
>>>>> spigot % TARGET=i386
>>>>> spigot % make -j24 buildworld
>>>>> spigot % make -j24 buildkernel
>>>>> 
>>>>> Works great, I get an i386 object tree under /usr/obj/i386.386/...
>>>>> 
>>>>> Then I go to install this over NFS and this is where I get stuck.
>>>>> 
>>>>> If I mount the i386 machine like so and install I get errors on libc and other libraries:
>>>>> 
>>>>> spigot % mount soekris:/ /usr/soekris
>>>>> spigot % cd /usr/src && make installworld
>>>>> .....
>>>>> ===> lib/libcrypt (install)
>>>>> install -C -o root -g wheel -m 444   libcrypt.a /usr/soekris/usr/lib
>>>>> install -C -o root -g wheel -m 444   libcrypt_p.a /usr/soekris/usr/lib
>>>>> install -s -o root -g wheel -m 444   -fschg  libcrypt.so.5 /usr/soekris/lib
>>>>> install: /usr/soekris/lib/libcrypt.so.5: Input/output error
>>>>> *** Error code 71
>>>>> 
>>>>> Stop.
>>>>> make[5]: stopped in /usr/trees/freebsd.git/lib/libcrypt
>>>>> *** Error code 1
>>>>> 
>>>>> OK, so that doesn't work...
>>>>> 
>>>>> Maybe if I mount the amd64 build host under the soekris box, no that breaks because the bootstrap tools (install(1), strip(1)) are built for amd64 so the install fails.
>>>>> 
>>>>> So what I finally did on the amd64 box was:
>>>>> 
>>>>> spigot % mkdir /use/soekris.local
>>>>> spigot % make installworld DESTDIR=/usr/soekris.local
>>>>> spigot % mount soekris:/  /usr/soekris
>>>>> spigot % rsync -avvH /usr/soekris.local/ /usr/soekris/
>>>>> 
>>>>> That hung at the end forever at the end:
>>>>> var/unbound/
>>>>> var/yp/
>>>>> var/yp/Makefile
>>>>> var/yp/Makefile.dist
>>>>> ....
>>>>> 
>>>>> but after giving it an hour I just hit ^C and rebooted and everything was more or less fine.
>>>>> 
>>>>> Is there a better way to do this?  Was the "installworld to NFS" breaking because of NFS bugs?  Should I get those to Rick?  I'm just confused.
>>>>> 
>>>>> -Alfred
>>>>> _______________________________________________
>>>>> freebsd-hackers@freebsd.org mailing list
>>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>>>>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
> 

[-- Attachment #2 --]
0	*H
010	+0	*H
90000
	*H
010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0
130518085048Z
140519220947Z0H10Ujhellenthal@dataix.net1%0#	*H
	jhellenthal@dataix.net0"0
	*H
0
'`TmfkܨJ5u+c'Upb`zv)&ȸXZ*VN6JvLoVoh}g
pQDŽKf/tZA˳("4Ԅ˻'d2h|IBl'^v^;'e8S99ۿVm|k8_UQtC"5l!kjZ]އQGn\BŽh!FTsD%pV^Eӑd¨x͸"9
г"f00	U00U0U%0++0UڔfmVʢ$䟓0U#0Sr풜\|~5NԸQ0!U0jhellenthal@dataix.net0LU C0?0;+70*0.+"http://www.startssl.com/policy.pdf0+00' StartCom Certification Authority0This certificate was issued according to the Class 1 Validation requirements of the StartCom CA policy, reliance only for the intended purpose in compliance of the relying party obligations.06U/0-0+)'%http://crl.startssl.com/crtu1-crl.crl0+009+0-http://ocsp.startssl.com/sub/class1/client/ca0B+06http://aia.startssl.com/certs/sub.class1.client.ca.crt0#U0http://www.startssl.com/0
	*H
{0Ӹ,52W{Ey8b[{7_+P"n["-,@ŽpJ-W$ݍjWA-6z(	RdIZ.KzXє[K6}{s+v.Qh0PͅKhTw0I73lz*Kv4Kkگ63;p1:ױ@)]ok>:W%XwC1þL/o8~#oP0400
	*H
0}10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1)0'U StartCom Certification Authority0
071024210155Z
171024210155Z010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0"0
	*H
0
	-).2AUGo#G
B|NDRpM-B=o-we5JQpa>O.#._<V
[~**pz~3WG.ᘟMlr[<Ce6fqO"uxfWN#uicgkv$Lb%y`_{`xK'GN00U00U0USr풜\|~5NԸQ0U#0N@[i04hCA0f+Z0X0'+0http://ocsp.startssl.com/ca0-+0!http://www.startssl.com/sfsca.crt0[UT0R0'%#!http://www.startssl.com/sfsca.crl0'%#!http://crl.startssl.com/sfsca.crl0U y0w0u+70f0.+"http://www.startssl.com/policy.pdf04+(http://www.startssl.com/intermediate.pdf0
	*H

}x,\c^#wMq}>UK/^yX֏y	frMIŲB61ymQ󸟆ҨݬZ0&;@#13qۑ&	̢o	6r_;GO>*I(	74XS1r3)!LJy6Kotˆ#
_wSr
;B
ADp(fs䰷6%.W0J3:bC<8t X1<Cn=t==wST~\wkBf|15zUP)(IjVB!OfI=bb\4-*em/нSJm7N[]'@ڽD9Kr>R7/|o^I@ټ'Pa$ z9a'L)(
I}vcH]۸D*W}
m>Q|C.(,lQ000
	*H
0}10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1)0'U StartCom Certification Authority0
060917194636Z
360917194636Z0}10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1)0'U StartCom Certification Authority0"0
	*H
0
	lF|x{3rb6 "$^wC
d̎68#nm<r=3+/AYg}
tyL7z9RYFC҅qub4,4ǖR=3M;JK&/r5w<]&6v\t%x-0-ryF*I
cSb:̵fkt+v>mDsb;ľSV%lQ	ʿvmۿ=fVH:KߧXP8u[ClMp[)eݪ]̯1ҍ{n'fHnB?!>{
pclT\%zɢɋ,~^MXn
2n6IHi–Mi
y"H{ipz7
vOW`g:ԋr"Ɵƶ\R<*s
`z/ۣn&0݉W=+ŷv+*r3]	K߻tRKR0N0U00U0UN@[i04hCA0dU]0[0,*(&http://cert.startcom.org/sfsca-crl.crl0+)'%http://crl.startcom.org/sfsca-crl.crl0]U T0P0L+70;0/+#http://cert.startcom.org/policy.pdf05+)http://cert.startcom.org/intermediate.pdf0+00' Start Commercial (StartCom) Ltd.0Limited Liability, read the section *Legal Limitations* of the StartCom Certification Authority Policy available at http://cert.startcom.org/policy.pdf0	`HB08	`HB
+)StartCom Free SSL Certification Authority0
	*H
lf4Ѕ^}
N8^ߦ%K2;=D	[I)f%	<6+Kh9f=&9Q{~ZWpi^X
ߌE8
^Wbz)n(DÐ8<CMdE(\s{諱.\dns1:}Q;Mf{<ӚePu/CiyCFrd6%8w~kjDKx,KD4R'
]xS2݀fuٵh(a.8gd./pǖ|eCTݥ9`4ɖp,H{~k";*RKU"4N&",uJ}׸d6/#	;sIjWxřCcMw-eriG	V$yX.	~m>J9+u	U77Cb VKel$$4"}?eQ
0j
r^1o0k0010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0	+0	*H
	1	*H
0	*H
	1
140601185813Z0#	*H
	1|$B(l#0	+710010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0*H
	1010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0
	*H
5GCOdړ 1ש7HQbLvÈev(x-uӂX1EUg8±+`=0ޅ	NPvh[;N꟧]o]տ~Oh֑⭶к|lK^99(& --al⯫nlWbA6qQ\b\Xo.|n@%.}vѲY;<cxct0

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50E51CBE-7F7B-4093-86A5-320ACE81072E>