On Sun, Aug 20, 2017 at 12:24:20AM +1000, Jonathan Gray wrote:
> With the atf-allwinner port and u-boot patch on ports@ we can now build
> and include an open firmware for the Pine64 without boot0.
>
> The arm64 snapshot for the 19th of August includes an older version of
> this patch which scanned the dmesg for *'Pine64+'* in the dmesg.
>
> U-Boot actually includes device trees for both
> sun50i-a64-pine64.dtb and sun50i-a64-pine64-plus.dtb in this image so
> this has been changed to just *'Pine64'*.
>
> So while all variants should boot the miniroot only the 1GB/2GB Pine64+
> systems will install U-Boot from the ramdisk in the current snapshot.
>
> I don't have a Pine64, looking for testers.
Hi,
my board was -plus afterall, and i was unable to get through the build
for regular GENERIC w/o panics,
so i didn't yet even try the RAMDISK w/your patch,
but since i see you've got correct offsets there,
i doubt it has issues besides missing .dtb copy on pine64?
-Artturi
>
> Index: arm64/miniroot/Makefile
> ===================================================================
> RCS file: /cvs/src/distrib/arm64/miniroot/Makefile,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile
> --- arm64/miniroot/Makefile 7 May 2017 12:00:12 -0000 1.4
> +++ arm64/miniroot/Makefile 19 Aug 2017 14:15:08 -0000
> @@ -65,6 +65,8 @@ do_files:
> cp /usr/mdec/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi
> echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh
> echo
> 'arm_control=0x200\nenable_uart=1\ndevice_tree_address=0x100\nkernel=u-boot.bin'
> > ${MOUNT_POINT}/config.txt
> + dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \
> + of=${VND_CDEV} bs=1024 seek=8
>
> rd_setup:
> dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS}
> Index: arm64/ramdisk/Makefile
> ===================================================================
> RCS file: /cvs/src/distrib/arm64/ramdisk/Makefile,v
> retrieving revision 1.2
> diff -u -p -r1.2 Makefile
> --- arm64/ramdisk/Makefile 18 Feb 2017 02:01:53 -0000 1.2
> +++ arm64/ramdisk/Makefile 19 Aug 2017 14:15:08 -0000
> @@ -18,6 +18,7 @@ DISKTYPE= rdroot
> MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096
>
> DIRS=\
> + pine64 \
> rpi
>
> .ifndef DESTDIR
> Index: arm64/ramdisk/install.md
> ===================================================================
> RCS file: /cvs/src/distrib/arm64/ramdisk/install.md,v
> retrieving revision 1.6
> diff -u -p -r1.6 install.md
> --- arm64/ramdisk/install.md 28 Jul 2017 18:15:44 -0000 1.6
> +++ arm64/ramdisk/install.md 19 Aug 2017 14:15:08 -0000
> @@ -38,23 +38,36 @@ MOUNT_ARGS_msdos="-o-l"
> md_installboot() {
> local _disk=/dev/$1 _mdec _plat
>
> + # Identify platform based on dmesg.
> + case $(scan_dmesg 's/^mainbus0 at root: \(.*\)$/\1/p') in
> + *'Pine64'*) _plat=pine64;;
> + *'Raspberry Pi'*) _plat=rpi;;
> + esac
> +
> # Mount MSDOS partition, extract U-Boot and copy UEFI boot program
> mount ${MOUNT_ARGS_msdos} ${_disk}i /mnt/mnt
> mkdir -p /mnt/mnt/efi/boot
> cp /mnt/usr/mdec/BOOTAA64.EFI /mnt/mnt/efi/boot/bootaa64.efi
> echo bootaa64.efi > /mnt/mnt/efi/boot/startup.nsh
>
> - _plat=rpi
> _mdec=/usr/mdec/$_plat
>
> - cp $_mdec/{bootcode.bin,start.elf,fixup.dat,*.dtb} /mnt/mnt/
> - cp $_mdec/u-boot.bin /mnt/mnt/
> - cat > /mnt/mnt/config.txt<<-__EOT
> - arm_control=0x200
> - enable_uart=1
> - device_tree_address=0x100
> - kernel=u-boot.bin
> - __EOT
> + case $_plat in
> + pine64)
> + dd if=$_mdec/u-boot-sunxi-with-spl.bin of=${_disk}c \
> + bs=1024 seek=8 >/dev/null 2>&1
> + ;;
> + rpi)
> + cp $_mdec/{bootcode.bin,start.elf,fixup.dat,*.dtb} /mnt/mnt/
> + cp $_mdec/u-boot.bin /mnt/mnt/
> + cat > /mnt/mnt/config.txt<<-__EOT
> + arm_control=0x200
> + enable_uart=1
> + device_tree_address=0x100
> + kernel=u-boot.bin
> + __EOT
> + ;;
> + esac
> }
>
> md_prep_fdisk() {
> Index: arm64/ramdisk/list
> ===================================================================
> RCS file: /cvs/src/distrib/arm64/ramdisk/list,v
> retrieving revision 1.4
> diff -u -p -r1.4 list
> --- arm64/ramdisk/list 8 Jul 2017 15:42:46 -0000 1.4
> +++ arm64/ramdisk/list 19 Aug 2017 14:15:08 -0000
> @@ -124,4 +124,6 @@ COPY /usr/local/share/raspberrypi-firmwa
> COPY /usr/local/share/raspberrypi-firmware/boot/fixup.dat
> usr/mdec/rpi/fixup.dat
> COPY /usr/local/share/u-boot/rpi_3/u-boot.bin usr/mdec/rpi/u-boot.bin
>
> +COPY /usr/local/share/u-boot/pine64_plus/u-boot-sunxi-with-spl.bin
> usr/mdec/pine64/u-boot-sunxi-with-spl.bin
> +
> TZ
>