So I zeroed the 2 boot partitions! Then I used mkfs.ext4 command for /dev/mmcblk1 ( eMMC is mounted like that ) *root@sina33:~# mkfs.ext4 /dev/mmcblk1* *mke2fs 1.43.1 (08-Jun-2016)* *Found a dos partition table in /dev/mmcblk1* *Proceed anyway? (y,n) y* *Discarding device blocks: done * *Creating filesystem with 966656 4k blocks and 241920 inodes* *Filesystem UUID: 0781019c-2095-4f9f-ac5b-5be68d807d63* *Superblock backups stored on blocks: * * 32768, 98304, 163840, 229376, 294912, 819200, 884736*
*Allocating group tables: done * *Writing inode tables: done * *Creating journal (16384 blocks): done* *Writing superblocks and filesystem accounting information: done* Then I dd-ed the sdcard image on the /dev/mmcblk1: *dd if=sdcard-sina33.img of=/dev/mmcblk1 bs=1M* But now, when I'm trying to boot from the nand, I get the following: * U-Boot SPL 2015.07-rc2-00119-g32c5be7 (Jun 14 2016 - 10:57:02) DRAM: 1024 MiB Card did not respond to voltage select! Could not determine boot source * * resetting ... * And is resetting over and over again! The thing is that this is the u-boot built by me (which is working for booting from the sd-card), but why the error messages? What's going wrong there ? On Tuesday, 6 September 2016 12:21:01 UTC+2, Siarhei Siamashka wrote: > > Hi, > > On Tue, 6 Sep 2016 02:51:29 -0700 (PDT) > Ciprian Manea <[email protected] <javascript:>> wrote: > > > Hi, > > > > I'm using the Sina33 dev board and as the wiki page says, it has a > 4GB > > eMMC (Toshiba THGBM5G5A1JBAIR). I'm trying to flash and boot a custom > made > > debian based Linux image from the eMMC at the moment. > > I'm able to boot this image from the SD card, but no luck so far with > > booting from the eMMC. > > > > What I did and got so far is trying to > > follow https://linux-sunxi.org/Bootable_SD_card and flash the eMMC > while > > booted from the SD card: > > > > 1. *# mkfs.ext4 /dev/mmcblk1* > > > > > > *root@sina33:~# cat /proc/partitions major minor #blocks name 179 > > > 0 30183936 mmcblk0 179 1 8209408 mmcblk0p1 179 8 > > 3866624 mmcblk1 179 24 2048 mmcblk1boot1 179 16 > > 2048 mmcblk1boot0I don't understand why the boot partitions are not > wiped.* > > That's because boot partitions are separate block devices. > > The whole idea of having boot partitions is that with eMMC you can have > your bootloader/firmware in its own special place, which is not sharing > the same block device with your primary storage media /dev/mmcblk1 > So that it's more difficult to accidentally (or maliciously) corrupt > your fiwmware. And also you can have proper GPT partitioning without > the bootloader special areas getting in the way. > > > > 2. *# root@sina33:~# fdisk -l* > > > > > > *Disk /dev/mmcblk0: 28.8 GiB, 30908350464 bytes, 60367872 sectorsUnits: > > sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes > / > > 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel > type: > > dosDisk identifier: 0x6706f5d0Device Boot Start End > Sectors > > Size Id Type/dev/mmcblk0p1 2048 16420863 16418816 7.8G 83 > LinuxDisk > > /dev/mmcblk1: 3.7 GiB, 3959422976 bytes, 7733248 sectorsUnits: sectors > of 1 > > * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 > bytesI/O > > size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mmcblk1boot1: 2 > MiB, > > 2097152 bytes, 4096 sectorsUnits: sectors of 1 * 512 = 512 bytesSector > size > > (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 > > bytes / 512 bytesDisk /dev/mmcblk1boot0: 2 MiB, 2097152 bytes, 4096 > > sectorsUnits: sectors of 1 * 512 = 512 bytesSector size > (logical/physical): > > 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes* > > > > > > 3. *# dd if=sdcard-sina33.img of=/dev/mmcblk1 bs=1M* > > *( The SD-card bootable image)* > > > > > > 4.* # root@sina33:~# fdisk -l* > > > > > > *Disk /dev/mmcblk0: 28.8 GiB, 30908350464 bytes, 60367872 sectorsUnits: > > sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes > / > > 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel > type: > > dosDisk identifier: 0x6706f5d0Device Boot Start End > Sectors > > Size Id Type/dev/mmcblk0p1 2048 16420863 16418816 7.8G 83 > LinuxDisk > > /dev/mmcblk1: 3.7 GiB, 3959422976 bytes, 7733248 sectorsUnits: sectors > of 1 > > * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 > bytesI/O > > size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk > > identifier: 0x6706f5d0Device Boot Start End Sectors Size Id > > Type/dev/mmcblk1p1 2048 4194303 4192256 2G 83 LinuxDisk > > /dev/mmcblk1boot1: 2 MiB, 2097152 bytes, 4096 sectorsUnits: sectors of 1 > * > > 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O > > size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mmcblk1boot0: 2 > MiB, > > 2097152 bytes, 4096 sectorsUnits: sectors of 1 * 512 = 512 bytesSector > size > > (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 > > bytes / 512 bytes* > > > > > > 5. Trying to boot without an sdcard connected > > > > > > *�` 08x x �|> ������������� �HELLO! BOOT0 is starting!boot0 version : > > 3.1.0reg_addr 0x01f00100 =0x00000000reg_addr 0x01f00104 > =0x00000000reg_addr > > 0x01f00108 =0x00000000reg_addr 0x01f0010c =0x00000000reg_addr 0x01f00110 > > =0x00000000reg_addr 0x01f00114 =0x00000000DRAM DRIVE INFO: V1.4DRAM CLK > > =552 MHZDRAM simple test OK.dram size =1024card boot number = 2card no > is > > 2sdcard 2 line count 0[mmc]: mmc driver ver 2014-06-05 14:18[mmc]: > ***Try > > SD card 2***[mmc]: mmc 2 cmd 8 timeout, err 0x00000100[mmc]: mmc 2 cmd 8 > > err 0x00000100[mmc]: mmc 2 send if cond failed[mmc]: mmc 2 cmd 55 > timeout, > > err 0x00000100[mmc]: mmc 2 cmd 55 err 0x00000100[mmc]: mmc 2 send app > cmd > > failed[mmc]: ***Try MMC card 2***[mmc]: MMC ver 4.5[mmc]: SD/MMC Card: > > 4bit, capacity: 3776MB[mmc]: vendor: Man 0x00110100 Snr 0x1094e248[mmc]: > > product: 004G9[mmc]: revision: 3.0[mmc]: ***SD/MMC 2 init OK!!!***sdcard > 2 > > init okERROR! NOT find the head of uboot.Ready to disable icache.Jump to > > Fel.* > > > > > > *What am I missing here ? Why can't I wipe the 2 *boot partitions? > Should I > > write the U-Boot & U-Boot SPL to one of those ?* > > If you want to use the eMMC in an sdcard-alike way and have your > bootloader on /dev/mmcblk1, then you can try to erase the content > of the boot partitions. > > Or you can try to use eMMC boot partitions for your own bootloader. > The U-Boot bootloader is not quite ready for this though and may > need some fixes (it needs to differentiate booting from the eMMC > boot partitions and booting from the eMMC data area). There are > special magic codes for the boot media type returned by the boot > ROM: https://irclog.whitequark.org/linux-sunxi/2016-06-11#16717168; > > -- > Best regards, > Siarhei Siamashka > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
