Yes primarily they should grow enough food to meet their nutritional requirement first - and hopefully sell some surplus.
There are all sort of systems in place - some sectors like tea and dairy are okay - there is a working model there - and those sub-sectors are successfuly - it doesnt need much tweaking.
There commercial banks/micro-finance lending very high interest loans with high fees -
We need a farmers bank - that runs on a cooperative model - that owns fertilizer importation/production - and quality seeds - and then warehouses and all that.
I would merge and acquire KFA, Kenya Seeds and NCPB - into one giant Kenya Farmers Bank. Gov annually will subsidize this bank by injecting money to be lend to farmers in form of inputs - and this bank - can "bank" farm outputs - and find market for them - just like KTDA.
I would avoid lending money to poor illiterates farmers - who will waste it and go deeper into poverty. They should be told to form farming groups - prepare their land - and farm inspector come - issue fertilizers - people plant - all of them get crop insurances at small fee - and they tend to the crops - their surplus can be sold to re-pay the zero rated loans.
Something like Digifarm, OneAcrefund merged with KFA, Kenya Seeds,NCPB and then fertilizer importation; DONE.
We cannot leave everything to magic of Market Economy - these 8M poor farmers will never emerge from their hole - without gov subsidies. And if supported they can double or triple their production in a year - eat better and spend more in the same economy.
Actually local banks have Agriculture division that supposed to lend to farmers, coop, kcb and equity. The loans are specifically structured for agriculture. The 8m subsistence farmers don't they farm mainly for their own consumption? If that's the case, the primary objective would be to find out what economic activity they can engage in that's commercially viable.
For example, Wakulima dairy in Nyeri provides farmers with everything they need to run a household its then deducted from their milk earnings. The farmer can then focus on dairy farming.