From owner-freebsd-arm@freebsd.org Sun Sep 27 17:02:46 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D1AA0AE05 for ; Sun, 27 Sep 2015 17:02:45 +0000 (UTC) (envelope-from jau789@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DACCF73 for ; Sun, 27 Sep 2015 17:02:45 +0000 (UTC) (envelope-from jau789@gmail.com) Received: by wicfx3 with SMTP id fx3so76273784wic.1 for ; Sun, 27 Sep 2015 10:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=DOCTuPMpFOudzDYLkeQZwDQ/jKhrd3kWl1pIeE6KxtY=; b=PDO6p/le8VoQcMdZM9HN06OqmZ28kdh97zDetclrY6fPVGSJo64PcFqHBoNyO4MnCy V9QPAGf2G7FEOd2K39MqAl0twFXjTfeQrpsDDLk6jY4R0l+aPV9TjHlVLHynbv85zRWP xdEoHkLNtT0inrA/wqMbMW0/eWbdRCewbs+fGx0KrXIIyi9Nmhhrd8VjRUuKIJFhHAdn 7W9fto0S4DeJrLKHA/UJZpWih1kAegjezqdOQv4QgzDYVlyCN5Ia1Aj363Hj8AQDGjlQ enr9ecqF6oyl/FIKZYuKsttiNOQmAY9p/Kp2ytTU4ItE+S6693BzrapS+Y6XA4BI4cWf Ph+w== X-Received: by 10.194.47.161 with SMTP id e1mr19442570wjn.1.1443373363855; Sun, 27 Sep 2015 10:02:43 -0700 (PDT) Received: from [192.168.1.193] (xdsl-205-163.nblnetworks.fi. [83.145.205.163]) by smtp.gmail.com with ESMTPSA id bk4sm8433164wjc.1.2015.09.27.10.02.43 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 27 Sep 2015 10:02:43 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: RBPI2 ds1307 rtc kernel panic From: Jukka Ukkonen X-Mailer: iPad Mail (13A404) In-Reply-To: <560811E5.806@kronometrix.org> Date: Sun, 27 Sep 2015 20:02:43 +0300 Cc: freebsd-arm@FreeBSD.org Content-Transfer-Encoding: 7bit Message-Id: <59B7838A-A323-4656-A86B-E811DEF42C45@gmail.com> References: <5607C63D.2010203@kronometrix.org> <5607DC59.5050509@gmail.com> <560811E5.806@kronometrix.org> To: sparvu@kronometrix.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2015 17:02:46 -0000 Sent from my iPad > On 27 Sep 2015, at 18:57, Stefan Parvu wrote: > > >> device ds1307 >> >> In the DTS file (sys/boot/fdt/dts/arm/rpi.dts) I added > > Thanks a lot for comments. Couple of questions: > > 1. It seems I need to modify and add the rtc section under rpi2.dts not > the bcm2836.dtsi. Do I need still to build the dtb file: > > root@rpi2:/usr/src/sys/tools/fdt # setenv MACHINE arm > root@rpi2:/usr/src/sys/tools/fdt # ./make_dtb.sh /usr/src/sys > /usr/src/sys/boot/fdt/dts/arm/rpi2.dts . > converting /usr/src/sys/boot/fdt/dts/arm/rpi2.dts -> ./rpi2.dtb > Warning (reg_format): "reg" property in /axi/gpio/rtc has invalid length > (4 bytes) (#address-cells == 2, #size-cells == 1) > Warning (avoid_default_addr_size): Relying on default #address-cells > value for /axi/gpio/rtc > Warning (avoid_default_addr_size): Relying on default #size-cells value > for /axi/gpio/rtc Are there still your previous lines in the dtsi file? I don't remember having seen those complaints in a while. During my first attempts when I did not have the size-cells and address-cells in the dts I certainly saw the exact same warnings, though. > 2. After modifying the rpi2.dts and the RPI2 kernel config file I just > rebuild, right ? Nothing else ? Actually, if I remember correctly buildkernel might run dtc automatically when building for arm. It's been a while since I setup my own rpi2 build scripts. So, I don't remember this detail and at the moment I cannot go to check it on my build system. If for some reason the dtb is not automatically built, you certainly have to run dtc manually to get the dtb. When I get my hands on my build system I will try to check what it does with the dts and dtb files. At one moment I actually used a prebuilt content for the fat16 boot partition and manually modified an older dtb file converting it back to a dts with dtb, editing it converting again with dtc from dts to dtb when the ds3231 info was added. So, in the worst case I might have two distinct dtb files, one manually prebuilt one which definitely works and another automatically built one, which for all I know at the moment, could be faulty but also unused. --jau