it is unfortunately still not very straight forward to do that… but it’s possible
The kernel has artifacts in a several places and they all need to be updated at once.
- the boot image has the DTB and the kernel Image file
- the rootfs has the kernel modules (in /lib/modules/xxx)
Updating #1 without #2 will mostly likely break your boot.
You can’t use fastboot , since fastboot is mostly meant to write to eMMC. When booting from SD card, fastboot “might” actually try to write into SD card, but I don’t recommend doing so because I don’t think we’ve tested that. So for now, let’s assume that we don’t know the outcome…
Once you have built your kernel and boot image on your PC/host, just put your SDcard on the host, and you can use ‘dd’ to copy the boot image into the ‘boot’ partition, e.g.
dd if= of=/dev/mmcblk0pX
where mmcblk0pX is the ‘boot’ partition on the SD card (it can be /dev/sdbXX depending on your PC and SD card controller).
In fact what fastboot really does is to provide a custom protocol to do a ‘byte copy’ over the USB cable, so doing ‘dd’ on the card itself is equivalent.
Then you need to mount your rootfs from the SD card on the host, and copy the kernel modules you deployed with “make modules_install” onto the target rootfs.
in theory it should then “just work”.
If you do that, that also means you are overwriting the debian file system without using debian packages, so the kernel modules will be ‘orphan’ files as far as debian packaging system is concerned. which is fine for local testing. Instead you could build a debian kernel package out of your kernel tree (using deb-pkg makefile target from Linux) , and instead of manually copying the modules you could:
- build boot image
- build .deb file and copy on the target (before updating the kernel)
- use dpkg -i to install your custom .deb file
- reboot and use ‘dd’ to copy the new boot image on the SD card