From owner-svn-src-head@freebsd.org Tue Sep 5 05:51:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84921E1BA2E for ; Tue, 5 Sep 2017 05:51:51 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: from mail-ua0-x230.google.com (mail-ua0-x230.google.com [IPv6:2607:f8b0:400c:c08::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37FA576CAC; Tue, 5 Sep 2017 05:51:51 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: by mail-ua0-x230.google.com with SMTP id l24so5956623uaa.5; Mon, 04 Sep 2017 22:51:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OON2XWmpfXKGwWkq/741zg6lgyEyHBpOcyrDouzGLsk=; b=lcGIaIus5S+qbdgwfW1eJJuoTGQpLCPkNfmJzkcZ5ahMVfwjpZxGD3nm5IQSAo8+Yl Q6+sezxMWdLz/4bB9ORQDb/PCUZouB/Ia4WnoHZl2m9p6N5OI+/wylptpZMDfRYo7BXB y6Ji7WqewMCCQ0BkSFIqMMucppe3lOW/+Cr9j3D6SMJOj2rg9bpfs4FogJV/2oK4KPsz UhKv+FGGtXttBUVFduh3Qoz8sSL6xFWgEe/CWGmvFWSUOlB5yUvocEmZi5e6UdwIg6Eo pSZgCxEhba25kQUVjU7lyuPmOSKAKPq78UcxWRbeS3FgwvmVS51GrYpBwcm8/KzQlI61 bHMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OON2XWmpfXKGwWkq/741zg6lgyEyHBpOcyrDouzGLsk=; b=T7D16ScO6rQUkq0fNYi8tFkjG7o+9oYpwbhvoLi8TK9CViiKnPWjdbSAc1orh0/9XB jYPWXW/vbTNegOyG29/pN+CqxzS/VpecDvi+GIs7xYSoKxxKYhy903+tGRvBXvyoaLuf WPJzRq5cqvaOZpmfhVHgQW84dV1vZ831TWbuNWXSJWL+elscXmMJOXkRTjBuim36/tAz PRk+h+o3O5y+cvXjJu37pJaC4RNRbBM3+ZQTZi5EnzwPqQ/CqeI7XlN/7PWlfOLZGsBX hUDsvjrh7ivVzhm0T8TGRcBihk0g9VY2tir9VsV8QFW2UPKF/kOq0nZCLbgxhytZTHev P16A== X-Gm-Message-State: AHPjjUgbPbiofAEiXnbG/q7cFdfahf9nUG9A48mv1I1hGTN/+1GT8EXE FrhW07PKXHX/xTYY7bc88PGhYBja93R4 X-Google-Smtp-Source: ADKCNb7y3R7QMpoyUq2QnpuY0I8gKoZ2pbcC22wSBfehL1AtLWP5cnCr4aEDyc1D3y1HfF99XIzLbx7NupJM+sC1qTY= X-Received: by 10.176.83.24 with SMTP id x24mr1886332uax.107.1504590709734; Mon, 04 Sep 2017 22:51:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.68.87 with HTTP; Mon, 4 Sep 2017 22:51:19 -0700 (PDT) In-Reply-To: <201708311732.v7VHWEvs037245@repo.freebsd.org> References: <201708311732.v7VHWEvs037245@repo.freebsd.org> From: Jia-Shiun Li Date: Tue, 5 Sep 2017 13:51:19 +0800 Message-ID: Subject: Re: svn commit: r323063 - head/sys/boot/efi/boot1 To: Warner Losh Cc: svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 05:51:51 -0000 Seems to cause armv6 crossbuild to fail. But did armv6 use efi anyway? jsli@jsli-e5:/tmp/src # uname -a FreeBSD jsli-e5 12.0-CURRENT FreeBSD 12.0-CURRENT #59 r323150: Mon Sep 4 11:30:09 CST 2017 jsli@jsli-e5:/usr/obj/usr/src/sys/GENERIC-NODEBUG amd64 jsli@jsli-e5:/tmp/src # svnversion 323170 jsli@jsli-e5:/tmp/src # time nice +20 env MAKEOBJDIRPREFIX=/tmp/obj make -sj12 TARGET_ARCH=armv6 KERNCONF=RPI2 -DNO_CLEAN buildworld buildkernel ... ... ... /tmp/src/sys/boot/efi/boot1/boot1.c:474:32: error: format specifies type 'wchar_t *' (aka 'unsigned int *') but the argume nt has type 'CHAR16 *' (aka 'unsigned short *') [-Werror,-Wformat] printf(" Load Path: %S\n", text); ~~ ^~~~ /tmp/src/sys/boot/efi/boot1/boot1.c:485:35: error: format specifies type 'wchar_t *' (aka 'unsigned int *') but the argume nt has type 'CHAR16 *' (aka 'unsigned short *') [-Werror,-Wformat] printf(" Load Device: %S\n", text); ~~ ^~~~ 2 errors generated. --- boot1.o --- *** [boot1.o] Error code 1 make[6]: stopped in /tmp/src/sys/boot/efi/boot1 1 error make[6]: stopped in /tmp/src/sys/boot/efi/boot1 --- all_subdir_sys/boot/efi/boot1 --- *** [all_subdir_sys/boot/efi/boot1] Error code 2 make[5]: stopped in /tmp/src/sys/boot/efi 1 error make[5]: stopped in /tmp/src/sys/boot/efi --- all_subdir_sys/boot/efi --- *** [all_subdir_sys/boot/efi] Error code 2 make[4]: stopped in /tmp/src/sys/boot 1 error make[4]: stopped in /tmp/src/sys/boot -Jia-Shiun On Fri, Sep 1, 2017 at 1:32 AM, Warner Losh wrote: > Author: imp > Date: Thu Aug 31 17:32:14 2017 > New Revision: 323063 > URL: https://svnweb.freebsd.org/changeset/base/323063 > > Log: > boot1.efi: print more info about where boot1.efi is loaded from > > Print the device that boot1.efi was loaded from. Print the path as > well (since it isn't included in DeviceHandle). Move block where we do > this earlier so all the block handle code is now together. > > Sponsored by: Netflix > > Modified: > head/sys/boot/efi/boot1/boot1.c > > Modified: head/sys/boot/efi/boot1/boot1.c > ============================================================ > ================== > --- head/sys/boot/efi/boot1/boot1.c Thu Aug 31 17:32:09 2017 > (r323062) > +++ head/sys/boot/efi/boot1/boot1.c Thu Aug 31 17:32:14 2017 > (r323063) > @@ -344,6 +344,7 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) > EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl = NULL; > SIMPLE_TEXT_OUTPUT_INTERFACE *conout = NULL; > UINTN i, max_dim, best_mode, cols, rows, hsize, nhandles; > + CHAR16 *text; > > /* Basic initialization*/ > ST = Xsystab; > @@ -387,6 +388,27 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) > } > putchar('\n'); > > + /* Determine the devpath of our image so we can prefer it. */ > + status = BS->HandleProtocol(IH, &LoadedImageGUID, (VOID**)&img); > + imgpath = NULL; > + if (status == EFI_SUCCESS) { > + text = efi_devpath_name(img->FilePath); > + printf(" Load Path: %S\n", text); > + efi_free_devpath_name(text); > + > + status = BS->HandleProtocol(img->DeviceHandle, > &DevicePathGUID, > + (void **)&imgpath); > + if (status != EFI_SUCCESS) { > + DPRINTF("Failed to get image DevicePath (%lu)\n", > + EFI_ERROR_CODE(status)); > + } else { > + text = efi_devpath_name(imgpath); > + printf(" Load Device: %S\n", text); > + efi_free_devpath_name(text); > + } > + > + } > + > /* Get all the device handles */ > hsize = (UINTN)NUM_HANDLES_INIT * sizeof(EFI_HANDLE); > if ((status = BS->AllocatePool(EfiLoaderData, hsize, (void > **)&handles)) > @@ -421,24 +443,6 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) > nhandles = hsize / sizeof(*handles); > printf(" Probing %zu block devices...", nhandles); > DPRINTF("\n"); > - > - /* Determine the devpath of our image so we can prefer it. */ > - status = BS->HandleProtocol(IH, &LoadedImageGUID, (VOID**)&img); > - imgpath = NULL; > - if (status == EFI_SUCCESS) { > - status = BS->HandleProtocol(img->DeviceHandle, > &DevicePathGUID, > - (void **)&imgpath); > - if (status != EFI_SUCCESS) > - DPRINTF("Failed to get image DevicePath (%lu)\n", > - EFI_ERROR_CODE(status)); > -#ifdef EFI_DEBUG > - { > - CHAR16 *text = efi_devpath_name(imgpath); > - DPRINTF("boot1 imagepath: %S\n", text); > - efi_free_devpath_name(text); > - } > -#endif > - } > > for (i = 0; i < nhandles; i++) > probe_handle_status(handles[i], imgpath); > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >