Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0

Russell Haley russ.haley at gmail.com
Wed Jul 17 17:22:23 UTC 2019


On Wed, Jul 17, 2019 at 10:06 AM Russell Haley <russ.haley at gmail.com> 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 <sparvu at 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 at freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
>>
>


More information about the freebsd-arm mailing list