Is there a possibility to update the Kernel (writing a new zImage into the NAND) from a program running on picomod ?
Thanks and kind regards
RSchubert
Is there a possibility to update the Kernel (writing a new zImage into the NAND) from a program running on picomod ?
Thanks and kind regards
RSchubert
Yes, that is possible.
You need set modify the bootargs/mtdparts like that (see the access rights for Kernel) - this line is from PicoMOD7A, pls set appropriate for your PicoMOD7:
In Buildroot you need to add tools to busybox with:
and add:
Then with the new rootfs and the corresponding bootargs you can update Linux Kernel Image from the serial command line (Linux) like:
Thanks,
I will try and tell the results.
I have the flash_eraseall and nandwrite commands running. On /dev/mtd3 I have no write access (I removed the "ro" flag behind the Kernel definition).
When looking to the mtdparts again I see NBoot 128k,UBoot 512k,UBootEnv 128k,UserDef 512k,Kernel 4M,TargetFS.
Is it correct that the Kernel must be /dev/mtd4 instead of /dev/mtd3? If yes how do I create the mtd4 and mtdblock4 devices?
Kind regards...
Take a look at the debug output (again this is PicoMOD7A):
Creating 5 MTD partitions on "fsnand0":
0x000000040000-0x0000000c0000 : "UBoot"
0x0000000c0000-0x000000100000 : "UBootEnv"
0x000000100000-0x000000500000 : "UserDef"
0x000000500000-0x000000800000 : "Kernel"
0x000000800000-0x000008000000 : "TargetFS"
You see 0=UBoot .. 3=Kernel
# cat /sys/class/mtd/mtd3/name
Kernel
Pls search for 'Kernel' and use the corresponding mtd*
On my device there are 6 partitions. I have an additional NBoot partition 0. So the Kernel is /dev/mtd4 but there's no mtd4 device in the /dev directory. I have created a device:
Now I can read the Kernel:
but writing is not possible (even after chmod 664 /dev/mtd4)
In my UBootEnv the mtdparts and bootargs are without the 'ro' flag after the Kernel definition.
Please make sure your bootargs look like (and run 'saveenv' to save modifications):