WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1  (Read 1363 times)

Offline ribx99

  • Newbie
  • *
  • Posts: 3
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!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10973
Re: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
« Reply #1 on: March 06, 2012, 05: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
The only barriers that can stop you are the ones you create yourself.

Offline ribx99

  • Newbie
  • *
  • Posts: 3
Re: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
« Reply #2 on: March 06, 2012, 06: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!

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
« Reply #3 on: March 06, 2012, 10:20:12 AM »
/tmp is in RAM.  You might be running out of memory.
It would be better to unpack and compile on a hard driver.

Offline ribx99

  • Newbie
  • *
  • Posts: 3
Re: build custom kernel - make[2]: *** [kernel/power/snapshot.o] Error 1
« Reply #4 on: March 07, 2012, 02:58:55 AM »
I should be enough space, but you are right. I moved it to another partition.