Jump to content
Sign in to follow this  
jim

error compiling kernel a second time

Recommended Posts

I am attempting to custom compile a kernel to add support for uinput and hidraw so that my pcDuino3 can work with an eGalax touchscreen. I did a git checkout of the pcduino3 kernel from http://github.com/pcduino/a20-kernel, and followed the directions here: http://www.pcduino.com/how-to-build-kernel-for-pcduino/

Upon first compiling, everything went great. I put the output files onto a USB drive and took it over to the pcDuino and replaced the kernel following the NAND directions on that page. The new kernel went in just fine, and running `cat /proc/version` showed the new kernel version.

However, when I went to make some changes to the kernel via `make menuconfig` and recompile on the original PC, I began to get this error:

Packing for linux
>>> script_parse 0.9.1
>>> check sys_config line format
>>> done.
>>> check partition config
>>> done.
>>> script_parse 0.9.1
>>> check sys_config line format
>>> done.
>>> check mainkey unique
>>> done.
>>> check module rule
>>> not implement yet
Modifying image.cfg: /home/steve/blackbeard/pcduino/allwinner-tools/livesuit/a20/default/image.cfg
script sys_config.fex /home/steve/blackbeard/pcduino/allwinner-tools/livesuit/a20/mod_update/script: 1: /home/steve/blackbeard/pcduino/allwinner-tools/livesuit/a20/mod_update/script: Syntax error: end of file unexpected
make: *** [livesuit] Error 2

I've run `make mrproper` inside of the linux-sunxi directory, but that didn't fix anything. I checked the git status to make sure I didn't accidentally change any files. What caused this script to fail on the second compile, but not on the first?

Share this post


Link to post
Share on other sites

Are there directions for the A20, then?

I see in your link there are some lines of code, but where do those go? Do I execute those from the command line before running make? After? Are those config variables to put into one of the source files before compiling?

I'm sorry. I just don't understand what that link is saying. It's just a few lines of code with no context.

Share this post


Link to post
Share on other sites

I've continued looking into the issue, and I was mistaken - it actually happened the first time as well, I just didn't notice.

It happens during the livesuit portion of make. The patch and hwpack work fine. Anytime I run make, or if I manually run `make livesuit` I get this error:

$ make livesuit
Packing for linux
>>> script_parse 0.9.1
>>> check sys_config line format
>>> done.
>>> check partition config
>>> done.
>>> script_parse 0.9.1
>>> check sys_config line format
>>> done.
>>> check mainkey unique
>>> done.
>>> check module rule
>>> not implement yet
Modifying image.cfg: /home/steve/blackbeard/a20-kernel/allwinner-tools/livesuit/a20/default/image.cfg
script sys_config.fex /home/steve/blackbeard/a20-kernel/allwinner-tools/livesuit/a20/mod_update/script: 1: /home/steve/blackbeard/a20-kernel/allwinner-tools/livesuit/a20/mod_update/script: Syntax error: end of file unexpected
make: *** [livesuit] Error 2

Share this post


Link to post
Share on other sites

I know it might be too late for an answer to the OP question, but for others landing here by looking for the error message ...

I was trying to compile the kernel and I encountered the same error. The trouble is that all files under mod_update folder:

/usr/local/src/a20-kernel/allwinner-tools/livesuit/a20/mod_update/*

are crosscompiled binaries for x86-64 platform:

ubuntu@ubuntu:/usr/local/src/a20-kernel/allwinner-tools/livesuit/a20/mod_update$ file script
script: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=0x66c6e87cb7255554d1dd9a45917b8d5d0900e7c4, not stripped

Which means that at least in my case (building the kernel on the pcDuino3 itself) they did not produce any output, meaning that the higher level code that called them complained about "end of file unexpected".

It seems that skipping this step doesn't bother me at least yet - since the hwpack part is properly generated (as it contains the script.bin and uImage kernel image which I can copy over to the /boot partition and that's it).

Browsing the net it seems that these pack tools are actually closed source and only binaries are offered - seems that if you really want to create the livesuit part, you will need to crosscompile the kernel on an X86 / 64bit platform.

Share this post


Link to post
Share on other sites

viulian,

I encounter this error also when compiling on the pcDuino3 itself. 

When you say 

Quote
...It seems that skipping this step doesn't bother me at least yet...
 

How do you skip the step, I have no use for livesuit, but it is part of the make, and it terminates the build. Are you saying that everything is actually done at that point or that I need to comment out livesuit from the build?

Thanks for any insight.

Share this post


Link to post
Share on other sites

I suspect (but haven't really checked) that the livesuite is the last step of the build, since by that time the kernel image and the script.bin file are already properly generated.

In fact last few kernels I deployed this way, just ignoring the failed build and using the images ..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×