How to update firmware by ethernet?


#1

Does Debian FW support ONLINE UPDATE?
How can I check this function? Does it have any specification?
Thanks


#2

hi,

can you please be more specific? What do you mean by ‘debian FW’?


#3

Hi ndec,

I boot dragonboard410c by http://builds.96boards.org/releases/dragonboard410c/linaro/debian/16.09/dragonboard410c_sdcard_install_debian-144.zip
After I modify the source code of kernel image, besides installing via fastboot mode from host PC, can I installing via network?


#4

not really now. at least there is no ‘very simple’ documented method to do it. there are instructions in the release to rebuild and deploy your custom kernel that explains how to do it with fastboot.

honestly, it is possible to compile on your PC (or even on the board), create a .deb file, copy it over to the board, install the .deb in the rootfs, generate the boot.img and flash it into eMMC, directly from the board, but it is not documented… and you might be on your own…

one thing we would like to do in the long term is to have the bootloader pick the image from the rootfs directly (like uboot does), in which case we could easily upgrade/modify kernel for next boot, but this is not implemented.


Could Debian update firmware or image via internet?
#5

According to the title, are there related solutions now?
thanks.


#6

honestly, it is possible to compile on your PC (or even on the board), create a .deb file, copy it over to the board, install the .deb in the rootfs, generate the boot.img and flash it into eMMC, directly from the board, but it is not documented… and you might be on your own…

One thing that helps is the recent work to make skales optional!

That means the boot image can be constructed simply by using cat to join
the kernel Image to a singe DT and then wrapping using abootimg and pushing
that into the boot partition.

Also @Loic has also been working on some tools to mess with the boot
partition from the DB410C itself. The focus for this isn’t firmware
update; it is to allow simple updates of the DTB but it should still
offer some clues on how things fit together.


#7

Yes I have some draft code at https://github.com/loicpoulain/96btoolbox. For now I have splitted this into two tools, dbboot to manage dragonboard specific boot image, and dtbtool to handle standard dtb blob. The first tool can be used on a dragonboard boot image or directly a runtime on your boot partition.

e.g: update kernel and dtb:
$ dbboot /dev/mmcblk1p7 --update kernel ~/Image.gz
$ dbboot /dev/mmcblk1p7 --update dtb ~/apq8016-sbc.dtb

The second tool (dtbtool) can be associated to edit the DTB :
e.g: enabling spi@78b5000
$ dbboot /dev/mmcblk1p7 -x dtb | dtbtool --enable-dev spi@78b5000 | dbboot /dev/mmcblk1p7 -u dtb


#8

Hi @Louise

I update the OS on my DragonBoards over Ethernet (or WiFi) all the time. No need for booting from the SDCard, or using Fastboot.

Here is what I do:

  • Build the kernel image as usual by following the instructions in the release notes. At the end you have a file boot-db410c.img in the kernel directory.
  • usually you would put the board into fastboot mode, and do

fastboot flash boot boot-db410c.img

  • instead copy the image to the Dragonboard that is running Debian and log into the board

scp boot-410c.img linaro@192.168.100.5:~/workspace
ssh linaro@192.168.110.5

  • finally on the DragonBoard, put the new image into the right place and reboot

cd workspace
sudo dd if=boot-410c.img of=/dev/mmcblk0p8
sync
sudo reboot now

of course this doesn’t install any new modules you might need, you will have to copy them over and install them yourself.

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.


#9

Hi, @ljking

Thank you for providing a easy update method.
I also want to try to put the rootfs into / dev / mmcblk0p10 over Ethernet,
Is there any good way?


#10

Hi @Louise

Updating the root file system is more difficult. I rarely update this. Instead I will run locally the commands:

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y

This updates all of the packages on the rootfs. However you may also need to copy the modules from your build to /sys/module if you have made kernel changes. I usually rebuild the kernel right on the system so installing the new modules and kernel is as simple as:

sudo make INSTALL_MOD_STRIP=1 modules_install KERNELRELEASE=`make kernelversion`-linaro-lt-qcom
sudo dd if=boot-db410c.img of=/dev/mmcblk0p8
sync
sudo reboot now

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.