Jump to content

zador.blood.stained

Members
  • Posts

    3633
  • Joined

  • Last visited

Everything posted by zador.blood.stained

  1. I had exactly this overwrite prompt when building 4.3 kernel. The reason why you can't do anything with it is not output redirection, but a dialog "window", that doesn't forward your input to the piped program. Having option to not use dialog for all compilation commands is fine, but "DEBUGKBUILD" name can be confused with debug kernel configuration. Anyway, kernel packaging should be fixed too for future builds so it requires no user interaction.
  2. 2. Sorry, my bad, missed that 3.x kernels already had DT bits for some devices (and make target for it), so it works. 3. Yes
  3. Igor, saw your commits on github. 1. KERNEL_KEEP_CONFIG definitely should be disabled by default, otherwise there will be no allwinner specific base config on fresh installations or major version upgrades. This option is for (re)building with different set of options/modules. 2. "dtbs" target is specific to Device Tree based kernels, building legacy kernels most likely will fail at this stage. 3. "bindeb-pkg" is not temporary but is a new default option for kernels that support this target: https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/scripts/package/builddeb?id=3716001bcb7f5822382ac1f2f54226b87312cc6b I guess that having USE_CCACHE enabled by default is okay even with default config ($HOME/.ccache, limit 1G), but it has some scenarios where it won't work as expected (recompiling kernel with changed config or manually pached include files): https://lists.samba.org/archive/ccache/2014q1/001172.html
  4. Собирать Ñдро Ñкриптами отÑюда: https://github.com/igorpecovnik/lib Крайне рекомендуетÑÑ Ð¸Ñпользовать Ubuntu 14.04 в VirtualBox Как и напиÑано в README Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ (и в документации http://www.armbian.com/documentation/), чтобы Ñобрать только Ñдро Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð½Ð¾Ð¹ конфигурацией, в копии compile.sh выÑтавить KERNEL_ONLY="yes" KERNEL_CONFIGURE="yes" Ð’ конфиге Ñдра Ñкорее вÑего надо будет включить Ñледующие опции (Ð´Ð»Ñ Ñдра верÑий 4.Ñ…): CONFIG_VIDEO_V4L2 CONFIG_USB_GADGET CONFIG_USB_VIDEO_CLASS CONFIG_USB_F_UVC CONFIG_USB_CONFIGFS_F_UVC и их дополнительные завиÑимоÑти, еÑли они будут. ЕÑли веб-камера заработает, можно будет попроÑить Ð˜Ð³Ð¾Ñ€Ñ Ð²ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒ Ñти опции в конфиг по умолчанию.
  5. Using bindeb-pkg target instead of deb-pkg seems to build kernel 4.3 without recompiling (which is logical since deb-pkg target is designed for making kernel source package amongst others and it executes "make clean" at the start). Also tested ccache on u-boot compilation - works, but if [ "$USE_CCACHE" = "yes" ]; then USE_CCACHE="ccache"; else USE_CCACHE=""; fi needs to be called only once somewhere before u-boot and kernel compilation.
  6. This logic for rewriting USE_CCACHE looks good, but checking exit code here this way (with one command piped to another) actually checks dialog exit code instead of make. ➜ Temp % true | false; echo $? 1 ➜ Temp % false | true; echo $? 0
  7. Looking at output of "make ... help" on 4.3 tree. Target "all" implies "zImage" - so zImage is not needed if all is specified, or maybe target list should be "zImage modules dtbs". This is not related to deb-pkg problem, but it is still an optimization.
  8. Okay. Kernel 4.3 + allwinner-audio-4.x patch + 6 patches related to sun4i-codec + enabling CONFIG_DMA_SUN4I (and of course enabling CONFIG_SND_SUN4I_CODEC) in kernel config + understanding new weird mixer controls = onboard sound works. ➜ ~ % dmesg | grep sun4i-codec [ 8.566444] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok ➜ ~ % aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sun4icodec [sun4i-codec], device 0: CDC PCM Codec-0 [] Subdevices: 0/1 Subdevice #0: subdevice #0 Edit: for reference, proper mixer config looks like this right now: Edit 2: Patches for sun4i-codec [file removed]
  9. Yes, I added ccache to make deb-pkg, but for me it compiles all sources again (second run with ccache should be much faster, but I didn't have time to finish it yesterday). It should probably be noted in documentation or near USE_CCACHE option, that users need to set up at least ccache dir and size before enabling this option.
  10. Rebuilding kernel several times in a row, made some changes, that would be nice to have in build script by default, and also some thoughts on custom kernel patches. 1.Option to not overwrite kernel config before compilation. Example: setting KERNEL_KEEP_CONFIG="yes" in build.sh Changes (common.sh): # use proven config if [ "$KERNEL_KEEP_CONFIG" != "yes" ]; then cp $SRC/lib/config/$LINUXCONFIG.config $SOURCES/$LINUXSOURCE/.config; fi 2. Option to use ccache for kernel compilation (at least). ccache can be set by creating symlinks for cross-compiling tools, but having an option in build script is more useful and easier IMHO. Example: setting USE_CCACHE="yes" in build.sh Changes (in common.sh): if [ "$USE_CCACHE" = "yes" ] then make $CTHREADS ARCH=arm CROSS_COMPILE="ccache arm-linux-gnueabihf-" all zImage 2>&1 | dialog --backtitle "$backtitle" --progressbox "Compiling kernel ..." 20 70 else make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all zImage 2>&1 | dialog --backtitle "$backtitle" --progressbox "Compiling kernel ..." 20 70 fi Also here stderr of compilation process is redirected to stdout so compiler warnings do not tear dialog window (2>&1). Compiling kernel with ccache right now, will report if it breaks anything. Looks like it doesn't like invoking make deb-pkg after compilation and tries to compile everything again, will test later other than this 4.3 related bug compilation works. 3. Automatically pick up and apply kernel patches from custom directory. Something like this: # in kernel souces root dir for patch in $SRC/patches/$KERNEL_TYPE/*.patch do patch -p1 < $patch done KERNEL_TYPE can be "next" or "legacy" to separate patches for different kernel branches. This can be extended to using device specific directories if necessary.
  11. On mainline kernel you need to blacklist modules that are loading without entry in /etc/modules. Create file /etc/modprobe.d/wireless-blacklist.conf and put this in it to disable Wi-Fi: blacklist brcmfmac blacklist brcmutil And you still need to comment rfcomm line in /etc/modules to disable bluetooth
  12. Thanks. Looks like driver itself (sun4i-codec) was merged separately. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/sound/soc/sunxi Posted kernel itself, of course, works, but without includes I won't be able to quickly compile and test this module and without required CONFIG_SND_SOC* options especially Edit: compiled 4.3 with all these patches, looks like it's not ready yet [ 8.380136] sun4i-codec 1c22c00.codec: Missing dma channel for stream: 0 [ 8.380164] sun4i-codec 1c22c00.codec: ASoC: pcm constructor failed: -22 [ 8.380176] sun4i-codec 1c22c00.codec: ASoC: can't create pcm CDC PCM :-22 [ 8.380186] sun4i-codec 1c22c00.codec: ASoC: failed to instantiate card -22 [ 8.380423] sun4i-codec 1c22c00.codec: Failed to register our card [ 8.380519] sun4i-codec: probe of 1c22c00.codec failed with error -22 Edit 2: Of course DMA engine is not enabled by default... really, who needs to make CONFIG_SND_SUN4I_CODEC depend on CONFIG_DMA_SUN4I if you can just spend another 2 hours recompiling kernel?
  13. @veribaka You can try to port it with settings like these: [Unit] DefaultDependencies=no Before=systemd-journald.service [Service] ... [Install] WantedBy=local-fs.target You don't need to remove existing script, systemd service unit with same name (ramlog.service) will have priority over init script. Also settings like these in [service] section may be required Type=oneshot RemainAfterExit=yes
  14. Well, it can be disabled and dealt with via IRQ, but I don't see any register that would allow changing the threshold.
  15. Thanks for the note. BTW, by "current" kernel here I was referencing current legacy 3.4.10x. Small correcton: using PMU temperature sensor should be better unless you are using battery (not the case for Banana Pi, it doesn't have battery connector as far as I see). Edit: comments from sun4i-ts.c in mainline: /* * The A10 temperature sensor has quite a wide spread, these * parameters are based on the averaging of the calibration * results of 4 completely different boards, with a spread of * temp_step from 0.096 - 0.170 and temp_offset from 176 - 331. */ Edit 2: this is very strange in sun4i-a10.dtsi: rtp: ... compatible = "allwinner,sun4i-a10-ts"; in sun7i-a20.dtsi: rtp: ... compatible = "allwinner,sun5i-a13-ts"; which leads to using another constants, with even better comment: /* * The user manuals do not contain the formula for calculating * the temperature. The formula used here is from the AXP209, * which is designed by X-Powers, an affiliate of Allwinner: * * temperature (C) = (value * 0.1) - 144.7 * * Allwinner does not have any documentation whatsoever for * this hardware. Moreover, it is claimed that the sensor * is inaccurate and cannot work properly. */
  16. Sensor is internal, so for your board it is located somewhere here :
  17. Ok. Last more or less sane idea is - install debsums package with its dependencies and running "debsums -cs" from bash shell. Debsums should detect any corrupted files (apart from config) if there are any (and it will probably whine about manually overwritten kernel related files). Since I didn't find debsums on ports.ubuntu.com for trusty It is in Universe repository. Alternatively you can run it from another Ubuntu or Debian installation and just point to your rootfs and admindir. If it doesn't output anything useful, then it means probably broken config files or missing packages, and unless you want to poke random config files looking for corruption signs, it would be easier to start from scratch with fresh image. I'm assuming you tried adding --verbose to kernel command line as suggested on upstart debugging page and it didn't output anything new. Also that you ran fsck.ext4 -f for your sd card partition and it didn't output any errors. Edit: earlier I extracted upstart package for trusty ➜ sbin % file init init: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=0bc26f5010188b174e1170c23ec32354b6e9e21c, stripped Edit 2: You can run "debsums -acs" to output also changed (compared to default) config files, theoretically it might help, if you remember what you did or did not modify. Edit 3: You may need to mount /proc and remount rootfs to rw in bash shell before running debsums. mount proc /proc -t proc mount -o remount,rw /
  18. Try this: http://forum.armbian.com/index.php/topic/323-no-shutdown-cubietruck-with-li-battery/#entry2084
  19. I²C device 0x34 is an AXP209 PMU: https://linux-sunxi.org/AXP209 /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input is not CPU Temperature, but PMU temperature: http://www.cubieforums.com/index.php/topic,2293.msg14566.html#msg14566 a20-tp-hwmon, however, is a kernel module that gets temperature of the CPU itself. As far as I read linked topic, this should be correct for current kernel.
  20. Looks like A10/A20 audio codec support got merged to linux-next tree. Igor, can you please add these patches? I'll try to find all related bits. There are too many commits to link them one by one. Here is merge commit, it's easier to remove not needed bcm2835 and sun6i stuff from it. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit?id=2030deefd5bfb68317732d8f64c69c7cb5169e9d
  21. Italic and bold are not working in code blocks I didn't mention these lines because csi, smc, lcd, mmc and whatever else are disabled by default. If wifi_used and bt_used are disabled, I'm not sure if pin settings in this block will have any effect, so it's better to set them in gpio or gpio_init explicitly.
  22. Wiki says upstart is default before 15.04, so then it's probably upstart problem http://upstart.ubuntu.com/wiki/Debugging
  23. I think that not loading drivers should work. I looked at ap6210 hardware specifications and cubietruck schematics, and its default state (with WL_REG_ON and BT_RST_N inputs both LOW) is the most power saving - both WLAN and BT sections are disabled. WL_REG_ON is connected to PH9, BT_RST_N is connected to PH18. To be sure, remove PH18 from [gpio_para] section in your fex/bin (also decrement gpio_num value there) gpio_pin_68 = port:PH18<0><default><default><0> And set wifi_used = 0 bt_used = 0 Edit: since there are no pull-down resistors and default pin state is floating, it may be better to set both specified pins as OUTPUT LOW in fex file. https://linux-sunxi.org/Fex_Guide#Port_Definitions https://linux-sunxi.org/Fex_Guide#.5Bgpio_para.5D https://linux-sunxi.org/Fex_Guide#.5Bgpio_init.5D
  24. FYI, I checked, using dtc from device-tree-compiler on device itself is an easier way to make such small changes in Device Tree config. http://forum.armbian.com/index.php/topic/382-armbian-on-pcduino3/#entry2444 Decompiled dts looks a bit different compared to original, but it's easy to find LED related sections and values.
  25. Yes, just checked, something like this should work Make backup of you existing /boot/dtb/sun7i-a20-pcduino3-nano.dtb Decompile: dtc -I dtb -O dts /boot/dtb/sun7i-a20-pcduino3-nano.dtb -o /tmp/temp.dts Edit /tmp/temp.dts: Add uart2_pins_a label uart2_pins_a: uart2@0 { allwinner,pins = "PI16", "PI17", "PI18", "PI19"; allwinner,function = "uart2"; allwinner,drive = <0x0>; allwinner,pull = <0x0>; }; Change serial section: serial@01c28800 { compatible = "snps,dw-apb-uart"; reg = <0x1c28800 0x400>; interrupts = <0x0 0x3 0x4>; reg-shift = <0x2>; reg-io-width = <0x4>; clocks = <0x2a 0x12>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart2_pins_a>; }; Compile it back (assuming you are using non-root user): sudo dtc -I dts -O dtb /tmp/temp.dts -o /boot/dtb/sun7i-a20-pcduino3-nano.dtb
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines