The "Officer safety search" is based on the Terry vs. Ohio doctrine. An officer can "frisk" you (a brief, cursory patdown) for weapons while he conducts a brief interview with you. This INCLUDES your backpack because it is within your immediate reach. Courtroom legalities can always be argued, of course, but officers make good-faith decisions everyday that span both sides of the blurry lines of legalese. During the frisk, an officer is looking for anything that could be a weapon which, of course, includes knives.
Concealing a knife is ok if you meant keeping it in your backpack. That's simply carrying it as opposed to concealing. It takes on a different meaning if you're concealing it on your person. In New Mexico, a person can carry a knife or gun in plain view - it becomes illegal when it's concealed. Many States have similar laws and I don;t know them all but concealing a weapon on your person is almost always illegal.
As far as being searched (frisked), I would think it's generally not going to happen (note use of the word "generally"). Most seasoned officers can size you up pretty quickly and a quick wants/warrants and criminal history check, coupled with your truthful story of just "hiking across the country" will be more than enough. Keep your hands in his sight at all times and, when asked for ID, be deliberate. If your ID is in your backpack, for example, let the officer know where it is before you go digging for it.
DON'T immediately say you have a knife or weapon here or there, just answer the officers questions. Without a doubt, you'll be asked if you have any weapons or contraband. THEN you can say you have a knife here or there.
I don;t see a problem. Police are regular people, which means you'll get treated differently not necessarily by location, but by individual personality. Some are more aggressive and assertive, others more relaxed and congenial. Some are new and others experienced - some are wise and others not so wise. ALL of them, while dealing with you, will be watching every move your eyes and body makes, and listening to how you respond to questions. As I said, experienced officers will know intuitively "who" you are in a very short time, the same way a dog seems to sense danger or ill-intent from a person.
In my opinion, everybody seemed to have some good advice, but OBG's, Susan's, and Trooper366's posts especially caught my attention.
There are alot of good, well-intentioned people walking or bicycling across the country and police officers know this. I think you'll be fine.
_________________________
DON'T BE SCARED
-Stretch