Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2023 12:52:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-arm@FreeBSD.org
Subject:   [Bug 271098] [nanobsd] cannot boot any NANO_LAYOUT model on armv7
Message-ID:  <bug-271098-7@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271098

            Bug ID: 271098
           Summary: [nanobsd] cannot boot any NANO_LAYOUT model on armv7
           Product: Base System
           Version: 13.2-RELEASE
          Hardware: arm
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: hondareyte.luc@laposte.net

Hello,

I try to build a bootable image on amd64 for armv7 with EFI for an orangepi=
-pc
and nanopi neo, but it does not work. The only layout that build without er=
ror
is 'std-embedded'. But it is not bootable because the offset of the FAT
partition is wrong. With an offset of 1M (like GPT) it works.

The good one:
=3D>     1  402511  md0  MBR  (197M)
       1    2047       - free -  (1.0M)
    2048   65536    1  fat16  [active]  (32M)
   67584   65536    2  freebsd  (32M)
  133120  269392    3  freebsd  (132M)

=3D>     0  269392  md0s3  BSD  (132M)
       0      16         - free -  (8.0K)
      16  269376      1  freebsd-ufs  (132M)

The partition layout with 'std-embedded' is as follow (I have manually acti=
vate
FAT16 partition):

The bad:
=3D>     1  400464  md0  MBR  (196M)
       1   65536    1  fat16  [active]  (32M)
   65537   65536    2  freebsd  (32M)
  131073  269392    3  freebsd  (132M)

=3D>     0  269392  md0s3  BSD  (132M)
       0      16         - free -  (8.0K)
      16  269376      1  freebsd-ufs  (132M)

And the ugly: here a patch which a new scheme named 'std-armv7' (not sure t=
his
is the best way to solve the problem) which add an offset to _.s1.


--- common.ori  2023-04-26 13:05:49.229317000 +0200
+++ common.new  2023-04-27 14:42:41.388647000 +0200
@@ -268,6 +268,13 @@
        # but there's problems: it marks all partitions as active, so you h=
ave
to
        # boot off partition 3 or 2 by hand if you're playing around with t=
his
WIP
        case ${NANO_LAYOUT} in
+       std-armv7)
+               # Layout for armv7 with EFI
+               mkimg -a 1 -s mbr -p ${s1}:=3D${NANO_LOG}/_.s1:1M \
+                       -p ${s2}:=3D${NANO_LOG}/_.s2 \
+                       -p ${s3}:=3D${NANO_LOG}/_.s3 \
+                       -o ${out}
+               ;;
        std-embedded)
                mkimg -a 3 ${skiparg} ${fmtarg} ${bootmbr} -s mbr -p
${s1}:=3D${NANO_LOG}/_.s1 \
                        -p ${s2}:=3D${NANO_LOG}/_.s2 \
@@ -593,7 +600,7 @@
 : ${NANO_MAKEFS_UFS:=3Dmakefs -t ffs -B ${NANO_ENDIAN}}
 : ${NANO_DISK_SCHEME:=3Dmbr}     # No others really supported ATM (well, g=
pt)
 case ${NANO_LAYOUT} in
-std-embedded)
+std-embedded|std-armv7)
        NANO_SLICE_FAT=3Ds1
        NANO_SLICE_CFG=3Ds2
        NANO_SLICE_ROOT=3Ds3

Regards,
Luc

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271098-7>