How to update ramdisk only for Ubuntu?

I need to build a custom kernel and kernel modules to based on the official Ubuntu image. And now, I have built the kernel Image and kernel modules.

Then I unpack the official image, and got the ramdisk directory from update.img (update.img–> ramdisk.partition --> ramdisk files) . Also, I have replace the kernel and module install into the ramdisk and repacked it.

But How can I just flash/update this part instead of the whole Ubuntu OS, for I have made some modifications to Ubuntu OS(the Rootfs partiton).

So How can I just update the ramdisk part? Thanks.

I think you can DD the new ramdisk.img to /dev/ramdisk.

Thanks. The ‘dd’ do the right things.

Hi TonyHo, which firmware did you use? I built the kernel and u-boot, and pack to emmc rom, it could not boot properly.
print said can not load Image.