[packages] ap51-flash: update ap51-flash and add loop option