Re: [rpi3] OpenBSD-6.2-beta does not boot after installer finish

2017-08-23 Thread R0me0 ***
Fixed :)
Thanks

2017-08-22 6:04 GMT-03:00 Jonathan Gray :

> On Tue, Aug 22, 2017 at 12:27:55PM +1000, Jonathan Gray wrote:
> > On Mon, Aug 21, 2017 at 06:28:16PM -0300, R0me0 *** wrote:
> > > Hello,
> > >
> > > Wrote miniroot62.fs to usb stick as usual, boots and installs
> > >
> > > ( tried with miniroot from ftp.openbsd.org and ftp.hostserver.de )
> > >
> > > miniroot62.fs 21-Aug-2017 03:10  22020096
> > >
> > >
> > > But after reboot, rpi3 does not initialize. Just boot if I rewrite
> miniroot
> > > to usb sitck
> > >
> > >
> > >
> > > Relinking to create unique kernel...done.
> > >
> > > CONGRATULATIONS! Your OpenBSD install has been successfully completed!
> > > To boot the new system, enter 'reboot' at the command prompt.
> > > When you login to your new system the first time, please read your mail
> > > using the 'mail' command.
> > >
> > > # reboot
> > > syncing disks... done
> > > rebooting...
> >
> > scan_dmesg does not seem to work correctly for this.
> >
> > # sed -n 's/^mainbus0 at root: \(.*\)$/\1/p' /var/run/dmesg.boot
> > Raspberry Pi 3 Model B Rev 1.2
> >
> > but scan_dmesg sorts the words of the string so that
> >
> > $(scan_dmesg 's/^mainbus0 at root: \(.*\)$/\1/p') gives
> >
> > "1.2 3 B Model Pi Raspberry Rev"
> >
> > The next snapshot will include a revised version of the diff
> > to use $(sysctl -n hw.product).
>
> 22nd August snapshot should work.  Thanks for the report.
>
> >
> > armv7 should be changed to use the same.
> >
> > Index: miniroot/Makefile
> > ===
> > RCS file: /cvs/src/distrib/arm64/miniroot/Makefile,v
> > retrieving revision 1.4
> > diff -u -p -r1.4 Makefile
> > --- miniroot/Makefile 7 May 2017 12:00:12 -   1.4
> > +++ miniroot/Makefile 22 Aug 2017 02:25:34 -
> > @@ -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: ramdisk/Makefile
> > ===
> > RCS file: /cvs/src/distrib/arm64/ramdisk/Makefile,v
> > retrieving revision 1.2
> > diff -u -p -r1.2 Makefile
> > --- ramdisk/Makefile  18 Feb 2017 02:01:53 -  1.2
> > +++ ramdisk/Makefile  22 Aug 2017 02:25:34 -
> > @@ -18,6 +18,7 @@ DISKTYPE=   rdroot
> >  MAKEFSARGS_RD=   -o disklabel=${DISKTYPE},minfree=0,density=4096
> >
> >  DIRS=\
> > + pine64 \
> >   rpi
> >
> >  .ifndef DESTDIR
> > Index: ramdisk/install.md
> > ===
> > RCS file: /cvs/src/distrib/arm64/ramdisk/install.md,v
> > retrieving revision 1.6
> > diff -u -p -r1.6 install.md
> > --- ramdisk/install.md28 Jul 2017 18:15:44 -  1.6
> > +++ ramdisk/install.md22 Aug 2017 02:25:34 -
> > @@ -38,23 +38,35 @@ MOUNT_ARGS_msdos="-o-l"
> >  md_installboot() {
> >   local _disk=/dev/$1 _mdec _plat
> >
> > + case $(sysctl -n hw.product) 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: ramdisk/list
> > ===
> > RCS file: /cvs/src/distrib/arm64/ramdisk/list,v
> > retrieving revision 1.4
> > 

Re: [rpi3] OpenBSD-6.2-beta does not boot after installer finish

2017-08-22 Thread Jonathan Gray
On Tue, Aug 22, 2017 at 12:27:55PM +1000, Jonathan Gray wrote:
> On Mon, Aug 21, 2017 at 06:28:16PM -0300, R0me0 *** wrote:
> > Hello,
> > 
> > Wrote miniroot62.fs to usb stick as usual, boots and installs
> > 
> > ( tried with miniroot from ftp.openbsd.org and ftp.hostserver.de )
> > 
> > miniroot62.fs 21-Aug-2017 03:10  22020096
> > 
> > 
> > But after reboot, rpi3 does not initialize. Just boot if I rewrite miniroot
> > to usb sitck
> > 
> > 
> > 
> > Relinking to create unique kernel...done.
> > 
> > CONGRATULATIONS! Your OpenBSD install has been successfully completed!
> > To boot the new system, enter 'reboot' at the command prompt.
> > When you login to your new system the first time, please read your mail
> > using the 'mail' command.
> > 
> > # reboot
> > syncing disks... done
> > rebooting...
> 
> scan_dmesg does not seem to work correctly for this.
> 
> # sed -n 's/^mainbus0 at root: \(.*\)$/\1/p' /var/run/dmesg.boot  
>  
> Raspberry Pi 3 Model B Rev 1.2
> 
> but scan_dmesg sorts the words of the string so that
> 
> $(scan_dmesg 's/^mainbus0 at root: \(.*\)$/\1/p') gives
> 
> "1.2 3 B Model Pi Raspberry Rev"
> 
> The next snapshot will include a revised version of the diff
> to use $(sysctl -n hw.product).

22nd August snapshot should work.  Thanks for the report.

> 
> armv7 should be changed to use the same.
> 
> Index: miniroot/Makefile
> ===
> RCS file: /cvs/src/distrib/arm64/miniroot/Makefile,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile
> --- miniroot/Makefile 7 May 2017 12:00:12 -   1.4
> +++ miniroot/Makefile 22 Aug 2017 02:25:34 -
> @@ -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: ramdisk/Makefile
> ===
> RCS file: /cvs/src/distrib/arm64/ramdisk/Makefile,v
> retrieving revision 1.2
> diff -u -p -r1.2 Makefile
> --- ramdisk/Makefile  18 Feb 2017 02:01:53 -  1.2
> +++ ramdisk/Makefile  22 Aug 2017 02:25:34 -
> @@ -18,6 +18,7 @@ DISKTYPE=   rdroot
>  MAKEFSARGS_RD=   -o disklabel=${DISKTYPE},minfree=0,density=4096
>  
>  DIRS=\
> + pine64 \
>   rpi
>  
>  .ifndef DESTDIR
> Index: ramdisk/install.md
> ===
> RCS file: /cvs/src/distrib/arm64/ramdisk/install.md,v
> retrieving revision 1.6
> diff -u -p -r1.6 install.md
> --- ramdisk/install.md28 Jul 2017 18:15:44 -  1.6
> +++ ramdisk/install.md22 Aug 2017 02:25:34 -
> @@ -38,23 +38,35 @@ MOUNT_ARGS_msdos="-o-l"
>  md_installboot() {
>   local _disk=/dev/$1 _mdec _plat
>  
> + case $(sysctl -n hw.product) 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: ramdisk/list
> ===
> RCS file: /cvs/src/distrib/arm64/ramdisk/list,v
> retrieving revision 1.4
> diff -u -p -r1.4 list
> --- ramdisk/list  8 Jul 2017 15:42:46 -   1.4
> +++ ramdisk/list  22 Aug 2017 02:25:34 -
> @@ -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 

Re: [rpi3] OpenBSD-6.2-beta does not boot after installer finish

2017-08-21 Thread Jonathan Gray
On Mon, Aug 21, 2017 at 06:28:16PM -0300, R0me0 *** wrote:
> Hello,
> 
> Wrote miniroot62.fs to usb stick as usual, boots and installs
> 
> ( tried with miniroot from ftp.openbsd.org and ftp.hostserver.de )
> 
> miniroot62.fs 21-Aug-2017 03:10  22020096
> 
> 
> But after reboot, rpi3 does not initialize. Just boot if I rewrite miniroot
> to usb sitck
> 
> 
> 
> Relinking to create unique kernel...done.
> 
> CONGRATULATIONS! Your OpenBSD install has been successfully completed!
> To boot the new system, enter 'reboot' at the command prompt.
> When you login to your new system the first time, please read your mail
> using the 'mail' command.
> 
> # reboot
> syncing disks... done
> rebooting...

scan_dmesg does not seem to work correctly for this.

# sed -n 's/^mainbus0 at root: \(.*\)$/\1/p' /var/run/dmesg.boot   
Raspberry Pi 3 Model B Rev 1.2

but scan_dmesg sorts the words of the string so that

$(scan_dmesg 's/^mainbus0 at root: \(.*\)$/\1/p') gives

"1.2 3 B Model Pi Raspberry Rev"

The next snapshot will include a revised version of the diff
to use $(sysctl -n hw.product).

armv7 should be changed to use the same.

Index: miniroot/Makefile
===
RCS file: /cvs/src/distrib/arm64/miniroot/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- miniroot/Makefile   7 May 2017 12:00:12 -   1.4
+++ miniroot/Makefile   22 Aug 2017 02:25:34 -
@@ -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: ramdisk/Makefile
===
RCS file: /cvs/src/distrib/arm64/ramdisk/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- ramdisk/Makefile18 Feb 2017 02:01:53 -  1.2
+++ ramdisk/Makefile22 Aug 2017 02:25:34 -
@@ -18,6 +18,7 @@ DISKTYPE= rdroot
 MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096
 
 DIRS=\
+   pine64 \
rpi
 
 .ifndef DESTDIR
Index: ramdisk/install.md
===
RCS file: /cvs/src/distrib/arm64/ramdisk/install.md,v
retrieving revision 1.6
diff -u -p -r1.6 install.md
--- ramdisk/install.md  28 Jul 2017 18:15:44 -  1.6
+++ ramdisk/install.md  22 Aug 2017 02:25:34 -
@@ -38,23 +38,35 @@ MOUNT_ARGS_msdos="-o-l"
 md_installboot() {
local _disk=/dev/$1 _mdec _plat
 
+   case $(sysctl -n hw.product) 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: ramdisk/list
===
RCS file: /cvs/src/distrib/arm64/ramdisk/list,v
retrieving revision 1.4
diff -u -p -r1.4 list
--- ramdisk/list8 Jul 2017 15:42:46 -   1.4
+++ ramdisk/list22 Aug 2017 02:25:34 -
@@ -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



[rpi3] OpenBSD-6.2-beta does not boot after installer finish

2017-08-21 Thread R0me0 ***
Hello,

Wrote miniroot62.fs to usb stick as usual, boots and installs

( tried with miniroot from ftp.openbsd.org and ftp.hostserver.de )

miniroot62.fs 21-Aug-2017 03:10  22020096


But after reboot, rpi3 does not initialize. Just boot if I rewrite miniroot
to usb sitck



Relinking to create unique kernel...done.

CONGRATULATIONS! Your OpenBSD install has been successfully completed!
To boot the new system, enter 'reboot' at the command prompt.
When you login to your new system the first time, please read your mail
using the 'mail' command.

# reboot
syncing disks... done
rebooting...