Jump to content

riskable

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

1067 profile views
  1. Well, the first address read by devmem2 matches the output from /proc/cpuinfo: root@orangepizero:~# devmem2 0x01c14200 w|grep Value|sed 's/^.*: 0x/ /' 2004620 root@orangepizero:~# cat /proc/cpuinfo | grep Serial Serial : 02004620161dea8a Of course, that's where it ends. Here's the next region: root@orangepizero:~# devmem2 0x01c14204 w|grep Value|sed 's/^.*: 0x/ /' 3435C614 Regardless, the "last byte of the first word" still doesn't match. So I'm guessing that sun8i.c is just plain wrong since 0x42 and 0x83 can't be found in any of these numbers.
  2. According to http://linux-sunxi.org/H2%2B#VariantsI should be able to differentiate between the H2+ and the H3 via the CPU SID. I have an Orange Pi Zero board with this output from /proc/cpuinfo Hardware : Allwinner sun8i Family Revision : 0000 Serial : 02004620161dea8a According to that site "the last byte of the first word" should be either 0x42 or 0x83 since the Orange Pi Zero has an H2+. Yet I am not finding 0x42 or 0x83 *anywhere* in "02004620161dea8a". Anyone know how to correctly identify the CPU variant?
  3. I can't seem to get the Orange Pi Zero working as a USB gadget (libcomposite) to emulate a keyboard. Here's the script I'm using to test: #!/bin/bash cd /sys/kernel/config/usb_gadget mkdir g1 cd g1 echo "0x1d6b" > idVendor echo "0x0104" > idProduct mkdir strings/0x409 echo "1234567890" > strings/0x409/serialnumber echo "0x1d6b" > strings/0x409/manufacturer echo "0x0104" > strings/0x409/product mkdir functions/hid.usb0 echo 1 > functions/hid.usb0/protocol echo 1 > functions/hid.usb0/subclass echo 8 > functions/hid.usb0/report_length /bin/echo -ne \\x05\\x01\\x09\\x06\\xa1\\x01\\x05\\x07\\x19\\xe0\\x29\\xe7\\x15\\x00\\x25\\x01\\x75\\x01\\x95\\x08\\x81\\x02\\x95\\x01\\x75\\x08\\x81\\x03\\x95\\x05\\x75\\x01\\x05\\x08\\x19\\x01\\x29\\x05\\x91\\x02\\x95\\x01\\x75\\x03\\x91\\x03\\x95\\x06\\x75\\x08\\x15\\ x00\\x25\\x65\\x05\\x07\\x19\\x00\\x29\\x65\\x81\\x00\\xc0 > functions/hid.usb0/report_desc mkdir configs/c.1 mkdir configs/c.1/strings/0x409 echo Conf 1 > configs/c.1/strings/0x409/configuration echo 120 > configs/c.1/MaxPower ln -s functions/hid.usb0 configs/c.1 echo musb-hdrc.1.auto > UDC When trying to execute the script I get this crash: root@orangepizero:/usr/local/bin# bash -x hid_testing.sh + modprobe libcomposite + cd /sys/kernel/config/usb_gadget/ + mkdir -p g1 + cd g1 + echo 0x1d6b + echo 0x0104 + echo 0x0100 + echo 0x0200 + mkdir -p strings/0x409 + echo fedcba9876543210 + echo girst + echo Hardpass + N=usb0 + mkdir -p functions/hid.usb0 + echo 1 + echo 1 + echo 8 + echo -ne '\x05\x01\x09\x06\xa1\x01\x05\x07\x19\xe0\x29\xe7\x15\x00\x25\x01\x75\x01\x95\x08\x81\x02\x95\x01\x75\x08\x81\x03\x95\x05\x75\x01\x05\x08\x19\x01\x29\x05\x91\x02\x95\x01\x[ 84.870357] Unable to handle kernel NULL pointer dereference at virtual address 000000 02 75\x03\x91\x03\x95\x06\x75\x08\x15\x00\x25\x65\x05\x07\x19\x00\x[ 84.879054] pgd = ce2b8000 29\x65\x81\x00\xc0' + C=1 + mkdir -p configs/c.1/strings/0x409[ 84.887248] [00000002] *pgd=4e2c9835 + echo 'Config 1: ECM network' + echo 250 + ln -s functions/, *pte=00000000hid.usb0 configs/c.1/ + ls /sys/class/udc , *ppte=00000000 [ 84.908434] Internal error: Oops: 17 [#1] SMP THUMB2 [ 84.913394] Modules linked in: usb_f_hid libcomposite evdev sun8i_ths gpio_keys cpufreq_dt uio_pdrv_genirq uio thermal_sys [ 84.924552] CPU: 3 PID: 1208 Comm: ls Not tainted 4.9.0-sun8i #14 [ 84.930639] Hardware name: Allwinner sun8i Family [ 84.935339] task: ce1bb900 task.stack: ce26e000 [ 84.939914] PC is at alloc_ep_req+0x15/0x50 [libcomposite] [ 84.945396] LR is at kmem_cache_alloc+0xe3/0xf0 [ 84.949923] pc : [<bf84ad76>] lr : [<c01c1cb7>] psr: 200e0033 [ 84.949923] sp : ce26fde8 ip : 00000000 fp : c9d8e1ec [ 84.961388] r10: c9c61e94 r9 : cd402ac4 r8 : cd402b1c [ 84.966608] r7 : cd402aa8 r6 : ce0a2418 r5 : ce178480 r4 : 00000008 [ 84.973128] r3 : 00000000 r2 : ffffffff r1 : 00000000 r0 : ce178480 [ 84.979651] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA Thumb Segment none [ 84.986953] Control: 50c5387d Table: 4e2b806a DAC: 00000051 [ 84.992693] Process ls (pid: 1208, stack limit = 0xce26e210) [ 84.998347] Stack: (0xce26fde8 to 0xce270000) [ 85.002703] fde0: bf8570a4 00000000 c9c61e94 bf856461 c0b48ba8 cdbd9000 [ 85.010874] fe00: c9d8e1ec bf847923 c9c61e94 cd402aa8 cd402aa8 00000000 cd402b1c bf84778b [ 85.019046] fe20: cd402b1c c9c61eec 00000200 cd402aa8 00000100 bf84a4b9 00000055 c9d8e000 [ 85.027235] fe40: c9d8e260 ce0a3148 bf84c100 c9d8e298 00000000 cd220200 00000000 c9d8e1ec [ 85.035419] fe60: cd1b06c0 c9d8e1ec c0b48ba8 cdbd9000 00000051 c05429c3 cd220200 00000000 [ 85.043603] fe80: c0b48bc0 c0542ca1 00000000 cd1b06c0 fffffff0 c9d8e000 c9d8e190 00000011 [ 85.051792] fea0: cdadc180 bf84ab99 00037e98 00000000 00000011 cd4278c0 00000011 cd4278d8 [ 85.059982] fec0: ce26ff80 c021de13 ce26ff80 cdadc180 c021dd81 c0712138 ce26ff80 00037e98 [ 85.068172] fee0: 00000011 00000000 00000000 c01cf3f7 50c5387d ce26ffb0 c0b08f2c 000001ff [ 85.076361] ff00: b6f2f120 c010121b 00000000 00000000 585423be 2aedab11 585423be 2aedab11 [ 85.084551] ff20: 585423be 2aedab11 00003077 00000000 bec70370 b6f4bd58 cdadc180 00000011 [ 85.092740] ff40: 00037e98 ce26ff80 00037e98 00000000 00000000 c01cfe5f 0000000e 000081a4 [ 85.100929] ff60: 00000001 cdadc180 cdadc180 00000000 00000000 00037e98 00000011 c01d09df [ 85.109118] ff80: 00000000 00000000 585423be 00000011 00037e98 b6f4bd58 00000004 c0105fe4 [ 85.117307] ffa0: ce26e000 c0105e21 00000011 00037e98 00000001 00037e98 00000011 00000000 [ 85.125496] ffc0: 00000011 00037e98 b6f4bd58 00000004 b6f4c0ac 00000001 b6f9c000 00000000 [ 85.133686] ffe0: 00000000 bec72ae4 b6eaf79b b6eeaf96 000e0030 00000001 4eff6861 4eff6c61 [ 85.141926] [<bf84ad76>] (alloc_ep_req [libcomposite]) from [<bf856461>] (hidg_bind+0x64/0x1d0 [usb_f_hid]) [ 85.151699] [<bf856461>] (hidg_bind [usb_f_hid]) from [<bf84778b>] (usb_add_function+0x3a/0xc4 [libcomposite]) [ 85.161740] [<bf84778b>] (usb_add_function [libcomposite]) from [<bf84a4b9>] (configfs_composite_bind+0x1cc/0x2d8 [libcomposite]) [ 85.173421] [<bf84a4b9>] (configfs_composite_bind [libcomposite]) from [<c05429c3>] (udc_bind_to_driver+0x1b/0x74) [ 85.183785] [<c05429c3>] (udc_bind_to_driver) from [<c0542ca1>] (usb_gadget_probe_driver+0xa1/0xe4) [ 85.192859] [<c0542ca1>] (usb_gadget_probe_driver) from [<bf84ab99>] (gadget_dev_desc_UDC_store+0x80/0x94 [libcomposite]) [ 85.203845] [<bf84ab99>] (gadget_dev_desc_UDC_store [libcomposite]) from [<c021de13>] (configfs_write_file+0x93/0xec) [ 85.214469] [<c021de13>] (configfs_write_file) from [<c01cf3f7>] (__vfs_write+0xf/0xb4) [ 85.222487] [<c01cf3f7>] (__vfs_write) from [<c01cfe5f>] (vfs_write+0x6f/0x13c) [ 85.229811] [<c01cfe5f>] (vfs_write) from [<c01d09df>] (SyS_write+0x2b/0x64) [ 85.236871] [<c01d09df>] (SyS_write) from [<c0105e21>] (ret_fast_syscall+0x1/0x4c) [ 85.244456] Code: d0d8 4605 b190 6a73 (f993) 2002 [ 85.249310] ---[ end trace 5a400d152710de10 ]--- hid_testing.sh: line 27: 1208 Segmentation fault ls /sys/class/udc > UDC Apparently this line is what kicks it off: ls /sys/class/udc > UDC Running this command you can see that it should simply output "musb-hdrc.1.auto" to the "UDC" file: root@orangepizero:/usr/local/bin# ls /sys/class/udc musb-hdrc.1.auto Sending that to the UDC file is basically the final step in initializing a USB gadget. So something in the USB gadget driver is failing to work properly and I haven't the foggiest idea of how to troubleshoot this further. It *seems* like it's a bug but I could be doing something wrong. Any assistance is appreciated.
  4. Everything is OK now! I did as you suggested and basically just deleted everything and started over from scratch. I've now got a working build. ...and eth0 has an IPv6 address so building custom fixed *that* problem too!
  5. I'm doing a build inside a Docker container (Ubuntu Xenial 16.04; started with --privileged) and I've tried several builds but all of them fail. The .img file gets created but after copying to the SD card they always fail (unrecognized file system). Here's the output of compile.sh: [ o.k. ] Creating board support package [ orangepizero default ] [ .... ] Fingerprinting [ o.k. ] Building package [ linux-xenial-root-orangepizero ] [ o.k. ] Starting rootfs and image building process for [ orangepizero xenial ] [ o.k. ] Extracting xenial-ng-armhf.50a...4c9.tgz [ 0 days old ] xenial-ng-armhf.50a...4c9.tgz: 75.6MiB [ 204MiB/s] [====================================================================================================================================================================================================================>] 100% [ o.k. ] Applying distribution specific tweaks for [ xenial ] sed: can't read /root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/etc/ssh/sshd_config: No such file or directory [ o.k. ] Applying common tweaks /root/armbian-devel/lib/distributions.sh: line 37: /root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/etc/modprobe.d/orangepizero.conf: No such file or directory sed: can't read /root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/etc/default/console-setup: No such file or directory chage: the shadow password file is not present [ o.k. ] Installing kernel [ linux-image-sun8i ] [ o.k. ] Installing u-boot [ linux-u-boot-orangepizero ] [ o.k. ] Installing headers [ linux-headers-sun8i ] [ o.k. ] Installing generic firmware [ armbian-firmware ] [ o.k. ] Installing board support package [ orangepizero ] sed: can't read /root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/etc/lirc/hardware.conf: No such file or directory sed: can't read /root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/etc/lirc/hardware.conf: No such file or directory sed: can't read /root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/etc/lirc/hardware.conf: No such file or directory cp: cannot create regular file '/root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/etc/lirc/lircd.conf': No such file or directory qemu: Unsupported syscall: 384 Created symlink /etc/systemd/system/getty.target.wants/serial-getty@ttyGS0.service, pointing to /lib/systemd/system/serial-getty@.service. [ o.k. ] Installing extra applications and drivers [ o.k. ] Installing linux firmware [ 5.24 ] dpkg: warning: parsing file '/var/lib/dpkg/status' near line 75 package 'dpkg': missing description dpkg: warning: parsing file '/var/lib/dpkg/status' near line 75 package 'dpkg': missing maintainer dpkg: warning: parsing file '/var/lib/dpkg/status' near line 75 package 'dpkg': missing architecture [ o.k. ] Installing additional driver [ MT7601U ] [ o.k. ] Checking git sources [ mt7601 old ] [ .... ] Creating local copy [ .... ] Fetching updates remote: Counting objects: 264, done. remote: Compressing objects: 100% (207/207), done. remote: Total 264 (delta 54), reused 255 (delta 53), pack-reused 0 Receiving objects: 100% (264/264), 1.29 MiB | 681.00 KiB/s, done. Resolving deltas: 100% (54/54), done. From https://github.com/igorpecovnik/mt7601 * branch old -> FETCH_HEAD * [new branch] old -> origin/old [ .... ] Checking out /root/armbian-devel/lib/extras/mt7601.sh: line 71: depmod: command not found [ o.k. ] Installing additional driver [ RT8192 ] [ o.k. ] Checking git sources [ rt8192cu master ] [ .... ] Creating local copy [ .... ] Fetching updates remote: Counting objects: 201, done. remote: Compressing objects: 100% (177/177), done. remote: Total 201 (delta 43), reused 71 (delta 21), pack-reused 0 Receiving objects: 100% (201/201), 1.17 MiB | 0 bytes/s, done. Resolving deltas: 100% (43/43), done. From https://github.com/dz0ny/rt8192cu * branch master -> FETCH_HEAD * [new branch] master -> origin/master [ .... ] Checking out /root/armbian-devel/lib/extras/rtl8192cu.sh: line 56: depmod: command not found [ o.k. ] Installing [ armbian-tools-xenial_5.24_armhf.deb ] dpkg: warning: parsing file '/var/lib/dpkg/status' near line 75 package 'dpkg': missing description dpkg: warning: parsing file '/var/lib/dpkg/status' near line 75 package 'dpkg': missing maintainer dpkg: warning: parsing file '/var/lib/dpkg/status' near line 75 package 'dpkg': missing architecture dpkg: dependency problems prevent configuration of armbian-tools-xenial: armbian-tools-xenial depends on libc6 (>= 2.10); however: Package libc6 is not installed. armbian-tools-xenial depends on libusb-1.0-0 (>= 2:1.0.8); however: Package libusb-1.0-0 is not installed. armbian-tools-xenial depends on libusb-0.1-4; however: Package libusb-0.1-4 is not installed. armbian-tools-xenial depends on libudev1; however: Package libudev1 is not installed. dpkg: error processing package armbian-tools-xenial (--install): dependency problems - leaving unconfigured Errors were encountered while processing: armbian-tools-xenial [ o.k. ] Installing additional application [ USB redirector ] cp: target '/root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/usr/local/bin/' is not a directory cp: cannot create regular file '/root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial/usr/local/bin/': No such file or directory /tmp/install.sh: line 3: apt-get: command not found /tmp/install.sh: line 12: apt-get: command not found /tmp/install.sh: line 13: apt-get: command not found [ o.k. ] Calling image customization script [ customize-image.sh ] dpkg-divert: warning: parsing file '/var/lib/dpkg/status' near line 88 package 'dpkg': missing description dpkg-divert: warning: parsing file '/var/lib/dpkg/status' near line 88 package 'dpkg': missing maintainer dpkg-divert: warning: parsing file '/var/lib/dpkg/status' near line 88 package 'dpkg': missing architecture dpkg-divert: warning: parsing file '/var/lib/dpkg/status' near line 88 package 'dpkg': missing description dpkg-divert: warning: parsing file '/var/lib/dpkg/status' near line 88 package 'dpkg': missing maintainer dpkg-divert: warning: parsing file '/var/lib/dpkg/status' near line 88 package 'dpkg': missing architecture [ o.k. ] Preparing image file for rootfs [ orangepizero xenial ] [ o.k. ] Current rootfs size [ 237 MiB ] [ o.k. ] Creating blank image for rootfs [ 461 MiB ] 461MiB [ 331MiB/s] [===================================================================================================================================================================================================================================================>] 100% [ o.k. ] Creating partitions [ root: ext4 ] mknod: /dev/loop0: File exists [ .... ] Creating rootfs [ ext4 ] mknod: 1: File exists The file /dev/loop0p1 does not exist and no size was specified. tune2fs: No such file or directory while trying to open /dev/loop0p1 Couldn't find valid filesystem superblock. mount: special device /dev/loop0p1 does not exist [ o.k. ] Copying files to image [ .raw ] 201.34M 99% 158.79MB/s 0:00:01 (xfr#16403, to-chk=0/21755) sent 202.52M bytes received 335.03K bytes 135.24M bytes/sec total size is 202.62M speedup is 1.00 [ o.k. ] Copying files to /boot partition [ .raw ] 8.93M 99% 530.38MB/s 0:00:00 (xfr#47, to-chk=0/50) sent 8.94M bytes received 921 bytes 17.87M bytes/sec total size is 8.93M speedup is 1.00 [ o.k. ] Free space: [ SD card ] tmpfs 1.5G 237M 1.3G 16% /root/armbian-devel/output/cache/sdcard-default-orangepizero-xenial [ o.k. ] Writing U-boot bootloader [ /dev/loop0 ] umount: /root/armbian-devel/output/cache/mount-default-orangepizero-xenial: not mounted [ o.k. ] Done building [ /root/armbian-devel/output/images/Armbian_5.24_Orangepizero_Ubuntu_xenial_3.4.113.img ] [ o.k. ] Runtime [ 8 min ] root@f01fb9beeb7e:~/armbian-devel#
  6. If you're seeing that a VNC port is listening you probably installed the wrong OS image. When I boot a fresh Armbian Ubuntu Xenial image the ethernet port will use DHCP to get IPv4 only (which is a bug I think--should also be getting IPv6) and the only thing listening is SSH. Wifi isn't enabled by default (since it doesn't know which SSID to connect to). I recommend trying today's beta image: http://image.armbian.com/betaimages/Armbian_5.24.161130_Orangepizero_Ubuntu_xenial_3.4.113.7z(taken from here: http://image.armbian.com/betaimages/) I also recommend connecting to the serial console over UART (http://linux-sunxi.org/File:OPi_Zero_UART.jpg): You can pick up a cable that will work here: http://a.co/78ua1Pa
  7. I just booted up a fresh install of Armbian 5.24 (Armbian_5.24.161128_Orangepizero_Ubuntu_xenial_3.4.113) on my Orange Pi Zero and I can't seem to get IPv6 working. It worked fine on Armbian 5.22. It's like the dhclient command isn't able to set the address or the address is silently getting dropped or something. Setting ipv6 address via dhclient fails for both eth0 and wlan0. I ran dhclient by hand to see if a problem would be listed in the output but there's nothing: root@orangepizero:/var/lib/NetworkManager# /sbin/dhclient -d -v -6 -N -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient6-wlan0.pid -lf /var/lib/NetworkManager/dhclient6-1cfb9f48-cd01-4176-b6e1-bd69daabe363-wlan0.lease -cf /var/lib/NetworkManager/dhclient6- wlan0.conf wlan0 Internet Systems Consortium DHCP Client 4.3.3 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on Socket/wlan0 Sending on Socket/wlan0 PRC: Confirming active lease (INIT-REBOOT). XMT: Forming Confirm, 0 ms elapsed. XMT: X-- IA_NA 6d:ba:2b:45 XMT: | X-- Confirm Address fd69:removed XMT: V IA_NA appended. XMT: Confirm on wlan0, interval 980ms. RCV: Reply message on wlan0 from fe80::removed. RCV: X-- IA_NA 6d:ba:2b:45 RCV: | X-- starts 1480454860 RCV: | X-- t1 - renew +0 RCV: | X-- t2 - rebind +0 RCV: | X-- [Options] RCV: X-- Server ID: 00:00:00:00:00:00:00:00:00:00 message status code NotOnLink. PRC: Soliciting for leases (INIT). XMT: Forming Solicit, 0 ms elapsed. XMT: X-- IA_NA 6d:ba:2b:45 XMT: | X-- Request renew in +3600 XMT: | X-- Request rebind in +5400 XMT: Solicit on wlan0, interval 1060ms. RCV: Advertise message on wlan0 from fe80::removed. RCV: X-- IA_NA 6d:ba:2b:45 RCV: | X-- starts 1480454860 RCV: | X-- t1 - renew +21600 RCV: | X-- t2 - rebind +34560 RCV: | X-- [Options] RCV: | | X-- IAADDR fd69:removed RCV: | | | X-- Preferred lifetime 4294967295. RCV: | | | X-- Max lifetime 4294967295. RCV: X-- Server ID: 00:03:00:01:a0:04:60:15:57:ca RCV: Advertisement recorded. PRC: Selecting best advertised lease. PRC: Considering best lease. PRC: X-- Initial candidate 00:00:00:00:00:00:00:00:00:00 (s: 154, p: 0). XMT: Forming Request, 0 ms elapsed. XMT: X-- IA_NA 6d:ba:2b:45 XMT: | X-- Requested renew +3600 XMT: | X-- Requested rebind +5400 XMT: | | X-- IAADDR fd69:removed XMT: | | | X-- Preferred lifetime +7200 XMT: | | | X-- Max lifetime +7500 XMT: V IA_NA appended. XMT: Request on wlan0, interval 1030ms. RCV: Reply message on wlan0 from fe80::removed. RCV: X-- IA_NA 6d:ba:2b:45 RCV: | X-- starts 1480454861 RCV: | X-- t1 - renew +21600 RCV: | X-- t2 - rebind +34560 RCV: | X-- [Options] RCV: | | X-- IAADDR fd69:removed RCV: | | | X-- Preferred lifetime 4294967295. RCV: | | | X-- Max lifetime 4294967295. RCV: X-- Server ID: 00:00:00:00:00:00:00:00:00:00 PRC: Bound to lease 00:00:00:00:00:00:00:00:00:00. PRC: Renewal event scheduled in 21600 seconds, to run for 12960 seconds. For reference: Yes, IPv6 works just fine on my network thank you very much. Just not the Orange Pi Zero (with yesterday's build: 5.24). I checked to see if there were any errors in /var/log/syslog or dmesg to indicate what the problem might be but there's nothing! It's baffling.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines