From owner-freebsd-arm@freebsd.org Tue May 2 17:58:32 2017 Return-Path: Delivered-To: freebsd-arm@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 9C530D5B543 for ; Tue, 2 May 2017 17:58:32 +0000 (UTC) (envelope-from mattia.rossi.mate@gmail.com) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (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 3C14C1D83 for ; Tue, 2 May 2017 17:58:32 +0000 (UTC) (envelope-from mattia.rossi.mate@gmail.com) Received: by mail-wr0-x241.google.com with SMTP id 6so18913427wrb.1 for ; Tue, 02 May 2017 10:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:references:to:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Pa+/X/fUu/9BCcI7y07yaxlNiW9j73R1BJlyCIzEN2E=; b=QeNAs4RELLt/dyuYMRSR0hCXIOfV3PSh6bZbPxffRJweXhzQtkxyPdu501PjoaBuSA P2B0T7Ncg0gBIJixBK5ukFpBCPb85ayQ03WnB2SI+1fDabpE17+xZ58eoJSn/nM0w53i eVIVtqiOxhN1s6ixa9eh14hDSRm0BZc+JcHR9ERZ1mDpeTvwb9h6uNOf4bQNbJbn70gl G2GryCMQ2y/4y0tW0GhBhKZDGBRT2hhvvmziFDc6ztAe70MoDXAHD+tFe/dsL35QnlXt qAjcyYixr4Cy3cSsJEyLGdWWDTztVs2Ge4K+8qHWiKZJDILF1UeagGVBqD6D9xXlG8Uu DQKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:references:to:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Pa+/X/fUu/9BCcI7y07yaxlNiW9j73R1BJlyCIzEN2E=; b=LUdHGoTiHMflQ+RB0u5BAsNGmDFe5CUcdKV8Mu8qXZ7m17z5qR494VHorf5x36jkCQ 1IQs9i753n2ICoB2ZHvONM32MF+3V8lxxWzZO3cf1lHeYYHH0JX/0yWhtJp9isjc+LPW 0pL/W8HH78T5lxn7du+Gw6isAl+/W5WesMme5lknyrRf+fRhSfCypwNIO5ZxmlQGF0z6 yHxn5LcM3d7tliQleCW1JrIRKfU51br7APsCEJkv9IqQqB0raFTeH0pBcdc4gDpbVhRy IYTlKqsdez/UKQmERydeVmgkah2MWMXNuCLK96Dy6CjcRiDVzOveHTNk6uw/jFq32qXQ 7ywg== X-Gm-Message-State: AN3rC/6LCREObUhoqL6iCOE+O/QPSRDJAI/EdXng3u3ZKqGEXwD2dd1s D8xMuR6KaO/sZA== X-Received: by 10.223.136.75 with SMTP id e11mr20956878wre.14.1493747908996; Tue, 02 May 2017 10:58:28 -0700 (PDT) Received: from ?IPv6:2a02:aa16:1101:d800::5? ([2a02:aa16:1101:d800::5]) by smtp.googlemail.com with ESMTPSA id l45sm14794908wre.2.2017.05.02.10.58.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 10:58:27 -0700 (PDT) From: Mattia Rossi X-Google-Original-From: Mattia Rossi Reply-To: mattia.rossi.mailinglists@gmail.com Subject: Re: OrangePi-Plus-2 boot process hangs in ubldr.bin References: <20170502105007.0424f8cb7c8021951bf04495@bidouilliste.com> To: Emmanuel Vadot , Warner Losh , ARM Message-ID: <196d9b83-f346-e51f-3ca7-4bc9b3a44a4b@gmail.com> Date: Tue, 2 May 2017 19:58:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170502105007.0424f8cb7c8021951bf04495@bidouilliste.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 May 2017 17:58:32 -0000 On 02/05/17 10:50, Emmanuel Vadot wrote: > On Sun, 30 Apr 2017 13:07:23 +0200 > Mattia Rossi wrote: > >> Hi all, > Hello, > >> I've tried to upgrade u-boot on the OrangePi-Plus-2 (not the 2e) from >> mainline u-boot and on the outside it looks fine. > When you say mainline, what exact version did you took ? > I assume you took some patches also as it seems that your u-boot have > API support. I took the latest git version (latest at the time: v2017.05-rc2-129-g1e6776000e) from http://git.denx.de/u-boot.git As I understand from the description of u-boot-master in ports, all changes made by Warner have been merged upstream, so this version should have all the necessary patches. API support can simply be enabled in the config. Oh one additional info: I built it on a linux machine using gcc: gcc version 5.4.0 (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) Target: armv6j-hardfloat-linux-gnueabi Maybe that's some detail you need and I missed to write ;-) > >> U-boot loads, and it boots ubldr.bin. >> >> I'm using the orangepi-plus-2e.dtb as it has been working well for this >> board before (It all used to work). >> >> Now ubldr can't boot the kernel though, and I don't know why. I've >> rebuilt ubldr, world and kernel from svn. Revision number is 317594 >> >> Any help would be appreciated >> >> The output before it stops is: >> >> U-Boot SPL 2017.05-rc2-00061-g12af9399e7 (Apr 25 2017 - 19:27:44) >> DRAM: 2048 MiB >> Trying to boot from MMC1 >> >> >> U-Boot 2017.05-rc2-00061-g12af9399e7 (Apr 25 2017 - 19:27:44 +0200) >> Allwinner Technology >> >> CPU: Allwinner H3 (SUN8I 1680) >> Model: Xunlong Orange Pi Plus 2E >> I2C: ready >> DRAM: 2 GiB >> MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1 >> In: serial >> Out: serial >> Err: serial >> Net: phy interface7 >> eth0: ethernet@1c30000 >> starting USB... >> USB0: USB EHCI 1.00 >> USB1: USB OHCI 1.0 >> USB2: USB EHCI 1.00 >> USB3: USB OHCI 1.0 >> USB4: USB EHCI 1.00 >> USB5: USB OHCI 1.0 >> scanning bus 0 for devices... 1 USB Device(s) found >> scanning bus 2 for devices... 1 USB Device(s) found >> scanning bus 4 for devices... 1 USB Device(s) found >> scanning usb for storage devices... 0 Storage Device(s) found >> Hit any key to stop autoboot: 0 >> Booting from: mmc 0 ubldr.bin >> reading ubldr.bin >> 237168 bytes read in 34 ms (6.7 MiB/s) >> ## No elf image at address 0x42000000 >> ## Starting application at 0x42000000 ... >> Consoles: U-Boot console >> Compatible U-Boot API signature found @0xbbf3f690 >> >> FreeBSD/armv6 U-Boot loader, Revision 1.2 >> (Sat Apr 29 19:16:42 CEST 2017 root@freebsd101) >> >> DRAM: 2048MB >> MMC Device 2 not found >> MMC Device 3 not found >> Number of U-Boot devices: 2 >> U-Boot env: loaderdev='mmc 0' >> Found U-Boot device: disk >> Checking unit=0 slice= partition=... good. >> Booting from disk0s2: >> /boot/kernel/kernel data=0x6a82c0+0x1a7d40 syms=[0x4+0xba030+0x4+0xaa532] >> >> Hit [Enter] to boot immediately, or any other key for command prompt. >> Booting [/boot/kernel/kernel]... >> /boot/dtb/orangepi-plus-2e.dtb size=0x6326 >> Loaded DTB from file 'orangepi-plus-2e.dtb'. >> Kernel entry at 0x42200100... >> Kernel args: (null) > This is probably a cache problem, the u-boot from ports (using imp@ > branch on github) do take care of that. Thanks for pointing that out, but could you expand on this? As I said before, I think all the patches were merged upstream. I do have a lot of cache configuration options which can be selected though. Does it have something to do with: Symbol: BLOCK_CACHE [=n] │ Type : boolean │ Prompt: Use block device cache │ Location: │ (1) -> Device Drivers │ Defined at drivers/block/Kconfig:31 or Symbol: SYS_L2CACHE_OFF [=n] or Symbol: SYS_MIPS_CACHE_INIT_RAM_LOAD [=n] ? > >> The u-boot environment looks like this: >> >> => printenv >> Fatboot=echo Booting from: ${fatdev} ${bootfile}; fatload ${fatdev} >> ${kernel_addr_r} ${bootfile} && bootelf || go ${kernel_addr_r}; >> SetupFatdev=env exists fatdev || env set fatdev 'mmc 0'; >> api_address=bbf3f690 >> baudrate=115200 >> bootcmd=run Fatboot >> bootfile=ubldr.bin >> bootm_size=0xa000000 >> console=ttyS0,115200 >> eth1addr=12:81:5a:66:27:6f >> ethact=ethernet@1c30000 >> ethaddr=02:81:5a:66:27:6f >> fatdev=mmc 0 >> fdt_addr_r=0x43000000 >> fdtcontroladdr=bbf39b68 >> fdtfile=orangepi-plus-2e.dtb >> ipaddr=192.168.0.200 >> kernel_addr_r=0x42000000 >> loaderdev=mmc 0 >> preboot=usb start; env exists bootfile || env set bootfile ubldr.bin; >> env exists SetupFatdev && run SetupFatdev; env exists UserPreboot && run >> UserPreboot; >> pxefile_addr_r=0x43200000 >> ramdisk_addr_r=0x43300000 >> scriptaddr=0x43100000 >> serial#=02c000815a66276f >> stderr=serial,vga >> stdin=serial,usbkbd >> stdout=serial,vga >> >> Environment size: 898/131068 bytes >> => >> >> >> The loader variables are the following: >> >> loader> show >> LINES=24 >> autoboot_delay=10 >> bootfile=kernel >> console=uboot >> currdev=disk0s2: >> interpret=OK >> kernel=kernel >> kernelname=/boot/kernel/kernel >> loaddev=disk0s2: >> loader_conf_files=/boot/loader.conf /boot/loader.conf.local >> module_path=/boot/kernel;/boot/kernel;/boot/modules;/boot/dtb >> prompt=loader> >> twiddle_divisor=1 >> loader> >> >> >> The filesystem can be found: >> >> loader> ls >> / >> d .snap >> COPYRIGHT >> d bin >> d boot >> d dev >> d etc >> d lib >> d libexec >> d media >> d mnt >> d proc >> d rescue >> d root >> d sbin >> l sys >> d tmp >> d usr >> d var >> loader> ls boot >> boot >> d kernel >> d defaults >> d dtb >> d firmware >> d modules >> d zfs >> loader.efi >> boot1.efi >> boot1.efifat >> menu.rc.sample >> ubldr >> ubldr.bin >> beastie.4th >> brand.4th >> brand-fbsd.4th >> check-password.4th >> color.4th >> delay.4th >> frames.4th >> loader.4th >> loader.help >> logo-beastie.4th >> logo-beastiebw.4th >> menu.4th >> logo-fbsdbw.4th >> logo-orb.4th >> logo-orbbw.4th >> menu-commands.4th >> menusets.4th >> screen.4th >> shortcuts.4th >> support.4th >> version.4th >> loader.rc >> efi.4th >> loader> >> >> Other info from ubldr: >> >> loader> devinfo >> MMC Device 2 not found >> MMC Device 3 not found >> U-Boot devices: >> device info (0): >> cookie = 0xbbf3f0b8 >> type = 0x00000082 >> type = MMC >> blk size = 512 >> blk count = 30318592 >> >> device info (1): >> cookie = 0xbbf3f4c0 >> type = 0x00000082 >> type = MMC >> blk size = 512 >> blk count = 30535680 >> >> loader> sysinfo >> U-Boot system info: >> sys info: >> clkbus = 0 MHz >> clkcpu = 0 MHz >> bar = 0x00000000 >> --- >> start = 0x40000000 >> size = 0x80000000 >> type = DRAM >> --- >> loader> >> >> U-boot variables are found in ubldr: >> >> loader> ubenv show >> uboot.preboot=usb start; env exists bootfile || env set bootfile >> ubldr.bin; env exists SetupFatdev && run SetupFatdev; env exists >> UserPreboot && run UserPreboot; >> uboot.bootm_size=0xa000000 >> uboot.loaderdev=mmc 0 >> uboot.fatdev=mmc 0 >> uboot.fdtcontroladdr=bbf39b68 >> uboot.serial#=02c000815a66276f >> uboot.pxefile_addr_r=0x43200000 >> uboot.eth1addr=12:81:5a:66:27:6f >> uboot.api_address=bbf3f690 >> uboot.scriptaddr=0x43100000 >> uboot.ethaddr=02:81:5a:66:27:6f >> uboot.fdt_addr_r=0x43000000 >> uboot.stdin=serial,usbkbd >> uboot.baudrate=115200 >> uboot.ethact=ethernet@1c30000 >> uboot.bootcmd=run Fatboot >> uboot.kernel_addr_r=0x42000000 >> uboot.filesize=39e70 >> uboot.bootfile=ubldr.bin >> uboot.fdtfile=orangepi-plus-2e.dtb >> uboot.fileaddr=42000000 >> uboot.stdout=serial,vga >> uboot.ramdisk_addr_r=0x43300000 >> uboot.Fatboot=echo Booting from: ${fatdev} ${bootfile}; fatload >> ${fatdev} ${kernel_addr_r} ${bootfile} && bootelf || go ${kernel_addr_r}; >> uboot.console=ttyS0,115200 >> uboot.SetupFatdev=env exists fatdev || env set fatdev 'mmc 0'; >> uboot.ipaddr=192.168.0.200 >> uboot.stderr=serial,vga >> loader> >> >> Kernel and modules seem loaded... >> >> loader> lsmod >> 0x42200000: /boot/kernel/kernel (elf kernel, 0x9b456c) >> modules: aw_ccung.1 aw_ccu.1 aw_reset.1 a10hdmiaudio.1 a10hdmi.1 >> aw_thermal.1 aw_sid.1 axp81x.1 axp2xx.1 rsb.1 awusbphy.1 a10codec.1 >> ufs.1 krpc.1 cryptosoft.1 crypto.1 nfslockd.1 nfssvc.1 nfslock.1 ipsec.1 >> ether.1 zlib.1 aio.1 sysvshm.1 sysvsem.1 sysvmsg.1 acl_posix1e.1 >> acl_nfs4.1 kernel.1200030 cd9660.1 g_part.0 g_flashmap.0 pseudofs.1 >> procfs.1 nfscl.1 nfs.1 nfscommon.1 msdosfs.1 videomode.1 usb_quirk.1 >> ums.1 ukbd.1 uhub.1 usb.1 umass.1 midi.1 sound.5 random_device.1 >> random_harvestq.1 ofwbus.1 null.1 mmc.3 mii_bitbang.1 miibus.1 mem.1 >> ofw_iicbus.1 iicbus.1 iic.1 ofw_gpiobus.1 gpioc.1 gpiobus.1 fbd.1 >> ofw_regulator_bus.1 clk_fixed.1 ofw_clkbus.1 ahci.1 cam.1 >> >> Thanks, >> >> Mat >> >> _______________________________________________ >> freebsd-arm@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-arm >> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >