|
按照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的内容,目录等都在。
|
|