monti Posted October 21, 2015 Posted October 21, 2015 Hello again, since I use the NAND-Flash to boot and I want to use the new kernel, which doesnt support NAND yet, I'm curious if its possible to use both: 1. Can I boot the new kernel from NAND? Since the new kernel is started after uboot, it should be possible? 2. Afterwards I have no possibility to update the kernel again. Or do I have? (Without SD-Card) a.) the nand-tools requires the nand-driver??? Or is there a possibility to writea prebuild image to nand without kernel-nand-support? b.) is it possible to start an old kernel from the new for upgrading? Tried "kexec uImage", but it doesnt work. Maybe I need the zImage instead of uImage? best regards
monti Posted October 21, 2015 Author Posted October 21, 2015 Hi Igor, Checked out the linux mainline 4.3-rc6-kernel, it seems to support the sunxi-NAND (it has an configuration entry). I changed the kernel within lib/configuration.sh and played with the configuration. But arch_sunxi wasn't set so I'm not sure if its correctly configured. Would it be hard to compile kernel 4.3rc...? Btw. how can I make changes to kernel configuration without reverting the changes every ./compile.sh? I patched some file to avoid the git pulls, but it was very dirty. Thanks, Jan
Igor Posted October 21, 2015 Posted October 21, 2015 Regarding building - perhaps necessary patches doesn't go trough well. This is nothing unusual. I will try to build and adopt patches when released or if bored NAND support will be here soon, also on u-boot. 1. I heard it's possible but not by default or without some hacking. 2. You need to boot with SD that support NAND and change the NAND kernel. a. no b. don't know
monti Posted October 22, 2015 Author Posted October 22, 2015 Thanks, just a question while playing: It is intended to switch off the kernel architectur arch_sunxi ? I switch this on, additional NAND, disabled some drivers (vhost* and lustre*) due to compile errors, but now the kernel complains about a missing device tree and tries to boot from TFTP...
Igor Posted October 22, 2015 Posted October 22, 2015 I compile with all on and it seems it works ok: CONFIG_ARCH_SUNXI=y CONFIG_MACH_SUN4I=y CONFIG_MACH_SUN5I=y CONFIG_MACH_SUN6I=y CONFIG_MACH_SUN7I=y CONFIG_MACH_SUN8I=y CONFIG_MACH_SUN9I=y
monti Posted October 23, 2015 Author Posted October 23, 2015 Made a fresh install with 4.2.4 (nothing worked with 4.2.3), now this seems to compile. - Switched on then NAND_SUNXI-Driver CONFIG_MTD_NAND_SUNXI=y --> compiles and runs But no nand visible, probably because no nand is configured in the dtb. I think, something like this is missing: http://lists.denx.de/pipermail/u-boot/2015-June/215988.html This is for the lime, but the lime2 should be the same regarding nand.
Igor Posted October 24, 2015 Posted October 24, 2015 Made a fresh install with 4.2.4 (nothing worked with 4.2.3), now this seems to compile. - Switched on then NAND_SUNXI-Driver CONFIG_MTD_NAND_SUNXI=y --> compiles and runs But no nand visible, probably because no nand is configured in the dtb. I think, something like this is missing: http://lists.denx.de/pipermail/u-boot/2015-June/215988.html This is for the lime, but the lime2 should be the same regarding nand. Yes, it must be defined in DTB. Try it.
monti Posted October 24, 2015 Author Posted October 24, 2015 Would be too easy if it works. - Applied this path to lime2.dts and the dtsi (corrected @-signs and the paths). - make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all zImage - Copied the new *lime2.dtb into /boot/dtb - Reboot - None This seems to be correct or did I forget to adapt some placeholder? (size-cells) &nfc { pinctrl-names = "default"; pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>; status = "okay"; nand@0 { #address-cells = <2>; #size-cells = <2>; reg = <0>; allwinner,rb = <0>; nand-ecc-mode = "hw"; nand-ecc-strength = <40>; nand-ecc-step-size = <1024>; nand-rnd-mode = "hw"; nand-randomizer-seeds = /bits/ 16 < 0x2b75 0x0bd0 0x5ca3 0x62d1 0x1c93 0x07e9 0x2162 0x3a72 0x0d67 0x67f9 0x1be7 0x077d 0x032f 0x0dac 0x2716 0x2436 0x7922 0x1510 0x3860 0x5287 0x480f 0x4252 0x1789 0x5a2d 0x2a49 0x5e10 0x437f 0x4b4e 0x2f45 0x216e 0x5cb7 0x7130 0x2a3f 0x60e4 0x4dc9 0x0ef0 0x0f52 0x1bb9 0x6211 0x7a56 0x226d 0x4ea7 0x6f36 0x3692 0x38bf 0x0c62 0x05eb 0x4c55 0x60f4 0x728c 0x3b6f 0x2037 0x7f69 0x0936 0x651a 0x4ceb 0x6218 0x79f3 0x383f 0x18d9 0x4f05 0x5c82 0x2912 0x6f17 0x6856 0x5938 0x1007 0x61ab 0x3e7f 0x57c2 0x542f 0x4f62 0x7454 0x2eac 0x7739 0x42d4 0x2f90 0x435a 0x2e52 0x2064 0x637c 0x66ad 0x2c90 0x0bad 0x759c 0x0029 0x0986 0x7126 0x1ca7 0x1605 0x386a 0x27f5 0x1380 0x6d75 0x24c3 0x0f8e 0x2b7a 0x1418 0x1fd1 0x7dc1 0x2d8e 0x43af 0x2267 0x7da3 0x4e3d 0x1338 0x50db 0x454d 0x764d 0x40a3 0x42e6 0x262b 0x2d2e 0x1aea 0x2e17 0x173d 0x3a6e 0x71bf 0x25f9 0x0a5d 0x7c57 0x0fbe 0x46ce 0x4939 0x6b17 0x37bb 0x3e91 0x76db>; onfi,nand-timing-mode = <0x1f>;/* main@400000 { label = "main"; reg = /bits/ 64 <0x400000 0xffc00000>; };*/ };};
Igor Posted October 25, 2015 Posted October 25, 2015 I was speaking theoretical. I haven't test this by myself. What about the driver, are you sure it's enabled / operational ?
monti Posted October 25, 2015 Author Posted October 25, 2015 Good morning Igor, I tested it practically Unfortunatelly, I'm not a kernel specialist, so I do not really know, what I'm doing. Regarding the driver: - don't know how to test. According to the config file its enabled. root@lime2:~# cat /boot/config-4.2.4-sunxi | grep NAND | grep -v \#CONFIG_MTD_NAND_ECC=yCONFIG_MTD_NAND=yCONFIG_MTD_NAND_IDS=yCONFIG_MTD_NAND_SUNXI=y But if its operational: In syslog/messages: nothing about mtd or nand (case insensitive), so maybe/maybe not.
Recommended Posts