15 15
Igor

read first How to build my own image or kernel?

Recommended Posts

Thank you so much Igor! This solved my problems!

 

Originally I was following the instructions here to get my image using another Linux machine. So I compiled the kernel and uboot image, then followed the instructions at the bottom to flash them into my SD card. However, the instructions seem to work only for uImage, but I got a zImage from compiling the 3.14 kernel, so I changed the first line of uEnv.txt to "bootfile=/boot/zImage", but that gave me a "Wrong Image Format for bootm command" when I tried it on hummingboard. I then did the following in uboot: 

 setenv bootargs 'console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32'

 ext2load mmc 0:1 0x10800000 /boot/zImage  
 
 bootz 0x10800000

But my screen just went black after the bootz command.

 

I then tried converting the zImage to uImage by typing the following:

mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux kernel" -d arch/arm/boot/zImage uImage

I tried to boot off that uImage and it gave me a black screen again.

 

What am I doing wrong here? 

 

PS: From the instructions I followed, I did not do anything for following line because I wasn't sure what to do:

 

<copy the root filesystem and do any other modifications on the mounted partition>

 

,but I doubt that's the reason? 

Share this post


Link to post
Share on other sites

I think the problem is kernel loading address. Check this (working) boot script:

setenv bootargs root=/dev/mmcblk0p1 rootfstype=ext4 rootwait console=tty1 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 rd.dm=0 rd.luks=0 rd.lvm=0 raid=noautodetect pci=nomsi ahci_imx.hotplug=1 consoleblank=0 vt.global_cursor_default=0 quiet
ext2load mmc 0 0x18000000 /boot/dtb/${fdt_file}
ext2load mmc 0 0x12000000 /boot/zImage
bootz 0x12000000 - 0x18000000

Forget about converting. I think it needs to be zImage.

Share this post


Link to post
Share on other sites

