Date: Wed, 17 Jul 2019 10:06:09 -0700 From: Russell Haley <russ.haley@gmail.com> To: Stefan Parvu <sparvu@kronometrix.org> Cc: freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0 Message-ID: <CABx9NuTgGFznGAW%2BamDh6J8uJSQHUWWYpCN7LqMRfX1mWGUFiQ@mail.gmail.com> In-Reply-To: <2AC05799-7D11-4200-8D16-38E3718470BB@kronometrix.org> References: <41A4CA5C-B487-490F-8A19-2D51F43E1004@kronometrix.org> <95616620-bbaf-dbc3-49eb-3e2562638d49@bunyatech.com.au> <AB510253-52D9-469C-B06E-5EC73C5F188E@kronometrix.org> <fd9991c4e6aaccb812a59ff86c9c8564ebd1d767.camel@freebsd.org> <74E3E782-8481-4B5B-A0AF-A04590C27D6D@kronometrix.org> <790afcb5f0809a89b45982958a85f1539fec05c7.camel@freebsd.org> <36088812-2135-4433-BC49-0BC433EC6767@kronometrix.org> <c52f9d9ab358ac0dc09af411bf97625945579b4e.camel@freebsd.org> <86CC4711-47AC-45C6-B6D3-71C9FFDD4A91@kronometrix.org> <BE321299-8569-4B2E-98FD-FD5210E1B6AF@kronometrix.org> <A9FD7D2B-9382-4EAE-B245-5F4DE643DBB7@gromit.dlib.vt.edu> <C93E2C64-6280-464D-AB5F-B1E968690CEF@kronometrix.org> <2ec7d7f63de31065b9cab396c662fe24f0107078.camel@freebsd.org> <BD0BE075-9E69-4CB0-826A-5DF2D160E9B1@kronometrix.org> <d71fc4e3db26242ffa817814d6cd92b8899fc2ab.camel@freebsd.org> <EF94BC84-4B8D-455C-952F-4FD1CC5557CE@kronometrix.org> <2AC05799-7D11-4200-8D16-38E3718470BB@kronometrix.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sparvu@kronometrix.org> 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" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABx9NuTgGFznGAW%2BamDh6J8uJSQHUWWYpCN7LqMRfX1mWGUFiQ>