How to build a "AUTO INSTALL" installation SD card

Hi All,

Does anyone know how to build a “AUTO INSTALL” installation SD card?
Which mean once I set device boot up from SD card, and insert SD card, then device will auto install by itself, and we don’t need to use mouse to click next button in external display.

Thanks.

Best regards,
Johnny

it shouldn’t be difficult to do. I provided a bit of information on that thread: Building custom rootfs for sd card boot - #10 by ndec, which explains how the GUI works.

so you could create an image that does not start the GUI tool, but instead runs the low level flashing command directly.

Thanks Ndec, I’ll check it first.

Best regards,
Johnny

Hi @anon91830841,

What do you mean “instead runs the low level flashing command”?
Should I modify the source code ‘flash’ or ‘mksdcard’?
Could you please tell me how should I modify it?
Thanks.

hi @Louise, the purpose of the GUI application is to call the ‘flash’ script after the user has selected the right image to flash from GUI.

If you want to create an SD card without GUI, you can directly call the ‘flash’ script on boot, and it will start flashing, this is what I meant. You shouldn’t need to make any change in the flash script of mkcard tool.

Hi @anon91830841,

So we need to build rootfs.img by ourselves to change the process to directly call the flash script?
Or we need to modify the nicolas.dechesne/db410c-installer.git - [no description] and build it only?

Thanks.

Best regards,
Johnny

hi,

the GUI is just here to let the user pick which release to install (we could have more than 1 OS on the SD card). Then the GUI just does the following :

QProcess burn;
burn.setWorkingDirectory(folder);
burn.start(_root + "/flash -o /dev/mmcblk0");

So basically, it changes to the folder that contains the image to install and calls the ‘flash’ script that is in the SD root folder. The flash script is this file:

https://git.linaro.org/landing-teams/working/qualcomm/db-boot-tools.git/tree/flash

Which then does:

OUTPUT=$(basename $2)
SCRIPTPATH=$(dirname $(readlink -f "$0") )
sudo $SCRIPTPATH/mksdcard -p partitions.txt -i $PWD -o /dev/$OUTPUT -s $((`cat /sys/block/$OUTPUT/size`/2))

The flashing really is done in the last command.

You can skip the GUI completely and directly invoke the last command from any shell script, that you can start at boot automatically. It will do the flashing automatically at boot, like you wanted.

mksdcard script can be found in working/qualcomm/db-boot-tools.git - [no description].