From owner-freebsd-arm@freebsd.org Wed Jul 17 17:06:22 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5EB0B193C for ; Wed, 17 Jul 2019 17:06:22 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB9C18AE8A for ; Wed, 17 Jul 2019 17:06:21 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-io1-xd33.google.com with SMTP id s7so46806525iob.11 for ; Wed, 17 Jul 2019 10:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7OF0QAbcCAIu9lKz5QhSfI+shyO+GIwVHykcW9YOyDE=; b=pKxixubzs2J3MC+FlC0vUq3AxsenU+JvOURl1y9N/pU/SCVakkxcV4L68RRrYemKyH 0vRGogRCBuxBlBLg620TMbaRV9RadXucHPYrBfYATtxiWJTfKHzUcK8KOsshtLh/LBXd MdzzmRbWi0f3XGsU5nERTyPILSe4vyXkuutfdbw40eOr4odS+Vbb0EFcKk2SSDzvQHaa fw7jW45ZKPtVX+aguQe7uZQkwgS7xLG/gy0aDRqjDEVVtYHzBEqMZwTTdMamnRfR7zRA d7bZhUoeaPBpvHdIctix8+2EZTeiWj8dMOeq5FK6dozv9XW4T/7zNiEBCLEM+BGb0W0w AhHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7OF0QAbcCAIu9lKz5QhSfI+shyO+GIwVHykcW9YOyDE=; b=IDvgnC9w0daobBF0NL6J6S+iujGZ5aAnwGTbDoo26y3P4I/ZK27YD+o03uXXFTJo3s MsEyHJCKFFbNxOGYsX/ta6+MiYcPciycfD4nwCc+UdkK7srM6PmAnmBkuk2pHj+NJzgC wjH1IBFIXa4um5Yp5I6hQYYqt8OHHHpqw8tYA9+nl2SB+FFtvrJxmYGCIDc8TvmrpsCP tt+0pC+N0tf+IFq+s8oREnm7P1B5pKjSbmXFryZqSoRcLfX2Al7KtRrPNmIHVi3s+q0u ha+fIMDkbekQBmnRyjiL59rPFojTAFN2vZiQx9Kz/hEHR4TrF4UiP5d001WFHhKZ54HW VTLg== X-Gm-Message-State: APjAAAV0aEVUcpqzNrHUtjJ9H//6+g/jo7Iiv3KGBAuhNDO9IU/GoBJ/ L0Z0pgyQ7uZX82oiHSr2N5Erb67SBGskeIJR9so= X-Google-Smtp-Source: APXvYqzKP/AeRAtETJ88K9thkrI5IddUeKjcg7WlYkKiAMRnKsFJUVvRjO9LOKv5NpRU4cTmP137djswLOEX3uB/XiU= X-Received: by 2002:a02:a07:: with SMTP id 7mr43333551jaw.65.1563383180577; Wed, 17 Jul 2019 10:06:20 -0700 (PDT) MIME-Version: 1.0 References: <41A4CA5C-B487-490F-8A19-2D51F43E1004@kronometrix.org> <95616620-bbaf-dbc3-49eb-3e2562638d49@bunyatech.com.au> <74E3E782-8481-4B5B-A0AF-A04590C27D6D@kronometrix.org> <790afcb5f0809a89b45982958a85f1539fec05c7.camel@freebsd.org> <36088812-2135-4433-BC49-0BC433EC6767@kronometrix.org> <86CC4711-47AC-45C6-B6D3-71C9FFDD4A91@kronometrix.org> <2ec7d7f63de31065b9cab396c662fe24f0107078.camel@freebsd.org> <2AC05799-7D11-4200-8D16-38E3718470BB@kronometrix.org> In-Reply-To: <2AC05799-7D11-4200-8D16-38E3718470BB@kronometrix.org> From: Russell Haley Date: Wed, 17 Jul 2019 10:06:09 -0700 Message-ID: Subject: Re: Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0 To: Stefan Parvu Cc: freebsd-arm X-Rspamd-Queue-Id: CB9C18AE8A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=pKxixubz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of russhaley@gmail.com designates 2607:f8b0:4864:20::d33 as permitted sender) smtp.mailfrom=russhaley@gmail.com X-Spamd-Result: default: False [-6.63 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.82)[-0.821,0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[3.3.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.80)[ip: (-8.37), ipnet: 2607:f8b0::/32(-3.15), asn: 15169(-2.44), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jul 2019 17:06:23 -0000 So out of curiosity I wanted to see if this process can be achieved on an amd64 platform. Memdisk can be used to open a release image and that can then be mounted. I then downloaded the source code and ran buildkernel. I performed these steps in TrueOS running under virtualbox: #may not have been necessary... added geom_md_load="YES" to loader.conf mkdir ~/freebsd mkdir ~/freebsd/src mkdir ~/freebsd/imgs mkdir ~/freebsd/obj mkdir ~/mount svn checkout svn://svn.freebsd.org/base/release/12.0.0 ~/freebsd/src #downloaded release image... #extract xz -d ~/freebsd/imgs/FreeBSD-12.0-RELEASE-arm-armv7-RPI2.img.xz #create a mem disk mdconfig -f ~/freebsd/imgs/FreeBSD-12.0-RELEASE-arm-armv7-RPI2.img.xz -u md0 #mount sudo mount /dev/md0s2a ~/mount #shows all kernel modules ls ~/mount/boot/kernel #build steps below setenv MAKEOBJDIRPREFIX ~/freebsd/obj cd ~/freebsd/src make -j4 buildkernel TARGET=arm TARGET_ARCH=armv6 KERNCONF=GENERIC --------------------------------- I then fished into the output dir and was able to `sudo cp` a random kernel module into my mounted img file. This will save you from having to run all this stuff on a PI and it means you (likely) don't need to "shrink" your image back down because it never expanded to fit a partition. My mounted img directory is only 1.3 GB. You could unmount and xz the file back up. Again, if you want to cross build your custom software, you could ask on this list how to re-use the arm compiler used in the buildkernel step. Good Luck, Russ On Wed, Jul 17, 2019 at 9:13 AM Stefan Parvu wrote: > >> > /usr/obj/arm64.aarch64/usr/src/sys/GENERIC/modules/i2c/nxprtc/opt_platform.h > > > > okay. let me try that. > > yes. Ian, you are correct. After fixing opt_platform manually yep, I can > see the driver > on the system. 10 x thanks. Let me try now the testing part. > > Stefan > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >