From owner-freebsd-arm@freebsd.org Wed Jul 17 17:22:23 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 4F126B1D8C for ; Wed, 17 Jul 2019 17:22:23 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (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 78C6A8B7AB for ; Wed, 17 Jul 2019 17:22:22 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-io1-xd36.google.com with SMTP id g20so46954606ioc.12 for ; Wed, 17 Jul 2019 10:22:22 -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=Ew70TE3x3U9b3wDHBVdMAo/rRVQzvYt15x02h0HveUw=; b=qvsQtBZ4Dybtboyrd5lZJvdEHh26N1QhXGNaBN/D2mOZN+KlAuQem3f/OUs/WeiVca W1pdr1V1TRhQ8/qi9v0falt1jvze/25In47RaU/RTA2B4ZMIc0KvJqBzeo2oZwZx5Yvj jwq+ptdHhcsuB91rp1YFWsMh6O6TaUZ3PpcrCNwuI+cd8+pDMyIyZ8TQdWPPDFpnxREx Hbl32SSUtwZwprHiYX46Ky4yKh/NLisxyjthzSQSbHUfKAmu1/2eyHx+8oNYvxGQbFx9 Xmg3fO5NCRwB1tNMQfBUKN1thHVMXolqJESWdotHb0XGGK8dYvRtatyVP7qBGfocSrxZ yATw== 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=Ew70TE3x3U9b3wDHBVdMAo/rRVQzvYt15x02h0HveUw=; b=dxCjwsd4mYcWh2SxQuPf2GSxwVa1ULw2CDgSj5Pug3HoZ1Ynpgsni6WJy8IowJaBIZ 2Xxyd0zh1NXz9Mg0e/Ax5rhTG/erCj5g9Vx2U2rwkpJ53hvSAvbs6iVjPzIOg1z7802P 01w7myX7a+rSKi6P1P4Jb1SGqVnoZbjU0H3j25OH08fHxy8KTpaNHQSEYTR989oHhj5y gJI9NVvF4sf0zdYCyHC/dcV/vqMMGEwh6qvuAZCEiU3t/xLl0h1LZWER8fEDGiN4QpRz iwYTyx8NELIHp2R/c0JjZ1Dm6QWQFowVPrfZ43meyuKb0QttcZRPWUHXq7xs2g0/FzGL V7bg== X-Gm-Message-State: APjAAAUdMMCMps8N4me6Z417R2/0xcBqqVJWrS23iqJEb0r3kj71upQY 7F9vCD0bGCnJBAskhf/ndgonWgsQDNNVfchfVekRYg8xFII= X-Google-Smtp-Source: APXvYqzzMBWl6fPwU4JmVKPLfxIeCxJEZ3aCaUGfMAbGK/Ggou7Vkf6ginKWKY8DNmU5Rpk8KTlikOkd3Sp364UX2wk= X-Received: by 2002:a5d:9e48:: with SMTP id i8mr36679287ioi.51.1563384141934; Wed, 17 Jul 2019 10:22:21 -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: From: Russell Haley Date: Wed, 17 Jul 2019 10:22:10 -0700 Message-ID: Subject: Re: Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0 To: Stefan Parvu Cc: freebsd-arm X-Rspamd-Queue-Id: 78C6A8B7AB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=qvsQtBZ4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of russhaley@gmail.com designates 2607:f8b0:4864:20::d36 as permitted sender) smtp.mailfrom=russhaley@gmail.com X-Spamd-Result: default: False [-6.83 / 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:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.83)[-0.830,0]; 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)[6.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.99)[ip: (-9.31), 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:22:23 -0000 On Wed, Jul 17, 2019 at 10:06 AM Russell Haley wrote: > 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 > Sorry, typo. Point mdconfig at the extracted img file: mdconfig -f ~/freebsd/imgs/FreeBSD-12.0-RELEASE-arm-armv7-RPI2.img -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" >> >