wildcat_paris Posted December 14, 2015 Posted December 14, 2015 more testing... version "next-sunxi" (uboot 15.10 kernel 4.3.2 + sunxi-ss hwrng patch + my .config file from 4.3.0) installed the new next-sunxi *.deb on lamobo-r1 bad news: the /usr/local/bin/ tools are not here but no overwritten so "swconfig" is still present from previous install EDIT: unlike my previous test (uboot 16.01-rc2 kernel 4.4-rc4, kernel starting some stuff & barely working), uboot 15.10 stops at "starting kernel" (the emergency procedure was quick this time, also avoided to use my emergency sdcard) userpatchs directory is very useful ok, I will leave Armbian lib test "master" branch for now need to go to work! 1
zador.blood.stained Posted December 14, 2015 Author Posted December 14, 2015 one more detail @zador.blood.stained you think like one of the "Armbian lib" tool writer/dev I think like an end user wishing to patch the kernel as quickly as possible, messing as little as possible with "lib" *.sh and folders, getting my kernel debian files to update my device. So having as little as possible to understand the internal of the "Armbian lib" I agree that this directory structure is not exactly user-friendly, but right now I'm thinking like this because kernel patches don't grow on trees, if user can make, change or find a patch that he wants to apply, you can expect him to know how to figure out this directory layout. Or at least to read and understand documentation about it. Also, Armbian supports many different SBCs now and probably will support even more later, and since some boards have unique kernel or u-boot sources, some have 2 possible kernel versions, some have 1, in the end you can't make directory structure simple enough without introducing tons of workarounds and extra configuration bits in build scripts. 1
zador.blood.stained Posted December 14, 2015 Author Posted December 14, 2015 @wildcat_paris, Did you make and install board-specific package (linux-trusty-root-next-lamobo-r1_5.00_armhf.deb or something similar)? I ran ./compile.sh BRANCH=next BOARD='lamobo-r1' KERNEL_ONLY=yes PROGRESS_DISPLAY=plain RELEASE=trusty [ o.k. ] Building deb package. [ linux-trusty-root-next-lamobo-r1_5.00_armhf.deb ] #dpkg-deb -c linux-trusty-root-next-lamobo-r1_5.00_armhf.deb | grep '/usr/local/bin' drwxr-xr-x root/root 0 2015-12-14 16:06 ./usr/local/bin/ -rwxr-xr-x root/staff 15531 2014-06-03 13:17 ./usr/local/bin/temper -rwxr-xr-x root/root 25528 2015-12-14 16:06 ./usr/local/bin/meminfo -rwxr-xr-x root/root 27244 2015-12-14 16:06 ./usr/local/bin/nand-part -rwxr-xr-x root/root 46614 2015-12-14 16:06 ./usr/local/bin/sunxi-fexc -rwxr-xr-x root/root 34868 2015-04-02 19:37 ./usr/local/bin/swconfig -rwxr-xr-x root/root 16943 2015-12-14 16:06 ./usr/local/bin/brcm_patchram_plus Files are present in board support package, but as far as I see this package is not installed to image, maybe Igor didn't finish this part yet. 1
Igor Posted December 14, 2015 Posted December 14, 2015 it's possible since there were so many changes. I'll look into this part and fix. 1
wildcat_paris Posted December 14, 2015 Posted December 14, 2015 @zador.blood.stained @Igor ok my bad!!!! in fact I used to build only the kernel, not the files related to the distro I mean "linux-trusty-root-next-lamobo-r1_5.00_armhf.deb" so some parts are missing for a while it was not an issue but now it seems to become one... because of many many changes in the tool
zador.blood.stained Posted December 14, 2015 Author Posted December 14, 2015 To correct myself - I found where rootfs package is installed to image, so this part is fine.
Igor Posted December 15, 2015 Posted December 15, 2015 There was one issue with version - images were without - fixed.
zador.blood.stained Posted December 16, 2015 Author Posted December 16, 2015 btw I would have suggested to add in lib/patching.sh in advanced_patch () mkdir -p "$SRC/userpatches/$dest/$family/$device" mkdir -p "$SRC/userpatches/$dest/$family" so next-time the user can fill the proper directory with the patches without having to add logs and read patching.sh I added extra info message to patching function, this should help a bit [ o.k. ] Started patching process for [ u-boot u-boot-next 2015.10 ] [ o.k. ] Looking for user patches in [ userpatches/u-boot/u-boot-next ] 1
zador.blood.stained Posted December 17, 2015 Author Posted December 17, 2015 Igor, can you please check building image on current master branch? Do you have this message or not? [ o.k. ] Shrink image last partition to [ minimum ] Re-reading the partition table failed.: Invalid argument After building image: ➜ ~ % losetup -l NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE /dev/loop0 0 0 1 0 /home/zador/armbian/output/cache/Armbian_5.00_Cubietruck_Debian_jessie_4.3.3.raw (deleted) I want to know if this is host OS related (tested on Wily, will check on Trusty later after finding what's the right way to access loop devices from inside a container) or not.
Igor Posted December 17, 2015 Posted December 17, 2015 Yes, I just made few tests today by using one partition, two partition and two with offset. I don't have those problems within Trusty so It must be OS related. The most probably cause is false / different parameter reading.
wildcat_paris Posted December 17, 2015 Posted December 17, 2015 Buddies, I have made 2 tests: 1/ installing gr@bpi:/armbian_kernel/test$ ll total 38252 drwxr-xr-x 2 root root 4096 Dec 17 17:55 ./ drwxr-xr-x 9 root root 4096 Dec 14 04:56 ../ -rw-r--r-- 1 gr gr 27188 Dec 17 12:33 linux-dtb-next-sunxi_5.00_armhf.deb -rw-r--r-- 1 gr gr 52550 Dec 17 12:33 linux-firmware-image-next-sunxi_5.00_armhf.deb -rw-r--r-- 1 gr gr 7801692 Dec 17 12:33 linux-headers-next-sunxi_5.00_armhf.deb -rw-r--r-- 1 gr gr 29298064 Dec 17 12:33 linux-image-next-sunxi_5.00_armhf.deb -rw-r--r-- 1 gr gr 1799264 Dec 17 12:34 linux-trusty-root-next-lamobo-r1_5.00_armhf.deb -rw-r--r-- 1 gr gr 172982 Dec 17 12:33 linux-u-boot-next-lamobo-r1_5.00_armhf.deb 2/ burning to sdcard (master branch, next kernel line, uboot 15.10 + sunxi-ss hwrng patch) Armbian_5.00_Lamobo-r1_Ubuntu_trusty_4.3.3.raw Both ended with "starting kernel... " and stalling, see screenshot http://tinyurl.com/zste9ap note: I have a SSD attached, I hope uboot doesn't try to boot the SSD, let's see note2: opened my box, removed SDD, then removed the USB hub with all devices. nope, no better. could you make me a lamobo-r1 next 4.3.3, so I burn it on sdcard for testing, please? In the mean-time my 4.3.0 patched kernel is ok thanks!
zador.blood.stained Posted December 17, 2015 Author Posted December 17, 2015 I made 2 sd cards, cubietruck, jessie, default and next kernels. Changed boot.scr to enable serial console. Branch experimental/fake-hwclock of my repo. Mainline kernel: first boot OK, second boot OK, disk resizing OK. Old kernel: first boot - u-boot error (I didn't reboot, u-boot message appeared after "Starting kernel" message, however it's possible it is some kind of filesystem error. U-Boot SPL 2015.10-armbian (Dec 17 2015 - 16:27:42) DRAM: 2048 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 U-Boot 2015.10-armbian (Dec 17 2015 - 16:27:42 +0300) Allwinner Technology CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 2 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment Setting up a 1024x768 vga console (overscan 0x0) In: serial Out: vga Err: vga SCSI: SUNXI SCSI INIT Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: eth0: ethernet@01c50000 starting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 USB2: USB EHCI 1.00 USB3: USB OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found scanning bus 2 for devices... 1 USB Device(s) found Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 1831 bytes read in 253 ms (6.8 KiB/s) ## Executing script at 43100000 ** File not found /boot/.next ** ** Unrecognized filesystem type ** 46360 bytes read in 566 ms (79.1 KiB/s) 5602600 bytes read in 618 ms (8.6 MiB/s) Kernel image @ 0x48000000 [ 0x000000 - 0x557d28 ] Starting kernel ... U-Boot SPL 2015.10-armbian (Dec 17 2015 - 16:27:42) DRAM: 0 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 U-Boot SPL 2015.10-armbian (Dec 17 2015 - 16:27:42) DRAM: 2048 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 Power reset - second boot OK apart from Linux cubietruck 3.4.110-sun7i #2 SMP PREEMPT Thu Dec 17 16:49:31 MSK 2015 armv7l -bash: echo: write error: No space left on device -bash: echo: write error: No space left on device -bash: [: : integer expression expected -bash: [: : integer expression expected (standard_in) 1: syntax error (standard_in) 1: syntax error -bash: [: -le: unary operator expected and usual unloading wi-fi module for 1.5 minutes Third boot - Ok, but disk resizing failed, root password change prompt didn't appear, instead bash errors appeared again. @wildcat_paris can you attach to serial console and change your boot.cmd/boot.scr (console=ttyS0,115200) to see what's going on? @Igor No network or systemd issues, Jessie with systemd as init system, all network restarting workarounds removed.
Igor Posted December 17, 2015 Posted December 17, 2015 No network or systemd issues, Jessie with systemd as init system, all network restarting workarounds removed. OK, lets put this in. @wildcat_paris My fresh compiled Trusty with 4.3.3 works normally on Cubietruck. I'll check R1 in the morning. 1
Igor Posted December 18, 2015 Posted December 18, 2015 It was a bug indeed in creating root file-system. Rebuild it.
zador.blood.stained Posted December 18, 2015 Author Posted December 18, 2015 Unloading wifi module for 1.5 minutes on shutdown on Jessie can be fixed by creating file /etc/systemd/system/systemd-modules-load.service.d/10-timeout.conf [Service] TimeoutStopSec=10 1
wildcat_paris Posted December 19, 2015 Posted December 19, 2015 Buddies, ok again my bad sorry. I have been using an old broken .config => the kernel was unable to boot Also playing with KERNEL_KEEP_CONFIG="yes" made me wrong for a long time! 1/ tested an image... booting ok 2/ replaced the whole set of files gr@bpi:~$ ll /armbian_kernel/kern_4.3.3_1/ -rw-r--r-- 1 gr gr 49850 Dec 19 07:11 linux-dtb-next-sunxi_5.00_armhf.deb -rw-r--r-- 1 gr gr 52530 Dec 19 07:11 linux-firmware-image-next-sunxi_5.00_armhf.deb -rw-r--r-- 1 gr gr 6813108 Dec 19 07:11 linux-headers-next-sunxi_5.00_armhf.deb -rw-r--r-- 1 gr gr 12552218 Dec 19 07:11 linux-image-next-sunxi_5.00_armhf.deb -rw-r--r-- 1 gr gr 1798258 Dec 19 07:13 linux-trusty-root-next-lamobo-r1_5.00_armhf.deb -rw-r--r-- 1 gr gr 172976 Dec 19 07:11 linux-u-boot-next-lamobo-r1_5.00_armhf.deb it seems like it works like a new image at restart "Restart is required" (previously I wasn't applying "linux-trusty-root-next-lamobo-r1_5.00_armhf.deb for kernel upgrades) Welcome to ARMBIAN (Ubuntu trusty 4.3.3-sunxi) You have new mail. Last login: Sat Dec 19 07:14:02 2015 from 192.168.1.2 Load: 2.48, 0.82, 0.29 - Board: 48.0°C - Memory: 907Mb [ Restart is required ] rm: remove write-protected regular empty file ‘/tmp/.reboot_required’? y rm: cannot remove ‘/tmp/.reboot_required’: Operation not permitted gr@bpi:~$ sudo rm /tmp/.reboot_required [sudo] password for gr: happy with "master" branch!! thanks EDIT: FYI I have noticed this warning message CLEAN scripts dpkg-deb: building package `linux-firmware-image-next-sunxi' in `../linux-firmware-image-next-sunxi_5.00_armhf.deb'. dpkg-deb: building package `linux-dtb-next-sunxi' in `../linux-dtb-next-sunxi_5.00_armhf.deb'. dpkg-deb: building package `linux-headers-next-sunxi' in `../linux-headers-next-sunxi_5.00_armhf.deb'. dpkg-deb: building package `linux-image-next-sunxi' in `../linux-image-next-sunxi_5.00_armhf.deb'. dpkg-genchanges: warning: package linux-libc-dev-next-sunxi in control file but not in files list
wildcat_paris Posted December 20, 2015 Posted December 20, 2015 @Igor (?) Sunday morning are hard, sleeping is better. just a little fix, only functions can be local, not variable (at least with bash from trusty) I am testing "dev"/ branchless [ o.k. ] Cleaning [ /home/gr/armtest/sources/u-boot/branchless ] [ o.k. ] Cleaning [ /home/gr/armtest/sources/linux-vanilla/branchless ] /home/gr/armtest/lib/main.sh: line 269: local: can only be used in a function /home/gr/armtest/lib/main.sh: line 270: local: can only be used in a function [ ! -f "$DEST/debs/$CHOOSEN_UBOOT" ] && local needs_uboot=yes [ ! -f "$DEST/debs/$CHOOSEN_KERNEL" ] && local needs_kernel=yes also thanks for the picture in the thread "lamobo-r1" and USB-uart but you have missed your little precious comment as the picture is from bananapi.com what is the uart (uart0) or another one please? thank you
zador.blood.stained Posted December 20, 2015 Author Posted December 20, 2015 Oops... my bad, I'll fix it ASAP. Guess saturday evenings can be hard too 1
Igor Posted December 20, 2015 Posted December 20, 2015 @zador.blood.stained Are headers compiling at your host?
zador.blood.stained Posted December 20, 2015 Author Posted December 20, 2015 For what board and kernel? I'll test it now. I tested new debootstrap process for last 2 days with precompiled kernel and disabled headers recompilation in install_kernel function. Also I made a patch that removes precompiled binaries from scripts folder for sun4i, sun7i and sunxi-next (official Debian and Ubuntu headers don't have precompiled scripts) and I saw some errors in recompilation function, so these patches might have broken things. You can "mask" them by creating empty files with same names in userpatches/kernel/... dirs for now.
Igor Posted December 20, 2015 Posted December 20, 2015 I try to build kernel for Udoo since they changed repository, than for Cubieboard 1 ... scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory Does this patch help in a matter that we won't need to use workaround for headers compiling inside chroot?
zador.blood.stained Posted December 20, 2015 Author Posted December 20, 2015 Does this patch help in a matter that we won't need to use workaround for headers compiling inside chroot? Yes, exactly. For me scripts recompilation eats a lot of memory and CPU. Only downside is - module compilation for end users may require compilation of scripts by themselves or using module-assistant as in official Ubuntu/Debian instructions for compiling missing kernel modules, it should be tested, and if this works, similar patches should be made for other kernel sources. Compilation of BOARD=cubieboard BRANCH=default failed, hm. BOARD=cubieboard BRANCH=next - OK [ o.k. ] File name [ linux-image-next-sunxi_5.00_armhf.deb ] [ o.k. ] Runtime [ 4 min ] Udoo uses its own kernel config and repo, I never tested it.
zador.blood.stained Posted December 20, 2015 Author Posted December 20, 2015 BOARD=cubietruck BRANCH=default compiles OK Either sun4i config is broken, ccache issue (it'll be faster for you to check with disabled ccache) tested, fails with disabled ccache, or make oldconfig/olddefconfig combined with sun4i config unlikely, compared default config with one after compilation attempt. But I didn't get headers error, I got arch/arm/plat-sunxi/pm/standby/standby_power.o: In function `standby_power_init': /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/standby_power.c:62: undefined reference to `__stack_chk_fail' /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/standby_power.c:62: undefined reference to `__stack_chk_guard' arch/arm/plat-sunxi/pm/standby/standby_power.o: In function `standby_power_exit': /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/standby_power.c:99: undefined reference to `__stack_chk_fail' /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/standby_power.c:99: undefined reference to `__stack_chk_guard' arch/arm/plat-sunxi/pm/standby/standby_power.o: In function `standby_set_voltage': /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/standby_power.c:201: undefined reference to `__stack_chk_fail' /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/standby_power.c:201: undefined reference to `__stack_chk_guard' arch/arm/plat-sunxi/pm/standby/standby_power.o: In function `standby_get_voltage': /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/standby_power.c:237: undefined reference to `__stack_chk_fail' /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/standby_power.c:237: undefined reference to `__stack_chk_guard' /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/standby/Makefile:22: recipe for target 'arch/arm/plat-sunxi/pm/standby/standby.elf' failed make[3]: *** [arch/arm/plat-sunxi/pm/standby/standby.elf] Error 1 /home/zador/armbian/sources/linux-sunxi/sunxi-3.4/arch/arm/plat-sunxi/pm/Makefile:8: recipe for target 'arch/arm/plat-sunxi/pm/standby/standby.bin' failed make[2]: *** [arch/arm/plat-sunxi/pm/standby/standby.bin] Error 2 scripts/Makefile.build:443: recipe for target 'arch/arm/plat-sunxi/pm' failed make[1]: *** [arch/arm/plat-sunxi/pm] Error 2 Makefile:947: recipe for target 'arch/arm/plat-sunxi' failed make: *** [arch/arm/plat-sunxi] Error 2 make: *** Waiting for unfinished jobs....
zador.blood.stained Posted December 20, 2015 Author Posted December 20, 2015 sys/types.h Did you remove packages from your build host or reinstalled OS? What libc6-dev* packages do you have installed now? 1
Igor Posted December 20, 2015 Posted December 20, 2015 Works fine for me with or w/o cache. This must be compiler related. 1
zador.blood.stained Posted December 20, 2015 Author Posted December 20, 2015 Yes, it's compiler related, it compiles past this point in Trusty (great, another legacy compatibility problem, goodbye cross-gcc 4.9, welcome cross-gcc 4.8. Or I need to disable stack protector options somehow). So what build options give errors for you? Udoo has non-default sources for both default and next kernels, which one to test? 1
Igor Posted December 20, 2015 Posted December 20, 2015 Yes, we need legacy kernel compilation .... I disable the header recompilation and it looks o.k. now. I made an image with 4.3.3 for Cubietruck and compiled some wifi module w/o problems.
Igor Posted December 20, 2015 Posted December 20, 2015 Ah, there is a problem on target: root@cubietruck:/usr/src/linux-headers-4.3.3-sunxi# make headers_check CHK include/generated/uapi/linux/version.h HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory #include <sys/types.h> ^ compilation terminated. scripts/Makefile.host:91: recipe for target 'scripts/basic/fixdep' failed make[1]: *** [scripts/basic/fixdep] Error 1 Makefile:439: recipe for target 'scripts_basic' failed make: *** [scripts_basic] Error 2 1
zador.blood.stained Posted December 20, 2015 Author Posted December 20, 2015 Does target have libc6-dev installed?
Recommended Posts