Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: ribx99 on March 06, 2012, 08:25:34 AM

Title: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
Post by: ribx99 on March 06, 2012, 08:25:34 AM
Hi,

I try to build a custom kernel on my embedded system and fail always on the same spot with the command make bzImage:
  CC      kernel/power/snapshot.o
kernel/power/snapshot.c: In function 'init_header_complete':
kernel/power/snapshot.c:1615:41: error: expected expression before ';' token
kernel/power/snapshot.c: In function 'check_image_kernel':
kernel/power/snapshot.c:1621:46: error: expected expression before ')' token
make[2]: *** [kernel/power/snapshot.o] Error 1
make[1]: *** [kernel/power] Error 2
make: *** [kernel] Error 2

Google pointed me to the include/linux/version.h:
#define LINUX_VERSION_CODE
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

I tried to add it the number 132643 manually but it didn't solve a thing, it looks like the file gets generated during the make bzImage

I'm using linux-3.0.3-patched.tar.xz and unpacked it in /tmp/packages. I also fetched the config file config-3.0.3-tinycore and copied into the linux-3.0.3 folder.
make oldconfig
make bzImage
and then I get the error message.

Thanks for looking into this issue!
Title: Re: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
Post by: curaga on March 06, 2012, 08:45:49 AM
- do you have the required extensions loaded? (compiletc, perl5, bash)
- you might want to try 3.0.21 from TC 4.4, in case it's a bug in the kernel build system, it might be fixed there
Title: Re: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
Post by: ribx99 on March 06, 2012, 09:47:37 AM
I forgot the bash extension and tried it again but got the same error, I will try the 3.0.21 kernel-sources

Thank you!
Title: Re: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
Post by: gerald_clark on March 06, 2012, 01:20:12 PM
/tmp is in RAM.  You might be running out of memory.
It would be better to unpack and compile on a hard driver.
Title: Re: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
Post by: ribx99 on March 07, 2012, 05:58:55 AM
I should be enough space, but you are right. I moved it to another partition.