borsti67 Posted May 13, 2016 Posted May 13, 2016 Hi all, some days ago I successfully built the image mentioned above (Build environment is Ubuntu 14.04/64 bit). The only remarkable issue was the ever-repeating "firstrun" script, which was easily solved with the method mentioned here: http://forum.armbian.com/index.php/topic/1100-post-install-scripts-on-every-reboot/#entry8509 (may be ALL of the scripts should be changed this way?) But today, after checking out the actual "master", I see a lot of failed copy and sed commands until the debootstrap-ng script finally fails at Mali-libdri2. The 1st occurrence of an error was during installation of "ramlog". I've inserted a breakpoint and looked into the image. "dpkg.log" reads 2016-05-13 07:45:53 startup archives install 2016-05-13 07:45:53 install ramlog:all <none> 2.0.0 2016-05-13 07:45:53 status half-installed ramlog:all 2.0.0 2016-05-13 07:45:53 status unpacked ramlog:all 2.0.0 2016-05-13 07:45:53 status unpacked ramlog:all 2.0.0 I manually issued the dpkg -i with the following result: dpkg -i /tmp/ramlog_2.0.0_all.deb Selecting previously unselected package ramlog. (Reading database ... 9890 files and directories currently installed.) Unpacking ramlog (from /tmp/ramlog_2.0.0_all.deb) ... dpkg: dependency problems prevent configuration of ramlog: ramlog depends on lsof; however: Package lsof is not installed. ramlog depends on rsync; however: Package rsync is not installed. dpkg: error processing ramlog (--install): dependency problems - leaving unconfigured Errors were encountered while processing: ramlog I have tried to deactivate the apt-cache by inserting the somewhat hidden command "NO_APT_CACHER=yes" in my compile.sh but this didn't help. (There are more errors following this one, e.g. /etc/default/console-setup is missing as well as /etc/lirc/hardware.conf, /etc/lirc/lircd.conf, /etc/wicd/manager-settings.conf, /etc/default/nodm, /etc/X11/xorg.conf) Some strange messages in-between, which I think I also saw earlier but as i haven't faced an issue with the image I ignored them: [ o.k. ] Installing desktop [ XFCE ] /bin/tar: A lone zero block at 70 /bin/tar: A lone zero block at 70 /bin/bash: unzip: command not found At the very end: [ o.k. ] Adding support for Mali - acceleration [ sunxi ] E: Unable to locate package mesa-utils-extra E: Unable to locate package libdri2-1 E: Unable to locate package libdri2-dev dpkg: dependency problems prevent configuration of libdri2-1: libdri2-1 depends on libdrm2 (>= 2.3.1); however: Package libdrm2 is not installed. libdri2-1 depends on libx11-6 (>= 2:1.4.99.1); however: Package libx11-6 is not installed. libdri2-1 depends on libxext6; however: Package libxext6 is not installed. dpkg: error processing libdri2-1 (--install): dependency problems - leaving unconfigured Errors were encountered while processing: libdri2-1 [ error ] Installation failed [ Mali - libdri2-1 ] What should I do now?
Igor Posted May 13, 2016 Posted May 13, 2016 It's compiling perfectly fine @my server. Remove caches and perhaps sources and than try again.
borsti67 Posted May 13, 2016 Author Posted May 13, 2016 ok, I started from scratch with only "compile.sh" in an empty directory. Unfortunately it still doesn't work, but by chance I saw a message which is not recorded in the logs: Get:595 http://httpredir.debian.org/debian/ wheezy/main wifi-radar all 2.0.s08+dfsg-1.1 [52.4 kB] Failed to fetch http://httpredir.debian.org/debian/pool/main/w/weather-util/weather-util-data_2.0-1_all.deb Hash Sum mismatch Fetched 295 MB in 43s (6787 kB/s) E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? Free space: tmpfs 2.5G 624M 1.9G 25% /home/qt/armb2/output/cache/sdcard ...could this be the reason? How can I possibly fix it? Or is more data cached anywhere outside of the lib, sources and toolchains directories? I have searched for "fail" and "error" in the available logs, but the only logged one is at the end, when Mail fails.
zador.blood.stained Posted May 13, 2016 Posted May 13, 2016 To enable "full" logging you have to add PROGRESS_LOG_TO_FILE=yes to compile.sh As for your errors - httpredir.debian.org redirects you to one of many possible mirrors based on your IP, so it's entirely possible that you are getting unlucky with selected mirror. You can override this selection by setting DEBIAN_MIRROR in userpatches/lib.config, i.e. DEBIAN_MIRROR="ftp.de.debian.org/debian/" And just a small note - Wheezy is now considered a LTS release and it's recommended to use newer releases instead.
borsti67 Posted May 13, 2016 Author Posted May 13, 2016 yes, I already found that switch after I tried to include another driver into the kernel (it didn't compile but anyway only "install.log" was in the debug folder - a compilation log was only saved when it was not needed: successfully compiled ). But I left in since then. Thanks for the hint regarding the mirror, I will try that. It would explain why it sometimes works! For my project I need full graphics support (eventually I will also have to switch to another kernel branch as mentioned here http://linux-sunxi.org/Optimizing_system_performance#Advanced_topic:_Using_more_recent_Mali_drivers - as far as I can see currently R3P0 is used while R3P2 could get more out of it). Some of the toolchains I will have to install are only maintained within Wheezy - I don't know if everything will work with Jessie. For compiling Armbian I also need the (former) LTS Ubuntu instead of Xenial, I fear many things will break here if that's going to be changed... But probably I'll give it a try after having everything else up and running. Now let's have some quiet holidays, I hope you have 'em, too!
chradev Posted May 14, 2016 Posted May 14, 2016 Hi to All, I have also get errors trying to build the image after today's scrips updates. The process stopped by error: [ o.k. ] Building deb [ sunxi-tools ] [ o.k. ] ... downloading sources [ sunxi-tools ] [ o.k. ] ... downloading sources [ temper ] [ o.k. ] ... downloading sources [ BT utils ] [ o.k. ] ... compiling [ sunxitools ] [ error ] Not built [ tools ] [ error ] ERROR in function unmount_on_exit [ debootstrap-ng.sh:522 ] [ error ] debootstrap-ng was interrupted [ o.k. ] Process terminated and debug logs where fail: root@chr-vm-yocto:/data/armbian-cust/output/debug# cat tools-build.log cc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -o sunxi-fexc fexc.c script.c script_uboot.c script_bin.c script_fex.c cc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -o sunxi-bootinfo bootinfo.c cc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ `pkg-config --cflags libusb-1.0` -o sunxi-fel fel.c progress.c `pkg-config --libs libusb-1.0` cc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -c -o nand-part-main.o nand-part-main.c cc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -o sunxi-pio pio.c Package libusb-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libusb-1.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libusb-1.0' found Package libusb-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libusb-1.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libusb-1.0' found fel.c:18:20: fatal error: libusb.h: No such file or directory #include <libusb.h> ^ compilation terminated. cc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -c -o nand-part-a10.o nand-part.c -D A10 cc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -c -o nand-part-a20.o nand-part.c -D A20 Makefile:105: recipe for target 'sunxi-fel' failed make: *** [sunxi-fel] Error 1 make: *** Waiting for unfinished jobs.... cc -o sunxi-nand-part nand-part-main.o nand-part-a10.o nand-part-a20.o I try to remove all output staff and rebuild all but the result is the same. Next I try to remove sources for sunxi-tools and the result is the same. And finally I have start from scratch and the result is the same. Where is the problem? Best regards Chris
Igor Posted May 14, 2016 Posted May 14, 2016 The script should rebuild cached file system since package base were changed ... i'll check. Walk around: remove cache and it should work.
zador.blood.stained Posted May 14, 2016 Posted May 14, 2016 Does not work even starting from scratch. Try setting EXTERNAL=no in compile.sh
chradev Posted May 14, 2016 Posted May 14, 2016 Thanks Igor and Zador, I found the problem. I overwrite PACKAGE_LIST_ADDITIONAL in lib.config because of need to add some additional packages. Unfortunately, this way is not clean and brings the problems when the package staff is changed in main code base. Is it possible to add an empty PACKAGE_LIST_USERS for using by the users to customize the package staff? Of course it is semi solution because the user may need to remove some of the packages used by default in Armbian. Are there any suggestions how to proceed in such a cases? Best regards Chris
zador.blood.stained Posted May 14, 2016 Posted May 14, 2016 I overwrite PACKAGE_LIST_ADDITIONAL in lib.config because of need to add some additional packages. Unfortunately, this way is not clean and brings the problems when the package staff is changed in main code base. You always can append packages instead of replacing whole list, i.e. PACKAGE_LIST_ADDITIONAL="$PACKAGE_LIST_ADDITIONAL package1 package2" also you can remove them using bash variable substitution syntax, but it's more tricky.
chradev Posted May 14, 2016 Posted May 14, 2016 Thanks Zador, You always can append packages instead of replacing whole list, i.e. PACKAGE_LIST_ADDITIONAL="$PACKAGE_LIST_ADDITIONAL package1 package2" also you can remove them using bash variable substitution syntax, but it's more tricky. I have already tried it but your suggestion has additional pair of quotation marks and will probably work so will report after testing. You are right about possibility to remove the packages by syntax substitution especially is the changes are more than a single package. Best regards Chris
chradev Posted May 14, 2016 Posted May 14, 2016 Thanks Zador, PACKAGE_LIST_ADDITIONAL="$PACKAGE_LIST_ADDITIONAL package1 package2" I works fine. Best regards Chris
borsti67 Posted May 19, 2016 Author Posted May 19, 2016 Hi Igor and Zador, I have removed the sources and set the mirror as Zador proposed but still no luck... The script seemingly runs fine, rolling back the screen and checking the logs shows no errors until here: Free space: tmpfs 2.5G 342M 2.2G 14% /home/qt/armb2/output/cache/sdcard [ o.k. ] Ending debootstrap process and preparing cache [ wheezy ] wheezy-ng-armhf.538...610.tgz: 218MB [ 176MB/s] [=====================================================================================================] 103% [ o.k. ] Applying distribution specific tweaks for [ wheezy ] sed: can't read /home/qt/armb2/output/cache/sdcard/etc/default/ramlog: No such file or directory sed: can't read /home/qt/armb2/output/cache/sdcard/etc/default/console-setup: No such file or directory [ o.k. ] Installing packages [ linux-image-sun7i ] [ o.k. ] Installing u-boot [ linux-u-boot-lime2 ] [ o.k. ] Installing headers [ linux-headers-sun7i ] [ o.k. ] Installing firmware [ linux-firmware-image-sun7i ] sed: can't read /home/qt/armb2/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory sed: can't read /home/qt/armb2/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory sed: can't read /home/qt/armb2/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory sed: can't read /home/qt/armb2/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory sed: can't read /home/qt/armb2/output/cache/sdcard/etc/lirc/hardware.conf: No such file or directory cp: cannot create regular file ‘/home/qt/armb2/output/cache/sdcard/etc/lirc/lircd.conf’: No such file or directory ...followed by the same errors as mentioned in my 1st post, finally failing at the Mali acceleration.
zador.blood.stained Posted May 19, 2016 Posted May 19, 2016 Please delete rootfs cache, add PROGRESS_LOG_TO_FILE=yes to compile.sh, run build process again and post output/debug/debootstrap.log on pastebin, Github Gist or similar service. This Free space: tmpfs 2.5G 342M 2.2G 14% /home/qt/armb2/output/cache/sdcard is rather low, even for Wheezy, so something wasn't installed properly.
borsti67 Posted May 19, 2016 Author Posted May 19, 2016 hmm, is it possible that caching leads to some of these issues? At work I was unable to create an image (neither wheezy nor jessie) regardless of removing the caches. At home - where I formerly created working images - I only switched from wheezy to jessie but forgot to remove the caches and the same errors came. Then I deleted all caches and now it compiled again... Will check it tomorrow @work again and supply logs. Thanks for your patience!
borsti67 Posted May 25, 2016 Author Posted May 25, 2016 Hi, it seems my VM got corrupted somehow... I have created a new one, since then the compilation succeeds. I have no clue what happened there. In the meantime I have managed to update most of my stuff to Jessie, looks quite good but the processor load using h.264 is still much higher compared to an "original" Olimex image. For the moment I have 3 more annotations/questions: formerly I have set the host name in lib.config. Now I noticed after the 1st login the machine is called "lime2" again? Looks like there is a bootscript now which changes it (but the other code seems still to be included?)... I would prefer if any automated change to the hostname would be done ONLY when it's not set manually. I need to install a lot of packages with apt-get. As I understand, repositories are cached (at least partially?) on the host machine. How do I make use of this, add mine to $PACKAGE_LIST? when I try to compile a project using c++ and OCAML in chroot, I see fails with a core dump. Seemingly qemu has some serious problems as this doesn't happen when running "live". Does anybody know how to circumvent this? Compiling on the A20 is no fun.
zador.blood.stained Posted May 25, 2016 Posted May 25, 2016 formerly I have set the host name in lib.config. Now I noticed after the 1st login the machine is called "lime2" again? Looks like there is a bootscript now which changes it (but the other code seems still to be included?)... I would prefer if any automated change to the hostname would be done ONLY when it's not set manually. Firstrun script will be reworked in the future probably I need to install a lot of packages with apt-get. As I understand, repositories are cached (at least partially?) on the host machine. How do I make use of this, add mine to $PACKAGE_LIST? Yes, this should work unless you have too many packages, in which case you'll have to set FORCE_USE_RAMDISK=no to prevent overfilling tmpfs mount. when I try to compile a project using c++ and OCAML in chroot, I see fails with a core dump. Seemingly qemu has some serious problems as this doesn't happen when running "live". Does anybody know how to circumvent this? Compiling on the A20 is no fun. Can you post exact error message here? And full steps (changes to customize-image.sh) to try to reproduce the crash?
borsti67 Posted May 25, 2016 Author Posted May 25, 2016 Hello Zador, Yes, this should work unless you have too many packages, in which case you'll have to set FORCE_USE_RAMDISK=no to prevent overfilling tmpfs mount. In fact this already happened. Can you post exact error message here? And full steps (changes to customize-image.sh) to try to reproduce the crash? hm, this is a rather complex one. I did a lot of changes to lib.config and customize_image.sh as well as an additional "external" script.Do you know the Paparazzi project? http://wiki.paparazziuav.org/wiki/Main_PageI was able to install dependencies, create and install the .debs for ivy and install modules with OPAM (this also is obviously not using all processor power ).The final step would be to call "make" in the paparazzi folder.I have manually mounted the image and fired chroot: /opt/paparazzi# make qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault (core dumped) qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault (core dumped) ------------------------------------------------------------ Building Paparazzi version v5.8.1_stable-none-g < ... > The script continues for a while but either errors out somewhen or just does nothing anymore so I have to kill it with ^C.Unfortuantely there is no more output, and a google search wasn't helpful.I think I can paste the necessary changes here but be aware that a compilation (with cached data!) takes over an hour here.
borsti67 Posted September 5, 2016 Author Posted September 5, 2016 Just an information: After upgrading the build environment to Xenial the segfaults disappeared; it seems the qemu version is much better. I was even able to use make with $CTHREADS inside chroot!
Recommended Posts