Your customized firmware may not boot up correctly after creating the jffs2 partition. This happens if the padding added by mksquashfs happens to be layed out across the erase_size (0x10000) boundary. In tihs situation, the kernel sets starting offset of the OpenWrt partition within the CRC-calculated range and that leads to a CRC error once you reboot the router.
Edit: added the diagram
You'll hit the problem if an address 0x????0000 comes within the "JACKPOT" zone below.
...
| "pmon" |
A+------------+ <- 0x00040000: "linux" partition starts here
| trx header |
B|------------|
| |
| |
| kernel |
| |
| |
|------------|
C|------------| <- 4 byte boundary (base:B,forced by trx)
| |
| |
| squashfs |
| |
| |
|------------| <- end of squashfs
|000000000000|
| ---------- | <- +2048 bytes safety margin by the kernel
>|000000000000|<<<<- [JACKPOT!!!]
|------------| <- 4K byte boundary (base:C,forced by mksquashfs)
|ffffffffffff|
|------------| <- 4K byte boundary (base:A,forced by trx)
|ffffffffffff| <- more padding by addpattern
|------------|
| (free) | <- still in the "linux" partition...
...
Here is a fix: