mnemoc changed the topic of #linux-sunxi to: Allwinner/sunxi development discussion - did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait! - https://github.com/linux-sunxi/ - Logs at http://irclog.whitequark.org/linux-sunxi
FreezingCold has joined #linux-sunxi
mcscruff has joined #linux-sunxi
viccuad has joined #linux-sunxi
deasy has joined #linux-sunxi
<Turl> ssvb: dunno, I'm not a mod :)
<mcscruff> Happy New Year All
<Turl> happy new year!
<Turl> I'm still in 2014 :P
<mcscruff> im not :)
<ssvb> Turl: do you happen to know who is a mod? ;-)
<ssvb> indeed, happy new year!
<ssvb> mcscruff: it looks like your patch did not reach the mailing list, so I wonder if it maybe awaits moderation for some reason
<ssvb> mcscruff: btw, can you try this android program on your tablet? http://www.androiddevice.info
leviathanch2 has joined #linux-sunxi
<ssvb> mcscruff: http://www.androiddevice.info/devices?search=bs1078 shows some results, and some of them seem to reveal the manufacturer name
<ssvb> mcscruff: appears that it can extract a bit more information than is shown in the 'about device' tab
FreezingCold has quit [Ping timeout: 240 seconds]
<mcscruff> i will do
viccuad has quit [Read error: Connection reset by peer]
<mcscruff> ssvb: someone already submitted
<ssvb> mcscruff: this shows "ro_product_brand = YonesToptech"
<mcscruff> which is what we said last night
<mcscruff> i will do one once my tablet has charged
<ssvb> but wait, that page does not list the 20140919 date anywhere
<ssvb> nothing like "fiber_bs1078-eng 4.4.2 PATCH420ODT0 20140919" that you got
<mcscruff> i just sent mine
<ssvb> ok, thanks!
<Turl> ssvb: mnemoc for sure, libv and oliv3r maybe?
<Turl> :)
<mcscruff> YonesToptech/fiber_bs1078/fiber-bs1078:4.4.2/KOT49H/20140910:eng/
Froolad has joined #linux-sunxi
<ssvb> mcscruff: can you re-send the fex patch to my e-mail address "siarhei.siamashka dot gmail.com"?
mmarker has quit [Remote host closed the connection]
Froolap has quit [Ping timeout: 255 seconds]
<mcscruff> sent
mmarker has joined #linux-sunxi
Froolad has quit [Ping timeout: 256 seconds]
ninolein has quit [Ping timeout: 265 seconds]
ninolein_ has joined #linux-sunxi
weissschloss has quit [Remote host closed the connection]
<ssvb> mcscruff: thanks, got it and pushed to sunxi-boards
<mcscruff> sweet
<ssvb> if you have a hdmi cable to connect a monitor and usb keyboard, maybe you could test some preliminary u-boot patch?
<mcscruff> yes, if it can wait till morning, you can email it to me if you want
<ssvb> ok, that's fine :)
<mcscruff> when i get u-boot, do i put it on sd card and report what i see
<mcscruff> or is there a wy to logcat it
weissschloss has joined #linux-sunxi
<ssvb> the new mainline u-boot supports video output on hdmi and also usb keyboard for input, so if it works fine, then you should get u-boot command prompt where you can type commands
<mcscruff> from there we get a kernel and debian
<ssvb> well, the kernel would be the next step, because it needs a dtb file
<ssvb> but after it is done, debian should probably work fine
<mcscruff> sweet
<mcscruff> im off to bed
<mcscruff> i will check in tomorrow
<oliv3r> i dunno if i am
deasy has quit [Quit: Nom d'un quark, c'est Edmonton !]
<oliv3r> but mnemoc and libv for sure
<oliv3r> who knows more then me about sunxi gpio's?
<oliv3r> we implement them using gpiolib and the pinctrl stuff, right?
Froolap has joined #linux-sunxi
<oliv3r> that's why i can't find binding docs for gpio's, but we use the devicetree stuff to 'use' gpios however, right? so i can define a gpio in a node, and the gpiolib uses the pinctrl to get and manage my gpio?
<oliv3r> meh bed time for now
<oliv3r> :)
mcscruff has quit [Ping timeout: 255 seconds]
egbert has quit [Disconnected by services]
egbert has joined #linux-sunxi
<wens> Turl: thanks, i already got them :p
mcscruff has joined #linux-sunxi
FDCX has quit [Ping timeout: 265 seconds]
leviathanch2 has quit [Ping timeout: 272 seconds]
Faisal has joined #linux-sunxi
popolon has quit [Quit: WeeChat 1.0.1]
mmarker has quit [Remote host closed the connection]
zombu2 has quit [Ping timeout: 252 seconds]
zombu2 has joined #linux-sunxi
leviathanch2 has joined #linux-sunxi
mmarker has joined #linux-sunxi
mmarker has quit [Ping timeout: 244 seconds]
TheSeven has quit [Ping timeout: 272 seconds]
TheSeven has joined #linux-sunxi
quitte has quit [Ping timeout: 256 seconds]
mmarker has joined #linux-sunxi
mmarker has quit [Read error: Connection reset by peer]
mrcan__ has joined #linux-sunxi
akaizen_ has joined #linux-sunxi
petr has joined #linux-sunxi
mcscruff_ has joined #linux-sunxi
mrcan_ has quit [Ping timeout: 264 seconds]
akaizen has quit [Ping timeout: 264 seconds]
mcscruff has quit [Ping timeout: 264 seconds]
petr_ has quit [Ping timeout: 264 seconds]
hipboi_ has joined #linux-sunxi
hipboi has quit [Ping timeout: 255 seconds]
FreezingCold has joined #linux-sunxi
zombu2 has quit [Ping timeout: 255 seconds]
Froolap has quit [Quit: KVIrc 4.0.2 Insomnia http://www.kvirc.net/]
Froolap has joined #linux-sunxi
leilei has joined #linux-sunxi
leilei has quit [Ping timeout: 244 seconds]
leilei has joined #linux-sunxi
mcscruff_ has quit [Ping timeout: 256 seconds]
viccuad has joined #linux-sunxi
FDCX has joined #linux-sunxi
viccuad has quit [Read error: Connection reset by peer]
Faisal has quit [Read error: Connection reset by peer]
tomboy65 has quit [Remote host closed the connection]
tomboy65 has joined #linux-sunxi
plaes_ has quit [Quit: Reconnecting]
plaes has joined #linux-sunxi
<mnemoc> happy 2015
JohnDoe_71Rus has joined #linux-sunxi
leilei has quit [Ping timeout: 255 seconds]
FreezingCold has quit [Ping timeout: 265 seconds]
FreezingCold has joined #linux-sunxi
leilei has joined #linux-sunxi
<premoboss> hi al
<premoboss> hi all
paulk-collins has joined #linux-sunxi
vpeter has joined #linux-sunxi
Netlynx has joined #linux-sunxi
Netlynx has quit [Changing host]
Netlynx has joined #linux-sunxi
paulk-collins has quit [Ping timeout: 244 seconds]
quitte has joined #linux-sunxi
hipboi_ has quit [Read error: Connection timed out]
JohnDoe_71Rus has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
hipboi_ has joined #linux-sunxi
<arete74> happy 2015
bonbons has joined #linux-sunxi
deasy has joined #linux-sunxi
FreezingCold has quit [Ping timeout: 265 seconds]
<gzamboni_> Happy 2015 :)
jinzo has joined #linux-sunxi
viccuad has joined #linux-sunxi
mmarker has joined #linux-sunxi
mmarker has quit [Read error: Connection reset by peer]
mmarker has joined #linux-sunxi
tomboy65 has quit [Ping timeout: 250 seconds]
mcscruff_ has joined #linux-sunxi
xeros has quit [Remote host closed the connection]
mmarker has quit [Read error: Connection reset by peer]
setkeh has joined #linux-sunxi
mmarker has joined #linux-sunxi
mmarker has quit [Changing host]
mmarker has joined #linux-sunxi
konradoo77 has joined #linux-sunxi
popolon has joined #linux-sunxi
leilei has quit [Ping timeout: 240 seconds]
leilei has joined #linux-sunxi
konradoo87 has joined #linux-sunxi
konradoo77 has quit [Ping timeout: 264 seconds]
xeros has joined #linux-sunxi
bengal has joined #linux-sunxi
mcscruff_ has quit [Ping timeout: 256 seconds]
Black_Horseman has joined #linux-sunxi
Black_Horseman has quit [Changing host]
Black_Horseman has joined #linux-sunxi
viccuad has quit [Read error: Connection reset by peer]
interrobangd has joined #linux-sunxi
leilei has quit [Remote host closed the connection]
hramrach_ has joined #linux-sunxi
konradoo77 has joined #linux-sunxi
konradoo87 has quit [Ping timeout: 250 seconds]
yajnab has joined #linux-sunxi
yajnab has quit [Ping timeout: 246 seconds]
bengal has quit [Quit: Leaving]
hramrach_ has quit [Quit: WeeChat 0.4.3]
Black_Horseman has quit [Remote host closed the connection]
tomboy65 has joined #linux-sunxi
yajnab has joined #linux-sunxi
<yajnab> hi
<yajnab> Finally got VGA images to boot
<yajnab> but the problem is
<premoboss> is?
yajnab_ has joined #linux-sunxi
<yajnab_> all images gets shut down after sometume
<yajnab_> *sometime
<yajnab_> maximum 25 sec with a long dmesg
<yajnab_> most of time readahead failures
<yajnab_> or ext4 failures
<premoboss> check clock is not to much high otherwhise it make A20 freeze/reboot
<yajnab_> same with the SD card things too
<yajnab_> its okay with the FEL recovery system
yajnab has quit [Ping timeout: 246 seconds]
<yajnab_> premo how can I adjust the clock when its self rebotting
<yajnab_> its impossible
<premoboss> wait.
<premoboss> do u use OS on uSD or on nand?
<premoboss> is the soc hot or warm?
<yajnab_> NAND
<yajnab_> uSD both
<yajnab_> both gave same result
<yajnab_> I think I need to switch to HDMI
<yajnab_> SoC is okey
<premoboss> mmm
<premoboss> strange
<yajnab_> I think I have some problem with my cubie
<premoboss> try to user a cubian headless (so no matter about the monitor type) and try to use it only from remote via ssh.
<yajnab_> wait
<yajnab_> same result
<yajnab_> android is flashed on it
yajnab has joined #linux-sunxi
konradoo87 has joined #linux-sunxi
yajnab_ has quit [Ping timeout: 246 seconds]
konradoo77 has quit [Ping timeout: 255 seconds]
<Turl> check your power supply, and if you are using nand make sure you power off normally, do not pull the plug or it may corrupt the nand contents
hramrach has joined #linux-sunxi
yajnab has quit [Ping timeout: 246 seconds]
<premoboss> Turl is right. nand is sensitive to umplug. is some case it can be damage permanently and never boot again even if re-flashed.
FDCX has quit [Ping timeout: 256 seconds]
<hramrach> nand is just junk, especially the stuff on the Chinese boards :/
<premoboss> hramrach, yes. but nand is quite usable IF right managed. unfortunately sometime it is impossibel to reboot without do dirty unplug
paulk-collins has joined #linux-sunxi
vpeter has quit [Remote host closed the connection]
interrobangd_ has joined #linux-sunxi
interrobangd has quit [Ping timeout: 244 seconds]
beboom has quit [Remote host closed the connection]
chil has quit [Ping timeout: 256 seconds]
vpeter has joined #linux-sunxi
konradoo77 has joined #linux-sunxi
chil has joined #linux-sunxi
konradoo87 has quit [Ping timeout: 264 seconds]
deasy has quit [Quit: Nom d'un quark, c'est Edmonton !]
afaerber_ has joined #linux-sunxi
afaerber has quit [Ping timeout: 244 seconds]
deasy has joined #linux-sunxi
jemk has quit [Remote host closed the connection]
<hramrach> ok, so I have created an ubi volume
<hramrach> what use is it?
paulk-collins has quit [Quit: Quitte]
<hramrach> you can presumably flash a squashfs image to it or glue a jffs2 filesystem on top of it neither of which seems to be particularly recommended
<hramrach> ok, I am missing an ubifs module I guess
konradoo77 has quit [Ping timeout: 240 seconds]
konradoo77 has joined #linux-sunxi
interrobangd_ has quit [Ping timeout: 244 seconds]
yajnab has joined #linux-sunxi
<yajnab> Well that was caused by a faulty power supply
<yajnab> how to flash a kernel to cubietruck
<hramrach> if your CT does not boot then the simplest ways would be 1) reflash 2) use a SD card to boot
<hramrach> 1) reflash completely
<hramrach> if it does boot you just copy it to nanda
<yajnab> Direct flash to NAND?
<yajnab> Allwinner has bad flashing system
<hramrach> yes, using the allwinner tools flash a whole working image if what you have is no longer working
<yajnab> okey
<yajnab> btw do u own a cubietruck
<yajnab> ?
<hramrach> yes, I do
<hramrach> but I boot from SD card
<hramrach> more reliable
<hramrach> and when it crashes anyway I can easily remove it and fix offline in a PC
<hramrach> and extract any data I might want
<yajnab> How do u flash a file
<yajnab> I think my cubietruck is strange
<yajnab> if i hold down fel button and connect to OTG device not detected
<yajnab> if i plug in the power adapter
<yajnab> then turn off keeping the power connected
<yajnab> then pressn FEL and putting in the OTG
<yajnab> the device is detected
<yajnab> is it strange
<yajnab> or its okey?
<yajnab> @hramrach
jemk has joined #linux-sunxi
<hramrach> does it power on when you connect it to OTG without the power adapter?
<hramrach> I always use an external adapter so I would not know
konradoo77 has quit [Ping timeout: 244 seconds]
<hramrach> so long as you manage to enter FEL one way I would not worry too much about it
konradoo77 has joined #linux-sunxi
<yajnab> if I connect OTG device wont starts up
<yajnab> power adapter needs to be connected
JohnDoe_71Rus has joined #linux-sunxi
vpeter has quit [Remote host closed the connection]
FreezingCold has joined #linux-sunxi
yajnab has quit [Quit: Page closed]
heffer has quit [Remote host closed the connection]
heffer has joined #linux-sunxi
domidumont has joined #linux-sunxi
JohnDoe_71Rus has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<hramrach> bbrezill1: any idea why the kernel would never find the bbt?
<hramrach> it seems it writes it but on boot it does not find any
vpeter has joined #linux-sunxi
beboom has joined #linux-sunxi
<bbrezill1> hramrach: what version are you trying ?
<hramrach> v7 with extra patches to work on cubieboard
<hramrach> is there newer one?
<bbrezill1> nope
<hramrach> I added extra debug prints and it seems it searches for the bbt on the same place it wrote it
<bbrezill1> it should work (I tested it on a cubeitruck with an on flash bbt)
akaizen_ is now known as akaizen
Andy-D has quit [Ping timeout: 245 seconds]
<hramrach> yeah, should work
<hramrach> maybe I broke something with my changes but don't see anything obvious
<bbrezill1> hramrach: can you add more traces in the bbt code to identify what's failing ?
<hramrach> it's all happy but never finds a bbt :s
<bbrezill1> hramrach: did it ever work on your board (I mean did you test it before) ?
<hramrach> I never had a bbt before
<bbrezill1> can you try to enable the on flash BBT, then reboot without on-flash-bbt and dump the last 2 blocks ?
<bbrezill1> is the bootloader accessing the NAND ?
<hramrach> it should not
<hramrach> I use u-boot on mmc. no nand driver
<hramrach> old u-boot-sunxi
<bbrezill1> yep, then there's little chance that this corruption come from the bootloader step
<hramrach> well, current state is bbt enabled
<hramrach> and it says it has just written it
<bbrezill1> yep, but you cannot dump the bbt when it's enabled, cause these blocks are not exported in mtd partitions
<hramrach> so presumably if I copy a DT without bbt enabled I can read it
<bbrezill1> this is why I need you to remove the on-flash-bbt property from your DT
lurkon has joined #linux-sunxi
<bbrezill1> yep you'll be able to dump the last 2 blocks of your last mtd part
<bbrezill1> and then we'll be able to check their content, and see if they look like a BBT...
lurkon has quit [Client Quit]
Stamehad has joined #linux-sunxi
<hramrach> can this be more specific? Hardware: Allwinner A1X (Device Tree)
<Stamehad> Hi! On this thread: http://irclog.whitequark.org/linux-sunxi/2013-11-03 there is a link to a doc that no longer exists: http://community.arm.com/servlet/JiveServlet/downloadBody/7404-102-1-10812/Whitepaper-EGLImage.pdf . Does anyone have a copy?
<hramrach> but I guess it distinguishes cb1 and cb2 all right so good enough
<bbrezill1> hramrach: I don't get it
<hramrach> I was trying to check which board I am on
<hramrach> ok, so now I have no bbt set up
<bbrezill1> hramrach: hm, cb2 is using an A20 not an A10
<hramrach> yes, so A1X is good enough in this case
<hramrach> so how do I read the data?
konradoo77 has quit [Ping timeout: 244 seconds]
<bbrezill1> what's your partitions layout ?
konradoo77 has joined #linux-sunxi
<bbrezill1> just use nanddump -o /tmp/bbt-dump -s <bbt-offset> -l <nand-block-size> /dev/mtdX
bengal has joined #linux-sunxi
<hramrach> nanddump -o -s 0x0000fff00000 -l 0x200000 /dev/mtd2 > bbt
<hramrach> gives empty file
<hramrach> my partition layout is same as cb2 in the v7
<hramrach> just copied it from some other DT file with nand
<bbrezill1> then you have to subtract the 0x200000 to your offset (because mtd2 starts at 0x200000)
<bbrezill1> I meant 0x400000 not 0x200000
<hramrach> ok
<bbrezill1> are you sure this is the same NAND (with the same block size) ?
<hramrach> actually cb1 and cb2 seem to have same nand
<bbrezill1> ok
<hramrach> but the nand is detected by nand id so this should not be a problem, should it?
<bbrezill1> nope, except that those partitions were defined with a specific NAND in mind
<bbrezill1> but as long as the NAND is the similar (same size and block size) it should be fine
<hramrach> so they might not be accurate for boot0 but the main part should still be usable
<hramrach> unless the boot0 comes out so small it is not block aligned
<bbrezill1> yep
<hramrach> obviously this layout was never tested with this nand since the ID is missing from the table
domidumont has quit [Ping timeout: 246 seconds]
<hramrach> this is the chip
<hramrach> maybe should double-check that the page size matches the sunxi code
<hramrach> yes, it appears to be the same
<hramrach> hmm, this appears reasonable
<hramrach> boot0 and boot0rescue 2M each
<hramrach> so 2 eraseblocks
<hramrach> and 4G flash
<hramrach> nanddump gives errors now http://sprunge.us/HMGQ
<hramrach> should I upload the bbts somewhere?
<hramrach> they look like garbage
<hramrach> so I have 4096 EBs - 2 boot0, 2 boot0rescue, 4092 main
<hramrach> but why is the driver even searching the bbt on non-existent offset?
<hramrach> that sounds fishy
<hramrach> if the bbt is for partition then the offset should not be so high
<hramrach> if not how do the other partitions get the bbt
konradoo87 has joined #linux-sunxi
konradoo77 has quit [Ping timeout: 244 seconds]
bengal has quit [Remote host closed the connection]
interrobangd has joined #linux-sunxi
<hramrach> bbrezill1: there does not seem to be a verification pass and the bbt area has bit errors
<hramrach> but not all blocks may be written or the ecc pattern not honored for the bbt
<hramrach> removing the partitioning does not help
<hramrach> bbt is still not recognized after reboot
tomcheng76 has quit [Read error: Connection reset by peer]
<bbrezill1> hramrach: try to dump it with -n
tomcheng76 has joined #linux-sunxi
<hramrach> yes, either dumps some garbage
<bbrezill1> remove the randomize-seeds property in your main partition
<hramrach> ok
F1skr has joined #linux-sunxi
<bbrezill1> hramrach: bbt is not per partition, it's per chip
<bbrezill1> and the offset you're seeing in your kernel NAND is the NAND offset not the partition offset
<hramrach> ok, it's out of the partition when bbt is used
<bbrezill1> yep
<hramrach> now that piece does look like a table
<bbrezill1> absolutely => Bbt0 and tbB1 (the mirror)
Faisal has joined #linux-sunxi
<hramrach> that should be empty table since I disabled bad block scan
<hramrach> but when I re-enable on-chip bbt it's not recognized
Faisal has quit [Client Quit]
Faisal has joined #linux-sunxi
<bbrezill1> then you'll have to add traces (in nand_bbt.c) to figure out why it's not a valid bbt
<bbrezill1> how did you disable BB scan ?
Netlynx has quit [Quit: Leaving]
bonbons has quit [Quit: Leaving]
<bbrezill1> hramrach: what nanddump version are you using (nanddump --version) ?
<hramrach> nanddump 1.5.1
<bbrezill1> okay, I wonder why OOB read fails...
<hramrach> do we have NAND_BBT_NO_OOB ?
<bbrezill1> yes we do
<bbrezill1> can we drop the -n option ?
<hramrach> probably but then we get ecc correction
<hramrach> which will probably introduce errors
<hramrach> with ecc whole bbt is full 0xff
<bbrezill1> it should not
<ssvb> wens: is the a23 reference schematics downloadable as a pdf file? It's just too difficult to read http://wenku.baidu.com/view/dedb8bbd4693daef5ef73dba.html?re=view
<bbrezill1> AFAIR, the BBT is not written in raw mode
mcan has joined #linux-sunxi
<bbrezill1> hramrach: can you revert your NAND_INVALID_BBM changes ?
<ssvb> wens: oh, nevermind, found it here - https://dl.linux-sunxi.org/users/gzamboni/a23_tablet_std_v2_0.pdf :)
<hramrach> I can but then I get all blocks invalid
<hramrach> and mtd fails to initialize because there is not enough room to store bbt
<hramrach> now with a few blocks erased it would work maybe, heh
<hramrach> but will take forever to scan the flash so not much use for testing, anyway
<bbrezill1> if you want to fix that, just apply this patch
<bbrezill1> boot your new kernel
<bbrezill1> erase all your partitions
<bbrezill1> then revert the patc
<bbrezill1> all your BBs should be gne
<bbrezill1> gone
mrcan__ has quit [Quit: pai]
<hramrach> no. it still needs changing the kernel so it does not puke on all blocks bad and gives you a mtd you can erase
<hramrach> hm, or the dt to not require a bbt which I have atm
<hramrach> but the point is to have this working with AW formatted nand
<bbrezill1> hramrach: actually my patch authorize erasure of a BB
<hramrach> yes
<hramrach> but with the DT config we have
<hramrach> we need room for bbt
bengal has joined #linux-sunxi
<hramrach> and with all blocks bad there is none
konradoo87 has quit [Ping timeout: 240 seconds]
<bbrezill1> just forget the BBT for now
<hramrach> so mtd init fails
<bbrezill1> drop the on-flash-bbt
<hramrach> yes, that should work
<hramrach> ok, I can later break the flash again by flashing some AW image
<bbrezill1> you're trying to develop a tool to move from an AW layout to a standard one ?
<hramrach> imo NAND_INVALID_BBM is enough
<hramrach> may need some tidying up but it's pretty harmless
<hramrach> so long as you have on-chip bbt it's used
<hramrach> when not the flash content is ignored
<hramrach> but my on-chip bbt fails to read
<bbrezill1> but what's your goal, keep some of the existing AW partitions ?
<bbrezill1> I don't see how you can keep both
<hramrach> boot0 and boot0rescue if possible
ninolein has joined #linux-sunxi
<hramrach> my goal is to take AW flashed tablet, boot mainline kernel on it, do some ubi-foo and untar my system on it
akaizen_ has joined #linux-sunxi
Stamehad has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<hramrach> which means I will have to update boot0 with something new, probably
<hramrach> but I want to avoid booting 3 different kernels in sucession to achieve that
leio_ has joined #linux-sunxi
mozzwald_ has joined #linux-sunxi
jelly-ho- has joined #linux-sunxi
gaby has joined #linux-sunxi
<bbrezill1> you'll need at least 2, because in the first one you disable the BB scan, thus you cannot write a reliable BBT
<hramrach> no.
<hramrach> disabling bb scan does not affect reliability of bbt
<bbrezill1> moreover your BBT table might corrupt your AW partition (since it is written on the last 2 blocks which might be used by the system)
<hramrach> because bb scan only looks for bb markers which are bogus anyway
<hramrach> no loss whatsoever
<bbrezill1> of course it does, how would you know if a block is good or bad
<hramrach> I only want boot0 preserved
<hramrach> you don't
<bbrezill1> you're just creating a BBT table assuming all blocks are good on your NAND
<bbrezill1> which is broken
konradoo77 has joined #linux-sunxi
6A4AAXIHM has joined #linux-sunxi
mozzwald has quit [Ping timeout: 256 seconds]
bengal has quit [Ping timeout: 256 seconds]
akaizen has quit [Ping timeout: 256 seconds]
leio has quit [Ping timeout: 256 seconds]
jelly-home has quit [Excess Flood]
gaby_ has quit [Ping timeout: 256 seconds]
6A4AAXIHM has quit [Ping timeout: 256 seconds]
deasy_ has joined #linux-sunxi
ninolein_ has quit [Ping timeout: 264 seconds]
deasy has quit [Ping timeout: 264 seconds]
<hramrach> that's as good as you get on misformatted nand
<bbrezill1> because the same table will be read on following boots and even bad blocks will be considered as good until someone tries to erase them
<hramrach> yes, totally
<hramrach> but the 'bad block scan' only checks the markers afair
<hramrach> so in absence of markers you know nothing
bengal has joined #linux-sunxi
<bbrezill1> yes, I don't pretend this can work with a single boot either :-)
<hramrach> you can, of course, do an erase pass as part of the ubi-foo
<hramrach> if that's going to help discovering the bad blocks or whatever
<hramrach> why it cannot work in single boot?
<hramrach> if you need 3 different kernels just to write to nand *that* is broken
<bbrezill1> 2 different kernel is enough
jelly-ho- has quit [Quit: ""]
<hramrach> but why 2 kernels? on a PC you can format a disk with the same kernel you boot with every day
<bbrezill1> and I'm not saying your solution does not work, just saying you should not create the BBT the first time you boot
<hramrach> why?
jelly-home has joined #linux-sunxi
<hramrach> if you create empty bbt and then erase are the bbs not written to it after the fact?
<bbrezill1> indeed, it should work, but then you'll end up updating this BBT several times
<hramrach> ok, maybe it would be nicer rather than writing an empty bbt to create empty bbt in memory and refuse to do anything but erase on the mtd
<hramrach> ok but returning to the bbt
<bbrezill1> yep, that sounds better
<hramrach> it seems that it's writen raw and don ecc correction on it gives empty page
<hramrach> which of course does not look like bbt
leviathanch2 has quit [Ping timeout: 250 seconds]
F1skr has quit [Quit: WeeChat 1.0.1]
<bbrezill1> when you dump with -n you get the appropriate MAGIC header, but when you dump without -n you just end up with 0xff, right ?
viccuad has joined #linux-sunxi
<hramrach> yes
<bbrezill1> is there any message informing you that ECC correction failed ?
<bbrezill1> can you read another block ?
<bbrezill1> with -o
<hramrach> it says ecc was corrected
<bbrezill1> I'm really I'm really concerned by the OOB error
<hramrach> can I like write a block using nanddump or something so that it appears correct?
<hramrach> I wrote some blocks last time I formatted ubifs but that was with randomizer on
<bbrezill1> first you have to erase it with flash_erase
jinzo has quit [Ping timeout: 255 seconds]
<bbrezill1> then you can use nandwrite
F1skr has joined #linux-sunxi
<hramrach> I am not sure I got this right: http://sprunge.us/HGKj
<hramrach> bbrezill1: data is garbage until offset 0x00002280 but I think I have randomizer off
<bbrezill1> hramrach: try to apply this patch, this should fix the OOB error you're seeing
fr4z has quit [Remote host closed the connection]
<bbrezill1> can you try with flash_erase and nandwrite and dump the block after the erase and after the write
<hramrach> the mtd_debug read gives the correct data
<hramrach> so it's scrambled by mtd
Stamehad has joined #linux-sunxi
<hramrach> presumably
gaby has quit [Ping timeout: 244 seconds]
konradoo87 has joined #linux-sunxi
<hramrach> hmm, or the block is bad and data is cached :S
Stamehad has quit [Client Quit]
konradoo77 has quit [Ping timeout: 265 seconds]
<hramrach> bbrezill1: which patch?
<bbrezill1> can you erase the whole partition and dump one block
<bbrezill1> if it's not filled with 0xff, then there's probably an issue with the randomizer/scrambler
<bbrezill1> flash_erase /dev/mtd2 0 0
<hramrach> I erased 2 random blocks with mtd_debug
<hramrach> and dumping them givesd garbage until 0x00002280 (with oob)
<hramrach> and 0xff afterwards
<bbrezill1> you mean only erased (not write), and it's not filled with 0xff ?
<bbrezill1> if that's the case, please try flash_erase in place of mtd_debug
<hramrach> yes, with flash_erase it's all 0xff
<bbrezill1> and use nandwrite to write on it
<hramrach> yes, nandwrite can write on it
<hramrach> but seems nand* and mtd_debug cannot agree on content of start of page
<hramrach> now that I wrote with nandwrite mtd_debug gives garbage
<hramrach> so I am quite positive there is some sort of scrambling
konradoo87 has quit [Ping timeout: 244 seconds]
<hramrach> bbrezill1: it says the patch is corrupted :/
bengal has quit [Ping timeout: 265 seconds]
<bbrezill1> use git apply, not git am
<bbrezill1> can you launch mtd_debug info /dev/mtd2
<bbrezill1> ?
<hramrach> I used
<hramrach> noeol
<hramrach> applies with plain patch
<hramrach> but not git
<hramrach> maybe bulix strips last newline
<bbrezill1> okay, so 'mtd_debug erase /dev/mtd2 16777216 1048576' and 'flash_erase /dev/mtd2 16 1' do not erase the same page ? That's really weird
<hramrach> does flash_erase count offset in pages?
<bbrezill1> no, you can only erase blocks
<hramrach> it seems it counts in bytes like everything else
<hramrach> yes, length is in blocks
<hramrach> and yes, they seem to erase the same page
<hramrach> but the content at start appears different
<hramrach> if you use same tool to read back the erased page it's empty
<bbrezill1> oops, sorry, flash_erase /dev/mtd2 16777216 1
Black_Horseman has joined #linux-sunxi
deasy_ has quit [Quit: Nom d'un quark, c'est Edmonton !]
<hramrach> but if you use different tool it's garbage
<bbrezill1> the only difference I see is that flash_erase supports MEMERASE64 ioctl
<hramrach> ok, applied the patch and now there is no oob error:
<bbrezill1> shouldn't solve the BBT issue though :-)
<bbrezill1> and if you remove the -n option you still get 0xff ?
<hramrach> yes
<hramrach> but if the oob was written to a different page
<hramrach> and the bbt has so few bits programmed it is corrected by ecc
<hramrach> that's understandable
<bbrezill1> why would it be programmed to a different page ?
<bbrezill1> and yes, it seems that the generated ECC bytes are those of an empty page (filled with 0xff)
<hramrach> why would you get error if oob was done correctly?
<bbrezill1> I mean what makes you think this is caused by a swap between to OOB areas ?
<hramrach> I don't really know what layer that patch changed
<hramrach> but before the patch there was no oob available
<bbrezill1> they were available
<bbrezill1> just not from user space
<hramrach> actually, if it was not written correctly it would likely be 0xff
<hramrach> so it must be written and wrong
<bbrezill1> yep, and since it corrects a lot of bits to change all the data in 0xff I'd say it was generated for an empty page
<bbrezill1> can you dump the block without -o and with -n
<hramrach> well, that's what we got previously when the oob was unavailable
<bbrezill1> then erase the block + write the data you just dumped ?
<bbrezill1> I mean in binary format so that we can format the same content
<bbrezill1> then erase this block and write bbt2n on it (with nandwrite)
<bbrezill1> and eventually dump it again without -n