This is a cache of https://discuss.96boards.org/t/how-to-boot-dragonboard-410c-with-custom-images-via-sd-card/206. It is a snapshot of the page at 2024-11-01T03:27:05.867+0000.
How to boot Dragonboard 410c with custom images via sd card? - DragonBoard410c - 96Boards Forum

How to boot Dragonboard 410c with custom images via sd card?

Hi as given in LinuxUserGuide_DragonBoard.pdf under section “2 Installing Linux”, We are able to boot from sd card using the installer-image from the 96-Boards Website i.e. dragonboard410c_sd_card_install_ubuntu.zip.

I want to do same using our custom images, i.e. (gpt_both0.bin, hyp.mbn, NON-HLOS.bin, rpm.mbn, sbl1.mbn, sec.dat, tz.mbn, emmc_appsboot.mbn, boot.img and rootfs.img).

So how do i make a single image (xyz.img) containing all the images and use the command “sudo dd if=xyz.img of=/dev/XXX bs=2M” to flash it on SD-Card and boot my board using the same SD-Card.

hi,

well we do not document how to do that, and i haven’t tested it… however i don’t see any obvious why it shouldn’t work.

you need to play a bit with the partition table to do that. The SD install image has several partitions, the last one is called ‘os’. you can rename the label to ‘rootfs’. you can do that on a Linux PC with gparted or gdisk.

then you need to ‘dd’ the rootfs image into the partition:

simg2img rootfs.img rootfs.img.raw # to unsparse the rootfs image
dd if=rootfs.img.raw of=/dev/<your SD card rootfs partition>

you also need to copy the boot image to the boot partition:
dd if=boot.img of=/dev/<your SD card boot partition>

Bare in mind it’s not tested… but this is how I would start…

Can you please explain, how i can create bootable sd-card image similar to dragonboard410c_sd_card_install_ubuntu.img containing all my custom image files. So that i can flash that img file directly on my SD-Card to make it bootable.

Hi ndec, as per your suggestion we tried to rename the OS partition to rootfs and flash root.img on rootfs partition, but when flashing boot.img under /dev/sdb9 partition we are getting “no space left error”. That is the partition is too small to be flashed with boot.img.

Can you please suggest as per “dragonboard410c_sd_card_install_ubuntu.img”, can we make a image which will similarly boot and let us flash on eMMC directly form sd-card ?

I too am interested in how the installer SD Card images are made. Is there a tool, script, etc. used to take the required bits and create a bootable SD Card image that writes the appropriate bits to eMMC?

As an alternative, is there a way to create a bootable SD Card, which contains the full OS (kernel, initrd, rootfs, etc.) such that it can boot directly to the OS on the card without writing the images to eMMC?

Thank you.

hi,

Just filled in these 2 requests:

https://bugs.96boards.org/show_bug.cgi?id=114
https://bugs.96boards.org/show_bug.cgi?id=115

In general, feel free to make requests directly in bugzilla for features/bugs… you need. It’s easier for us to track in BZ than on the forum.

I think I should be able to have the instructions for the SD boot quickly. For the SD install image it will take a bit more time.

Has anyone figured out how to create the dragonboard410c_sd_card_install_ubuntu.img file that can be written to the SD flash device using dd? I haven’t gotten fastboot on Windows to recognize my 410c board yet, and I was hoping for an alternative method to get my board working.

any update on this matter?

I should probably wait for the updated tool, but I got anxious and tried poking at it. I can reflash the OS partition just fine. However, how do I write my own boot.img into the boot partition? On the 410c board, I would use the “fastboot” tool to write into the eMMC. How do I do this to my SD card? Doing “dd if=boot.img of=/dev/mmcblk0pX” is what I expected, except the boot partition doesn’t seem to become available in “/dev/mmcblkopX”.

Model: SD SL16G (sd/mmc) Disk /dev/mmcblk0: 15.9GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:

Number Start End Size File system Name Flags
1 67.1MB 134MB 67.1MB ext3 modem msftdata
2 134MB 135MB 524kB sbl1
3 135MB 135MB 524kB rpm
4 135MB 136MB 524kB tz
5 136MB 136MB 524kB hyp
6 201MB 201MB 16.4kB sec
7 201MB 202MB 1049kB aboot
8 202MB 253MB 50.3MB boot
9 253MB 254MB 1049kB devinfo
10 254MB 2621MB 2368MB ext4 os

frank:~$ ls /dev/mmcblk*
/dev/mmcblk0 /dev/mmcblk0p2 /dev/mmcblk0p4 /dev/mmcblk0p6
/dev/mmcblk0p1 /dev/mmcblk0p3 /dev/mmcblk0p5 /dev/mmcblk0p7

Ok, FWIW, I got it to work. Dirty and hacky it may be, for now I am booting Linaro ALIP (debian) image from SD card on my 410c board. Here is what I did:

  1. Install Linaro ALIP (debian) onto eMMC using the recovery SD card (NOOBS installer).
  2. Boot into Linaro ALIP (boot from eMMC).
  3. Run “dd if=/dev/mmcblk0 of=/dev/mmcblk1”. Here I am cloning the eMMC into a SD card
  4. Take the SD card out from 410c board, mount it onto your desktop. Use dd to flash sbl1, rpm, tz,hyp, sec, and aboot from the recovery image into respective partitions in the sd card.
  5. Done!

Hello,
Is there any way to get the Android and Debian partition.xml files, instead of reverse engineering them?
It will be very helpful in a recovery SD-card creation.
Thank you, Leonid.

Thank you Adam. Would you please provide more detailed information, especially the full commands you used for step 4? Does this allow booting and running debian from the SD card without the need to ever access the on board eMMC?