From owner-freebsd-questions@FreeBSD.ORG Mon Jun 7 16:20:39 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D2641065677 for ; Mon, 7 Jun 2010 16:20:39 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by mx1.freebsd.org (Postfix) with ESMTP id 2AC9E8FC18 for ; Mon, 7 Jun 2010 16:20:39 +0000 (UTC) Received: from fledge.watson.org (localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.14.3/8.14.3) with ESMTP id o57GKcLL042581; Mon, 7 Jun 2010 12:20:38 -0400 (EDT) (envelope-from doug@fledge.watson.org) Received: from localhost (doug@localhost) by fledge.watson.org (8.14.3/8.14.3/Submit) with ESMTP id o57GKbSD042577; Mon, 7 Jun 2010 12:20:37 -0400 (EDT) (envelope-from doug@fledge.watson.org) Date: Mon, 7 Jun 2010 12:20:37 -0400 (EDT) From: doug To: pluknet In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (fledge.watson.org [127.0.0.1]); Mon, 07 Jun 2010 12:20:38 -0400 (EDT) Cc: freebsd general questions Subject: Re: is it safe to crossbuild 6.4 i386 on 7.3 amd64 box? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: doug@safeport.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2010 16:20:39 -0000 On Tue, 11 May 2010, pluknet wrote: > Hi, > > That's sort of "for the record". > I faced with issue where I wasn't able to boot a box w/ kernel built > with subj scheme. > > On build box with 7.3-amd64 installed: > 1. prepare world/kernel in an existing chrooted 6.4-S environment => > doesn't work (see below) > 2. prepare world/kernel just cd'ing to 6.4-S src & change > MAKEOBJDIRPREFIX => PROFIT! > Both built with equal config and source. > > Next, what does not work in 1. > System stops after printing "point_to_point" in /etc/rc.d/initrandom: > # XXX temporary until we can improve the entropy > # harvesting rate. > # Entropy below is not great, but better than nothing. > # This unblocks the generator at startup > ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ > | dd of=/dev/random bs=8k 2>/dev/null > > Here sysctl -a queries dev.cpu.0.freq -> cpufreq_curr_sysctl@/kern/kern_cpu.c > and locks up. As I understand, CPU doesn't return from sched_switch(). > > <118> ethernet > <118> point_to_point > KDB: enter: Line break on console > > db> ps > pid ppid pgrp uid state wmesg wchan cmd > 68 66 51 0 R+ CPU 255 sysctl > 66 64 51 0 S+ wait 0xc82e6648 sh > 65 59 51 0 S+ piperd 0xc853f4c8 dd > 64 59 51 0 S+ wait 0xc82e6218 sh > 59 51 51 0 S+ wait 0xc82e6a78 sh > 51 1 51 0 Ss+ wait 0xc852ec90 sh > > db> bt 68 > Tracing pid 68 tid 100076 td 0xc8551820 > sched_switch(c8551820,0,1) at sched_switch+0x143 > mi_switch(1,0,c8551980,0,c0adf560,...) at mi_switch+0x1ba > sched_bind(c8551820,0) at sched_bind+0x52 > cpu_est_clockrate(0,eebeead4,c84f3400,3,c84f3400,...) at cpu_est_clockrate+0xc1 > cf_levels_method(c8214900,c85da000,eebeeb48) at cf_levels_method+0x303 > cf_get_method(c8214900,c85cb000) at cf_get_method+0x12b > cpufreq_curr_sysctl(c8218cc0,c81ea000,0,eebeec04,c8218cc0,...) at cpufreq_curr_s > sysctl_root(0,eebeec74,4,eebeec04) at sysctl_root+0x107 > userland_sysctl(c8551820,eebeec74,4,0,bfbfdbdc,0,0,0,eebeec70,0) at userland_sys > __sysctl(c8551820,eebeed04) at __sysctl+0x93 > syscall(3b,3b,3b,4,bfbfdbdc,...) at syscall+0x2bf > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (202, FreeBSD ELF32, __sysctl), eip = 0x2812650b, esp = 0xbfbfdb4c, > I was able to cross-build and install a 32 bit 8.0 kernel using an amd64 system as the build machine. I was never able to get installworld to work. I did this by NFS mounting the target system's fs on the build system. I mixed the information in the following link http://bsdimp.blogspot.com/2006/09/cross-building-freebsd.html with advice from others to get the kernel installed. I do not have access to my notes at the moment. If you would like details on what I tried let me know. It is unclear if cross-building is officially supported.