DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th December 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default Installing OpenBSD to eMMC

I'm try to think through and plan the installation of OpenBSD amd64/current to a netbook with eMMC storage.

My netbook has 2 current issues. install64.fs (?bsd.rd) does not recognize eMMC storage and the wireless card, rtl8723BE, is not presently supported. Per Kevin Lo, rtl8723BE support is in the works. There are reports that formated eMMC storage is recognized by bsd.sp/bsd.mp.

Quote:
Thank you for the suggestion, Stuart! That was fun, but now the plot gets
thicker.
I installed 6.3 to a usb stick, but when I reboot into the install, my
eMMC is suddenly showing up as 29GB, as it should.

Should I try somehow manually installing from my openbsd install on the usb
to the eMMC? That seems convoluted but possibly fun.

Here are the sdmmc related lines from dmesg in the install environment:
source: http://openbsd-archive.7691.n7.nabbl...-td352781.html

The latest linux kernel, and by report FreeBSD 12rc, recognize eMMC storage and I was able to install Arch Linux. The Arch Linux partitions:

Code:
Disk /dev/mmcblk0: 29.1 GiB, 31268536320 bytes, 61071360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AB2391E3-95E4-4EA2-9856-7965843FBD23

Device            Start      End  Sectors  Size Type
/dev/mmcblk0p1     2048  2099199  2097152    1G BIOS boot
/dev/mmcblk0p2  2099200 18876415 16777216    8G Linux swap
/dev/mmcblk0p3 18876416 38334463 19458048  9.3G Linux filesystem
/dev/mmcblk0p4 38334464 61069311 22734848 10.9G Linux filesystem
I'm wondering about changing /dev/mmcblk0p1 to an EFI partition and
Code:
mount /dev/mmcblk0p1/mnt2
mkdir -p /mnt2/efi/boot
cp /mnt/usr/mdec/BOOTX64.EFI /mnt2/efi/boot
Delete partitions /dev/mmcblk0p2 -> /dev/mmcblk0p4 and create /dev/mmcblk0p2 out of the remaining space as type A6. disklabel /dev/mmcblk0. Then a choice: extract all fileset manually or just bsd.rd and hopefully install the remaining filesets.

Advice/Comments?

Last edited by shep; 5th December 2018 at 07:49 PM.
Reply With Quote
  #2   (View Single Post)  
Old 5th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

If you don't want to dual boot with FBSD:
  • install onto USB
  • boot USB
  • create an MBR or GPT on the eMMC drive with fdisk(8). If you create a GPT, don't forget to create the EFI partition for boot program storage.
  • allocate partitions with disklabel(8). Automatic allocation would be advised.
  • format each partition with newfs(8)
  • One partition at a time, use dump(8)/restore(8) to copy the USB system to eMMC.
  • remove the restoresymtable files in each restore()d partition. They don't hurt anything, but they won't be needed again.
  • use installboot(8) to write boot blocks.
  • Edit your fstab(5) to point to the new DUID!
  • reboot!

Last edited by jggimi; 5th December 2018 at 07:41 PM. Reason: highlighted a critical step. :)
Reply With Quote
  #3   (View Single Post)  
Old 5th December 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

I'm going to order another 8GB USB flash drive for the install. My understanding of disklabel(8) is 8GB's is needed for all the usual partitions.

In Arch linux, swap space is assigned by mkswap. Will disklabel automatically "mkswap" or just allocate the space? Is there an OpenBSD mkswap equivalent?

My prior gpt installs used OpenBSD UEFI howto. I would like to keep the GPT partition as 1GB in case I ever want to restore Win10s. Using
Code:
fdisk -i -b 1024 sdmmc0
should accomplish that?
Then copy over efi/boot/BOOTX64.EFI from the usb drive to sdmmc0?
Reply With Quote
  #4   (View Single Post)  
Old 5th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

