Re: [linux-sunxi] Re: How to decide NAND boot address?
On 03/14/2014 04:42 PM, hunter hu wrote: Hi, OK, I think I need to close the topic and drew a conclusion: The conclusion is: my board in question, which is an IView435TPC, doesn't allow any hacking on NAND by doing something magic inside closed source boot1. The conclusion fis based on my following observations: 1. I have tried Installing to NAND sunxi wiki instructions, it works fine. just git checkout lichee-dev, make the CONFIG_BOOTCOMMAND changes with fatload inside include/configs/sun5i_a13.h, basically that is the line we put inside boot.cmd for boot.scr. No need to do any dram configurations as we want to do in sd card boot case. correct, dram is initialized by boot0/boot1 2. when I was using nand-part tool to repartition the internal NAND, the last re-read partition table command returns -1 on the iview tablet, but return 0 on Olimex a13 board, which indicates something is going on in the iview nand. nand-part may simply not support the newer version of libnand used on this tablet 3. I could see no debugging output from serial when hooking up with UART1 on the iview, but everything is OK on Olimex NAND, I can see boot0 loading messages, as well as lichee-dev uboot, and my uImage output. Closed blobs make you cry. You probably have an incompatible libnand. But fear not, the mtd driver is very slowly progressing. A year from now we might be thinking 'oh, heh, good riddens libnand is gone'. So, the lesson learned here is for some of the commercial tablets out there, they must have put some magic keys/encryptions to lock down their internal NAND to prevent any hacking or manipulations, no debug output from serial is a very good sign of such lock down. You are the very first one that 'might' (unlikly) have a locked down nand. I sincerly doubt it's locked down at all. Olliver Hope these notes are helpful to someone, and my appreciations to all the help from you guys. Cheers, -Hunter On Friday, March 7, 2014 5:09:41 PM UTC-6, hunter hu wrote: Hi, I finally got the serial port working on my board, just a side note, we need a pull up resistor at the Rx pin, and I am using UART1 with SD card approach, anyone struggles with serial port, here is the thread that helped me: https://www.olimex.com/forum/index.php?topic=1788.0 https://www.olimex.com/forum/index.php?topic=1788.0 All goes well with the SD u-boot and I can stop at u-boot prompt and play with it, booting up as usual too by typing boot. However when I set the NAND stuff up with lichee-dev u-boot built out of sun5i_a13, there is no serial output at all upon boot and stuck at logo, which indicates something is wrong with the u-boot image and it didn't run as expected. I also tried just use the stock android u-boot, some posts say we can stop android u-boot when booting up, I didn't see that happen either. Any ideas how to proceed from here would be greatly appreciated. Thanks in advance, -Hunter On Wednesday, March 5, 2014 10:13:45 PM UTC-6, hunter hu wrote: Thanks Pat, I have used the correct syntax, but still, stuck at the SUNXI logo; at this moment I have a few questions: 1 my cpu is A13, your u-boot is for A20, I would think that is not working for me? 2 I have been using lichee-dev, sun5i_a13 board, trying to modify the configurations as shown before; when I was adding my board to the u-boot-sunxi, I had to add a dram_myboard.c to configure the DRAM by following the sunxi wiki instructions, I tried to do with and without the DRAM stuff, the same, stuck at the logo, I believe I have to get the serial port working first. Thank you very much for all help so far, I greatly appreciated. -Hunter On Wednesday, March 5, 2014 9:35:06 PM UTC-6, Patrick Wood wrote: fatload nand 0 kernel_address kernel_file Note that my u-boot is based on a heavily-modified version of the one used by android. On Wednesday, March 5, 2014 10:10:03 PM UTC-5, hunter hu wrote: Hi Pat, I was not be able to get serial port access yet, work in progress. Regarding the syntax, what are the correct ones? thanks, -Hunter On Wednesday, March 5, 2014 8:51:22 PM UTC-6, Patrick Wood wrote: That's not the right syntax for file access. Don't you have a serial port you can get boot logs from? -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com mailto:linux-sunxi+unsubscr...@googlegroups.com. For more options, visit
Re: [linux-sunxi] Re: How to decide NAND boot address?
Hi, OK, I think I need to close the topic and drew a conclusion: The conclusion is: my board in question, which is an IView435TPC, doesn't allow any hacking on NAND by doing something magic inside closed source boot1. The conclusion fis based on my following observations: 1. I have tried Installing to NAND sunxi wiki instructions, it works fine. just git checkout lichee-dev, make the CONFIG_BOOTCOMMAND changes with fatload inside include/configs/sun5i_a13.h, basically that is the line we put inside boot.cmd for boot.scr. No need to do any dram configurations as we want to do in sd card boot case. 2. when I was using nand-part tool to repartition the internal NAND, the last re-read partition table command returns -1 on the iview tablet, but return 0 on Olimex a13 board, which indicates something is going on in the iview nand. 3. I could see no debugging output from serial when hooking up with UART1 on the iview, but everything is OK on Olimex NAND, I can see boot0 loading messages, as well as lichee-dev uboot, and my uImage output. So, the lesson learned here is for some of the commercial tablets out there, they must have put some magic keys/encryptions to lock down their internal NAND to prevent any hacking or manipulations, no debug output from serial is a very good sign of such lock down. Hope these notes are helpful to someone, and my appreciations to all the help from you guys. Cheers, -Hunter On Friday, March 7, 2014 5:09:41 PM UTC-6, hunter hu wrote: Hi, I finally got the serial port working on my board, just a side note, we need a pull up resistor at the Rx pin, and I am using UART1 with SD card approach, anyone struggles with serial port, here is the thread that helped me: https://www.olimex.com/forum/index.php?topic=1788.0 All goes well with the SD u-boot and I can stop at u-boot prompt and play with it, booting up as usual too by typing boot. However when I set the NAND stuff up with lichee-dev u-boot built out of sun5i_a13, there is no serial output at all upon boot and stuck at logo, which indicates something is wrong with the u-boot image and it didn't run as expected. I also tried just use the stock android u-boot, some posts say we can stop android u-boot when booting up, I didn't see that happen either. Any ideas how to proceed from here would be greatly appreciated. Thanks in advance, -Hunter On Wednesday, March 5, 2014 10:13:45 PM UTC-6, hunter hu wrote: Thanks Pat, I have used the correct syntax, but still, stuck at the SUNXI logo; at this moment I have a few questions: 1 my cpu is A13, your u-boot is for A20, I would think that is not working for me? 2 I have been using lichee-dev, sun5i_a13 board, trying to modify the configurations as shown before; when I was adding my board to the u-boot-sunxi, I had to add a dram_myboard.c to configure the DRAM by following the sunxi wiki instructions, I tried to do with and without the DRAM stuff, the same, stuck at the logo, I believe I have to get the serial port working first. Thank you very much for all help so far, I greatly appreciated. -Hunter On Wednesday, March 5, 2014 9:35:06 PM UTC-6, Patrick Wood wrote: fatload nand 0 kernel_address kernel_file Note that my u-boot is based on a heavily-modified version of the one used by android. On Wednesday, March 5, 2014 10:10:03 PM UTC-5, hunter hu wrote: Hi Pat, I was not be able to get serial port access yet, work in progress. Regarding the syntax, what are the correct ones? thanks, -Hunter On Wednesday, March 5, 2014 8:51:22 PM UTC-6, Patrick Wood wrote: That's not the right syntax for file access. Don't you have a serial port you can get boot logs from? -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [linux-sunxi] Re: How to decide NAND boot address?
Hi, I finally got the serial port working on my board, just a side note, we need a pull up resistor at the Rx pin, and I am using UART1 with SD card approach, anyone struggles with serial port, here is the thread that helped me: https://www.olimex.com/forum/index.php?topic=1788.0 All goes well with the SD u-boot and I can stop at u-boot prompt and play with it, booting up as usual too by typing boot. However when I set the NAND stuff up with lichee-dev u-boot built out of sun5i_a13, there is no serial output at all upon boot and stuck at logo, which indicates something is wrong with the u-boot image and it didn't run as expected. I also tried just use the stock android u-boot, some posts say we can stop android u-boot when booting up, I didn't see that happen either. Any ideas how to proceed from here would be greatly appreciated. Thanks in advance, -Hunter On Wednesday, March 5, 2014 10:13:45 PM UTC-6, hunter hu wrote: Thanks Pat, I have used the correct syntax, but still, stuck at the SUNXI logo; at this moment I have a few questions: 1 my cpu is A13, your u-boot is for A20, I would think that is not working for me? 2 I have been using lichee-dev, sun5i_a13 board, trying to modify the configurations as shown before; when I was adding my board to the u-boot-sunxi, I had to add a dram_myboard.c to configure the DRAM by following the sunxi wiki instructions, I tried to do with and without the DRAM stuff, the same, stuck at the logo, I believe I have to get the serial port working first. Thank you very much for all help so far, I greatly appreciated. -Hunter On Wednesday, March 5, 2014 9:35:06 PM UTC-6, Patrick Wood wrote: fatload nand 0 kernel_address kernel_file Note that my u-boot is based on a heavily-modified version of the one used by android. On Wednesday, March 5, 2014 10:10:03 PM UTC-5, hunter hu wrote: Hi Pat, I was not be able to get serial port access yet, work in progress. Regarding the syntax, what are the correct ones? thanks, -Hunter On Wednesday, March 5, 2014 8:51:22 PM UTC-6, Patrick Wood wrote: That's not the right syntax for file access. Don't you have a serial port you can get boot logs from? -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [linux-sunxi] Re: How to decide NAND boot address?
Hi Pat, I was not be able to get serial port access yet, work in progress. Regarding the syntax, what are the correct ones? thanks, -Hunter On Wednesday, March 5, 2014 8:51:22 PM UTC-6, Patrick Wood wrote: That's not the right syntax for file access. Don't you have a serial port you can get boot logs from? -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [linux-sunxi] Re: How to decide NAND boot address?
fatload nand 0 kernel_address kernel_file Note that my u-boot is based on a heavily-modified version of the one used by android. On Wednesday, March 5, 2014 10:10:03 PM UTC-5, hunter hu wrote: Hi Pat, I was not be able to get serial port access yet, work in progress. Regarding the syntax, what are the correct ones? thanks, -Hunter On Wednesday, March 5, 2014 8:51:22 PM UTC-6, Patrick Wood wrote: That's not the right syntax for file access. Don't you have a serial port you can get boot logs from? -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [linux-sunxi] Re: How to decide NAND boot address?
Thanks Pat, I have used the correct syntax, but still, stuck at the SUNXI logo; at this moment I have a few questions: 1 my cpu is A13, your u-boot is for A20, I would think that is not working for me? 2 I have been using lichee-dev, sun5i_a13 board, trying to modify the configurations as shown before; when I was adding my board to the u-boot-sunxi, I had to add a dram_myboard.c to configure the DRAM by following the sunxi wiki instructions, I tried to do with and without the DRAM stuff, the same, stuck at the logo, I believe I have to get the serial port working first. Thank you very much for all help so far, I greatly appreciated. -Hunter On Wednesday, March 5, 2014 9:35:06 PM UTC-6, Patrick Wood wrote: fatload nand 0 kernel_address kernel_file Note that my u-boot is based on a heavily-modified version of the one used by android. On Wednesday, March 5, 2014 10:10:03 PM UTC-5, hunter hu wrote: Hi Pat, I was not be able to get serial port access yet, work in progress. Regarding the syntax, what are the correct ones? thanks, -Hunter On Wednesday, March 5, 2014 8:51:22 PM UTC-6, Patrick Wood wrote: That's not the right syntax for file access. Don't you have a serial port you can get boot logs from? -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [linux-sunxi] Re: How to decide NAND boot address?
The lichee u-boot also support fat access, just use fatload instead of nand command to load files. mån 2014-03-03 klockan 16:41 -0800 skrev Patrick Wood: This version of uboot loads the entire partition into RAM, not the uImage file. You need a modified uboot that can be set up more like the one that's used on SD cards: http://www.cubieforums.com/index.php?topic=511.0 Pat On Monday, March 3, 2014 4:00:55 PM UTC-5, hunter hu wrote: Thanks Patrick, Does this mean I don't need to change the default 5000 at all? My intention is to load Linux instead of Android from NAND and following this sunxi wiki: http://linux-sunxi.org/Installing_to_NAND. What changes need to be made in the uboot env besides the /dev/nandd - /dev/nandb? -Hunter On Monday, March 3, 2014 2:45:21 PM UTC-6, Patrick Wood wrote: That's not the nand read address; that's the RAM address where the nand read command stores data read from nand. The last argument (boot, recovery) is the nand partition name where it's reading data. This is how an android kernel+initrd is loaded. On Monday, March 3, 2014 2:42:17 PM UTC-5, hunter hu wrote: Hi All, I am trying to boot from NAND, and using Allwinner lichee-dev branch, in the sun5i_a13.h header, there is a section of hard coded environment setup like this: 81 #define CONFIG_EXTRA_ENV_SETTINGS \ 182 bootdelay=3\0 \ 183 bootcmd=run setargs boot_normal\0 \ 184 console=ttyS0,115200\0 \ 185 nand_root=/dev/nandd\0 \ 186 mmc_root=/dev/mmcblk0p4\0 \ 187 init=/init\0 \ 188 loglevel=8\0 \ 189 setargs=setenv bootargs console= ${console} root=${nand_root} \ 190 init=${init} loglevel=${loglevel}\0 \ 191 boot_normal=nand read 5000 boot; boota 5000\0 \ 192 boot_recovery=nand read 5000 recovery; boota 5000\0 \ 193 boot_fastboot=fastboot\0 My question is: how do I find the nand read address of my own instead of default 5000? My nand-part on the tablet looks like: 9 mbr: version 0x0100, magic softw311 10 2 partitions 11 partition 1: class = DISK, name = boot, partition start =32768, partition size =52768 user_type=0 12 partition 2: class = DISK, name = root, partition start =85536, partition size = 15479264 user_type=0 Is that the start of nandb which is 85536 x 512 = 43794432 ? I also need to change /dev/nandd to /dev/nandb because I boot from the second partition /dev/nandb, correct? Any hints are greatly appreciated, Cheers, -Hunter -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[linux-sunxi] Re: How to decide NAND boot address?
That's not the nand read address; that's the RAM address where the nand read command stores data read from nand. The last argument (boot, recovery) is the nand partition name where it's reading data. This is how an android kernel+initrd is loaded. On Monday, March 3, 2014 2:42:17 PM UTC-5, hunter hu wrote: Hi All, I am trying to boot from NAND, and using Allwinner lichee-dev branch, in the sun5i_a13.h header, there is a section of hard coded environment setup like this: 81 #define CONFIG_EXTRA_ENV_SETTINGS \ 182 bootdelay=3\0 \ 183 bootcmd=run setargs boot_normal\0 \ 184 console=ttyS0,115200\0 \ 185 nand_root=/dev/nandd\0 \ 186 mmc_root=/dev/mmcblk0p4\0 \ 187 init=/init\0 \ 188 loglevel=8\0 \ 189 setargs=setenv bootargs console=${console} root=${nand_root} \ 190 init=${init} loglevel=${loglevel}\0 \ 191 boot_normal=nand read 5000 boot; boota 5000\0 \ 192 boot_recovery=nand read 5000 recovery; boota 5000\0 \ 193 boot_fastboot=fastboot\0 My question is: how do I find the nand read address of my own instead of default 5000? My nand-part on the tablet looks like: 9 mbr: version 0x0100, magic softw311 10 2 partitions 11 partition 1: class = DISK, name = boot, partition start =32768, partition size =52768 user_type=0 12 partition 2: class = DISK, name = root, partition start =85536, partition size = 15479264 user_type=0 Is that the start of nandb which is 85536 x 512 = 43794432 ? I also need to change /dev/nandd to /dev/nandb because I boot from the second partition /dev/nandb, correct? Any hints are greatly appreciated, Cheers, -Hunter -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[linux-sunxi] Re: How to decide NAND boot address?
Thanks Patrick, Does this mean I don't need to change the default 5000 at all? My intention is to load Linux instead of Android from NAND and following this sunxi wiki: http://linux-sunxi.org/Installing_to_NAND. What changes need to be made in the uboot env besides the /dev/nandd - /dev/nandb? -Hunter On Monday, March 3, 2014 2:45:21 PM UTC-6, Patrick Wood wrote: That's not the nand read address; that's the RAM address where the nand read command stores data read from nand. The last argument (boot, recovery) is the nand partition name where it's reading data. This is how an android kernel+initrd is loaded. On Monday, March 3, 2014 2:42:17 PM UTC-5, hunter hu wrote: Hi All, I am trying to boot from NAND, and using Allwinner lichee-dev branch, in the sun5i_a13.h header, there is a section of hard coded environment setup like this: 81 #define CONFIG_EXTRA_ENV_SETTINGS \ 182 bootdelay=3\0 \ 183 bootcmd=run setargs boot_normal\0 \ 184 console=ttyS0,115200\0 \ 185 nand_root=/dev/nandd\0 \ 186 mmc_root=/dev/mmcblk0p4\0 \ 187 init=/init\0 \ 188 loglevel=8\0 \ 189 setargs=setenv bootargs console=${console} root=${nand_root} \ 190 init=${init} loglevel=${loglevel}\0 \ 191 boot_normal=nand read 5000 boot; boota 5000\0 \ 192 boot_recovery=nand read 5000 recovery; boota 5000\0 \ 193 boot_fastboot=fastboot\0 My question is: how do I find the nand read address of my own instead of default 5000? My nand-part on the tablet looks like: 9 mbr: version 0x0100, magic softw311 10 2 partitions 11 partition 1: class = DISK, name = boot, partition start =32768, partition size =52768 user_type=0 12 partition 2: class = DISK, name = root, partition start =85536, partition size = 15479264 user_type=0 Is that the start of nandb which is 85536 x 512 = 43794432 ? I also need to change /dev/nandd to /dev/nandb because I boot from the second partition /dev/nandb, correct? Any hints are greatly appreciated, Cheers, -Hunter -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[linux-sunxi] Re: How to decide NAND boot address?
This version of uboot loads the entire partition into RAM, not the uImage file. You need a modified uboot that can be set up more like the one that's used on SD cards: http://www.cubieforums.com/index.php?topic=511.0 Pat On Monday, March 3, 2014 4:00:55 PM UTC-5, hunter hu wrote: Thanks Patrick, Does this mean I don't need to change the default 5000 at all? My intention is to load Linux instead of Android from NAND and following this sunxi wiki: http://linux-sunxi.org/Installing_to_NAND. What changes need to be made in the uboot env besides the /dev/nandd - /dev/nandb? -Hunter On Monday, March 3, 2014 2:45:21 PM UTC-6, Patrick Wood wrote: That's not the nand read address; that's the RAM address where the nand read command stores data read from nand. The last argument (boot, recovery) is the nand partition name where it's reading data. This is how an android kernel+initrd is loaded. On Monday, March 3, 2014 2:42:17 PM UTC-5, hunter hu wrote: Hi All, I am trying to boot from NAND, and using Allwinner lichee-dev branch, in the sun5i_a13.h header, there is a section of hard coded environment setup like this: 81 #define CONFIG_EXTRA_ENV_SETTINGS \ 182 bootdelay=3\0 \ 183 bootcmd=run setargs boot_normal\0 \ 184 console=ttyS0,115200\0 \ 185 nand_root=/dev/nandd\0 \ 186 mmc_root=/dev/mmcblk0p4\0 \ 187 init=/init\0 \ 188 loglevel=8\0 \ 189 setargs=setenv bootargs console=${console} root=${nand_root} \ 190 init=${init} loglevel=${loglevel}\0 \ 191 boot_normal=nand read 5000 boot; boota 5000\0 \ 192 boot_recovery=nand read 5000 recovery; boota 5000\0 \ 193 boot_fastboot=fastboot\0 My question is: how do I find the nand read address of my own instead of default 5000? My nand-part on the tablet looks like: 9 mbr: version 0x0100, magic softw311 10 2 partitions 11 partition 1: class = DISK, name = boot, partition start =32768, partition size =52768 user_type=0 12 partition 2: class = DISK, name = root, partition start =85536, partition size = 15479264 user_type=0 Is that the start of nandb which is 85536 x 512 = 43794432 ? I also need to change /dev/nandd to /dev/nandb because I boot from the second partition /dev/nandb, correct? Any hints are greatly appreciated, Cheers, -Hunter -- You received this message because you are subscribed to the Google Groups linux-sunxi group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.