Author Topic: Troubles with mainline kernel and NAND  (Read 1276 times)

Offline yakatao

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Troubles with mainline kernel and NAND
« on: September 25, 2016, 11:56:02 pm »
I just want to get the 4.7 kernel on Cubieboard's NAND.
I have a Cubieboard with installed Debian on Nand, which is mounted read-only.
I read https://linux-sunxi.org/Installing_to_NAND and learned that I should use " special allwinner version of u-boot".
I tried to build it but when I run
Code: [Select]
sudo make CROSS_COMPILE=arm-linux-gnueabihf-I got the error:
Code: [Select]
In file included from /media/disk/progs/cubie/u-boot-sunxi/include/linux/compiler.h:40:0,
                 from cmd_version.c:27:
/media/disk/progs/cubie/u-boot-sunxi/include/linux/compiler-gcc.h:87:30: fatal error: linux/compiler-gcc6.h: No such file or directory
 #include gcc_header(__GNUC__)
So I learned that I need gcc-4 but there is only gcc-6-arm-linux-gnueabihf and gcc-6-arm-linux-gnueabihf in the Debian Sid repository and I don't know how to get 4.
Then I tried to use crosstool-ng to build appropriate u-boot but only got another error.
So I decied to give up and use pre-installed stuff. I crosscompiled 4.7 kernel and tried to replace previous one with kexec.
I mounted an SD-card with the kernel and kexec-tools source code on it and build kexec-tools on Cubieboard.
Then I connected cubieboard to the UART and run
Code: [Select]
# ./kexec -l /home/cubie/Documents/uImage --dtb /home/cubie/Documents/sun4i-a10-cubieboard.dtb
# ./kexec -e
I saw this:
Code: [Select]
cubie@cubieboard:~$ <6>[sw-ohci2]: shutdown start
[sw-ohci2]: close clock
<6>[sw-ohci2]: shutdown end
<6>[sw-ehci2]: shutdown start
[sw-ehci2]: Set USB Power OFF
[sw-ehci2]: close clock
<6>[sw-ehci2]: shutdown end
<6>[sw-ohci1]: shutdown start
[sw-ohci1]: close clock
<6>[sw-ohci1]: shutdown end
<6>[sw-ehci1]: shutdown start
[sw-ehci1]: Set USB Power OFF
[sw-ehci1]: close clock
<6>[sw-ehci1]: shutdown end
wrn: hcd is disable, need not shutdown
[NAND]shutdown
nand try to shutdown 0 time
Nand flash shutdown ok!
<0>Starting new kernel
[  632.201177] Starting new kernel

Message from syslogd@localhost <6>Bye!
at Sep 26 05:12:59 ...
 kernel
But now I have no idea what to do, what commands can I use (if any) and how to check if new kernel loaded successfully.

Please, help me.