From owner-freebsd-arm@freebsd.org Fri Nov 9 21:10:04 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6418E1108114 for ; Fri, 9 Nov 2018 21:10:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C0D6F8DE2D for ; Fri, 9 Nov 2018 21:10:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 02264155B8 for ; Fri, 9 Nov 2018 21:10:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id wA9LA2nx043867 for ; Fri, 9 Nov 2018 21:10:02 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id wA9LA240043851 for freebsd-arm@FreeBSD.org; Fri, 9 Nov 2018 21:10:02 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 233097] U-Boot/ubldr loaderdev broken Date: Fri, 09 Nov 2018 21:10:02 +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: 12.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pawel.worach@gmail.com 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 MIME-Version: 1.0 X-Rspamd-Queue-Id: C0D6F8DE2D X-Spamd-Result: default: False [-105.69 / 200.00]; ALLOW_DOMAIN_WHITELIST(-100.00)[freebsd.org]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[4]; XAW_SERVICE_ACCT(1.00)[]; MX_GOOD(-0.01)[cached: mx66.freebsd.org]; NEURAL_HAM_SHORT(-1.00)[-1.000,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:10310, ipnet:2001:1900:2254::/48, country:US]; IP_SCORE(-3.58)[ip: (-9.50), ipnet: 2001:1900:2254::/48(-4.69), asn: 10310(-3.62), country: US(-0.09)]; TO_DOM_EQ_FROM_DOM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; FROM_NO_DN(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 21:10:04 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233097 Bug ID: 233097 Summary: U-Boot/ubldr loaderdev broken Product: Base System Version: 12.0-STABLE Hardware: arm OS: Any Status: New Severity: Affects Some People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: pawel.worach@gmail.com Board: bcm283x armv6 U-Boot: 2018.09 FreeBSD: stable/12 r340282 Setting loaderdev in U-Boot is supposed to set the correct currdev for ubld= r, this seems to be broken. Setting loaderdev to "mmc 0:3.0" seems to cause ubldr to use unit=3D0, slic= e=3D0 and partition=3D3 instead of slice=3D3 and partition=3D0. This is caused by stor_open() in stand/uboot/lib/disk.c which loads a vararg uboot_devdesc struct as a disk_devdesc struct. My workaround was to use the disk_devdesc struct in stand/uboot/common/main= .c instead of the uboot_devdesc struct. Post-workaround: U-Boot> setenv loaderdev mmc 0:3.0 U-Boot> boot ... U-Boot env: loaderdev=3D'mmc 0:3.0' Found U-Boot device: disk Checking unit=3D0 slice=3D3 partition=3D0... good. Booting from disk0s3a: --=20 You are receiving this mail because: You are the assignee for the bug.=