As you can see in the AUTOMATIC ALLOCATION section of disklabel(8), partition "b" will be defined as swap. In OpenBSD, if partition "b" of the boot drive is labelled as swap space it will be automatically allocated for swap on boot. Swap space requires no pre-formatting of any kind, and if used is encrypted.

---

I think you may not need to manually copy the boot program, but you can certainly check the partition to see if the second stage bootloader is installed there. I can't remember if installboot(8) does this for you.
Reply With Quote
  #5   (View Single Post)  
Old 5th December 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

@jggimi

Thanks. Hopefully I'll be able to report back with a dmesg.
Reply With Quote
  #6   (View Single Post)  
Old 6th December 2018
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 461
Default

Quote:
Originally Posted by shep View Post
Then copy over efi/boot/BOOTX64.EFI from the usb drive to sdmmc0?
The UEFI loader needs to be placed at EFI/BOOT/BOOTX64.EFI on the EFI system partition for it to be loaded automatically by the UEFI firmware.

More details here: https://www.rodsbooks.com/efi-bootlo...rnative-naming
__________________
Are you infected with Wetiko?
Reply With Quote
  #7   (View Single Post)  
Old 6th December 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Unless there are some major commits to current, I'll likely hold off until the 6.5 release.
The lack of eMMC recognition by bsd.rd raises questions about upgrading current via snapshot binaries.
Doing manual upgrades seems to be the only path and it looks like a little much to do on a weekly basis.
https://www.openbsd.org/faq/upgrade64.html#NoInstKern


On the other hand, with -release, syspatch and M:tier updates should work.
Reply With Quote
  #8   (View Single Post)  
Old 6th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

If you had the time and inclination, you could install -current onto USB, and then experiment with the eMMC disk as the second mass storage device.

If nothing else, a GENERIC or GENERIC.MP -current dmesg would probably be welcome by those making revisions to sdmmc(4) and related drivers in the chain.

What was posted in the thread you reference in your top post was a 6.3 RAMDISK dmesg.
Reply With Quote
  #9   (View Single Post)  
Old 6th December 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

I was unable to find any pertinent eMMC commits since the 6.3 release.

I did find the FreeBSD 12 commits and apparently there are 3 use cases that were viewed manufacturer quirks. The sys/dev code differed between FreeBSD and OpenBSD to the point that it did not look like a slam-dunk import and certainly beyond my skill level. I'll download the latest changelog, grep it for mmc and post the output.

Code:
[jsh@Huffalump Downloads]$ less ChangeLog | grep -n mmc
28577:  sys/dev/sdmmc  : if_bwfm_sdio.c 
35069:  sys/dev/fdt    : sximmc.c 
45868:  sys/dev/fdt    : ahci_fdt.c if_dwge_fdt.c sximmc.c sxitwi.c

Modified files:
 sys/dev/ic     : elink3.c malo.c 
 sys/dev/pci    : if_bge.c if_nep.c if_vte.c 
 sys/dev/sdmmc  : if_bwfm_sdio.c 

CVSROOT: /cvs
Module name: src
Changes by: patrick@cvs.openbsd.org 2018/11/16 13:11:52

Modified files:
 sys/dev/fdt    : sximmc.c 

Log message:
Add support for Allwinner A64's eMMC controller.  It is essentially
the same as the MMC controller but has the same DMA max length as
the A10 SoC.  This makes the eMMC work on the Pinebook.

ok jsg@


Modified files:
 sys/dev/fdt    : ahci_fdt.c if_dwge_fdt.c sximmc.c sxitwi.c 

Log message:
Unify messaged printed when we can't estiblish an interrupt.
.

Given the limited storage space, I'm reluctant to dual boot. I would offer to work w/ the developers but am hesitant to blow away a working system without developer interest. I'll post to @tech, with a link to the FreeBSD code, and see if there are any responses.

Last edited by shep; 6th December 2018 at 07:12 PM. Reason: added changelog search
Reply With Quote
Old 10th December 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

