From owner-freebsd-embedded@freebsd.org Wed Jul 25 19:04:06 2018 Return-Path: Delivered-To: freebsd-embedded@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9025F105218E for ; Wed, 25 Jul 2018 19:04:06 +0000 (UTC) (envelope-from freebsd@justmail.de) Received: from mout3.freenet.de (mout3.freenet.de [IPv6:2001:748:100:40::2:5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "*.freenet.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EBE68A50D for ; Wed, 25 Jul 2018 19:04:05 +0000 (UTC) (envelope-from freebsd@justmail.de) Received: from [195.4.92.163] (helo=mjail0.freenet.de) by mout3.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (port 25) (Exim 4.90_1 #2) id 1fiP4s-0003BX-Rd for freebsd-embedded@freebsd.org; Wed, 25 Jul 2018 21:04:02 +0200 Received: from [::1] (port=55344 helo=mjail0.freenet.de) by mjail0.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.90_1 #2) id 1fiP4s-0001DY-Qv for freebsd-embedded@freebsd.org; Wed, 25 Jul 2018 21:04:02 +0200 Received: from sub4.freenet.de ([195.4.92.123]:49454) by mjail0.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.90_1 #2) id 1fiP29-0007JK-L7 for freebsd-embedded@freebsd.org; Wed, 25 Jul 2018 21:01:13 +0200 Received: from p4fd9e297.dip0.t-ipconnect.de ([79.217.226.151]:53072 helo=freebsd-t450.fritz.box) by sub4.freenet.de with esmtpsa (ID freebsdnewbie@freenet.de) (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (port 587) (Exim 4.90_1 #2) id 1fiP29-0000Rh-Fs for freebsd-embedded@freebsd.org; Wed, 25 Jul 2018 21:01:13 +0200 Date: Wed, 25 Jul 2018 21:01:11 +0200 From: Manuel =?iso-8859-15?Q?St=FChn?= To: freebsd-embedded@freebsd.org Subject: NanoBSD on Beaglebone Black Message-ID: <20180725190111.GA9220@freebsd-t450.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2018 19:04:06 -0000 Hi, I'm trying to get NanoBSD running on Beaglebone Black and had some setbacks: 1. using the standard slice layout does not find/load a kernel: [..] DRAM: 512MB Card did not respond to voltage select! Card did not respond to voltage select! Card did not respond to voltage select! Number of U-Boot devices: 2 U-Boot env: loaderdev not set, will probe all devices. Found U-Boot device: disk Probing all disk devices... Checking unit=0 slice= partition=... Checking unit=1 slice= partition=... Checking unit=2 slice= partition=... Checking unit=3 slice= partition=... Checking unit=4 slice= partition=... Checking unit=5 slice= partition=... Found U-Boot device: net Booting from net0: link up on port 0, speed 100, full duplex After switching in nanobsd/embedded/common the slice numbers of NANO_SLICE_CFG(2->3) and NANO_SLICE_ROOT(3->2), it boots without problems 2. devmatch cant read linker hints file: dmesg: [..] Starting devd. devmatch: Can't read linker hints file. devmatch: Can't read linker hints file. devmatch: Can't read linker hints file. devmatch: Can't read linker hints file. devmatch: Can't read linker hints file. devmatch: Can't read linker hints file. [..] Google told me to "kldxref -R /boot", and after adding a function into my nanobsd config file for the bbb which chroots into the nanobsd-world and calls this "kldxref -R /boot" it boots without these messages. How should this be done correctly? 3. ABI mismatch of chrooted nanobsd and booted nanobsd: I would like to install some packages into the nanobsd image, so i extended my config file by a some code: prepare_chroot() { mkdir -p ${NANO_WORLDDIR}/usr/local/bin cp /usr/local/bin/qemu-arm-static ${NANO_WORLDDIR}/usr/local/bin mount -t devfs devfs ${NANO_WORLDDIR}/dev } cleanup_chroot() { umount ${NANO_WORLDDIR}/dev rm -f ${NANO_WORLDDIR}/usr/local/bin/qemu-arm-static } install_packages () ( mkdir -p ${NANO_WORLDDIR}/usr/local/etc/pkg/repos sed 's/\${ABI}/FreeBSD:12:armv7/g' ${NANO_WORLDDIR}/etc/pkg/FreeBSD.conf \ > ${NANO_WORLDDIR}/usr/local/etc/pkg/repos/FreeBSD.conf echo "nameserver 8.8.8.8" > ${NANO_WORLDDIR}/etc/resolv.conf prepare_chroot chroot ${NANO_WORLDDIR} pkg install -y vim-console mosquitto cleanup_chroot rm -f ${NANO_WORLDDIR}/etc/resolv.conf ) chroot'ing into the nanobsd world and querying hw.machine_arch gets me armv6. Booting the image and querying the variable on real hardware returns armv7. This prevents me from install packages without altering the FreeBSD.conf. Who replies queries of sysctl-variable "hw.machine_arch" in chroot? Thanks -- Manuel