From nobody Thu Apr 27 12:52:21 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q6bHB1JCBz477cl for ; Thu, 27 Apr 2023 12:52:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q6bH96HkDz3vn4 for ; Thu, 27 Apr 2023 12:52:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682599941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gKxnoIEhaYHumNPuQGou42/Y51AdKZOIpzN0qJyZtX8=; b=yex6d5Nnt1f0IRBmUqzqeYfra0Um3JfhNRzot6C1lWSMlQAJOLwGXJG9XIS3kb/p1+H3kd 0b0vKb27V8MP1s6iR6bMqCY9nHX/WAvnGAckla5wfNOcx0Ep55QR8AvMPN8EC6TYW+oZ2j wz33hQcFY/DYiEwU5bHnCLRMdVyjzXEgHzMqf04MNDx8OI+UDHSk+E7kHVX5akj1m2Q/Wr E5dSSGordadtBFAmBiUKeNH3t4bPiUPdb+caPDwiyVO579i/ehhGmyuvlagsjw0JwcVgur TO2wsowMDgi2kDryyBk/dgmYmAxryUf3+wOk5jdO23yvZNudxVWgJkdxVsW7kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682599941; a=rsa-sha256; cv=none; b=txpR/NhypJFoYp7mbdj/ZmNfzsfqTpky/0k5SO5n9Q9QKqOSVBJDjP4CsJt0DW0BvhB+fI 3o++xyB47X+8AV6p7jMIsZNY6A7YJ6u5jogQcZZDJ4+Zyxyrd+orAPJKV9cdG2EdWjPPOB LM5hP2+Y1/ubU8tdNIZWaw0t20LFHSll2OgvcoV67p1TtliH4kWiKz65SkKVhaMAaWm+MJ cTUlt6bBaGpBJrrMLLT9dNixPrgBzjaCcO0Zz4oIy+lDpeuEvFk36QrISX8xzNLc/NHGlt W/IUzxsVvnU1QAoCd0KXDnxZYRqRneNOaervFGHz40IzSxa6pGH0QMkm6ipoHw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q6bH95LrxzJ83 for ; Thu, 27 Apr 2023 12:52:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 33RCqLmn034991 for ; Thu, 27 Apr 2023 12:52:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 33RCqLeD034990 for freebsd-arm@FreeBSD.org; Thu, 27 Apr 2023 12:52:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 271098] [nanobsd] cannot boot any NANO_LAYOUT model on armv7 Date: Thu, 27 Apr 2023 12:52:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: hondareyte.luc@laposte.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N 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.=