1 Reply Latest reply on Nov 6, 2017 11:06 AM by fupjones

    Flash old Debian 7.9 image from uSD to newer BBB (Debian 8.3)

    fupjones

      For the last couple of years, I have been successfully flashing my application image from a uSD card to production units on the Element14 BBB rev C.  However this no longer works with the latest BBB's received from Element14.  I believe this is because the new boards were shipped with a newer image that uses a single partition in the eMMC, which breaks the old flasher script.  Specifically, we have been booting from the uSD and using /opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh to flash our boards.

       

      My production image is based on 3.8.13-bone79 (Debian 7.9), which has separate partitions for boot and rootfs.  The boards I am trying to flash have 4.1.15-ti-rt-r43 (Debian 8.3).

       

      I have attempted to reformat the eMMC to match the format of the older board (two partitions), but this does not fix the problem.

       

      The following is the output of fdisk -l on my older boards that work.

       

      debian@beaglebone:/dev/disk$ fdisk -l
      Disk /dev/mmcblk0: 3925 MB, 3925868544 bytes
      4 heads, 16 sectors/track, 119808 cylinders, total 7667712 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: 0x00000000
      
              Device Boot      Start         End      Blocks   Id  System
      /dev/mmcblk0p1   *        2048      198655       98304    e  W95 FAT16 (LBA)
      /dev/mmcblk0p2          198656     7667711     3734528   83  Linux
      
      Disk /dev/mmcblk0boot1: 1 MB, 1048576 bytes
      4 heads, 16 sectors/track, 32 cylinders, total 2048 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: 0x00000000
      
      Disk /dev/mmcblk0boot1 doesn't contain a valid partition table
      
      Disk /dev/mmcblk0boot0: 1 MB, 1048576 bytes
      4 heads, 16 sectors/track, 32 cylinders, total 2048 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: 0x00000000
      
      
      Disk /dev/mmcblk0boot0 doesn't contain a valid partition table

       

      And this is the fdisk -l output on a newer board after my attempt at reformatting (note, I have to boot from uSD to view the disk format, obviously).

       

      root@beaglebone:/home/debian# fdisk -l
      Disk /dev/mmcblk0: 3.7 GiB, 3965190144 bytes, 7744512 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
      Disklabel type: dos
      Disk identifier: 0x0aa8d2b0
      
      Device         Boot Start     End Sectors  Size Id Type
      /dev/mmcblk0p1 *     8192 6963199 6955008  3.3G 83 Linux
      
      Disk /dev/mmcblk1: 3.6 GiB, 3825205248 bytes, 7471104 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
      Disklabel type: dos
      Disk identifier: 0x894089be
      
      Device         Boot  Start     End Sectors  Size Id Type
      /dev/mmcblk1p1 *      2048  198655  196608   96M  e W95 FAT16 (LBA)
      /dev/mmcblk1p2      198656 7471103 7272448  3.5G 83 Linux
      
      Disk /dev/mmcblk1boot1: 2 MiB, 2097152 bytes, 4096 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 /dev/mmcblk1boot0: 2 MiB, 2097152 bytes, 4096 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

       

      Does anyone have any ideas about why this is not working for me?  I assume there is something wrong with my format, but maybe there is something else I don't understand.  Since all application testing has been done on Debian 7.9, changing to a newer O/S version would be a major issue for us.  This seems like it would be a common problem for anyone trying to use BBB in a production environment.

       

      Thanks in advance for any help,

      Jason

       

      Edit

       

      It is now clear why the flasher is not working.  When booting from the old uSD card (with Debian 7.9), the eMMC device is not recognized by the O/S.  Only mmcblk0 is listed in /dev and by lsblk (see below).

       

      root@beaglebone:~# lsblk
      NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
      mmcblk0     179:0    0   3.7G  0 disk
      |-mmcblk0p1 179:1    0    96M  0 part
      `-mmcblk0p2 179:2    0   3.6G  0 part /

       

      However, if I boot from an uSD with a newer Debian version (say 9.2), the mmc devices look like this

       

      debian@beaglebone:~$ lsblk
      NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
      mmcblk0      179:0    0  3.7G  0 disk
      |-mmcblk0p1  179:1    0  3.3G  0 part /
      mmcblk1      179:8    0  3.6G  0 disk
      |-mmcblk1p1  179:9    0  3.6G  0 part
      mmcblk1boot0 179:16   0    2M  1 disk
      mmcblk1boot1 179:24   0    2M  1 disk

      I can't figure out why this would be unless there is a hardware difference.   Is there some other formatting incompatibility that is preventing the eMMC from showing up in /dev?  If so, is there any way to make it readable by the older O/S?

       

      Message was edited by: Jason Jones