BaronVonChickenPants Posted September 8, 2015 Share Posted September 8, 2015 I am currently in the middle of a build using Debian Wheezy on cubieboard1's that requires a 2nd network interface, I have purchased 3 different USB3.0 to Ethernet interfaces, all of which turned out to be Asix ax88179 chipsets. I have searched far and wide but have not been able to find how to activate the usb network interface on armbian. The device appears under lsusb: Bus 001 Device 002: ID 0b95:1790 ASIX Electronics Corp. Bus 004 Device 002: ID 046d:c52e Logitech, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub I am currently running up a fresh Ubuntu build environment to build the kernel module but thought while I'm waiting I would check if this is the correct path. Is there support for usb networking and the ax88179 chipset already built into the Ambian 4.1 image? Side note: At this point it is too late to change to another board but for future builds I am looking at something like this: http://boundarydevices.com/product/nit6_solox-imx6/will this platform run one of the Armbian 1mx6 images? Regards, Jordan. Link to comment Share on other sites More sharing options...
Igor Posted September 8, 2015 Share Posted September 8, 2015 Asix chipset is generally supported. I have one USB2.0 based here and it's working out of the box. If it will not work, we can add it to the kernel in one cycle or you can compile it by yourself from the vendor sources. It usually works. Perhaps this solution is also an option for you case: http://www.premoboard.com/en/ Boundary devices are not supported by Armbian. If you could run an imx based image there (from Cubox or Udoo) is by luck / accident. Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 8, 2015 Author Share Posted September 8, 2015 Thanks Igor, I have tried compiling the kernel module on the cubieboard amrbian image but received the following errors, I believe the drivers provided by Asix are not intended for the 4.x kernel, hence the below errors. make -C /lib/modules/4.1.6-sunxi/build SUBDIRS=/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE modules make[1]: Entering directory `/usr/src/linux-headers-4.1.6-sunxi' Building modules, stage 2. MODPOST 1 modules WARNING: "usbnet_disconnect" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_probe" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_set_msglevel" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_get_msglevel" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_tx_timeout" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_start_xmit" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_stop" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_open" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_get_endpoints" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_defer_kevent" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_suspend" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_resume" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_write_cmd_nopm" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_write_cmd" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_read_cmd_nopm" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_read_cmd" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_get_drvinfo" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! WARNING: "usbnet_skb_return" [/root/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE/ax88179_178a.ko] undefined! make[1]: Leaving directory `/usr/src/linux-headers-4.1.6-sunxi' I am currently building a new image with the 3.x kernel to try. Do you have any pointers on how to add the Asix driver source during build time? I noticed there was an option to add external drivers in the compile.sh but was not clear on where to add them. I have been watching the premoboards but they didn't make it to market in time for my current projects deadline. Thanks again, Jordan. Link to comment Share on other sites More sharing options...
Igor Posted September 8, 2015 Share Posted September 8, 2015 I think it should work in any 3.4 image by default ... I don't build for CB1 because can't test / no A10 board around. It was recently added: https://github.com/dan-and/linux-sunxi/commit/2f102f92deec2000e4eca75bd6c9de94cd1db92a Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 8, 2015 Author Share Posted September 8, 2015 That's good news, now if I could only get a 3.4 kernel to boot. No matter what method I use, build from scratch, downgrade a fresh 4.2 image with upgrade script, the system runs through initial diagnostics, fails to find /boot/.next and /boot/script.bin, then freezes on: Starting Kernel...... The attached photo is of a fresh 4.2 SD card image downgraded using the upgrader script. The results are identical for the image built using the build environment. I have enabled kernel options in the compile.sh and found that the kernel config for Cubieboard 1's is set to build for the A20 CPU not the A10. I have changed this back to A10 and running a fresh build. I have also confirmed that the default settings for the 3.4 kernel include the drivers for the ax88179. I'll report back in the morning on build outcome, I'm open to any suggestions anyone can offer in the meantime. Thanks, Jordan. PS: As noted elsewhere in the forum, when installing Ubuntu for your build environment, do not change any localisation settings, leave all settings on the US based defaults or the SDK scripts do not run correctly. Link to comment Share on other sites More sharing options...
Igor Posted September 8, 2015 Share Posted September 8, 2015 Sadly, I can't help much with A10 but like I see from your log one thing stands out: Can't find /boot/script.bin ... this file must be loaded otherwise board can't operate. Source: https://github.com/igorpecovnik/lib/blob/next/config/lime-a10.fex Convert this to script.bin PS: As noted elsewhere in the forum, when installing Ubuntu for your build environment, do not change any localisation settings, leave all settings on the US based defaults or the SDK scripts do not run correctly. I already fix few things regarding language. Is it still present? And where? Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 9, 2015 Author Share Posted September 9, 2015 Ok i've made a little progress. The new image performed the same as all previous 3.4.x images. Upon inspection of the /boot folder I found the symlinks for zImage and script.bin were not valid. I have copied the /boot/bin/cubieboard.bin to /boot/script.bin which got past not finding script.bin but the system still froze at Starting kernel... I also tried a symlink from within /boot to bin/lime-a10.bin and converting a fresh script.bin from your link above. The outcome was the same, please see image attached. I have tried copying vmlinuz-3.4.108-sunxi to zImage and recreating the symlink locally as below: root@ArmbianDev2:/media# ls -lha cdrom/boot/ total 7.4M drwxr-xr-x 3 root root 4.0K Sep 8 20:25 . drwxr-xr-x 22 root root 4.0K Sep 8 07:07 .. drwxr-xr-x 2 root root 4.0K Sep 8 07:05 bin -rw-r--r-- 1 root root 6.8K Sep 8 07:04 boot.bmp -rw-r--r-- 1 root root 1.8K Sep 8 07:06 boot.cmd -rw-r--r-- 1 root root 1.8K Sep 8 07:06 boot.scr -rw-r--r-- 1 root root 96K Sep 8 04:20 config-3.4.108-sunxi lrwxrwxrwx 1 root root 16 Sep 8 20:24 script.bin -> bin/lime-a10.bin -rw-r--r-- 1 root root 2.0M Sep 8 04:20 System.map-3.4.108-sunxi -rwxr-xr-x 1 root root 5.4M Sep 8 04:20 vmlinuz-3.4.108-sunxi lrwxrwxrwx 1 root root 21 Sep 8 20:25 zImage -> vmlinuz-3.4.108-sunxi Re: localisation: - when localisation is set to Australia the compile script does not present a menu to select board type, the first menu presented is distribution, then kernel version, after which the script falls apart because the variable for board type is not set. Regards, Jordan. Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 9, 2015 Author Share Posted September 9, 2015 Further examination reveals the following: Each boot starts with: *** Warning - bad CRC, using default environment The Linux Sunxi wiki says: "If your 3.4.x kernel refuses to boot / gets stuck right after "Starting kernel ...": Double-check that bootm_boot_mode is set to "sec"!" http://linux-sunxi.org/Mainline_U-boot#Legacy_kernel_won.27t_start I tried adding setenv bootm_boot_mode sec and env set bootm_boot_mode sec to boot.cmd recompiling to boot.scr But there was still no progress Regards, Jordan Link to comment Share on other sites More sharing options...
Igor Posted September 9, 2015 Share Posted September 9, 2015 It must be something wrong with the kernel configuration. U-boot probably works ok, this bad CRC is normal behavior. http://www.denx.de/wiki/view/DULG/WarningBadCRCUsingDefaultEnvironment Try to build kernel with Cubieboard 1 factory default configuration. I sincerely hope that this is the problem. Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 9, 2015 Author Share Posted September 9, 2015 While I was playing with builds, configs and git repository's I set the cubieboard running with the debian netinstall image from here: https://github.com/ssvb/sunxi-bootsetup/releases/tag/20141215-sunxi-bootsetup-prototype Once debian was installed the system booted first time and the ax88179 just worked. I have no idea what the differences are but I'm happy to provide any details if you wish to cross examine. :~# uname -a Linux cubie 4.1.0-2-armmp #1 SMP Debian 4.1.6-1 (2015-08-23) armv7l GNU/Linux :~# lsusb Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 003: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 003: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub :~# lsmod Module Size Used by joydev 9000 0 evdev 10432 0 ax88179_178a 14826 0 usbnet 24797 1 ax88179_178a hid_generic 816 0 mii 3962 2 usbnet,ax88179_178a axp20x_regulator 3194 1 i2c_mv64xxx 7438 0 sun4i_ts 4098 0 sunxi_wdt 3531 0 sunxi_sid 2401 0 ohci_platform 4658 0 ohci_hcd 39040 1 ohci_platform ehci_platform 5206 0 ehci_hcd 64605 1 ehci_platform spi_sun4i 3926 0 leds_gpio 3180 0 cpufreq_dt 4984 0 autofs4 30560 2 ext4 502662 1 crc16 1154 1 ext4 mbcache 9210 1 ext4 jbd2 89061 1 ext4 ahci_sunxi 2915 0 libahci_platform 6145 1 ahci_sunxi libahci 23210 2 libahci_platform,ahci_sunxi libata 181727 3 libahci,libahci_platform,ahci_sunxi scsi_mod 181219 1 libata phy_sun4i_usb 4208 8 sunxi_mmc 11177 0 sun4i_emac 10381 0 :~# modinfo ax88179_178a filename: /lib/modules/4.1.0-2-armmp/kernel/drivers/net/usb/ax88179_178a.ko license: GPL description: ASIX AX88179/178A based USB 3.0/2.0 Gigabit Ethernet Devices alias: usb:v17EFp304Bd*dc*dsc*dp*ic*isc*ip*in* alias: usb:v04E8pA100d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v0DF6p0072d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v2001p4A00d*dc*dsc*dp*ic*isc*ip*in* alias: usb:v0B95p178Ad*dc*dsc*dp*ic*isc*ip*in* alias: usb:v0B95p1790d*dc*dsc*dp*ic*isc*ip*in* depends: usbnet,mii intree: Y vermagic: 4.1.0-2-armmp SMP mod_unload modversions ARMv7 p2v8 Thank you for your time and assistance. Regards, Jordan. Link to comment Share on other sites More sharing options...
Igor Posted September 9, 2015 Share Posted September 9, 2015 Nice! Can you attach kernel configuration? But I sill don't know why my kernel 3.4.108 doesn't work on A10 Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 10, 2015 Author Share Posted September 10, 2015 The only clue i was able to find but not confirm was here: http://linux-sunxi.org/Toolchain#Linaro_toolchain "WARNING: Do not use the 4.8 gcc versions of the linaro toolchain to build legacy kernels (sunxi-3.4 etc.), those seem to have issues building the kernel. Use an earlier version instead. (TODO: Verify that this is still true today)." I only used the cc-arm-linux-gnueabihf toolchain provided by the package included with Ubuntu 14.04, testing with the 4.7 toolchain as suggested was next on my list but for now I need to move on with what is working. I have uploaded the /boot folder with kernel config here: https://www.dropbox.com/sh/23nqmq8wn0ua7je/AACQgz9-uFex8DDMCL7LtG7ca I'll leave this image for now in case you need anything else from it. Regards, Jordan. Link to comment Share on other sites More sharing options...
Igor Posted September 10, 2015 Share Posted September 10, 2015 I know about this compiler issue but doubt since we are running exact same kernel on A20 just fine. Thanks for files. No need for me to salvage this. I'll merge the Debian arm kernel config except things for strange 3rd party boards. 88179_178 will be in next armbian kernel 4.2 among many others. It's in the main kernel source so no need to patch it. Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 11, 2015 Author Share Posted September 11, 2015 Some things weren't adding up with the Debian netinstall, so I did more digging. I'm certain that the link that sent me to the netinstall said Debian Wheezy, so without seeing otherwise, I just assumed this would install Wheezy. Turns out it actually installs Debian 9 "Stretch" :~# /usr/bin/lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux testing (stretch) Release: testing Codename: stretch :~# cat /etc/*-release PRETTY_NAME="Debian GNU/Linux stretch/sid" NAME="Debian GNU/Linux" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support/" BUG_REPORT_URL="https://bugs.debian.org/" :~# cat /proc/version Linux version 4.1.0-2-armmp (debian-kernel@lists.debian.org) (gcc version 4.9.3 (Debian 4.9.3-3) ) #1 SMP Debian 4.1.6-1 (2015-08-23) Digging into the installer revealed this initrd.gz taken from http://d-i.debian.org/daily-images/armhf/daily/netboot/ on 07-Sep-2015 and lzma compressed My current project requires wheezy, so it's back to the drawing board. Currently trying to build an Armbian 4.x image using the debian kernel config and a fresh git pull as well as tweak the debian netinstall to provide a Wheezy install. Thank you for your efforts with this and Armbian in general. Have a Cubieboard on us - donation confirmation number: 5LK26066KV490302G Regards, Jordan. Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 11, 2015 Author Share Posted September 11, 2015 Progress update: Running the compile script to build a Cubieboard Armbian 4.3 image with wheezy and the 4.1.6 kernel using the debian kernel config looked like it was going to work, the usbnet and ax88179 drivers were available in the sources and to be selected as part of the build, but the resulting image did not include any support for usbnet devices and lsmod revealed only a minimal list of modules. Open to any suggestions. Regards, Jordan. Link to comment Share on other sites More sharing options...
Igor Posted September 11, 2015 Share Posted September 11, 2015 Huh. So you think Debian kernel is vanilla with extra patches? I also made one kernel, but added only usbnet and asix to my configuration. Currently out of office, will check later. Thanks! Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 11, 2015 Author Share Posted September 11, 2015 As far as I can tell the compile script is ignoring the .config module list and compiling only the bare essential modules. Link to comment Share on other sites More sharing options...
Igor Posted September 11, 2015 Share Posted September 11, 2015 Here is my latest kernel deb package. http://mirror.igorpecovnik.com/test/linux-image-next-sunxi_4.3_armhf.deb Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 11, 2015 Author Share Posted September 11, 2015 Wonderful, works exactly as hoped. Thank you for you time and continued efforts. A couple of quick notes, maybe they were competency tests I did have to pull the deb package apart and install manually. Running dpkg -i "completed successfully" but didn't appear to do anything, no new files or folders in /boot or /lib/modules/ I'm guessing the link was supposed to be http://mirror.igorpecovnik.com/test/linux-firmware-image-next-sunxi_4.2_armhf.deb or I was just too quick, 4.3 is there now. Regards, Jordan. Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 11, 2015 Author Share Posted September 11, 2015 Thank again Igor, http://mirror.igorpecovnik.com/test/linux-image-next-sunxi_4.3_armhf.debinstalled effortlessly, dpkg -i, reboot, done. Regards, Jordan. 1 Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 13, 2015 Author Share Posted September 13, 2015 I'm not sure if it is something I'm doing wrong or a bug in the build scripts but any changes to kernel options appear to be ignored at the final compile stage. I deployed a fresh build VM with Ubuntu Trusty, downloaded all of the build environment again as per http://www.armbian.com/github/ Changed the following compile.sh options: KERNEL_ONLY="yes" KERNEL_CONFIGURE="yes" KERNELTAG="v4.2" FBTFT="no" This then presents me with the make menu_config screen as expected where I can alter or load kernel .config's but the resulting kernel is always the same. Examples: Enabling DRBD modules Removing support for superfluous Allwinner SoC's A10s/A13/A31/sun8i/sun91 Removing Bluetooth, IrDA and WiMAX As a reference I was able to successfully build a kernel using the build environment and scripts from here: https://eewiki.net/display/linuxonarm/A10-OLinuXino-LIME The two environments/scripts seem very similar but I a looming deadline keeps me from reverse engineering them to see where it's falling apart. Curiously Allwinner NAND support was available in both kernel but neither would enable access to the Cubieboards 4Gb NAND Jordan. Link to comment Share on other sites More sharing options...
Igor Posted September 14, 2015 Share Posted September 14, 2015 There is one magic switch for this FORCE_CHECKOUT="yes" Set this to no and your changes will be accepted. Configuration is also always taken from lib/config/xxxxxxxxxxxxxxxxxx.config ... so you need to copy over there. Not the best solution for advanced users but easy for beginners and small modifications. Ideas how to change this are welcome. Link to comment Share on other sites More sharing options...
BaronVonChickenPants Posted September 22, 2015 Author Share Posted September 22, 2015 Thanks Igor, that worked as expected. Without knowing exactly what each of them does, I would have thought that if someone had modified compile.sh to activate KERNEL_CONFIG would have been enough and FORCE_CHECKOUT may be a little redundant. An option like FORCE_CHECKOUT that performed a fresh download of all files before you start, in case you had made a mass of them, would be useful, which is what I had assumed it did. Where does the compile.sh script expect to find "extra" items? How do I add additional items to this? Regards, Jordan Link to comment Share on other sites More sharing options...
Igor Posted September 22, 2015 Share Posted September 22, 2015 An option like FORCE_CHECKOUT that performed a fresh download of all files before you start, in case you had made a mass of them, would be useful, which is what I had assumed it did. I am working to fix this a little different but it will suit the purpose. If you made a mass to the code and you wan't a fresh source just remove the source directory and it will re-download without a question. The new option will be CLEANUP_LEVEL [0-3], nothing, cleaning compilation, sources, debootstrap And probably I will add a parameter for external kernel config. Link to comment Share on other sites More sharing options...
Recommended Posts