Author Topic: Cubieboard4 boot issue with new linux image created using sdk  (Read 2745 times)

Offline ramesh.yadav

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Cubieboard4 boot issue with new linux image created using sdk
« on: October 24, 2015, 02:24:50 am »
Hi Folks,


I am facing an issue in creating the linux image for cubieboard4 (cc-a80) using SDK, any help will be much appreciated

I am not able to boot from the sdcard/eMMC with my new linux image created using sdk
Tried all the products like debian server, linaro server and desktop versions for more than 25+ times but no luck

And with all prebuild images(http://dl.cubieboard.org/model/cc-a80/Image/)  board works fine


Below is the detailed explaination regarding the steps I followed:

My host machine configurations:

OS: Ubuntu-12.04 LTS 32 bit
arm toolchain: arm-linux-gnueabihf-


I followed all the steps given in document(http://dl.cubieboard.org/model/cc-a80/Doc/debian-server/Cubieboard4-Linux-Sdk-Guide.pdf)

Observations:
1)With default kernel configurations, I got below compilation error:

  CC      mm/truncate.o
  AS      arch/arm/kernel/debug.o
arch/arm/mach-sunxi/pm/standby/gen_check_code: 1: arch/arm/mach-sunxi/pm/standby/gen_check_code: Syntax error: end of file unexpected (expecting ")")
/home/user/cb4-linux-sdk-card/linux-3.4/arch/arm/mach-sunxi/pm/standby/Makefile:85: recipe for target 'arch/arm/mach-sunxi/pm/standby/resume1.code' failed
make[3]: *** [arch/arm/mach-sunxi/pm/standby/resume1.code] Error 2
/home/user/cb4-linux-sdk-card/linux-3.4/arch/arm/mach-sunxi/pm/Makefile:70: recipe for target 'arch/arm/mach-sunxi/pm/standby/standby.code' failed
make[2]: *** [arch/arm/mach-sunxi/pm/standby/standby.code] Error 2
scripts/Makefile.build:443: recipe for target 'arch/arm/mach-sunxi/pm' failed
make[1]: *** [arch/arm/mach-sunxi/pm] Error 2
Makefile:945: recipe for target 'arch/arm/mach-sunxi' failed
  LD      ipc/built-in.o
make: *** [arch/arm/mach-sunxi] Error 2
make: *** Waiting for unfinished jobs....

For this error, I disabled all the power managment configuations in kernel config, with this fix build is success

So after this I flashed the SD card and inserted to cubieboard 4, but it is not booting, even no messages on UART display

What could be the issue ?? please help me to solve this.


« Last Edit: October 24, 2015, 02:38:20 am by ramesh.yadav »

Offline allen

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
    • View Profile

Offline ramesh.yadav

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Cubieboard4 boot issue with new linux image created using sdk
« Reply #2 on: October 24, 2015, 03:17:40 am »
Thank you very much Allen for your quick reply.
I will check this kernel and update you

Offline ramesh.yadav

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Cubieboard4 boot issue with new linux image created using sdk
« Reply #3 on: October 26, 2015, 02:55:23 am »
Hi Allen,

I tried with kernel you shared but behavior is same

Please find below 3 errors I got while building kernel source and fixes I tried:

Error 1:
 CC      mm/truncate.o
  AS      arch/arm/kernel/debug.o
arch/arm/mach-sunxi/pm/standby/gen_check_code: 1: arch/arm/mach-sunxi/pm/standby/gen_check_code: Syntax error: end of file unexpected (expecting ")")
/home/user/cb4-linux-sdk-card/linux-3.4/arch/arm/mach-sunxi/pm/standby/Makefile:85: recipe for target 'arch/arm/mach-sunxi/pm/standby/resume1.code' failed
make[3]: *** [arch/arm/mach-sunxi/pm/standby/resume1.code] Error 2
/home/user/cb4-linux-sdk-card/linux-3.4/arch/arm/mach-sunxi/pm/Makefile:70: recipe for target 'arch/arm/mach-sunxi/pm/standby/standby.code' failed
make[2]: *** [arch/arm/mach-sunxi/pm/standby/standby.code] Error 2
scripts/Makefile.build:443: recipe for target 'arch/arm/mach-sunxi/pm' failed
make[1]: *** [arch/arm/mach-sunxi/pm] Error 2
Makefile:945: recipe for target 'arch/arm/mach-sunxi' failed
  LD      ipc/built-in.o
make: *** [arch/arm/mach-sunxi] Error 2
make: *** Waiting for unfinished jobs....

Fix I tried:
   Disabled all the PM related configurations in kernel config

Error 2:
 LD      init/built-in.o
  LD      .tmp_vmlinux1
net/built-in.o: In function `wiphy_rfkill_start_polling':
/home/user/cb4-linux-sdk-card/linux-3.4/net/wireless/core.c:640: undefined reference to `rfkill_resume_polling'
Makefile:873: recipe for target '.tmp_vmlinux1' failed
make: *** [.tmp_vmlinux1] Error 1
make: Leaving directory '/home/user/cb4-linux-sdk-card/linux-3.4'
******* Multiarch build: no

Fix I tried:
               Added the dummy function(rfkill_resume_polling) in linux-3.4/net/wireless/core.c

Error 3:
      sound/built-in.o: In function `sndvir_audio_resume':
/home/user/cb4-linux-sdk-card/linux-3.4/sound/soc/codecs/ac100.c:4903: undefined reference to `standby_type'
Makefile:873: recipe for target '.tmp_vmlinux1' failed

Fix I tried:
             Commented the source which uses standby_tye in /linux-3.4/sound/soc/codecs/ac100.c file

After these fixes new uImage file is created and I tried to flash using below commands and I got the below output message

user@user-ubuntu:~/cb4-linux-sdk-card$ cb_part_install_tfcard sdc
sdc  !
Cleaning /dev/sdc
BLKRRPART: Device or resource busy
This disk is currently in use.
Checking that no-one is using this disk right now ...
BLKRRPART: Device or resource busy

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.

Disk /dev/sdc: 61056 cylinders, 64 heads, 32 sectors/track
Old situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sdc1             0         -          0   0  Empty
/dev/sdc2             0         -          0   0  Empty
/dev/sdc3             0         -          0   0  Empty
/dev/sdc4             0         -          0   0  Empty
New situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sdc1         40960     65535      24576  83  Linux
/dev/sdc2         65536 125042687  124977152  83  Linux
/dev/sdc3             0         -          0   0  Empty
/dev/sdc4             0         -          0   0  Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,
before using mkfs
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
mkfs.vfat 3.0.12 (29 Oct 2011)
mkfs.vfat: /dev/sdc1 contains a mounted file system.
mke2fs 1.42 (29-Nov-2011)
/dev/sdc2 is mounted; will not make a filesystem here!
Make sunxi partitons successfully
user@user-ubuntu:~/cb4-linux-sdk-card$ cb_install_tfcard sdc
sdc  !
`/home/user/cb4-linux-sdk-card/binaries/bin/u-boot-spl.bin' -> `/home/user/cb4-linux-sdk-card/output/cb4/cb4-debian-server/u-boot-spl.bin'
`/home/user/cb4-linux-sdk-card/binaries/bin/u-boot-sun9iw1p1.bin' -> `/home/user/cb4-linux-sdk-card/output/cb4/cb4-debian-server/u-boot-sun9iw1p1.bin'
`/home/user/cb4-linux-sdk-card/binaries/bin/u-boot-sun9iw1p1_card2.bin' -> `/home/user/cb4-linux-sdk-card/output/cb4/cb4-debian-server/u-boot-sun9iw1p1_card2.bin'
bash: /home/user/sdk/binaries/cmd/cubie-fex2bin: cannot execute binary file
bash: /home/user/sdk/binaries/cmd/cubie-uboot-spl: cannot execute binary file
bash: /home/user/sdk/binaries/cmd/cubie-uboot: cannot execute binary file
bash: /home/user/sdk/binaries/cmd/cubie-uboot: cannot execute binary file
32+0 records in
32+0 records out
32768 bytes (33 kB) copied, 0.00017162 s, 191 MB/s
818+1 records in
818+1 records out
838224 bytes (838 kB) copied, 0.00137239 s, 611 MB/s
mkdir: created directory `/home/user/cb4-linux-sdk-card/output/cb4/cb4-debian-server/part1'
mkdir: created directory `/home/user/cb4-linux-sdk-card/output/cb4/cb4-debian-server/part2'
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
umount: /home/user/cb4-linux-sdk-card/output/cb4/cb4-debian-server/part1: not mounted


After flashing, I just inserted card into board, but no LUCK(It's not booting !!)

Please please let me know if I am missing anything.



« Last Edit: October 26, 2015, 06:52:23 am by ramesh.yadav »

Offline Christobalde

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Cubieboard4 boot issue with new linux image created using sdk
« Reply #4 on: October 31, 2015, 05:31:57 am »
Quote
OS: Ubuntu-12.04 LTS 32 bit

Before doing anything, you have to read carefully the "how to" here :
http://dl.cubieboard.org/model/cc-a80/Doc/ubuntu-linaro/Cubieboard4-Linux-Sdk-Guide.pdf

You have to use a x64 linux system in english language
Please delete all you have done, read carfully the sdk doc, and all will be ok.

If your console language is not english, switch it in english or edit the line 229 from boardenvsetup.sh in the tools directory like that:

echo y | sudo mkfs.ext4 -i 8192 ${CB_OUTPUT_DIR}/rootfs.ext4 ( english standard )
echo o | sudo mkfs.ext4 -i 8192 ${CB_OUTPUT_DIR}/rootfs.ext4 ( french )
echo s | sudo mkfs.ext4 -i 8192 ${CB_OUTPUT_DIR}/rootfs.ext4 ( italian )
and so on... 8)