my sd card have two partition,one is the boot,and another is the filesystem,now I use linux tool cryptsetup encrypt the filesystem partition,when boot on my board,the kernel can't mount the filesystem(encrypt),my aim is to protect the whole filesystem,maybe three partition can achieve,if I have only two partition,whether it can be achieved?need to modify the kernel source?
You have not advised the distro you are using, and this makes a difference. It is definitely possible to do "full disk" encryption with 2 partitions under Linux, and I know that it can be done with Ubuntu. (Not sure if the default install does it, I think it does, otherwise you can get an alternate disk which does). I'd imagine there is a Spin for Fedora or CentOS as well.
The mechanism used to achieve this is as follows: