From 5eebec24d0760d4dfd2c935a0dd19a422147959d Mon Sep 17 00:00:00 2001 From: drahn Date: Sun, 2 May 2021 23:48:14 +0000 Subject: [PATCH] riscv64 initiall installation notes (more of a skeleton). --- distrib/notes/riscv64/contents | 30 ++++++++++++++++++++++ distrib/notes/riscv64/features | 40 +++++++++++++++++++++++++++++ distrib/notes/riscv64/hardware | 4 +++ distrib/notes/riscv64/install | 47 ++++++++++++++++++++++++++++++++++ distrib/notes/riscv64/prep | 41 +++++++++++++++++++++++++++++ distrib/notes/riscv64/upgrade | 2 ++ distrib/notes/riscv64/whatis | 3 +++ distrib/notes/riscv64/xfer | 9 +++++++ 8 files changed, 176 insertions(+) create mode 100644 distrib/notes/riscv64/contents create mode 100644 distrib/notes/riscv64/features create mode 100644 distrib/notes/riscv64/hardware create mode 100644 distrib/notes/riscv64/install create mode 100644 distrib/notes/riscv64/prep create mode 100644 distrib/notes/riscv64/upgrade create mode 100644 distrib/notes/riscv64/whatis create mode 100644 distrib/notes/riscv64/xfer diff --git a/distrib/notes/riscv64/contents b/distrib/notes/riscv64/contents new file mode 100644 index 00000000000..67f2123261c --- /dev/null +++ b/distrib/notes/riscv64/contents @@ -0,0 +1,30 @@ +dnl $OpenBSD: contents,v 1.1 2021/05/02 23:48:14 drahn Exp $ +TopPart + +OpenBSDminiroot + +OpenBSDdistsets + +OpenBSDbsd + +OpenBSDrd +dnl not yet... +dnl OpenBSDcd + +DistributionDescription(eight) + +OpenBSDbase(92997156,284219392) + +OpenBSDcomp(57727901,212260864) + +OpenBSDgame(2768356,9330688) + +OpenBSDman(7322823,31395840) + +OpenBSDxbase(16439912,71249920) + +OpenBSDxfont(40291103,59377664) + +OpenBSDxserv(6446904,18399232) + +OpenBSDxshare(4524534,30216192) diff --git a/distrib/notes/riscv64/features b/distrib/notes/riscv64/features new file mode 100644 index 00000000000..ec845e338ab --- /dev/null +++ b/distrib/notes/riscv64/features @@ -0,0 +1,40 @@ +dnl $OpenBSD: features,v 1.1 2021/05/02 23:48:14 drahn Exp $ +dnl +dnl This file lists almost all the conditional features of this port, +dnl which are used to provide accurate installation notes. +dnl +dnl Information about the installer script features should be in sync with +dnl src/distrib/arm64/ramdisk/install.md +dnl and the list files in +dnl src/distrib/arm64/ramdisk/list +dnl +dnl ==== +dnl +dnl architecture name (for the packages directory) +define({:-MACHINE_ARCH-:},riscv64)dnl +dnl +dnl define if /sbin/kbd exists on the media +define({:-MDKBD-:},)dnl +dnl +dnl define if serial consoles needs to be enabled in /etc/ttys +dnl (i.e. md_consoleinfo is not empty) +define({:-MDSERCONS-:},)dnl +dnl +dnl define if SMP kernels are provided +define({:-MDSMP-:},)dnl +dnl +dnl define if shared libraries are provided +define({:-MDSO-:},1)dnl +dnl +dnl define if some media have timezone information (TZ in their list) +define({:-MDTZ-:},1)dnl +dnl +dnl define if glass console is possible +dnl (XXX does not imply availability of X servers though) +dnl define({:-MDX-:},)dnl +dnl +dnl define if the X server can't start until machdep.allow_aperture is set +dnl define({:-MDXAPERTURE-:},)dnl +dnl +dnl define if the X server can start without a configuration file +dnl define({:-MDXDM-:},)dnl diff --git a/distrib/notes/riscv64/hardware b/distrib/notes/riscv64/hardware new file mode 100644 index 00000000000..f3c9f8a4307 --- /dev/null +++ b/distrib/notes/riscv64/hardware @@ -0,0 +1,4 @@ +dnl $OpenBSD: hardware,v 1.1 2021/05/02 23:48:14 drahn Exp $ +The following machines are targeted by OpenBSD/MACHINE: + + Qemu riscv64 diff --git a/distrib/notes/riscv64/install b/distrib/notes/riscv64/install new file mode 100644 index 00000000000..941b11c8d94 --- /dev/null +++ b/distrib/notes/riscv64/install @@ -0,0 +1,47 @@ +dnl $OpenBSD: install,v 1.1 2021/05/02 23:48:14 drahn Exp $ +OpenBSDInstallPrelude + +OpenBSDInstallPart2 + +OpenBSDInstallPart3(,"sd0") + +OpenBSDInstallPart4 + +OpenBSDInstallMBRPart1 + +dnl OpenBSDInstallMBRPart2(indeed) + The fdisk(8) utility will be invoked to let you edit your MBR + partitioning. The current MBR partitions defined will be + displayed and you will be allowed to modify them, and add new + partitions. + + The setup will need two partitions, one 'OpenBSD' for the + OpenBSD/MACHINE installation, and one 'MSDOS' for the + U-Boot scripts/bootloader. + + If you use the whole disk option, the install script + will create a small 'MSDOS' partition and use the rest of + the disk for the OpenBSD installation. + + After your OpenBSD MBR partition has been set up, the real + partition setup can follow. + +OpenBSDInstallPart5 + +OpenBSDInstallPart6({:-CD-ROM, -:}) + +OpenBSDURLInstall + +OpenBSDCDROMInstall + +OpenBSDDISKInstall(,,{:-, MS-DOS-:}) + +OpenBSDCommonInstall + +OpenBSDInstallWrapup + +OpenBSDCongratulations + + + +OpenBSDUnattendedInstallation diff --git a/distrib/notes/riscv64/prep b/distrib/notes/riscv64/prep new file mode 100644 index 00000000000..d41ff6d0763 --- /dev/null +++ b/distrib/notes/riscv64/prep @@ -0,0 +1,41 @@ +dnl $OpenBSD: prep,v 1.1 2021/05/02 23:48:14 drahn Exp $ +Please be aware that OpenBSD support for this platform is far from +complete. + +Qemu with opensbi and u-boot is the only tested environment. + +OpenBSD can be installed onto a disk by copying the miniroot for your +board "miniroot{:--:}OSrev.img" image to an SD card. + +Booting from an SD card: + + To use the miniroot image you will need another machine to plug the + SD card in to. Any machine type will do, as long as it supports SD card + storage devices. Under OpenBSD, it will appear as a ``sd'' device, for + example sd1. + + Use the dd(1) utility to copy the miniroot to the SD card. + The command would likely be, under OpenBSD: + dd if=miniroot{:--:}OSrev.img of=/dev/rsd1c bs=1m + + When you have connected the serial to your computer, a command such + as "cu -l cuaU0 -s 115200" (assuming cuaU0 is your serial port device) + should connect you to the board's console. + +Running EFI payloads with U-Boot: + +If the U-Boot target supports "distro_bootcmd" efiboot will automatically +be loaded by placing bootaa64.efi into /efi/boot/bootaa64.efi on a FAT +filesystem. With dtb files placed in in /vendor/, /dtbs/vendor/, or +/dtb/current/vendor/. + +If the U-Boot target supports bootefi but not automatically finding it with +"distro_bootcmd" then it must be loaded manually or by U-Boot commands or +script. + => run findfdt + => load mmc 0:1 ${fdt_addr_r} ${fdtfile} + => load mmc 0:1 ${kernel_addr_r} efi/boot/bootaa64.efi + => bootefi ${kernel_addr_r} ${fdt_addr_r} +The bootloader will then run and try to load sd0a:/bsd off an FFS +filesystem after a timeout. + diff --git a/distrib/notes/riscv64/upgrade b/distrib/notes/riscv64/upgrade new file mode 100644 index 00000000000..6ac5c5e4f03 --- /dev/null +++ b/distrib/notes/riscv64/upgrade @@ -0,0 +1,2 @@ +dnl $OpenBSD: upgrade,v 1.1 2021/05/02 23:48:14 drahn Exp $ +OpenBSDUpgrade({:-your usual boot device-:}) diff --git a/distrib/notes/riscv64/whatis b/distrib/notes/riscv64/whatis new file mode 100644 index 00000000000..865e8b7e6ed --- /dev/null +++ b/distrib/notes/riscv64/whatis @@ -0,0 +1,3 @@ +dnl $OpenBSD: whatis,v 1.1 2021/05/02 23:48:14 drahn Exp $ + +OpenBSD/MACHINE is just starting to function, please port to more hardware. diff --git a/distrib/notes/riscv64/xfer b/distrib/notes/riscv64/xfer new file mode 100644 index 00000000000..fdcd29920cf --- /dev/null +++ b/distrib/notes/riscv64/xfer @@ -0,0 +1,9 @@ +dnl $OpenBSD: xfer,v 1.1 2021/05/02 23:48:14 drahn Exp $ + +Installation is supported from a media type, including: + + Image files + +OpenBSDXferShortPrelude + +OpenBSDXferFFS -- 2.20.1