I will definitely give it a shot when I get my new SD card (I don't want to mess up the current one). But in the end, my SD will contain the following:

/boot
        zImage
        imx6q-hummingboard.dtb

/lib (obtained from make modules_install)

uEnv.txt

and of course the SPL and uboot. Does anything look suspicious to you?

 

Thanks,

 

Kam

Share this post


Link to post
Share on other sites

Igor,

 

Running the script at the top of this thread,  in the "Select distribution" windows,  there are 2 choices:  "default 3.4.x-3.14.x",  "next mainline".    Can you shed some light on how to choose one from another? 

 

Jim

Share this post


Link to post
Share on other sites

I am using your build script to create the 4.1 kernel but I get prompted for 400 things to answer, is there a way to accept all as modular or 'y' so I get the most hardware possible? I am trying to test if the USB TV Tuner will work with this kernel on the Lemaker Banana Pi.

Share this post


Link to post
Share on other sites

It's possible but usually not recommended, especially setting all to Y. 

http://serverfault.com/questions/116299/automatically-answer-defaults-when-doing-make-oldconfig-on-a-kernel-tree

 

I already add a lot of tuners. Use my new development config:

https://github.com/igorpecovnik/lib/blob/second/config/linux-sunxi-next.config

(the script branch will be default when I'll be sure everything is going ok)

Share this post


Link to post
Share on other sites

Hi Igor,

 

the git branch 'second' is failing while shrinking or resizing the image:

Processing triggers for dbus (1.8.18-0+deb8u1) ...
[ o.k. ] Install board specific applications. [ bananapi ]
[ o.k. ] Fingerprinting. [ Armbian 4.2 Bananapi Debian jessie next Linux 4.2.0 ]
[ o.k. ] Creating boot scripts [ bananapi ]
[ o.k. ] Possible after install. 
[ o.k. ] Writing boot loader [ /dev/loop0 ]
368+1 Datensätze ein
368+1 Datensätze aus
[ o.k. ] Shrink partition and image to real size [ 15 % free space ]
resize2fs 1.42.12 (29-Aug-2014)
/root/armbian/lib/common.sh: Zeile 273: (4k: Der Wert ist für die aktuelle Basis zu groß. (Fehlerverursachendes Zeichen ist »4k«).
[ ok ] Runtime 3 min

A (bad) translation of the German statement is: "4k: The value is too large for the recent basis. Error is caused by character '4k')"

 

Have a nice day,

~September~

Share this post


Link to post
Share on other sites

Thanks. I thought I solved this bug.  :angry:

 

I'll redo this again ;)

 

BTW. What is your host system?

 

Ooops. Sorry forgot to tell you:

user@ububuild:~$ uname -a
Linux ububuild 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11 14:16:45 UTC 2015 i686 i686 i686 GNU/Linux

user@ububuild:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.04
DISTRIB_CODENAME=vivid
DISTRIB_DESCRIPTION="Ubuntu 15.04"

But I get the same message with Ubuntu 14.04 LTS, no matter if running virtual or real  or 64bit or 32bit.

 

~September~

Share this post


Link to post
Share on other sites

But I get the same message with Ubuntu 14.04 LTS, no matter if running virtual or real  or 64bit or 32bit.

 

Not possible to recreate this error on Ubuntu 14.04 LTS even with recompiled tune2fs from sources. I always get the proper number 4096 and not 4k. 

Share this post


Link to post
Share on other sites

Confirmed.

 

After installing a clean ubuntu 14.04.3 LTS in a VM (left locale on en_US except keyboard) I was able to build the image w/o any modifications. The difference between the other 14.04 LTS images I have relies on the additional PPAs. Some of them are development or at least experimental.

 

Typical case of PEBKAC, I would say. :wacko:

 

Sorry for the noise and thanks for the 'second' branch.

 

Good luck,

~September~

Share this post


Link to post
Share on other sites

hi, thank you for your great job. i have a little issue:

 

i am using armbian on my cubietruck3 without any changes after getting from git. My host machine is Ubuntu 14.04. I realize that after a successull compile operation (i.e. running compile.sh) file permissions of the /tmp folder are changed. and it causes to silly things (cannot open odt or docx files, cannot find applications in unity dash, and etc.) After this, i am changing its permission to 1777 again and everything becomes fine again. What can cause to this?

Share this post


Link to post
Share on other sites

hi, after logging the scripts i've found where the permission is changed:

common.sh -> closing_image () -> dpkg -x $DEST"/debs/"$CHOOSEN_UBOOT".deb" /tmp/ operation changes /tmp permission from 1777 to 755.

 

i have searched a little, and saw that it is a bug of dpkg.

to fix it, the following options are suggessted:

1) Using internal tar(difficult, it's not meant to be used that way).2) Pass additional args to the external tar.3) Wait for dpkg 2.0, which will have a rewritten archive library, that'llmake this kind of thing trivial.

it sounds me very confused, can reverting the permission after this operation to 1777 be a more simple solution?

Share this post


Link to post
Share on other sites

Hi Igor,

how can I build an older kernel with your script?

I want to use kernel version 3.4.104 because it's the last version where spi is fully working. In the newer versions it seems that it is not possible to receive data by spi.

Share this post


Link to post
Share on other sites

Hi Igor,
 
Thank you for your help. It almost worked ...
The compilation process stopped with an error:

fs/overlayfs/inode.c:71:11: note: in expansion of macro ‘list_entry’
   alias = list_entry(inode->i_dentry.next,
           ^
In file included from include/linux/compiler-gcc.h:103:0,
                 from include/linux/compiler.h:48,
                 from include/linux/stddef.h:4,
                 from include/linux/posix_types.h:4,
                 from include/linux/types.h:17,
                 from include/linux/blk_types.h:10,
                 from include/linux/fs.h:11,
                 from fs/overlayfs/inode.c:10:
include/linux/compiler-gcc4.h:14:34: error: ‘union <anonymous>’ has no member named ‘d_alias’
 #define __compiler_offsetof(a, __builtin_offsetof(a,
                                  ^
include/linux/stddef.h:18:31: note: in expansion of macro ‘__compiler_offsetof’
 #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
                               ^
include/linux/kernel.h:683:29: note: in expansion of macro ‘offsetof’
  (type *)( (char *)__mptr - offsetof(type,member) );})
                             ^
include/linux/list.h:351:2: note: in expansion of macro ‘container_of’
  container_of(ptr, type, member)
  ^
fs/overlayfs/inode.c:71:11: note: in expansion of macro ‘list_entry’
   alias = list_entry(inode->i_dentry.next,
           ^
make[4]: *** [fs/overlayfs/inode.o] Fehler 1
make[3]: *** [fs/overlayfs] Fehler 2
make[2]: *** [fs] Fehler 2
make[1]: *** [deb-pkg] Fehler 2
make: *** [deb-pkg] Fehler 2
mv: der Aufruf von stat für »*.deb“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden

I really believe, that the spi display worked, because the system only has to send data without receiving data. When I have some more time, I will try to check the signals with an oszilloscope, but this needs some time to configure the system.
 
Maybe you habe an idea, why the build process fails, when trying to build 3.4.104?

Share this post


Link to post
Share on other sites

Yes, disable (at least overlayfs) patches for this kernel (lib/patching.sh). They might not be compatible with 3.4.104

 

I would be glad on feedback regarding SPI. 

 

BTW. The famous spi_test.c also went o.k. ... 

Share this post


Link to post
Share on other sites
Guest sandmen

found it... :-)

Share this post


Link to post
Share on other sites

Hello Igor,

 

great thanks for your Armbian OS, i've tried a lot of Installations. Now i've build my "own" Armbian, first from stock to try, but your Image Build Script is producing a lil error for the Cubietruck. the Script is building some links wrong for zImage and script.bin

 

It schould be important, that zImage need to be linked as zImage > ./vmlinuz**** and script.bin > ./bin/cubietruck.bin

 

than the OS is booting correct from SD Card. Your Links from /boot/*** arent aknowledged by cubietrucks boot sequence and printing a missing error for uEnv.txt, script.bin etc

 

i'll change the configure script and send it to you.

 

Regards, Dierk

Share this post


Link to post
Share on other sites

 

Igor. Thank you for the build script.

I've got this error when starting the compile.sh script for OrangePI:

[ ok ] Downloading u-boot
Cloning into '/home/user/output/u-boot'...
fatal: unable to connect to git.denx.de:
git.denx.de[0: 85.214.87.163]: errno=Connection refused

while http://git.denx.de/u-boot.git is seen in the browser

git clone git://git.denx.de/u-boot.git doesn't work either

 

Hi, same problem. I can not compile the kernel under OrangePi PC.

Share this post


Link to post
Share on other sites

Hi Igor

 

Thank you for your effort, much appreciated. Have created images for C2, H3 and they work well

 

I am not able to create roseapple images yet ?

 

[ error ] ERROR in function source [ main.sh:103 ]
[ error ] Board configuration does not define valid kernel config 
[ o.k. ] Process terminated 
 
Regards

Share this post


Link to post
Share on other sites

Thank you and thanks to all contributors. It's not just my effort  :)

 

 

I am not able to create roseapple images yet ?

 

[ error ] ERROR in function source [ main.sh:103 ]
[ error ] Board configuration does not define valid kernel config 
[ o.k. ] Process terminated 
 
Regards

 

Me neither :P It's all prepared and it should work - I guess I need to study those boards more - but it doesn't :angry: so the configuration is disabled. I'll add that such info will be displayed when selecting board, which is not quite done yet. 

Share this post


Link to post
Share on other sites

Hi Igor,

 

I have build error based on latest source on github

Target platform banana pi m2+

Anything I'm missing?

 

  │   AS      arch/arm/mach-sunxi/power/brom/resumes.o                           │  
  │   CC      arch/arm/mach-sunxi/power/brom/resume_head.o                       │  
  │ arch/arm/mach-sunxi/power/brom/gen_check_code: 1: arch/arm/mach-sunxi/power/ │  
  │ make[3]: *** [arch/arm/mach-sunxi/power/brom/resumes.code] Error 2           │  
  │ make[2]: *** [arch/arm/mach-sunxi/power/brom/resumes.code] Error 2           │  
  │ make[1]: *** [arch/arm/mach-sunxi/power] Error 2                             │  
  │ make: *** [arch/arm/mach-sunxi] Error 2                                      â”‚  
  └──────────────────────────────────────────────────────────────────────────────┘  
    
 
 
[ error ] ERROR in function compile_kernel [ common.sh:184 ]
[ error ] Kernel was not built [ @host ]
[ o.k. ] Process terminated #

Share this post


Link to post
Share on other sites

Most critical part is your host. What are you using? Any changes to the configuration?

 

Ubuntu 14.4 LTS as follow armbian suggestion 

No change in configuration

Btw, build process could finish without any problem from git source a week ago

I notice you update source couple days ago, maybe because of that some code broken?

Share this post


Link to post
Share on other sites

Remove sources, that you force clean download, and I think it should work.

 

I delete all and redo git which means compile from clean

But still same problem

My host Ubuntu 14.04 x86 not x64, is it matters?

 

  │ arch/arm/mach-sunxi/power/brom/gen_check_code: 1: arch/arm/mach-sunxi/power/ │  
  │ make[3]: *** [arch/arm/mach-sunxi/power/brom/resumes.code] Error 2           │  
  │ make[2]: *** [arch/arm/mach-sunxi/power/brom/resumes.code] Error 2           │  
  │ make[1]: *** [arch/arm/mach-sunxi/power] Error 2                             │  
  │ make: *** [arch/arm/mach-sunxi] Error 2                                      â”‚  
  └──────────────────────────────────────────────────────────────────────────────┘  
    
 
 
[ error ] ERROR in function compile_kernel [ common.sh:179 ]
[ error ] Kernel was not built [ @host ]
[ o.k. ] Process terminated #
user@ubuntuvm:~/Armbian$ 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
15 15