A-P Posted April 18, 2017 Posted April 18, 2017 Hi all i'm trying to boot my Orange Pi bord over the network. For this purpose i'm going to use SPI Flash memory to load bootloader (Uboot). I found a tool named nand-sata-install introduced by Igor. I have read all the script and i'm wondering how much capacity my SPI NAND flash should have. SunXi recommends 2MB (16Mbit) but my bootloader is about 5MB.
martinayotte Posted April 18, 2017 Posted April 18, 2017 Booting from SPI-NOR doesn't need other things than the u-boot-sunxi-with-spl.bin in the flash, which a bit less than 500K. The kernel itself along uinitrd and dtb should be located elsewhere. I've never try to boot in NFS or TFTP yet, but booting from USB drive just works fine. (BTW, pushing u-boot-sunxi-with-spl.bin into flash isn't done by nand-sata-install, nand-sata-install is used to copy sdcard into other storage such USB drive or eMMC) 1
A-P Posted April 18, 2017 Author Posted April 18, 2017 Thanks for the quick reply. Can you tell me step by step guide and tool how to flash my spi flash memory and also how to tell uboot to boot over lan or usb ? best regards.
martinayotte Posted April 18, 2017 Posted April 18, 2017 For flashing the SPI-NOR, you need to get "mtd-utils", either from apt-get or from sources. You need to add in the /boot/armbianEnv.txt the following overlay : overlays=spi-jedec-nor Then, reboot, and check if SPI-NOR appears by doing "cat /proc/mtd". If you have mtd partitions, then install u-boot-spl using this command (check previous partitions to make sure u-boot is mtd0) : flashcp /usr/lib/linux-u-boot-dev-orangepipc_5.27_armhf/u-boot-sunxi-with-spl.bin /dev/mtd0 Next steps are for copying your sdcard into you already inserted usb drive by using nand-sata-install. After copy finished, edit the boot.cmd from your usb drive, this means probably /mnt/boot/boot.cmd if drive mounted in /mnt. Change all "mmc" words by "usb" and add on top of boot.cmd the line "setenv devtype usb", save it and recompile it with "mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr". Then, shutdown the board, remove the sdcard, and re-power the board. Check the boot log using USB-TTL adaptor. If everything fine, you should get into the login prompt. Bingo ! 1
A-P Posted April 22, 2017 Author Posted April 22, 2017 I followed all of your instruction but was unable to make SPI-Flash to work. after adding overlays=spi-jedec-nor and installing mtd-utils still there is no /proc/mtd file and that flashcp command does not recognize /dev/mtd0. Is there any additional process I have to do ? I'm using am untouched Armbian opi zero image. Regards.
martinayotte Posted April 22, 2017 Posted April 22, 2017 Check the back of your OPiZero to make sure you have a SPI_NOR already soldered. If your PCB has blank SOIC8 pads, you will need to purchase a flash chip and solder it there.
A-P Posted April 22, 2017 Author Posted April 22, 2017 I've already soldered spi flash "Macronix MX25L1606E" which xunlong currently use for zero and pc2 but spi flash does not show up .
A-P Posted April 22, 2017 Author Posted April 22, 2017 My "dmesg" output if it helps : Spoiler root@orangepizero:~# dmesg [ 0.000000] Booting Linux on physical CPU 0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.4.113-sun8i (root@devel) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #28 SMP PREEMPT Thu Feb 2 02:01:28 CET 2017 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine: sun8i [ 0.000000] cma: dma_declare_contiguous(266): ION reserve size should be 4m align! adjust size to 128MBytes [ 0.000000] cma: CMA: reserved 128 MiB at 48000000 [ 0.000000] Memory policy: ECC disabled, Data cache writealloc [ 0.000000] On node 0 totalpages: 65536 [ 0.000000] free_area_init_node: node 0, pgdat c09914c0, node_mem_map c0aca000 [ 0.000000] Normal zone: 576 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 64960 pages, LIFO batch:15 [ 0.000000] script_init enter! [ 0.000000] script_init exit! [ 0.000000] PERCPU: Embedded 8 pages/cpu @c0d1b000 s11968 r8192 d12608 u32768 [ 0.000000] pcpu-alloc: s11968 r8192 d12608 u32768 alloc=8*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960 [ 0.000000] Kernel command line: root=UUID=28c1cfce-318b-4f95-bf76-92472adc14bf rootwait rootfstype=ext4 console=tty1 console=ttyS0,115200 cgroup_enable=memory swapaccount=1 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=7 ubootpart=a90cd46f-01 ubootsource=mmc sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] allocated 524288 bytes of page_cgroup [ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups [ 0.000000] Memory: 256MB = 256MB total [ 0.000000] Memory: 112588k/112588k available, 149556k reserved, 0K highmem [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB) [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc08d0a9c (8995 kB) [ 0.000000] .init : 0xc08d1000 - 0xc0924ec0 ( 336 kB) [ 0.000000] .data : 0xc0926000 - 0xc0995d30 ( 448 kB) [ 0.000000] .bss : 0xc09964e4 - 0xc0ac97c8 (1229 kB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] Additional per-CPU info printed with stalls. [ 0.000000] NR_IRQS:544 [ 0.000000] Architected local timer running at 24.00MHz. [ 0.000000] Switching to timer-based delay loop [ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms [ 0.000000] Console: colour dummy device 80x30 [ 0.000000] console [tty1] enabled [ 0.002239] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000) [ 0.002380] pid_max: default: 32768 minimum: 301 [ 0.002736] Security Framework initialized [ 0.002819] AppArmor: AppArmor disabled by boot time parameter [ 0.003241] Mount-cache hash table entries: 512 [ 0.005264] Initializing cgroup subsys cpuacct [ 0.005346] Initializing cgroup subsys memory [ 0.005476] Initializing cgroup subsys devices [ 0.005546] Initializing cgroup subsys freezer [ 0.005612] Initializing cgroup subsys blkio [ 0.005699] Initializing cgroup subsys perf_event [ 0.005907] CPU: Testing write buffer coherency: ok [ 0.006049] ftrace: allocating 24851 entries in 73 pages [ 0.060561] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.060651] [sunxi_smp_prepare_cpus] enter [ 0.060746] Setting up static identity map for 0x4061fbf8 - 0x4061fc50 [ 0.062690] CPU1: Booted secondary processor [ 0.062690] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.070587] CPU2: Booted secondary processor [ 0.070587] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.070953] CPU3: Booted secondary processor [ 0.070953] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.080356] Brought up 4 CPUs [ 0.080514] SMP: Total of 4 processors activated (19200.00 BogoMIPS). [ 0.081959] devtmpfs: initialized [ 0.096515] wakeup src cnt is : 2. [ 0.096569] [exstandby]leave extended_standby_enable_wakeup_src : event 0x800000 [ 0.096592] [exstandby]leave extended_standby_enable_wakeup_src : wakeup_gpio_map 0x0 [ 0.096615] [exstandby]leave extended_standby_enable_wakeup_src : wakeup_gpio_group 0x40 [ 0.096639] [exstandby]leave extended_standby_enable_wakeup_src : event 0x800000 [ 0.096660] [exstandby]leave extended_standby_enable_wakeup_src : wakeup_gpio_map 0x8 [ 0.096683] [exstandby]leave extended_standby_enable_wakeup_src : wakeup_gpio_group 0x40 [ 0.096706] sunxi pm init [ 0.097016] pinctrl core: initialized pinctrl subsystem [ 0.107498] NET: Registered protocol family 16 [ 0.109534] DMA: preallocated 2048 KiB pool for atomic coherent allocations [ 0.109534] script_sysfs_init success [ 0.109534] sunxi_dump_init success [ 0.109534] gpiochip_add: registered GPIOs 0 to 383 on device: sunxi-pinctrl [ 0.109534] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver [ 0.110103] plat: add bmp085 device [ 0.110129] plat: add pcf8591 device [ 0.110219] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.110298] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.110718] script config pll_video to 297 Mhz [ 0.110779] script config pll_de to 864 Mhz [ 0.110865] script config pll_ve to 402 Mhz [ 0.110919] sunxi_default_clk_init [ 0.110934] try to set pll6ahb1 to 200000000 [ 0.110973] try to set ahb clk source to pll6ahb1 [ 0.110991] set ahb clk source to pll6ahb1 [ 0.111010] try to set ahb1 to 200000000 [ 0.111032] try to set apb1 to 100000000 [ 0.130468] bio: create slab <bio-0> at 0 [ 0.130676] [ARISC] :sunxi-arisc driver v1.04 [ 0.148586] [ARISC] :arisc version: [v0.1.58] [ 0.257639] [ARISC] :sunxi-arisc driver v1.04 startup succeeded [ 0.260910] SCSI subsystem initialized [ 0.261355] usbcore: registered new interface driver usbfs [ 0.261545] usbcore: registered new interface driver hub [ 0.270094] usbcore: registered new device driver usb [ 0.270359] twi_chan_cfg()340 - [twi0] has no twi_regulator. [ 0.270416] twi_chan_cfg()340 - [twi1] has no twi_regulator. [ 0.270471] twi_chan_cfg()340 - [twi2] has no twi_regulator. [ 0.271981] Linux video capture interface: v2.00 [ 0.272516] Advanced Linux Sound Architecture Driver Version 1.0.25. [ 0.274082] cfg80211: Calling CRDA to update world regulatory domain [ 0.274238] NetLabel: Initializing [ 0.274238] NetLabel: domain hash size = 128 [ 0.274238] NetLabel: protocols = UNLABELED CIPSOv4 [ 0.274238] NetLabel: unlabeled traffic allowed by default [ 0.274238] Switching to clocksource arch_sys_counter [ 0.297175] FS-Cache: Loaded [ 0.297783] CacheFiles: Loaded [ 0.321599] NET: Registered protocol family 2 [ 0.345126] IP route cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.346259] TCP established hash table entries: 8192 (order: 4, 65536 bytes) [ 0.346584] TCP bind hash table entries: 8192 (order: 4, 98304 bytes) [ 0.346918] TCP: Hash tables configured (established 8192 bind 8192) [ 0.346973] TCP: reno registered [ 0.347016] UDP hash table entries: 128 (order: 0, 4096 bytes) [ 0.347107] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes) [ 0.347824] NET: Registered protocol family 1 [ 0.348702] RPC: Registered named UNIX socket transport module. [ 0.348766] RPC: Registered udp transport module. [ 0.348811] RPC: Registered tcp transport module. [ 0.348860] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.349291] Trying to unpack rootfs image as initramfs... [ 0.845468] Freeing initrd memory: 3700K [ 0.846802] hw perfevents: enabled with ARMv7 Cortex_A7 PMU driver, 5 counters available [ 0.847096] sunxi_reg_init enter [ 0.848952] audit: initializing netlink socket (disabled) [ 0.849093] type=2000 audit(0.840:1): initialized [ 0.853045] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.853462] misc fatfs initialized [ 0.853931] NFS: Registering the id_resolver key type [ 0.854761] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.854829] Installing knfsd (copyright (C) 1996 okir@monad.swb.de). [ 0.856368] NTFS driver 2.1.30 [Flags: R/W]. [ 0.857030] fuse init (API version 7.18) [ 0.857897] msgmni has been set to 483 [ 0.861017] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253) [ 0.861107] io scheduler noop registered [ 0.861148] io scheduler deadline registered [ 0.861302] io scheduler cfq registered (default) [ 0.862149] [DISP]disp_module_init [ 0.862808] cmdline,init_disp= [ 0.862894] cmdline,disp= [ 0.871591] [DISP] Fb_map_kernel_logo,line:932:Fb_map_kernel_logo failed! [ 0.887756] Console: switching to colour frame buffer device 90x36 [ 0.906431] [DISP]disp_module_init finish [ 0.907134] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator. [ 0.907549] sw_uart_get_devinfo()1503 - uart1 has no uart_regulator. [ 0.907951] sw_uart_get_devinfo()1503 - uart2 has no uart_regulator. [ 0.909265] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI [ 0.917350] sw_uart_pm()890 - uart0 clk is already enable [ 0.925349] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n [ 1.047148] console [ttyS0] enabled [ 2.695956] uart1: ttyS1 at MMIO 0x1c28400 (irq = 33) is a SUNXI [ 2.711665] uart2: ttyS2 at MMIO 0x1c28800 (irq = 34) is a SUNXI [ 2.727796] sunxi_cmatest_init enter [ 2.727885] sunxi_cmatest_init success [ 2.736545] brd: module loaded [ 2.756738] loop: module loaded [ 2.769035] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator. [ 2.784609] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator. [ 2.801315] spi spi0: master is unqueued, this is deprecated [ 2.817034] spi spi1: master is unqueued, this is deprecated [ 2.831792] tun: Universal TUN/TAP device driver, 1.6 [ 2.845301] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> [ 2.861909] PPP generic driver version 2.4.2 [ 2.874954] PPP BSD Compression module registered [ 2.888040] PPP Deflate Compression module registered [ 2.906559] PPP MPPE Compression module registered [ 2.919705] NET: Registered protocol family 24 [ 2.932389] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.967604] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.984655] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1 [ 3.002200] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000 [ 3.030071] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00 [ 3.045677] hub 1-0:1.0: USB hub found [ 3.057671] hub 1-0:1.0: 1 port detected [ 3.090580] sunxi-ehci sunxi-ehci.2: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 3.107712] sunxi-ehci sunxi-ehci.2: new USB bus registered, assigned bus number 2 [ 3.125193] sunxi-ehci sunxi-ehci.2: irq 106, io mem 0xf1c1b000 [ 3.160104] sunxi-ehci sunxi-ehci.2: USB 0.0 started, EHCI 1.00 [ 3.175986] hub 2-0:1.0: USB hub found [ 3.188160] hub 2-0:1.0: 1 port detected [ 3.221145] sunxi-ehci sunxi-ehci.3: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 3.238261] sunxi-ehci sunxi-ehci.3: new USB bus registered, assigned bus number 3 [ 3.256059] sunxi-ehci sunxi-ehci.3: irq 108, io mem 0xf1c1c000 [ 3.290081] sunxi-ehci sunxi-ehci.3: USB 0.0 started, EHCI 1.00 [ 3.306171] hub 3-0:1.0: USB hub found [ 3.318537] hub 3-0:1.0: 1 port detected [ 3.351606] sunxi-ehci sunxi-ehci.4: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 3.368761] sunxi-ehci sunxi-ehci.4: new USB bus registered, assigned bus number 4 [ 3.386376] sunxi-ehci sunxi-ehci.4: irq 110, io mem 0xf1c1d000 [ 3.420080] sunxi-ehci sunxi-ehci.4: USB 0.0 started, EHCI 1.00 [ 3.435951] hub 4-0:1.0: USB hub found [ 3.448266] hub 4-0:1.0: 1 port detected [ 3.461348] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 3.496638] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver [ 3.513669] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 5 [ 3.530805] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400 [ 3.605177] hub 5-0:1.0: USB hub found [ 3.617773] hub 5-0:1.0: 1 port detected [ 3.651156] sunxi-ohci sunxi-ohci.2: SW USB2.0 'Open' Host Controller (OHCI) Driver [ 3.668383] sunxi-ohci sunxi-ohci.2: new USB bus registered, assigned bus number 6 [ 3.685529] sunxi-ohci sunxi-ohci.2: irq 107, io mem 0xf1c1b400 [ 3.765224] hub 6-0:1.0: USB hub found [ 3.777916] hub 6-0:1.0: 1 port detected [ 3.811337] sunxi-ohci sunxi-ohci.3: SW USB2.0 'Open' Host Controller (OHCI) Driver [ 3.828442] sunxi-ohci sunxi-ohci.3: new USB bus registered, assigned bus number 7 [ 3.845427] sunxi-ohci sunxi-ohci.3: irq 109, io mem 0xf1c1c400 [ 3.925086] hub 7-0:1.0: USB hub found [ 3.937655] hub 7-0:1.0: 1 port detected [ 3.970942] sunxi-ohci sunxi-ohci.4: SW USB2.0 'Open' Host Controller (OHCI) Driver [ 3.988242] sunxi-ohci sunxi-ohci.4: new USB bus registered, assigned bus number 8 [ 4.005296] sunxi-ohci sunxi-ohci.4: irq 111, io mem 0xf1c1d400 [ 4.085082] hub 8-0:1.0: USB hub found [ 4.097610] hub 8-0:1.0: 1 port detected [ 4.111022] Initializing USB Mass Storage driver... [ 4.125252] usbcore: registered new interface driver usb-storage [ 4.140504] USB Mass Storage support registered. [ 4.154104] usbcore: registered new interface driver ums-alauda [ 4.169231] usbcore: registered new interface driver ums-cypress [ 4.184338] usbcore: registered new interface driver ums-datafab [ 4.199355] usbcore: registered new interface driver ums_eneub6250 [ 4.214491] usbcore: registered new interface driver ums-freecom [ 4.229319] usbcore: registered new interface driver ums-isd200 [ 4.243752] usbcore: registered new interface driver ums-jumpshot [ 4.258185] usbcore: registered new interface driver ums-karma [ 4.272145] usbcore: registered new interface driver ums-onetouch [ 4.286366] usbcore: registered new interface driver ums-realtek [ 4.300286] usbcore: registered new interface driver ums-sddr09 [ 4.314055] usbcore: registered new interface driver ums-sddr55 [ 4.327613] usbcore: registered new interface driver ums-usbat [ 4.341114] uinput result 0 , vmouse_init [ 4.342433] mousedev: PS/2 mouse device common for all mice [ 4.355668] sunxikbd_init failed. [ 4.365899] sunxikbd_init failed. [ 4.365925] ls_fetch_sysconfig_para: ls_unused. [ 4.377495] ltr_init: ls_fetch_sysconfig_para err. [ 4.378135] [RTC] WARNING: Rtc time will be wrong!! [ 4.390143] [RTC] WARNING: use *internal OSC* as clock source [ 4.403529] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0 [ 4.417574] i2c /dev entries driver [ 4.428737] sunxi cedar version 0.1 [ 4.428828] [cedar]: install start!!! [ 4.429228] [cedar]: install end!!! [ 4.429584] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x18) [ 4.452420] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x19) [ 4.475736] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x1a) [ 4.499659] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x29) [ 4.524332] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x2a) [ 4.549525] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x2b) [ 4.575432] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x4c) [ 4.602112] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x4d) [ 4.629315] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x4e) [ 4.657648] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x18) [ 4.687225] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x19) [ 4.718082] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x1a) [ 4.750199] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x29) [ 4.783595] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x2a) [ 4.818327] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x2b) [ 4.853806] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4c) [ 4.890067] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4d) [ 4.926987] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4e) [ 4.964027] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0 [ 4.985367] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf [ 5.010982] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0) [ 5.046076] wdt_enable, write reg 0xf1c20cb8 val 0x00000000 [ 5.066071] timeout_to_interv, line 167 [ 5.083838] interv_to_timeout, line 189 [ 5.101331] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec [ 5.137577] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com [ 5.173790] calibrat: max_cpufreq 1008Mhz Type 1! [ 5.173817] [cpu_freq] ERR:get cpu extremity frequency from sysconfig failed, use max_freq [ 5.210103] [mmc]: SD/MMC/SDIO Host Controller Driver(v1.111 2015-4-13 15:24) Compiled in Feb 2 2017 at 01:59:41 [ 5.210178] [mmc]: get mmc0's sdc_power is null! [ 5.210236] [mmc]: get mmc1's sdc_power is null! [ 5.210256] [mmc]: get mmc1's 2xmode ok, val = 1 [ 5.210276] [mmc]: get mmc1's ddrmode ok, val = 1 [ 5.210311] [mmc]: MMC host used card: 0x3, boot card: 0x0, io_card 2 [ 5.214913] [mmc]: sdc0 power_supply is null [ 5.217677] no blue_led, ignore it! [ 5.235031] Registered led device: red_led [ 5.235270] Registered led device: green_led [ 5.235305] no led_0, ignore it! [ 5.251660] no led_1, ignore it! [ 5.267627] no led_2, ignore it! [ 5.283237] no led_3, ignore it! [ 5.298491] no led_4, ignore it! [ 5.313391] no led_5, ignore it! [ 5.327938] no led_6, ignore it! [ 5.342137] no led_7, ignore it! [ 5.357749] usbcore: registered new interface driver usbhid [ 5.374225] usbhid: USB HID core driver [ 5.385632] mmc0: new high speed SDHC card at address 0001 [ 5.386553] mmcblk0: mmc0:0001 SD 7.38 GiB [ 5.388539] mmcblk0: p1 [ 5.389545] mmcblk mmc0:0001: Card claimed for testing. [ 5.389572] mmc0:0001: SD 7.38 GiB [ 5.466833] asoc: sndcodec <-> sunxi-codec mapping ok [ 5.483951] [DAUDIO]sunxi-daudio cannot find any using configuration for controllers, return directly! [ 5.512512] [I2S]snddaudio cannot find any using configuration for controllers, return directly! [ 5.540084] [DAUDIO0] driver not init,just return. [ 5.561263] asoc: sndhdmi <-> sunxi-hdmiaudio.0 mapping ok [ 5.578884] oprofile: using arm/armv7-ca7 [ 5.592326] u32 classifier [ 5.603621] Performance counters on [ 5.616030] input device check on [ 5.628070] Actions configured [ 5.640102] IPv4 over IPv4 tunneling driver [ 5.654017] TCP: bic registered [ 5.665256] TCP: cubic registered [ 5.676386] TCP: westwood registered [ 5.687542] TCP: highspeed registered [ 5.698518] TCP: hybla registered [ 5.708804] TCP: htcp registered [ 5.718705] TCP: vegas registered [ 5.728668] TCP: veno registered [ 5.738481] TCP: scalable registered [ 5.748780] TCP: lp registered [ 5.758543] TCP: yeah registered [ 5.768577] TCP: illinois registered [ 5.779093] Initializing XFRM netlink socket [ 5.791012] NET: Registered protocol family 10 [ 5.805161] NET: Registered protocol family 17 [ 5.817108] NET: Registered protocol family 15 [ 5.828827] Registering the dns_resolver key type [ 5.841924] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 5.857478] ThumbEE CPU extension supported. [ 5.869116] Registering SWP/SWPB emulation handler [ 5.882539] registered taskstats version 1 [ 5.895648] cmdline,disp= [ 5.905677] [DISP] disp_init_tv,line:539:screen 0 do not support TV TYPE! [ 5.920419] [DISP] bsp_disp_tv_register,line:990:'ptv is null [ 5.933758] tv registered!! [ 5.933831] [DISP] disp_device_attached_and_enable,line:159:attched ok, mgr1<-->device1, type=2, mode=11 [ 5.940912] ths_fetch_sysconfig_para: type err device_used = 1. [ 5.943624] CPU Budget:corekeeper enabled [ 5.944060] CPU Budget:Register notifier [ 5.944081] CPU Budget:register Success [ 5.944104] sunxi-budget-cooling sunxi-budget-cooling: Cooling device registered: thermal-budget-0 [ 5.950972] [rf_pm]: Did not config module_power1 in sys_config [ 5.950994] [rf_pm]: Did not config module_power2 in sys_config [ 5.951012] [rf_pm]: Did not config module_power3 in sys_config [ 5.951031] [rf_pm]: mod has no chip_en gpio [ 5.951046] [rf_pm]: regulator on. [ 5.951078] [rf_pm]: set losc_out 32k out[wifi_pm]: set wl_reg_on 1 ! [ 6.051694] [wifi_pm]: get wifi_sdc_id failed [ 6.053275] [mmc]: sdc1 power_supply is null [ 6.109289] mmc1: new high speed SDIO card at address 0001 [ 6.151742] [wifi_pm]: wifi gpio init is OK !! [ 6.151857] [rfkill]: init no bt used in configuration [ 6.151878] ALSA device list: [ 6.162186] #0: audiocodec [ 6.172305] #1: sndhdmi [ 6.183785] Freeing init memory: 332K [ 6.278325] systemd-udevd[96]: starting version 215 [ 7.333335] Btrfs loaded [ 8.024325] EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null) [ 9.270631] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR) [ 9.302646] systemd[1]: Detected architecture 'arm'. [ 9.362904] systemd[1]: Set hostname to <orangepizero>. [ 9.862483] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory. [ 9.902839] systemd[1]: Expecting device dev-ttyGS0.device... [ 9.940336] systemd[1]: Expecting device dev-ttyS0.device... [ 9.970280] systemd[1]: Starting Forward Password Requests to Wall Directory Watch. [ 9.988854] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ 10.007217] systemd[1]: Starting Remote File Systems (Pre). [ 10.040252] systemd[1]: Reached target Remote File Systems (Pre). [ 10.056971] systemd[1]: Starting Encrypted Volumes. [ 10.090239] systemd[1]: Reached target Encrypted Volumes. [ 10.105887] systemd[1]: Starting Dispatch Password Requests to Console Directory Watch. [ 10.125010] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ 10.143829] systemd[1]: Starting Paths. [ 10.170237] systemd[1]: Reached target Paths. [ 10.184838] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point. [ 10.240253] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point. [ 10.270160] systemd[1]: Starting Root Slice. [ 10.300255] systemd[1]: Created slice Root Slice. [ 10.315518] systemd[1]: Starting /dev/initctl Compatibility Named Pipe. [ 10.350248] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe. [ 10.367924] systemd[1]: Starting Delayed Shutdown Socket. [ 10.400241] systemd[1]: Listening on Delayed Shutdown Socket. [ 10.416423] systemd[1]: Starting Journal Socket (/dev/log). [ 10.450235] systemd[1]: Listening on Journal Socket (/dev/log). [ 10.466852] systemd[1]: Starting User and Session Slice. [ 10.500245] systemd[1]: Created slice User and Session Slice. [ 10.516821] systemd[1]: Starting udev Control Socket. [ 10.550239] systemd[1]: Listening on udev Control Socket. [ 10.566138] systemd[1]: Starting udev Kernel Socket. [ 10.600240] systemd[1]: Listening on udev Kernel Socket. [ 10.615631] systemd[1]: Starting Journal Socket. [ 10.650235] systemd[1]: Listening on Journal Socket. [ 10.664953] systemd[1]: Starting System Slice. [ 10.700257] systemd[1]: Created slice System Slice. [ 10.714747] systemd[1]: Starting Increase datagram queue length... [ 10.841355] systemd[1]: Starting Restore / save the current clock... [ 10.971934] systemd[1]: Starting Create list of required static device nodes for the current kernel... [ 11.061657] systemd[1]: Mounting POSIX Message Queue File System... [ 11.160856] systemd[1]: Starting udev Coldplug all Devices... [ 11.241988] systemd[1]: Mounting Debug File System... [ 11.350985] systemd[1]: Mounted Huge Pages File System. [ 11.368709] systemd[1]: Started Set Up Additional Binary Formats. [ 11.384377] systemd[1]: Starting LSB: Set keymap... [ 11.511087] systemd[1]: Starting system-serial\x2dgetty.slice. [ 11.550324] systemd[1]: Created slice system-serial\x2dgetty.slice. [ 11.565951] systemd[1]: Starting system-getty.slice. [ 11.600277] systemd[1]: Created slice system-getty.slice. [ 11.619487] systemd[1]: Starting Load Kernel Modules... [ 11.711417] systemd[1]: Started File System Check on Root Device. [ 11.726610] systemd[1]: Starting Slices. [ 11.760384] systemd[1]: Reached target Slices. [ 11.790502] systemd[1]: Mounted Debug File System. [ 11.820489] systemd[1]: Mounted POSIX Message Queue File System. [ 11.861594] [XRADIO] Driver Label:L34M.01.08.0002 Feb 2 2017 02:00:08 [ 11.876812] [XRADIO] Allocated hw_priv @ c6b47240 [ 11.890364] [SBUS] XRadio Device:sdio clk=50000000 [ 11.903520] xradio wlan power on [ 11.914564] gpio wl_reg_on set val 1, act val 1 [ 11.964610] gpio wl_reg_on set val 0, act val 0 [ 11.966638] gpio wl_reg_on set val 1, act val 1 [ 11.980343] systemd[1]: Started Increase datagram queue length. [ 12.066795] [XRADIO] Detect SDIO card 1 [ 12.140283] systemd[1]: Started Restore / save the current clock. [ 12.240303] systemd[1]: Started Create list of required static device nodes for the current kernel. [ 12.425307] [XRADIO_ERR] xradio_load_firmware: can't read config register, err=-110. [ 12.442478] [XRADIO_ERR] xradio_load_firmware failed(-110). [ 12.480377] systemd[1]: Started LSB: Set keymap. [ 12.560320] systemd[1]: Started udev Coldplug all Devices. [ 12.580992] systemd[1]: Time has been changed [ 12.595284] systemd[1]: Starting Create Static Device Nodes in /dev... [ 12.711386] systemd[1]: Starting Syslog Socket. [ 12.740459] systemd[1]: Listening on Syslog Socket. [ 12.754668] systemd[1]: Starting Journal Service... [ 12.769060] xradio wlan power off [ 12.781424] gpio wl_reg_on set val 0, act val 0 [ 12.831517] [XRADIO] Remove SDIO card 1 [ 12.831831] mmc1: card 0001 removed [ 12.832279] [mmc]: sdc1 power_supply is null [ 12.930523] systemd[1]: Started Journal Service. [ 12.946855] ep_matches, wrn: endpoint already claimed, ep(0xc097afbc, 0xc68e0b40, ep1in-bulk) [ 12.946894] ep_matches, wrn: endpoint already claimed, ep(0xc097afbc, 0xc68e0b40, ep1in-bulk) [ 12.946921] ep_matches, wrn: endpoint already claimed, ep(0xc097b008, 0xc68e0b40, ep1out-bulk) [ 12.946944] gadget_is_softwinner_otg is not -int [ 12.946961] gadget_is_softwinner_otg is not -int [ 12.946995] g_serial gadget: Gadget Serial v2.4 [ 12.960247] g_serial gadget: g_serial ready [ 12.983613] [XRADIO_ERR] xradio_host_dbg_init failed=2599 [ 12.998443] [XRADIO] Driver Label:L34M.01.08.0002 Feb 2 2017 02:00:08 [ 13.014824] [XRADIO] Allocated hw_priv @ c6b47240 [ 13.029496] xradio wlan power on [ 13.041093] gpio wl_reg_on set val 1, act val 1 [ 13.091159] gpio wl_reg_on set val 0, act val 0 [ 13.093191] gpio wl_reg_on set val 1, act val 1 [ 13.173200] systemd-udevd[174]: starting version 215 [ 13.193280] [XRADIO] Detect SDIO card 1 [ 13.194882] [mmc]: sdc1 power_supply is null [ 13.250145] mmc1: new high speed SDIO card at address 0001 [ 13.265101] [SBUS] XRadio Device:sdio clk=50000000 [ 13.279587] [XRADIO] XRADIO_HW_REV 1.0 detected. [ 13.470085] [XRADIO] Bootloader complete [ 13.670220] [XRADIO] Firmware completed. [ 13.686058] [WSM] Firmware Label:XR_C01.08.0043 Jun 6 2016 20:41:04 [ 13.703596] [XRADIO] Firmware Startup Done. [ 13.732503] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht' [ 13.814570] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x48) [ 13.856650] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x48) [ 13.885454] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x77) [ 13.917499] bmp085: probe of 0-0077 failed with error -70 [ 14.484518] EXT4-fs (mmcblk0p1): re-mounted. Opts: commit=600,errors=remount-ro [ 14.931389] Adding 131068k swap on /var/swap. Priority:-1 extents:1 across:131068k SS [ 16.829754] systemd-journald[171]: Received request to flush runtime journal from PID 1 [ 19.428510] Registered IR keymap rc-empty [ 19.444054] rc0: sunxi-ir as /devices/virtual/rc/rc0 [ 19.494246] IR RC5(x) protocol handler initialized [ 19.634551] rc s_cir0: lirc_dev: driver ir-lirc-codec (sunxi-ir) registered at minor = 0 [ 19.740297] gmac0: probed [ 19.756478] gmac0 gmac0: eth0: eth0: PHY ID 00441400 at 0 IRQ poll (gmac0-0:00) [ 21.400494] [STA] !!!xradio_vif_setup: id=0, type=2, p2p=0 [ 21.532294] ADDRCONF(NETDEV_UP): wlan0: link is not ready root@orangepizero:~#
zador.blood.stained Posted April 22, 2017 Posted April 22, 2017 15 minutes ago, A-P said: [ 0.000000] Linux version 3.4.113-sun8i (root@devel) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #28 SMP PREEMPT Thu Feb 2 02:01:28 CET 2017 This is the legacy kernel. You need to enable spidev in script.bin (if it's not enabled already) and use flashrom (from flashrom package) on /dev/spidev0.0 to write the u-boot 1
A-P Posted April 22, 2017 Author Posted April 22, 2017 I'm currently using raspberry pi hat type lcd with the board. Does that mean spidev is already activated ? If not please tell me how to enable that. also flashing uboot means issue the command : flashcp /usr/lib/linux-u-boot-dev-orangepipc_5.27_armhf/u-boot-sunxi-with-spl.bin /dev/spidev0.0 ? thanks.
martinayotte Posted April 22, 2017 Posted April 22, 2017 What do you mean exactly ? How to flash SPI-NOR or How to make LCD work on RaspberryPi ? this is completely 2 different subjects. For the SPI-NOR, as Zador said, it is not enabled by default. I personally suggest to use Mainline kernel anyway, it is much more easy to enable the overlay.
A-P Posted October 26, 2017 Author Posted October 26, 2017 Hi again @martinayotte Using your guide I could successfully program the spi flash and see /dev/mtd0. Today I tried to to the same with a NEXT image and I added spi-jedec-nor to overlays together with other overlays like analog-audio and param_spidev_spi_bus=1 and <other overlays> spi-spidev and also spi-add-cs1 as user-overlays for getting a hat lcd with touch screen to work. But I can not see /dev/mtd0 Anything wrong with my setup ?
martinayotte Posted October 26, 2017 Posted October 26, 2017 Along with "overlays=spi-jedec-nor", do you have "param_spinor_spi_bus=0" ? Did you inspect "dmesg" to see any related errors ? 1
A-P Posted October 28, 2017 Author Posted October 28, 2017 problem solved by adding param_spinor_spi_bus=0 Thanks again @martinayotte
Recommended Posts