From owner-freebsd-current@FreeBSD.ORG Sat Sep 20 11:37:40 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BC725F6; Sat, 20 Sep 2014 11:37:40 +0000 (UTC) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FDD3FFA; Sat, 20 Sep 2014 11:37:39 +0000 (UTC) Received: by mail-lb0-f180.google.com with SMTP id b12so4444247lbj.39 for ; Sat, 20 Sep 2014 04:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=tteROCGyQWVnFXSHMUs8XhNi7bupyHMsxSCRiPYT1Jc=; b=IY78tPVCVvzwR2PC2Bf/wnMDBb0WevpkqBoIvZsEj2bJoyG//wm0TY5Yir+JyfS1gk hCcJPn0ltLz+/O9oLbQvhGaRtvsVRMVnFmpBKhajhcRMB85kg2jnJP0FMAMA8esichY3 X7RNfpYN9fcozf2ZIS02JAzX8PPMGQowolwBsADyCyCO61xe5fRVkGzCUMtEfvHfExCJ QKnmcXcYtaEG2gfzaKqsRMF7gB26Hom4Y/XIBNwQI3sw7gEQGbH63fPbxGg/lv4n+y6M QCHwjycpPVGtZs2edzxMuRFW7CuyYyH/ohcI0raoEBe97LogcS72ERV22wP5Q5WRPeoW Ya7A== MIME-Version: 1.0 X-Received: by 10.152.45.8 with SMTP id i8mr12752844lam.31.1411213057060; Sat, 20 Sep 2014 04:37:37 -0700 (PDT) Received: by 10.112.218.101 with HTTP; Sat, 20 Sep 2014 04:37:37 -0700 (PDT) Reply-To: huanghwh@gmail.com In-Reply-To: <53E730E8.9070206@icloud.com> References: <537DFD85.1090903@icloud.com> <53C10945.4020003@icloud.com> <53C16ED0.2000604@freebsd.org> <53E730E8.9070206@icloud.com> Date: Sat, 20 Sep 2014 19:37:37 +0800 Message-ID: Subject: Re: uefi boot on Apple Mac From: Huang Wen Hui To: Anders Bolt Evensen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-current , Ed Maste X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2014 11:37:40 -0000 I finally make MacBookPro 11,3 UEFI boot successfully: 1. copy boot1.efi to /EFI/boot/BOOTx64.efi in EFI partition 2. Create a small UFS partition in internal SSD, and installworld and installkernel. 3. Without USB stick, then system really can boot, although the loader still stop at: Start @ 0xffffffff802d9000... 4. I can ssh log in and found that culprit is XHCI USB controller does not work in UEFI mode. 5. Xorg and nvidia driver also works. 6. verbose boot log can be found at: http://sw.gddsn.org.cn/freebsd/uefi-messages.txt Cheers, Huang Wen Hui 2014-08-10 16:44 GMT+08:00 Anders Bolt Evensen : > If you're interested, you can try out the following ISO: > https://www.dropbox.com/s/srbunx0agrokcs3/freebsd- > current-uefi-bios-amd64.iso > > The image was built on Friday 8th of August for the amd64 platform. > > I tested out the EFI part on VirtualBox (UEFI 2.X) and my MacBook Pro 17 > inch from 2011 (EFI 1.10), and as far as EFI goes, I successfully booted > the image on both my Mac and VirtualBox (however, booting the image from > BIOS using my Mac was a different story). > > So, as I said, as far as (U)EFI goes, the image should work on UEFI 2.X > based PC's and EFI 1.10 based Macs. > > On 12/07/14 19:22, Nathan Whitehorn wrote: > >> I'd point out that, as of last week, the standard -CURRENT ISOs (and >> generate-release.sh script) make EFI-bootable media by default. All the >> snapshots should have this done already, for instance. >> -Nathan >> > I wasn't aware of that, but thanks for the info. :) > > >> On 07/12/14 03:09, Anders Bolt-Evensen wrote: >> >>> I also got a message like that when I booted from a USB stick on a >>> MacBookPro8,3 (17 inch, late 2011). >>> >>> I fixed it by creating a custom ISO image and burned that onto a DVD >>> using an external DVD drive. >>> The UEFI installer boots fine from this external DVD drive. >>> >>> Here is how I did it: >>> >>> Genereste an ISO with the FreeBSD-CURRENT kernel, mount the ISO and cop= y >>> all files from the root directory in the ISO and unmount >>> > cd /usr/src/release >>> > sh ./generate-release.sh # You may have to run =E2=80=9Cmake buil= dworld=E2=80=9D >>> and be connected to the internet to install required ports. >>> > mount -t cd9660 /scratch/R/release/FreeBSD-something-disc1.iso >>> /mnt >>> > mkdir freebsd_generic_installer >>> #Files copied to the directory in the next command will be copied t= o >>> a new ISO in step 3 >>> > cp -R /mnt/ freebsd_generic_installer/ >>> > umount /mnt >>> 2. Create a FAT filesystem image and place the loader in it in the >>> default path that UEFI will look for (the following steps are copied fr= om >>> https://wiki.freebsd.org/UEFI#CD.2FDVD_Boot_under_UEFI): >>> > dd if=3D/dev/zero of=3Defiboot.img bs=3D4k count=3D100 >>> > mdconfig -a -t vnode -f efiboot.img >>> > newfs_msdos -F 12 -m 0xf8 /dev/md0 >>> > mount -t msdosfs /dev/md0 /mnt >>> > mkdir -p /mnt/efi/boot >>> > cp loader.efi /mnt/efi/boot/bootx64.efi >>> > umount /mnt >>> > mdconfig -d -u 0 >>> >>> 3. Create the custom ISO image. Please make sure that the entry in >>> freebsd_generic_installer/etc/fstab matches the label you choose in the >>> command below. >>> > makefs -t cd9660 -o bootimage=3D'i386;efiboot.img' -o no-emul-boo= t >>> -o rockridge -o label=3D=E2=80=9CFREEBSD_UEFI_INSTALL" -o publisher=3D"= test" >>> uefi-test.iso freebsd_generic_installer/ >>> >>> To get the example in the command above to work, please make sure that >>> the entry in freebsd_generic_installer/etc/fstab reads >>> "/dev/iso9660/FREEBSD_UEFI_INSTALL / cd9660 ro 0 0" >>> >>> 4. Burn the image to DVD, reboot your system and choose =E2=80=9CEFI Bo= ot=E2=80=9D. Note >>> that unless you are using a EFI console like rEFIt or rEFInd, you may h= ave >>> to kind of wait a couple of minutes while the kernel is loading before >>> anything appears on the screen. >>> >>> >>> On 04/07/14 16:34, Huang Wen Hui wrote: >>> >>>> Hi, >>>> On my MacbookPro11,3, I got this error message: >>>> >>>> http://sw.gddsn.org.cn/freebsd/uefi.jpg >>>> >>>> cheers, >>>> >>>> Huang WenHui >>>> >>>> 2014-07-04 22:13 GMT+08:00 Ed Maste : >>>> >>>> On 24 May 2014 19:39, Rafael Esp=C3=ADndola >>>>> wrote: >>>>> >>>>>> Yes, I got that in the mac laptops I tried, it worked on a Mac Pro. = It >>>>>> might be the frame buffer corruption that Ed Maste was mentioning. >>>>>> >>>>> I purchased a new MacBook Air yesterday (model identifier >>>>> MacBookAir6,2). UEFI boot and vt(4) worked correctly. (My image >>>>> included Rafael's patch; I haven't tried a boot without.) >>>>> >>>>> I also committed a change to display the framebuffer parameters >>>>> (address, dimensions, etc.) on boot, in order to help identify the >>>>> source of this issue. If you have a moment can you build a new USB >>>>> stick image and give it a try? >>>>> >>>>> -Ed >>>>> >>>>> _______________________________________________ >>>> freebsd-current@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@ >>>> freebsd.org" >>>> >>> >>> _______________________________________________ >>> freebsd-current@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@ >>> freebsd.org" >>> >>> >> > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= "