Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Trying to bring the Firefly up on mainline(ish)

2

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
2
Posted at 12/3/2014 21:56:22      1#

Wow, what a large post...




It is difficult to follow if the various sources and files aren't placed where they should be...

To get your firefly booting mainline, you should create a github account, fork or mirror the required sources (from mmind) and then collect your additional files and push them in your account. When you have questions about certain things, put a link or copy only a few lines of doubtful code and a link to the rest. In this way people could use the full feature set of git and github to check, compare, improve your code.

To the nand:

There is no and there will probably never be an open source driver for nand. You can use the rknand.ko together with a matching version of the RKxxx Loader.img is a bootloader. But the nand handling and FTL handling is licensed software that is not available as open source.

the rknand driver available as open source is a minimal interface to access the SOCs NAND hardware interface. You can try to access the chip and try your own FTL or NAND aware filesystem on top of it. That would probably require to write a low level MTD interface set of functions.

For the DTB and config files:?

I am waiting if I can get a RK3288 based system. I do not have any for now. If that changes there I will be putting together a dtb as one of the first actions. We could share our results over github.

And for mainline, I had some other priorities in the last weeks, but I'll fetch mmin00s changes soon and add a collection of dtb and config files. The way the linux kernel is developed has changed a bit and so it is required to do some more tricks and treats to have the reuired latest linux-next chnages mirrored in your github account. But how I told above: Attach yourself to one of the guru's gits and try to rebase often.?

Best regards

Astralix
Reply

Use props Report

2

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
2
Posted at 12/3/2014 22:54:23      2#

This driver there is a small piece of software just opening the door to the NAND controller interface in the SOC.

To have a real NAND driver you need a FTL (flash translation layer) and ECC handler. The ECC handler detects and corrects (multi-)bit errors, while the FTL maps blocks at a logical position to a physical block. Around that is a wear leveling driver that counts block writes of the large erase blocks and spreads writes to the smaller write sectors in a manor that avoids wear-out of single sectors.

This is a complicate job and so there is only commercial software available to manage that job.

The source code of the real rknand driver is only availble to some RK people and is not given out of hand even you sign an NDA.




So if you like to use the NAND you need to use the rknand.ko driver as that binary image that it is. The partitions are created in the parameter file.




With RK3288 some things may have changed. But AFAIK the uboot available for RK3288 can use the same NAND code as a binary blob that is used by the Loader. So even with RK3288 NAND access will only run through binary only rknand.ko.

If you like to have very fast static memory, use dwmmc driver and a fast SD card like Samsung Extreme Pro 45/45 or Sandisc Extreme 40/45 (write/read speed in MB/s)

The RK3288 features additional transfer speeds but I am not sure if this is already implemented in mainline. Then you can use XDHC cards up to 100/100 if the hardware layout and termination has been trimmed to the last value. eMMC memory can be accessed with 200/200 (cause 8bit width).

However this needs additional software in the SD/MMC driver section. Using raw NAND is always a bad idea.

Astralix
Reply

Use props Report

2

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
2
Posted at 12/4/2014 18:19:42      3#

@ac000:

You asked about NAND and I answered about NAND. But somewhere I told, that with eMMC you do not need any additional driver as the mainline dwmmc driver should work, if not, use the rkmmc. Then your partitions should be addressed as /dev/mmcblk0...

You can use rknand.ko as it can handle SD and MMC too, but it is not needed for eMMC as the usual drivers work fine.

If you need to sign and lock your systems images, you probably need to use RK Loader and rknand.ko but for open source you won't do that.


To avoid misunderstandings:

The word NAND is commonly used for raw NAND memory, having just blocks of FLASH. On the operating system side (Android / Linux /...)  additional software has to provide bad block management (BBT), error detection and correction (ECC) and wear-leveling (FTL).


eMMC is NAND behind a logic block that includes all of the above in hardware. So there is no additional software needed. You just write to a logical block device (LBA adressing) and the eMMC internal controller transfers LBA to physical memory blocks while keeping care of BBT, ECC and FTL.


Astralix

Reply

Use props Report

2

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
2
Posted at 12/5/2014 00:47:49      4#

Andrew, I do not have any 3288 device yet, so I didn't check the device tree for them.?

Sorry, I will report back as soon, as I have something new for you.




Astralix
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list