Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2017 07:18:41 -0300
From:      =?UTF-8?B?T3RhY8OtbGlv?= <otacilio.neto@bsd.com.br>
To:        freebsd-arm@freebsd.org
Subject:   Re: FreeBSD 12-CURRENT on OrangePi One
Message-ID:  <3e0ebfa5-65d1-d7a0-816b-a0c72b3fe15b@bsd.com.br>
In-Reply-To: <8eae97a3-6f3d-2273-31fb-67627ce4bd15@paranoici.org>
References:  <8eae97a3-6f3d-2273-31fb-67627ce4bd15@paranoici.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Em 28/04/2017 07:03, aggaz escreveu:
> Dear list,
>
> recently I was able to build a working FreeBSD 12-CURRENT image for
> OrangePi One by using crochet.
>
> This particular board is partially supported. It uses SoC H3 which is
> supported by FreeBSD, and there is a u-boot package available in ports.
> However there is no ready-made crochet-specific configuration.
>
> I am going to write here what I did, hoping that someone else will find
> this information useful, and hoping that crochet developers are reading
> this. I do not have a github account and I can not contact them on that
> particular portal.
>
>
> 1. Freebsd and crochet sources.
> I am using FreeBSD 12-CURRENT and last crochet, sources of both
> downloaded on April 26 2017.
>
>
> 2. OrangePi One config
> In crochet, I created a new board, called "OrangePi-One" using the
> config from "OrangePi-Plus2E" as a template.
> I corrected paths and a little bug on the setup.sh file, which follows:
>
> =========================================================================
> % cat setup.sh
> KERNCONF=ALLWINNER
> UBLDR_LOADADDR=0x42000000
> SUNXI_UBOOT="u-boot-orangepi-one"
> SUNXI_UBOOT_BIN="u-boot.img"
> IMAGE_SIZE=$((1000 * 1000 * 1000 * 2))
> TARGET_ARCH=armv6
>
> UBOOT_PATH="/usr/local/share/u-boot/${SUNXI_UBOOT}"
>
> allwinner_partition_image ( ) {
>      echo "Installing U-Boot files"
>      dd if=${UBOOT_PATH}/u-boot-sunxi-with-spl.bin conv=notrunc,sync
> of=/dev/${DISK_MD} bs=1024 seek=8
>      dd if=${UBOOT_PATH}/u-boot.img conv=notrunc,sync of=/dev/${DISK_MD}
> bs=1024 seek=40
>      disk_partition_mbr
>      disk_fat_create 32m 16 1m
>      disk_ufs_create
> }
> strategy_add $PHASE_PARTITION_LWW allwinner_partition_image
>
> allwinner_check_uboot ( ) {
>      uboot_port_test ${SUNXI_UBOOT} ${SUNXI_UBOOT_BIN}
> }
> strategy_add $PHASE_CHECK allwinner_check_uboot
>
> strategy_add $PHASE_BUILD_OTHER freebsd_ubldr_build
> UBLDR_LOADADDR=${UBLDR_LOADADDR}
> strategy_add $PHASE_BOOT_INSTALL freebsd_ubldr_copy_ubldr .
>
> # BeagleBone puts the kernel on the FreeBSD UFS partition.
> strategy_add $PHASE_FREEBSD_BOARD_INSTALL board_default_installkernel .
> # overlay/etc/fstab mounts the FAT partition at /boot/msdos
> strategy_add $PHASE_FREEBSD_BOARD_INSTALL mkdir -p boot/msdos
> # ubldr help and config files go on the UFS partition (after boot dir
> exists)
> strategy_add $PHASE_FREEBSD_BOARD_INSTALL freebsd_ubldr_copy boot
> =========================================================================
>
> basically, I am using u-boot for OrangePi One from ports (line 3, 8, 12,
> 13).
> Line 12 was causing problems, same as described by someone else here:
> https://github.com/freebsd/crochet/issues/191
>
> I added the parameters "conv=notrunc,sync" and now it works.
>
>
> 4. DTB file
> There is no dtb file for OrangePi One.
> In a previous attempt, by using old freebsd/crochet sources, I tried to
> use the DTB file compiled for OrangePi-Plus2E.
> It was working, but it took a lot to boot (I had issues with timers
> apparently), and I was not able to use ethernet connection.
> Then I tried the DTB from NanoPi-Neo, which is also based on H3 Soc, and
> thing seems to work fine.
> So now, I basically copied the DTB file /boot/dtb/nanopi-neo.dtb to
> /boot/dtb/sun8i-h3-orangepi-one.dtb
>
>
> 5. Issuses
> For some reason, I can not use the GrowFS option. At boot I get errors.
> The following line is continuously printed and the sistem wont boot.
> ----
> vm_fault: pager read error, pid 1 (init)
> ----
> I will try to grow the partition manually.
>
>
> For the time being, this is it.
> Hope this report is useful, if some developer wish to use my board and
> my time to test stuff to make the support of this board more stable, I
> am available for testing.
>
> Regards
> Aggaz

I'm getting exactly this same error on RPI3 and beaglebone black 
(vm_fault: pager read error, pid 1 (init)). And I reported here:

http://freebsd.1045724.x6.nabble.com/HEAD-on-RPI3-td6181434.html

The new gotcha is your report that this is related with Growfs. Thank 
you by your report. Now I know that my environment is clean and I'm not 
crazy.

[]'s
-Otacilio



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3e0ebfa5-65d1-d7a0-816b-a0c72b3fe15b>