<codekipper>
I think wens used this on his hummingboard, however it's mainline
<codekipper>
I've made a build of the sdk which i could share...I've never tested it though...everytime I insert my serial connection on my Mele I7 it refuses to boot
<mripard>
codekipper: don't use that SD image on any board but the colombus one.
leviathanch2 has quit [Ping timeout: 265 seconds]
<codekipper>
mripard: was expecting that response....
<codekipper>
I couldn't decontruct it using imgrepacker...how did you put it together?
<mripard>
I didn't
<mripard>
I just got a binary image iirc
<codekipper>
I think wens ran it successfully on his board.
<codekipper>
I know you were worried about axp setup
<mripard>
yeah, I just happen to work
<codekipper>
topi`: use at your own risk
<mripard>
it doesn't mean that you won't fry your board using it.
<topi`>
question about the Allwinner A31 SDK... does it work? I mean, does it produce a working kernel :)
<topi`>
the kernel is old, but I successfully compiled it and that can be used as a starting point towards a usable system
<topi`>
our aim is to eventually support Xen virtualization on the Merrii A31 board (we'll see how well that goes)
philippe_fouquet has quit [Remote host closed the connection]
<mripard>
then don't use allwinner's sdk.
<mripard>
it doesn't support any kind of virtualization
philippe_fouquet has joined #linux-sunxi
<topi`>
eventually I would go and try the 3.17 mainline kernel, it has some A31 support
ninolein has quit [Ping timeout: 244 seconds]
<topi`>
supposedly the SDK supplied 2011/09 UBOOT is new enough to be able to load 3.17 kernels?
ninolein has joined #linux-sunxi
<mripard>
it doesn't have DT support, but it can boot a new kernel
philippe_fouquet has quit [Read error: No route to host]
<topi`>
what is DT?
<mripard>
device tree
<topi`>
isn't that a major bummer?
<topi`>
the DT is used to configuring pretty much every arm device at boot time
<mripard>
no, there's some support in the kernel to workaround old bootloaders
<topi`>
oh...
<mripard>
you just have to append the DT image to the kernel image, and that's it
<mripard>
this is what we do to work on the A31
<topi`>
hehe, sounds...hacky
tomboy65 has quit [Ping timeout: 246 seconds]
<mripard>
well, it's a workaround
<topi`>
I have this file: boot0_sdcard_sun6i.bin
<topi`>
I tried to put that (at offset 8k) to a SD card but it doesn't seem to work
<topi`>
is it the correct file anyways?
<topi`>
and what's the difference between boot0/boot1?
<mripard>
it shuold be the correct file
<mripard>
the same difference than between SPL and u-boot
<topi`>
how does the BOOT0 know where to look for the U-BOOT?
<mripard>
boot0 initialises the RAM, loads boot1, executes it
<topi`>
since you can either place u-boot at offset 32k or 40k
<topi`>
ok, so I need *both* BOOT0 and BOOT1??
<mripard>
it's boot1 that loads and execute u-boot
<mripard>
yes
<topi`>
darn
philippe_fouquet has joined #linux-sunxi
<topi`>
the Bootable_SD_Card page talks about "spl/sunxi-spl.bin", how do I make that out of boot0/boot1 files?
<topi`>
if SPL is the sum of boot0 and boot1?
<mripard>
you were told several time that this page doesn't apply in your case.
<mripard>
stop refering to it.
<topi`>
ok...
<topi`>
how do I find out the correct offsets on the SD card then?
GeertJohan has left #linux-sunxi ["bye"]
popolon has joined #linux-sunxi
sehraf has joined #linux-sunxi
<mripard>
it's 8k for boot0
<topi`>
and where should I place boot1 then?
<mripard>
I don't know, I think I looked into boot0 code last time I tried doing that
<topi`>
so, how do you boot the A31 then?
<topi`>
maybe I should scan the NAND on the board and try to find some hints from it...
<mripard>
I just use fastboot
<topi`>
oh, does fastboot work?
<mripard>
and use allwinner's bootloaders
<mripard>
yep
<topi`>
right.
<topi`>
I only have fastboot experience from a few years back, when we were hacking the Toshiba AC100
<topi`>
it was a Tegra 2 device
<mripard>
just boot the thing, use either adb or your uart
<mripard>
and type reboot bootloader
<topi`>
yeah
<mripard>
and fastboot will start at reboot
<topi`>
do you have any idea what's needed to add SPL support to linux-sunxi's U-Boot?
<mripard>
someone figuring out the memory initialization
<topi`>
then I'd need to have a JTAG debugger :)
<mripard>
and given how the A31 boot process, someone figuring out how to flash the SPL to the NAND
nicksydney has quit [Ping timeout: 244 seconds]
dantob has joined #linux-sunxi
dantob has quit [Client Quit]
Net147 has joined #linux-sunxi
astr has quit [Ping timeout: 240 seconds]
<topi`>
it seems that my Merrii A31 board boots with U-Boot, not fastboot
<topi`>
it's difficult to say from what src the binary is built
<codekipper>
according to cardscript.fex boot1 is uboot
<codekipper>
let me check the image I've created
<codekipper>
same
<topi`>
so, let's see. I flashed boot0.img to offset 8k and boot1.img offset 40k
<topi`>
I also modified the boot0 messages a little, just to see that it's my code that's executring
<topi`>
the HELLO message did not contain my customization. So it's not my code that gets executed :(
<topi`>
I would need to see the Merrii board schematics to be certain of the boot order
<topi`>
the A31 user's manual does describe the boot order, but I need to see the schema
<topi`>
it seems the source code from where the boot0 that shipped, is built, is nowhere to be found in the SDK
<topi`>
I grepped recursirvely for "Jump to secend Boot.
<topi`>
it is found in the .bin files, but nowhere in actual source code
afaerber has quit [Quit: Verlassend]
ogi has joined #linux-sunxi
afaerber has joined #linux-sunxi
ricardocrudo has joined #linux-sunxi
diego71_ has joined #linux-sunxi
diego71 has quit [Ping timeout: 240 seconds]
zumbi_ has quit [Ping timeout: 265 seconds]
gjm has quit [Ping timeout: 265 seconds]
lioka has quit [Ping timeout: 265 seconds]
alexxy has quit [Read error: Connection reset by peer]
zumbi has joined #linux-sunxi
gjm has joined #linux-sunxi
alexxy has joined #linux-sunxi
rafaelMOD has joined #linux-sunxi
FunkyPenguin has quit [Ping timeout: 244 seconds]
FunkyPenguin has joined #linux-sunxi
Black_Horseman has quit [Remote host closed the connection]
<hno>
topi`, a31 boot code is not shipped in the SDK.
<hno>
and, to boot from SD you need to hold the uboot button.
<hno>
also, the boot0.bin file needs to have correct checksum and right DRAM information for the board in question or it will fail.
<hno>
if you do not hold uboot button then the board will default to boot from NAND.
lioka has joined #linux-sunxi
<hno>
MY123, There is not much GPL violation to speak of regarding boot0.bin, or eGON version of boot1.bin. u-boot version of boot1.bin is another story..
Quarx has joined #linux-sunxi
<topi`>
hno: ok, that explains why it froze when I tried modifying the uboot0 binary.
<topi`>
need to recalc the checksum!
<hno>
topi`, there is a tool in the SDK for applying DRAM information and calculating the checksum.
<hno>
But I am not sure if it accepts input files with bad checksum.
<hno>
It doesn't freeze due to bad checksum. But you likely end up in FEL boot recovery mode (USB).
Quarx has joined #linux-sunxi
<hno>
Any boot source with bad checksum is ignored.
<topi`>
this is odd. if I write the boot0 (32KB) to the mmcblk0, with a skip=8 bs=1k, I end up with a non-detected SD card. I.e. it has no MBR partitions.
<topi`>
how can it be? AFAIK the MBR partitioning is kept on the very first sector (i.e. 512 bytes)
pwhalen has quit [Ping timeout: 256 seconds]
rafaelMOD has joined #linux-sunxi
<topi`>
hno: do you think the sun6i boot code works in the same way as sun4i wrt the checksum?
<hno>
topi`, it does.
<topi`>
ok.
<hno>
at least in principle. Haven't 100% verified that all details is the same.
<hno>
but 99.9% sure.
<topi`>
what's the length, generally?
<topi`>
on hexdump, I see it's 8000 0000
<topi`>
does that mean (in LSB byte order), 00 00 00 80 ?
<topi`>
but this is just 128 bytes?
pwhalen has joined #linux-sunxi
leviathanch2 has quit [Ping timeout: 264 seconds]
<topi`>
hno: are you the same guy who works on squid?
_massi has quit [Ping timeout: 255 seconds]
<hno>
topi`, yes.
<topi`>
hno: I've been trying to get squid working as a child proxy, but in vain :)
<topi`>
there's plenty of doc there, but I still don't get it right. Maybe I'm in the wrong type of business...
<hno>
topi`, all fields are in CPU order (LSB).
FR^2 has joined #linux-sunxi
<hno>
topi`, see never_direct and cache_peer options. But that question is better asked in #squid
<topi`>
hno: I'll do that
<topi`>
hno: is the "length" field really the length of the header, and not the whole binary blob?
<topi`>
since 0x80 bytes is just 128 bytes
<hno>
there is several length fields.
<topi`>
but your code is using that length field to see how many bytes it needs to traverse in order to calculate the checksum
<hno>
total blob. header, second header, and maybe some more.
<topi`>
maybe I'm misinterpreting the output of od -x
<topi`>
i printf()'d it and it seems it's 32K
<topi`>
so ignore my question
<topi`>
hno: what kind of A31 board do you have?
<hno>
none.
<topi`>
oh...
<topi`>
so, you work on another Axx device?
<hno>
only a10, a20, a13, a10s, a80.
<topi`>
does the a80 share some internals with the a31?
<hno>
some
<topi`>
my guess is the A31 is newer than A10 or A20
<hno>
a31 is older than a20, but different.
<topi`>
yeah the A31 seems to be the bastard child
<hno>
they all are.
<hno>
but most is known about a10, a13 and a20. They are all very similar. The others differ in key parts such as DRAM, Video and USB.
<hno>
sorry, a10s is also in that same group.
<hno>
very similar to a13.
Net147 has quit [Quit: HydraIRC -> http://www.hydrairc.com <- The professional IRC Client :D]
<topi`>
hmm, some of these .fex files seem to be just ASCII files
<topi`>
the really disappointing part about the A31 SDK is how everything lacks organisation
_massi has joined #linux-sunxi
<topi`>
sys_config.fex inside a sun6i directory is actually for evb_v12 machine, which is a A20 device...
<topi`>
sheesh
pwhalen has quit [Ping timeout: 250 seconds]
gjm has quit [Changing host]
gjm has joined #linux-sunxi
<codekipper>
topi`: the SDK that I built has evb V100 and A31 in the sys_config.fex.
<topi`>
it seems the way to build the SDK kernel is to use the build.sh script... but it uses some obsolete, unsupported switches like --min-array-alignment
<topi`>
which make my gcc 4.8 based linaro compiler die
<topi`>
codekipper: ok, then we have different SDKs
<codekipper>
but seriously good luck with this....I've started trying the merge the code into my sunxi-linux track
<topi`>
thanks for demystifying the contents of the SDK
<codekipper>
It's easier for me to merge monkey than to get on the hardware to test
pwhalen has joined #linux-sunxi
<codekipper>
yep that's definitely the SDK I used.
tomboy65 has joined #linux-sunxi
FunkyPenguin has quit [Ping timeout: 255 seconds]
FunkyPenguin has joined #linux-sunxi
FunkyPenguin has quit [Ping timeout: 264 seconds]
FunkyPenguin has joined #linux-sunxi
xavia has joined #linux-sunxi
pwhalen has quit [Ping timeout: 250 seconds]
FunkyPenguin has quit [Ping timeout: 244 seconds]
FunkyPenguin has joined #linux-sunxi
FunkyPenguin has quit [Ping timeout: 265 seconds]
FunkyPenguin has joined #linux-sunxi
pwhalen has joined #linux-sunxi
FunkyPenguin has quit [Ping timeout: 240 seconds]
HeHoPMaJIeH has quit [Quit: Konversation terminated!]
<hno>
topi`, the 6GB one includes toolchain & android. The stripped one is only base system sources & tools.
FunkyPenguin has joined #linux-sunxi
<rafaelMOD>
guys, how is uboot support on sunxi-uboot for nand boot on A20 Should i stay with lichee for nand boot or is there any sunxi uboot branch nand boot working?
philippe_fouquet has quit [Remote host closed the connection]
dack has joined #linux-sunxi
philippe_fouquet has joined #linux-sunxi
naobsd has joined #linux-sunxi
<hno>
rafaelMOD, the Allwinner NAND drivers are such a bit mess that we have no plans on merging any version of them. Have to keep some sanity.
<hno>
plus their support on the NAND controller is negative, giving out less and less information, and no longer any sources.
<ricardocrudo>
dack: I'd like to know if this tutorial will work to a core board like Marsboard A20, where the NAND flash has no data
<dack>
ricardocrudo: oh, you mean a NAND that doesn't having a working OS on it already?
<dack>
ricardocrudo: regardless, the libnand is still broken for A20 devices, so you'll only end up wrecking whatever is on the NAND (if anything)
<dack>
ricardocrudo: you'd have to use the binary blob nand driver that comes with the Allwinner SDK to actually write to the NAND
<dack>
ricardocrudo: yeah, that tutorial doesn't cover building your own boot0 partition, so you'd have to already have a bootable partition on the NAND to do what it's describing
pwhalen has joined #linux-sunxi
pwhalen has quit [Changing host]
pwhalen has joined #linux-sunxi
<ricardocrudo>
dack: I see. And how to use this blob approach?
<ricardocrudo>
dack: any doc?
<dack>
ricardocrudo: no doc.. :) The blob is the binary driver needed to simply read and write to the NAND. You'd still need the boot0 portion already on the NAND.
<dack>
ricardocrudo: the blob is to get the "/dev/nand" described in that tutorial
<dack>
ricardocrudo: basically it'll be a _LOT_ of work to get it working off NAND for you... I haven't even tried using the blob to access my NAND on my devices, so I can't help you there either.
bonbons has joined #linux-sunxi
<ricardocrudo>
dack: I can use Phoenix tool to first deploy and after that follow the tutorial, but in the mass production line this is impracticable...
pwhalen_ has joined #linux-sunxi
pwhalen has quit [Ping timeout: 250 seconds]
pwhalen_ has quit [Ping timeout: 264 seconds]
pwhalen has joined #linux-sunxi
sherpa has joined #linux-sunxi
sherpa has quit [Client Quit]
skaag has quit [Quit: Leaving.]
<dack>
ricardocrudo: hmm.. there's tools to make an image for use with Phoenix tool. You could make an image that had everything you needed and flash each device with that tool. I don't know how you make those images, though.
sherpa has joined #linux-sunxi
<dack>
ricardocrudo: what I did with cubieboard was write a script to take a zipped file system and put that on the NAND. You could make a bootable SDcard that on start up flashes a filesystem to the NAND. Again, you'd need a working driver for the NAND, though, that's not currently available in linux-sunxi
sherpa has quit [Client Quit]
<hno>
MY123, and no NAND chip on my A80 device.
FR^2 has quit [Quit: Connection reset by peer]
<hno>
MY123, there is never any clear usage licenses for RE.
Zboonet has joined #linux-sunxi
skaag has joined #linux-sunxi
<ricardocrudo>
dack: a time ago I saw something about how to create this phoenix image, not easy to understand and poor documentation
Renard has joined #linux-sunxi
<MY123>
hno: Broadcom permits that for RPi blobs 'for the purpose of using it on a Raspberry Pi device'
<ricardocrudo>
dack: can I 'dd' a u-boot working partition to NAND booting by sdcard? i.e.: flash a board using the phoenix tool copy the u-boot partition and paste it to other board booting by sdcard
<hno>
MY123, they permit redistribution, not re.
<hno>
but Allwinner have very vague notion of licensing...
bertrik has joined #linux-sunxi
leviathanch2 has quit [Ping timeout: 245 seconds]
<hno>
ricardocrudo, yes, if the nand FTL driver (Allwinner nand_sunxi) used in the kernel is compatible with boot0 that is installed in the nand boot blocks.
<hno>
and you create a Allwinner NAND partition table etc as required by the version of boot0 installed in the nand boot blocks.
<hno>
and you have a suitable boot1 that is compatible with the kernel driver.
<hno>
we do have full sources of some A20 allwinner nand driver btw.
<hno>
dack ^
skaag has quit [Quit: Leaving.]
hramrach_ has quit [Ping timeout: 246 seconds]
tomboy65 has quit [Ping timeout: 246 seconds]
afaerber has quit [Quit: Verlassend]
<dack>
ricardocrudo: you can't 'dd' to the nand until you have a working driver so you'll see a /dev/nand device
<dack>
ricardocrudo: but, yes, if you had the driver working, you can just dd copy between devices
<dack>
hno: the full source is available for an older version... the current nand driver used by A20 devices is binary only and appears to be incompatible with the older one. Using the driver in the current linux-sunxi will either not work on a A20 device or end up breaking it
<dack>
libv: have you taken a look at Boris` contributions for a nand driver? (link above)
Faisal has joined #linux-sunxi
rafaelMOD has quit [Quit: Saindo]
_massi has quit [Remote host closed the connection]
<hno>
dack, which of the older ones are you referring to?
<hno>
the one in linux-sunxi, or the one for A20?
<dack>
the driver in linux-sunxi in drivers/block/sunxi_nand/ . It works with A10, but not with newer A20 devices. I broke the image on one of my devices when I tried to use it. libv confirmed there was an issue
<dack>
hno: ^
<hno>
dack, there is also a source driver for A20. But not merged into linux-sunxi.
<dack>
hno: Boris seems to be working on a mainline driver in drivers/mtd/nand/
<hno>
yes, but that is also incompatible with Allwinner NAND format, all versions.
<dack>
hno: I thought what was in linux-sunxi was the source driver, no?
<dack>
hno: oh.. so Boris' won't work with the format on the AW nand's?
<dack>
Anyone know the meaning of the "usb_controller_type" values in the fex? It seems to be undocumented in the wiki.
<dack>
oh.. nvm.. I see it here in the source. I'm still unsure how to figure out what kind of controller a device has though. My FEX seems to be missing that value.
ricardocrudo has quit [Remote host closed the connection]
enrico_ has quit [Quit: Bye]
nabblet has joined #linux-sunxi
ogi has quit [Remote host closed the connection]
pwhalen has quit [Ping timeout: 256 seconds]
ricardocrudo has joined #linux-sunxi
MY123 has quit [Quit: Connection closed for inactivity]
pwhalen has joined #linux-sunxi
pwhalen has joined #linux-sunxi
nabblet has quit [Quit: leaving]
konradoo77 has joined #linux-sunxi
ricardocrudo has quit [Quit: Saindo]
deasy has joined #linux-sunxi
konradoo87 has joined #linux-sunxi
dack has quit [Remote host closed the connection]
konradoo77 has quit [Ping timeout: 244 seconds]
konradoo87 has quit [Ping timeout: 244 seconds]
FunkyPenguin has quit [Ping timeout: 256 seconds]
FunkyPenguin has joined #linux-sunxi
pwhalen has quit [Ping timeout: 265 seconds]
bonbons has quit [Quit: Leaving]
pwhalen has joined #linux-sunxi
xavia has quit [Remote host closed the connection]
Black_Horseman has joined #linux-sunxi
bertrik has quit [Remote host closed the connection]