Questions and clarifications

Started by Mellnik, October 24, 2015, 10:48:24 PM

Previous topic - Next topic

Mellnik

Hello guys. After getting an A20-OLinuXino-MICRO-4G I have been doing many experiments with it and came up with some questions and stuff I would need a bit of clarification of :).

1. boot0, boot1
Where are those blobs located? The A20 MICRO is supposed to have 4G NAND and 2KB EEPROM. After dd if=/dev/zero of=/dev/nand and booting, boot0 and boot1 still comes up. So what kind of extra memory does the board have?

2. How does the SERIAL-F cable work?
I have connected the SERIAl-F cable to my Linux machine and interact using screen /dev/ttyUSB0 115200.
It shows me boot0/boot1 and the U-Boot startup processes. Is the driver for SERIAL-F within boot0 or how does this exactly work?

3. 100% OSS?
Can I get all sources of every single blob/binary etc and load them onto the board myself?

4. Boot sequence?
This my current understanding of the A20 MICRO basic boot sequence:
CPU executes boot0, boot0 loads boot1, boot1 loads NAND/SD/SATA driver and loads U-Boot from it.

That's for it now, thanks!

JohnS

See linux-sunxi.org site

Not all OSS, no.  The IP of the chip isn't either...

John

MBR

Quote from: Mellnik on October 24, 2015, 10:48:24 PM
1. boot0, boot1
Where are those blobs located? The A20 MICRO is supposed to have 4G NAND and 2KB EEPROM. After dd if=/dev/zero of=/dev/nand and booting, boot0 and boot1 still comes up. So what kind of extra memory does the board have?

The MTD "partitions" are not located on the device itself, but they are hardcoded into the kernel or passed as kernel parameters, so no amount of overwriting will rid them of. To modify them, you must either modify the kernel itself or pass the kernel parameters each time you boot. See the nice article on http://free-electrons.com/blog/managing-flash-storage-with-linux/ or the kernel MTD documentation for more details.

Quote from: Mellnik on October 24, 2015, 10:48:24 PM
2. How does the SERIAL-F cable work?
I have connected the SERIAl-F cable to my Linux machine and interact using screen /dev/ttyUSB0 115200.
It shows me boot0/boot1 and the U-Boot startup processes. Is the driver for SERIAL-F within boot0 or how does this exactly work?

The SERIAL-F cable is a serial to USB convertor, without the TTL- to RS232-level shifter (typicaly MAX232 or something similar), so it can work directly with TTL-level UARTs of SoCs like the A20. So it's just a serial cable, there are no drivers for it on the serial side, the code in the bootloaders works with the UART device only. If you add a level shifter (e.g. like this - https://www.sparkfun.com/products/449) to plain serial cable connected to the COM1 (assuming that your computer still has serial ports), it will work the same - displaying the serial console of bootloader(s), the kernel and possibly the shell.

Mellnik

Thanks for the answers!

@MBR
I don't quite understand your first answer. I don't even have a microSD with a Linux Kernel inserted in the board and the nand is fully overwritten with zeros. But still boot0 comes up.


MBR

Quote from: Mellnik on October 26, 2015, 03:47:56 PM
I don't quite understand your first answer. I don't even have a microSD with a Linux Kernel inserted in the board and the nand is fully overwritten with zeros. But still boot0 comes up.

The /dev/nand is probably just a symlink, pointing to the /dev/mtdblock<some number> (try ls -l /dev/nand), because AFAIK, there is no way to access whole "unpartioned" NAND using the block device (NAND flashers/erasers uses the char devices and some IOCTL magic), unless you configure the MTD as one "partition".

PS: You can view the MTD partitioning by someting like cat /proc/mtd.