[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: OS from flash?



> Is it possible to get information about whether the OS running on the
> devboard was booted from the flash memory or loaded from one of the
> interfaces? If it was loades from an interface, may it be 
> evaluated from
> which? Is it possible to know whether the OS was uploaded 
> using ktest or
> kflash? If these questions can be answered when logged in on 
> the devboard,
> how can that be done?

The kernel knows if it was booting from flash or RAM (when booting from
RAM it mounts the root partition in RAM). There is a variable (romfs_in_flash)
that is 1 when booting from flash and 0 otherwise. That's the only way I know
to determine which boot method was used. Maybe you can use some information
from /proc and figure out if the root filesystem is in flash or RAM, but I'm
not sure. In a future release this will be possible to figure out from 
/proc/cmdline.

Best regards
/Jonas