<Tony_>
After I changed the rule, the mmc0 can be works fine with rknand.ko whatever boot from eMMC or SDCARD.
<Tony_>
sdio wifi works fine too.
<Tony_>
naobsd told me that "guessing" with trial & error, I will keep in mind. :)
<naobsd>
Tony_: congrat. btw, your !strcmp("mmc0") version should be used carefully. you shouldn't use that fix on "mmc0 is eMMC/SD" system (=without rknand.ko)
<naobsd>
you should try "if (host_dev_id == 1)" as like as 4.4 kernel
<naobsd>
^I'm not sure hardware unit id is provided in 4.2 driver
<Tony_>
Yes, you are right.
<naobsd>
anyway, you confirmed that rknand.ko doesn't interfere with SDIO controller (SDMMC unit #1). thank you.
<Tony_>
But host_dev_id is not exist in mainline kernel. That is added by RK.
<naobsd>
no problem, RK's bug doesn't exist in mainline too :)
<Tony_>
:)
<naobsd>
actually I didn't try sdio on mainline yet, but I don't believe there is such a bug ;)
<Tony_>
Me too. I think that RK change a lot about sdmmc_rescan_try_freq.
<Tony_>
That is.
<Tony_>
I see the diff of driver/mmc/core version 3.0 between mainline and RK.
<Tony_>
RK separate mmc_rescan to two func that are emmc_rescan and sdmmc_rescan.
<Tony_>
and sdmmc_rescan calls sdmmc_rescan_try_freq which is added by RK.
<Tony_>
This bug is only exist in RK'code, not mainline. RK change too much code about mmc from mainline.
<naobsd>
I think you don't need to worry for bugs in RK 3.0 in mainline... basically mainline is not descendant of RK 3.0
<Tony_>
Yes, I'm clear than before.
AstralixNB has joined #linux-rockchip
Astralix1 has joined #linux-rockchip
Astralix has quit [Ping timeout: 250 seconds]
GriefNorth has joined #linux-rockchip
Bludot has quit [Quit: Connection closed for inactivity]
eebrah|legit is now known as eebrah
<Tony_>
After that, I'm confused again.
<Tony_>
Why need to disable SDMMC0_RK29 when boot from SDCARD.
<naobsd>
Tony_: because rknand.ko controls SDMMC unit#0
<Tony_>
rknand.ko => SDMMC unit#0 => SDCARD.
<Tony_>
?
<naobsd>
Tony_: you're driving a car, and what happen if someone try to take handle?
<Tony_>
rknand.ko is driving SDMMC unit#0, so the SDMMC0_RK29 need to be diable.
<Tony_>
this metaphor so pretty.
<Tony_>
How you will do when you want to boot from SDCARD but you don't use rknand.ko ?
<Tony_>
I can answer myself now.
<Tony_>
you can enable SDMMC0_RK29, and add parttion info to MBR of SDCARD.
<Tony_>
My question and answer are right, aren't that?
<naobsd>
it was my first answer about your sd boot question some days ago ;)
<Tony_>
yes. :P
hipboi has quit [Ping timeout: 255 seconds]
hipboi has joined #linux-rockchip
hipboi_ has joined #linux-rockchip
hipboi has quit [Ping timeout: 256 seconds]
<Tony_>
naobsd, another question, the rest of partition(fat32) of SDCARD can be detected or mounted when boot from SDCARD?
<Tony_>
I think it should be by logic. but the truth is not after I test.
<Tony_>
This is only for rknand.ko.
dlan has quit [Ping timeout: 260 seconds]
dlan has joined #linux-rockchip
mrcan has joined #linux-rockchip
mrcan has joined #linux-rockchip
<naobsd>
Tony_: same as usual, kernel driver detects sd card. rest of things are the matter of user
<Tony_>
really? why not VOLD mount the reset partition ?
<Tony_>
*rest
<Tony_>
naobsd, really? why don't the VOLD mount the reset partition ?
<Tony_>
after kernel driver detects sd card.
<naobsd>
vold is part of user(land)
<naobsd>
there is no different between vold and mount command in this context
<Tony_>
Yes, maybe I should try to mount by hand.
<Tony_>
for test.
<naobsd>
well
<naobsd>
I never said vold doesn't mount partition(s)
<naobsd>
if you use vold to mount partition, vold mount partition
<naobsd>
if you use mount command to mount partition, mount command mount partition
<naobsd>
if you use something to mount partition, something mount partition
<naobsd>
"matter of user"
<Tony_>
yes, but the problem or truth is that the fat32 partition of SDCARD isn't mounted when booting sdcard.
<Tony_>
It will be mounted auto when booting from eMMC.
<naobsd>
if you did nothing to mount partition, nothing mount partition
<naobsd>
if some system mount partition automatically when booting, someone configured something
<Tony_>
in my opinion, the user space is always user space, whatever boot from.
<naobsd>
if you are talking about Android, vold should have responsibility
<Tony_>
I don't change the user space: mount, etc.
<naobsd>
did you use MBR partition for eMMC boot?
<naobsd>
your eMMC boot system and SD boot system are really same?
<Tony_>
No, I'm always use rknand.ko so far.
<naobsd>
are you using rknand.ko for SD boot?
<Tony_>
Yes.
<Tony_>
so far.
<Tony_>
rknand.ko can mount the rest partition of SDCARD ?
arokux2 has quit [Remote host closed the connection]
<naobsd>
"user" partition?
<Tony_>
Nope/
<naobsd>
which partition?
<Tony_>
the rest of SDCARD. Its format is fat32. I can see it from PC.
<Tony_>
when I plugin the sdcard into PC.
<naobsd>
how your PC detect partitions in parameter?
<Tony_>
okay, Let me explain.
<Tony_>
When I use SD_Fireware_Tool make [SD BOOT](boot from SD).
<Tony_>
then there will be two part.
<Tony_>
I can see from PC.
<Tony_>
one part has no parttion info, the other part is fat32.
<naobsd>
<naobsd> your eMMC boot system and SD boot system are really same?
<Tony_>
the fat32 part is part what I said.
<Tony_>
I think so.
<naobsd>
"the other part is fat32" this exist on eMMC too?
<Tony_>
I can't answer. :|
<naobsd>
only you have answer
<Tony_>
because I don't know,
<naobsd>
these are your system
<naobsd>
your PC just see MBR partition
<naobsd>
"internal SD" on RK Android is "user" partition defined in parameter.
<Tony_>
I know about "internal SD".
<Tony_>
But I can sure that It is fat32 or not.
<naobsd>
RK Android/vold mounts "user" partition in parameter
<Tony_>
yeah.
<Tony_>
then ? or I should do something to them.
<Tony_>
user partition and the rest partition of SDCARD.
<naobsd>
<Tony_> yes, but the problem or truth is that the fat32 partition of SDCARD isn't mounted when booting sdcard.
<naobsd>
<Tony_> It will be mounted auto when booting from eMMC.
<naobsd>
what are you talking about? "fat32 partition only on SD" or "user partition in both parameter"
<Tony_>
Sorry, give a one more time.
rz2k_ has joined #linux-rockchip
<Tony_>
user partition(eMMC)
<Tony_>
rknand.ko mount fs by parameter.
<Tony_>
rknand.ko can mount user partition when booting eMMC.
<Tony_>
rknand.ko can't mount [the rest of partition sdcard(fat32)] when booting from sdcard.
<Tony_>
It seem that I fond something.
<naobsd>
btw any storage driver does NOT mount file system, it just provides block device. user can format block device and can request block device to mount as file system
<Tony_>
When booting from sdcard, I should change parameter.
<naobsd>
RK Android is configured to mount a partition named "user" as internal SD card
<naobsd>
you/your system can mount "user" partition defined in parameter when booting SD card as same as eMMC
<Tony_>
you/your system can mount "user" partition defined in parameter when booting SD card as same as eMMC! yes, It is.
<Tony_>
naobsd, you are right. the real question is what you said. ;)
<naobsd>
rknand.ko shouldn't detect partitions defined in MBR
<naobsd>
PC will detect partitions defined in MBR
<Tony_>
(forgive me my poor organizational competence)
<Tony_>
(;P)
<Tony_>
Yes, you are right now. because MBR.
<Tony_>
Is it possible that I mount by hand.
<Tony_>
*Yes, you are right, I'm clear now. because MBR.
<Tony_>
Is it possible that I mount by hand ?
mrcan has quit [Ping timeout: 264 seconds]
hipboi_ has quit [Ping timeout: 256 seconds]
cyrozap has quit [Ping timeout: 244 seconds]
<naobsd>
mount partition defined in MBR on Android with rknand.ko?
<naobsd>
or mount partition defined in partition on PC?
<naobsd>
for former, you can add another partition or modify "user" partition which point same area as fat32 partition in MBR
<naobsd>
for later, you can modify fat32 partition in MBR which point same are as "user" partition in parameter
cyrozap has joined #linux-rockchip
<naobsd>
don't forget 0x2000 sectors offset
<Tony_>
ok.
<Tony_>
actually, I'm a idiot again. let me explain it.
<Tony_>
I thought the fat32 partition of SDCARD what I saw from PC can be mounted to /mnt/external_sd point.
<Tony_>
I saw the /mnt/external_sd has no mount. so I guess that the fat32 partition of sdcard is never mounted.
<Tony_>
but actually, it's mounted in the point /mnt/internal_sd.
hipboi_ has joined #linux-rockchip
<Tony_>
The /mnt/internal_sd is the fat32 partition of sdcard.
<Tony_>
Maybe nothing could be confused if I don't saw the fat32 partition from PC.
<Tony_>
But what you said is still useful for another added partition.
<Tony_>
I noted to my note book.
dlezcano has joined #linux-rockchip
<naobsd>
I guess fat32 partition in MBR and "user" partition in parameter already point same area
<naobsd>
did you check both offset?
<naobsd>
if my memory is correct, SD tool refers partition in parameter
<naobsd>
^to make fat32 partition, which stores update.img for "restore" SD card, which stores user data for "boot" SD
<naobsd>
I remembered I wrote memo about partition layout but I cannot remember where memo is...
<naobsd>
and you can check which partition is mounted by "mount" command on android
<Tony_>
it's mounted by VOLD after I checked.
<naobsd>
you can check _mounted_ partitions by "mount" command
<naobsd>
I cannot remember, thare is better way to get what is vold/31:9...
<Tony_>
Actually, there is no /dev/mtdb* , there is /dev/mtd/mtd9.
<naobsd>
ah, /dev/block/mtdblock9
<naobsd>
probably
<naobsd>
ls -l /dev/block/mtdblock9 /dev/block/vold/31:9
<naobsd>
grep mtd9 /proc/mtd
<Tony_>
root@android:/ # grep mtd9 /proc/mtd
<Tony_>
mtd9: 345180000 00004000 "user"
<Tony_>
root@android:/ #
<Tony_>
you are right again.
<Tony_>
I guess.
<naobsd>
you can check offset both fat32 partition and "user" partition
<naobsd>
user + 0x2000 == fat32
<naobsd>
size should be same
wildea01 has joined #linux-rockchip
<Tony_>
I got what you mean, but I don't know how to do this.
<Tony_>
my parameter:mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00020000@0x00020000(backup),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),-@0x00382000(user)
dlezcano has quit [Ping timeout: 256 seconds]
<naobsd>
you can see partition table by fdisk command on PC linux
dlezcano has joined #linux-rockchip
<naobsd>
(or non "SD boot with rknand.ko" system)
<Tony_>
sudo fdisk -l /dev/sdb
<Tony_>
Disk /dev/sdb: 15.9 GB, 15931539456 bytes
<Tony_>
255 heads, 63 sectors/track, 1936 cylinders, total 31116288 sectors
<rperier>
"Rockchip RK3188 TRM" (I just found this on the web)
<rperier>
I mean, I know that RK30xx TRM and RK3288 datasheet was available, but I did not know that it was the case for RK3188 :)
<Tony__>
I'm here, May I help you ?
<Tony__>
rperier
naobsd has joined #linux-rockchip
<rperier>
for what ? I was just saying that I did not know that technical reference manual is publically available for rk3188
<rperier>
I have just discovered it earlier
<naobsd>
Tony__: logical sector 0 is placed at physical sector 0x2000 on SD/eMMC
<naobsd>
someone decided/implemented
<Tony__>
naobsd, could you give me the wikimedia url.
<Tony__>
about you said.
<naobsd>
Tony__: sorry... I said what?
<Tony__>
naobsd, "logical sector 0 is placed at physical sector 0x2000 on SD/eMMC"
<naobsd>
Tony__: why you need wikimedia url?
<Tony__>
I want to know the detail.
<naobsd>
<naobsd> someone decided/implemented
<Tony__>
Isn't that not a common rule ?
<Tony__>
Isn't that a common rule ?
<naobsd>
what is common? RK does it on rk3188/rk3288, is it common?
<naobsd>
we can see parameter at 0x2000 sector (4MiB)
<naobsd>
we know logical 0 is physical 0x2000
<naobsd>
that's all
<naobsd>
we know -> we can understand
<RaYmAn>
isn't that just due to the boot "partitions" on eMMC? e.g. usually mmcblk0boot0/boot1 - usually they are 2MiB each (though, bigger on larger flash chips) (I say partitions because they are eMMC partitions that aren't actual partitions in the sense of a partition table)
hramrach_ has quit [Write error: Connection reset by peer]
hramrach_ has joined #linux-rockchip
<naobsd>
possibly
<naobsd>
anyway, it needs some space to store loader etc, logical partitions need to have offset
<Tony__>
okay, I noted.
<naobsd>
RK proprietary loader uses 0x2000. I don't know it's common or not,
<naobsd>
sleepy
<Tony__>
the loader is in (3686400)0x384000 ?
<Tony__>
no, no, no. maybe I should read what you said again and again.