I did a minimal amd64 6.4 install to my 1GB usb drive and booted the drive on the HP Stream.

My dmesg
Code:
OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8128622592 (7752MB)
avail mem = 7872995328 (7508MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xe66f0 (36 entries)
bios0: vendor Insyde version "F.01" date 05/03/2018
bios0: HP HP Stream Laptop 14-cb1XX
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP UEFI IHIS UEFI SSDT SSDT MSDM BDAT DBG2 DBGP HPET LPIT APIC MCFG NPKT PRAM WSMT SSDT SSDT SSDT SSDT SSDT SSDT SSDT FPDT WDAT
acpi0: wakeup devices PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) XHC_(S4) HDAS(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 19200000 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Celeron(R) N4000 CPU @ 1.10GHz, 1097.35 MHz, 06-7a-01
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 19MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.2.4.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Celeron(R) N4000 CPU @ 1.10GHz, 1096.98 MHz, 06-7a-01
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (RP01)
acpiprt2 at acpi0: bus -1 (RP02)
acpiprt3 at acpi0: bus -1 (RP03)
acpiprt4 at acpi0: bus -1 (RP04)
acpiprt5 at acpi0: bus 1 (RP05)
acpiprt6 at acpi0: bus -1 (RP06)
acpiec0 at acpi0
### AML PARSE ERROR (0x4cd5): Undefined name: SMA4
error evaluating: \\_SB_.PCI0.LPCB.EC0_._REG
acpiec _REG failed, broken BIOS
acpipwrres0 at acpi0: DRST
acpipwrres1 at acpi0: DRST
acpipwrres2 at acpi0: DRST
acpipwrres3 at acpi0: DRST
acpipwrres4 at acpi0: DRST
acpipwrres5 at acpi0: DRST
acpicpu0 at acpi0: C3(10@150 mwait.1@0x60), C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS
acpicpu1 at acpi0: C3(10@150 mwait.1@0x60), C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS
acpitz0 at acpi0: critical temperature is 210 degC
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibat0 at acpi0: BAT0 model "Primary" serial   type LION oem "HP"
"HPQ6001" at acpi0 not configured
"HPIC0003" at acpi0 not configured
"*ETD0742" at acpi0 not configured
acpicmos0 at acpi0
"INT3453" at acpi0 not configured
"INT0E0C" at acpi0 not configured
"INT33A1" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"INT3400" at acpi0 not configured
"INT3403" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 1097 MHz: speeds: 1101, 1100, 1000, 900, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 vendor "Intel", unknown product 0x31f0 rev 0x03
vendor "Intel", unknown product 0x318c (class DASP subclass miscellaneous, rev 0x03) at pci0 dev 0 function 1 not configured
vendor "Intel", unknown product 0x3190 (class system subclass miscellaneous, rev 0x03) at pci0 dev 0 function 3 not configured
vga1 at pci0 dev 2 function 0 vendor "Intel", unknown product 0x3185 rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
azalia0 at pci0 dev 14 function 0 vendor "Intel", unknown product 0x3198 rev 0x03: msi
azalia0: codecs: Realtek ALC282, Intel/0x280d, using Realtek ALC282
audio0 at azalia0
vendor "Intel", unknown product 0x319a (class communications subclass miscellaneous, rev 0x03) at pci0 dev 15 function 0 not configured
ppb0 at pci0 dev 19 function 0 vendor "Intel", unknown product 0x31da rev 0xf3: msi
pci1 at ppb0 bus 1
vendor "Realtek", unknown product 0xb822 (class network subclass miscellaneous, rev 0x00) at pci1 dev 0 function 0 not configured
xhci0 at pci0 dev 21 function 0 vendor "Intel", unknown product 0x31a8 rev 0x03: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
sdhc0 at pci0 dev 28 function 0 vendor "Intel", unknown product 0x31cc rev 0x03: apic 1 int 39
sdhc0: SDHC 3.0, 200 MHz base clock
sdmmc0 at sdhc0: 8-bit, sd high-speed, mmc high-speed, dma
pcib0 at pci0 dev 31 function 0 vendor "Intel", unknown product 0x31e8 rev 0x03
vendor "Intel", unknown product 0x31d4 (class serial bus subclass SMBus, rev 0x03) at pci0 dev 31 function 1 not configured
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
wbsio0 at isa0 port 0x2e/2: W83627EHF rev 0x87
umass0 at uhub0 port 3 configuration 1 interface 0 "USB DISK 2.0" rev 2.00/12.19 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: <USB, DISK 2.0, 1219> SCSI0 0/direct removable serial.090c1000R75JEPN4EPUW
sd0: 956MB, 512 bytes/sector, 1957888 sectors
ugen0 at uhub0 port 5 "Realtek Bluetooth Radio" rev 1.10/1.10 addr 3
uvideo0 at uhub0 port 6 configuration 1 interface 0 "Generic HP Webcam" rev 2.00/1.01 addr 4
video0 at uvideo0
sdmmc0: can't enable card
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (50925dce733bad21.a) swap on sd0b dump on sd0b
umass1 at uhub0 port 2 configuration 1 interface 0 "HP v125w" rev 2.00/1.00 addr 5
umass1: using SCSI over Bulk-Only
scsibus4 at umass1: 2 targets, initiator 0
sd1 at scsibus4 targ 1 lun 0: <HP, v125w, 1.00> SCSI2 0/direct removable serial.03f033073S9A091102A6
sd1: 3821MB, 512 bytes/sector, 7827392 sectors
fdisk would not find /dev/sdmmc0
Reply With Quote
Old 10th December 2018
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

The emmc card should be treated as a scsi disk so you would need to run fdisk against sdX.

But in your last dmesg the driver failed to power up the card (according to the comment in the driver code).

I think you've said OpenBSD has been able to detect the card before? Was that after a warm reboot from another OS that could see the card? Could be that the OpenBSD driver is missing some initialization step for this particular device.
Reply With Quote
Old 11th December 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

This archive post noted that a reboot to the install environment, the eMMC was seen.http://openbsd-archive.7691.n7.nabbl...-td352781.html

I found this presentation from Samsung on the structure of eMMC. Slide 3of21 shows the RPMB partition may be sector 0.

https://www.slideshare.net/linaroorg/intro-to-emmc

FreeBSD 12amd64 Release does recognize the eMMC drive

Code:
mmc0: <MMC/SD bus> on sdhci_pci0
mmcsd0: 31GB <MMCHC DF4032 0.1 SN F626303D MFG 04/2018 by 69 0x0000> at mmc0 200.0MHz/8bit/8192-block
mmcsd0boot0: 4MB partion 1 at mmcsd0
mmcsd0boot1: 4MB partion 2 at mmcsd0
mmcsd0rpmb: 4MB partion 3 at mmcsd0
I was also able to print the partition table using FreeBSD's fdisk.

Last edited by shep; 11th December 2018 at 04:45 PM. Reason: added FreeBSD12 dmesg
Reply With Quote
Old 25th December 2019
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

As of this commit, emmc storage is recognized on an Gemini Lake based HP stream.
https://marc.info/?l=openbsd-tech&m=157426797205036&w=2

Last edited by shep; 25th December 2019 at 05:41 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing OpenBSD under QEMU/KVM bsd007 OpenBSD Packages and Ports 4 26th October 2017 11:37 AM
Installing KDE on OpenBSD 5.2 EverydayDiesel OpenBSD General 3 17th January 2013 11:25 PM
Installing Cacti on OpenBSD 4.9 ai-danno Guides 6 23rd September 2011 06:59 PM
OpenBSD installing OpenBSD from USB ocicat News 5 5th April 2010 10:51 PM
installing openbsd bsdnewbie999 OpenBSD Installation and Upgrading 12 4th May 2009 11:55 AM


All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick