CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 11822|回复: 2

在CB1上自己构建的Debian无法启动,黑屏。如何检查问题?

[复制链接]
发表于 2014-4-27 13:50:03 | 显示全部楼层 |阅读模式
按照soloforce大侠的指导书,一步一步做下来,中间没有遇到问题,最后生成了SD卡。用SD开启动CB1,黑屏无反应。SD卡本身无问题,将Cubian拷进去,可以正常启动。因此肯定是自制的Debian的问题。

能否请大侠看看到底是啥问题?Kernel编译都很正常,顺利完成,下面是之后发生的:

root@ubuntu:~# cd ${WORK_DIR}
root@ubuntu:~/cubiedebian# cd linux-sunxi/
root@ubuntu:~/cubiedebian/linux-sunxi# make -j2 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  SKIPPED include/generated/compile.h
  CHK     kernel/config_data.h
  CC [M]  drivers/gpu/mali/mali/linux/mali_osk_atomics.o
  CC [M]  drivers/gpu/mali/mali/linux/mali_osk_locks.o
  CC [M]  drivers/gpu/mali/mali/linux/mali_osk_math.o
  CC [M]  drivers/gpu/mali/mali/linux/mali_osk_memory.o
  CC [M]  drivers/gpu/mali/mali/linux/mali_osk_misc.o
  LD [M]  drivers/gpu/mali/mali/mali.o
  CC [M]  drivers/gpu/mali/ump/../mali/linux/mali_osk_atomics.o
  CC [M]  drivers/gpu/mali/ump/../mali/linux/mali_osk_locks.o
  CC [M]  drivers/gpu/mali/ump/../mali/linux/mali_osk_memory.o
  CC [M]  drivers/gpu/mali/ump/../mali/linux/mali_osk_math.o
  CC [M]  drivers/gpu/mali/ump/../mali/linux/mali_osk_misc.o
  LD [M]  drivers/gpu/mali/ump/ump.o
  Kernel: arch/arm/boot/Image is ready
  Building modules, stage 2.
  Kernel: arch/arm/boot/zImage is ready
  Image arch/arm/boot/uImage is ready
  MODPOST 88 modules
  LD [M]  drivers/gpu/mali/mali/mali.ko
  LD [M]  drivers/gpu/mali/ump/ump.ko

注释:上面说明Kernel正常编译成功

下面是在emacs中编辑了uEnv.txt文件。

root@ubuntu:~/cubiedebian/chroot-armhf# cat boot/uEnv.txt
mmcboot=fatload mmc 0 0x43000000 script.bin || fatload mmc 0 0x43000000 evb.bin; fatload mmc 0 0x48000000 uImage; if fatload mmc 0 0x43100000 uInitrd; then bootm 0x48000000 0x43100000; else bootm 0x48000000; fi
uenvcmd=run mmcboot
bootargs=console=ttyS0,115200 console=tty0 disp.screen0_output_mode=EDID:1280x1024p50 hdmi.audio=EDID:0 root=/dev/mmcblk0p1

注释:这里copy和修改boot/script.fex (加了GPIO,没有配置SPI,应该不影响)。之后生成script.bin都正常,无报错。

下面将SD卡前1M做处理也都正常。我用的SD卡有16G。

root@ubuntu:~/cubiedebian/u-boot-sunxi# cd ${WORK_DIR}/u-boot-sunxi
root@ubuntu:~/cubiedebian/u-boot-sunxi# dd if=/dev/zero of=/dev/sdb bs=1k count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 1.05215 s, 997 kB/s
root@ubuntu:~/cubiedebian/u-boot-sunxi# dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
251+1 records in
251+1 records out
257512 bytes (258 kB) copied, 0.271819 s, 947 kB/s


用fdisk对SD卡进行分区。只建立了一个分区。SD卡是/dev/sdb。我看到SD卡扇区是512字节大小,分区从2048开始,这个是否有问题?

root@ubuntu:~/cubiedebian/u-boot-sunxi# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x9205562c.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sdb: 15.7 GB, 15707668480 bytes
64 heads, 32 sectors/track, 14980 cylinders, total 30679040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9205562c

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-30679039, default 2048): 2048
Last sector, +sectors or +size{K,M,G} (2048-30679039, default 30679039):
Using default value 30679039

Command (m for help): p

Disk /dev/sdb: 15.7 GB, 15707668480 bytes
64 heads, 32 sectors/track, 14980 cylinders, total 30679040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9205562c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    30679039    15338496   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
root@ubuntu:~/cubiedebian/u-boot-sunxi# mkfs.ext4 /dev/sdb1
mke2fs 1.42.8 (20-Jun-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
959104 inodes, 3834624 blocks
191731 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3930062848
118 block groups
32768 blocks per group, 32768 fragments per group
8128 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done                           
Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   

这里将整个ROOTFS拷到分区上也都正常。拷完后也检查了/mnt的内容,目录等都在。
回复

使用道具 举报

 楼主| 发表于 2014-4-27 15:16:05 | 显示全部楼层
还不完全是黑屏。每启动两次,一次是黑屏,一次出现下面错误:
mmc0: error -110 whilst initialising SD card

另外,大家接串口的软件工具用哪个?Hyper terminal在win7上没有了。我用putty,接上TTL线后结果显示都是乱码。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-4-28 20:37:40 | 显示全部楼层
今天又换了一个SANdisk的16G卡,原来的是Kingston的。依然是同样的问题。所以应该还是系统的问题,不是卡的问题。哪位大侠给点指导?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-12-31 00:52 , Processed in 0.019946 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部