ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
ftg^ has joined #linux-sunxi
HERIC has joined #linux-sunxi
ftg has quit [Ping timeout: 480 seconds]
ftg^ has quit [Ping timeout: 480 seconds]
HERIC has quit [Ping timeout: 480 seconds]
apritzel has quit [Ping timeout: 480 seconds]
youmukonpaku1337 has quit [Ping timeout: 480 seconds]
vagrantc has quit [Quit: leaving]
youmukonpaku1337 has joined #linux-sunxi
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
youmukonpaku1337 has quit [Ping timeout: 480 seconds]
youmukonpaku1337 has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
youmukonpaku1337 has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
junari_ has joined #linux-sunxi
warpme has joined #linux-sunxi
junari_ has quit [Ping timeout: 480 seconds]
warpme has quit []
warpme has joined #linux-sunxi
chewitt has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
junari_ has joined #linux-sunxi
warpme has quit [Ping timeout: 480 seconds]
warpme has joined #linux-sunxi
warpme has quit [Remote host closed the connection]
warpme has joined #linux-sunxi
warpme has quit []
junari_ has quit [Ping timeout: 480 seconds]
warpme has joined #linux-sunxi
warpme has quit [Ping timeout: 480 seconds]
kuba2k2 has joined #linux-sunxi
junari_ has joined #linux-sunxi
junari_ has quit [Ping timeout: 480 seconds]
youmukonpaku1337 has joined #linux-sunxi
Benjojo__ has left #linux-sunxi [#linux-sunxi]
kuba2k2 has quit [Ping timeout: 480 seconds]
DarkNeutrino has quit [Read error: Connection reset by peer]
DarkNeutrino has joined #linux-sunxi
warpme has joined #linux-sunxi
kuba2k2 has joined #linux-sunxi
DarkNeutrino has quit [Ping timeout: 480 seconds]
DarkNeutrino has joined #linux-sunxi
JohnDoe_71Rus has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
ftg has joined #linux-sunxi
apritzel has joined #linux-sunxi
ftg has quit [Ping timeout: 480 seconds]
Danct12 has quit [Quit: A-lined: User has been AVIVA lined]
macromorgan is now known as Guest1636
Guest1636 has quit [Read error: Connection reset by peer]
macromorgan has joined #linux-sunxi
kuba2k2 has quit [Read error: Connection reset by peer]
Danct12 has joined #linux-sunxi
warpme has quit []
apritzel has quit [Ping timeout: 480 seconds]
ftg has joined #linux-sunxi
juri_ has quit [Remote host closed the connection]
juri_ has joined #linux-sunxi
<youmukonpaku1337> hm
<youmukonpaku1337> i should probably get back to work lol
youmukonpaku1337 has quit [Quit: WeeChat 4.0.4]
apritzel has joined #linux-sunxi
warpme has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
youmukonpaku1337 has joined #linux-sunxi
DarkNeutrino has quit [Read error: Connection reset by peer]
DarkNeutrino has joined #linux-sunxi
DarkNeutrino has quit [Ping timeout: 480 seconds]
DarkNeutrino has joined #linux-sunxi
apritzel has joined #linux-sunxi
juri_ has quit [Ping timeout: 480 seconds]
vagrantc has joined #linux-sunxi
warpme has quit [Read error: Connection reset by peer]
warpme has joined #linux-sunxi
juri_ has joined #linux-sunxi
JohnDoe_71Rus has quit []
warpme has quit [Read error: Connection reset by peer]
warpme has joined #linux-sunxi
<youmukonpaku1337> apritzel: yo, am back to working on this and turns out it was the bad sd card... now, the question is how do i boot a vmlinux image stored in the main rootfs partition
<youmukonpaku1337> or do i move it out
apritzel has quit [Ping timeout: 480 seconds]
<youmukonpaku1337> oh come on
<youmukonpaku1337> megi: how do you boot linux on your device? just throw uboot in boot0 and then how do you boot kernel?
<youmukonpaku1337> i have a debian vmlinux stored in the root partition but i might as well use your kernel, question is where do i write it lol
<youmukonpaku1337> oh
<youmukonpaku1337> i cant write to boot1 or boot0
<youmukonpaku1337> any way to do that lol
<youmukonpaku1337> throws an "operation not permitted"
warpme has quit []
apritzel has joined #linux-sunxi
<youmukonpaku1337> hey apritzel
<youmukonpaku1337> check log
vagrantc has quit [Quit: leaving]
evgeny_boger has joined #linux-sunxi
evgeny_boger has quit [Remote host closed the connection]
evgeny_boger has joined #linux-sunxi
<apritzel> youmukonpaku1337: well, you just load it, using U-Boot's "load" command
<apritzel> like: load mmc 0:1 0x43000000 boot/vmlinuz
<apritzel> where the last part is the filename inside that partition
<youmukonpaku1337> apritzel: i see
<youmukonpaku1337> 0:1 would be 1:1 for emmc right
<youmukonpaku1337> also i cant write to boot0
<apritzel> "0:1" means "first (MMC) device", first partition
<youmukonpaku1337> so 1:1 for emmc
<youmukonpaku1337> got it
<youmukonpaku1337> since emmc is 2nd
<apritzel> yes, for the first partition on the eMMC
<youmukonpaku1337> alr
<youmukonpaku1337> but again how can i unlock boot0 to write to it lol
<youmukonpaku1337> and/or boot1
<youmukonpaku1337> also where do i put boot.scr
<apritzel> you have to disable the write protection from the boot partition first
<apritzel> that force_ro file in sysfs
<youmukonpaku1337> oh i see
<youmukonpaku1337> will test in a minute
<youmukonpaku1337> what about boot scr tho
<youmukonpaku1337> can i write it to boot1
<apritzel> no
<apritzel> it should go to the first partition as well
<youmukonpaku1337> and how would i do that?
<apritzel> just put it on the Linux root partition?
<apritzel> (I think you said you went with only one partition?)
<youmukonpaku1337> oh ok
<youmukonpaku1337> and uboot will read it off there?
<apritzel> yes, there is some rather complex mechanism called "distroboot" which will scan various media to find something to boot
<youmukonpaku1337> awesomeee
<youmukonpaku1337> alrighr
<youmukonpaku1337> what should i put in boot.cmd (and .scr which will be generated from it)
<youmukonpaku1337> i just need to boot debian off mmcblk1p1 with no insane logging level
<apritzel> the load command for the kernel, as mentioned above
<apritzel> and a "setenv bootargs ...." to set the command line
<apritzel> then finally the bootz to kick things off
<apritzel> can spice this up with any U-Boot command you need, really
<youmukonpaku1337> bootz 43000000 - $fdtdeviceaddr?
<apritzel> $fdtcontroladdr, but yes
<youmukonpaku1337> also what kernel params would be decent for this lol
<apritzel> that depends on what you want to do: that's the reason those are flexible parameters and not baked in ;-)
<apritzel> but you would need at least a console and a rootfs specification
<youmukonpaku1337> just quietly boot debian with a tty on serial
<youmukonpaku1337> the rest i can take from there
<apritzel> like "console=ttyS0,115200n8 root=/dev/mmcblk1p1"
<youmukonpaku1337> it wont spit logging into the tty right
<apritzel> this is
<youmukonpaku1337> no i mean
<youmukonpaku1337> when its fully booted
<apritzel> ... would be all generic Linux command line things
<youmukonpaku1337> ah ok
<youmukonpaku1337> cool
<youmukonpaku1337> alr
<apritzel> same as on your PC
<apritzel> I mean you have only one console, so it spits out everything there
<apritzel> you can reduce the loglevel, of course
<youmukonpaku1337> can i also define console=tty1
<youmukonpaku1337> if i ever need it
<apritzel> if you have a display and all the drivers set up to use a graphical console
<youmukonpaku1337> ill set those up eventually
<youmukonpaku1337> but i can just leave it there right
<apritzel> but that works fine on other boards (with HDMI ports), just need a USB keyboard for the input
<youmukonpaku1337> got it
<youmukonpaku1337> alr ill leave that there
<youmukonpaku1337> will be useful once i get GUd
<youmukonpaku1337> *GUD
<apritzel> with your DT there won't be a tty1, but I don't think it particularly hurts
evgeny_boger has quit [Ping timeout: 480 seconds]
<apritzel> I don't know how a console works with GUD, since that's probably set up quite late in the process
<youmukonpaku1337> worst case it doesnt work and i only get X
<youmukonpaku1337> or wayland
<youmukonpaku1337> xD
<youmukonpaku1337> apritzel: do i put boot.scr into root or boot/boot.scr
ftg has quit [Read error: Connection reset by peer]
<apritzel> it first looks in /, then in /boot
<youmukonpaku1337> alr
<apritzel> on a U-Boot prompt: "printenv scan_dev_for_scripts"
<youmukonpaku1337> alr i think i should be good to go
<youmukonpaku1337> moment of truth
<apritzel> I bet you need at least a handful of iterations to get this going ;-)
<youmukonpaku1337> aanddd
<youmukonpaku1337> it does not work
<youmukonpaku1337> absolutely 0 output in serial too
<youmukonpaku1337> hm
<youmukonpaku1337> what could have i missed lol
<apritzel> did you enable the boot partition?
<youmukonpaku1337> i what
<youmukonpaku1337> i mean i wrote uboot to it
<youmukonpaku1337> i disabled force RO
<youmukonpaku1337> oh wow
<youmukonpaku1337> when booting uboot through fel it tries to go into debian
<apritzel> you need to go back to the part where I said you should *read* those instructions
<youmukonpaku1337> wtf
<youmukonpaku1337> cannot open root device mmcblk1p1
<youmukonpaku1337> here are the available partitions: mmcblk0 and mmcblk0p1
<youmukonpaku1337> what in the name of hell
<youmukonpaku1337> apritzel: uhh
<apritzel> did you disable the SD card?
<youmukonpaku1337> i didnt
<youmukonpaku1337> am booting off emmc which should be mmc1p1
<apritzel> check the bootlog carefully
<apritzel> In general I am afraid you underestimate the complexity of this whole boot process
<apritzel> you should take small steps, and make sure everything works before moving on
<youmukonpaku1337> alright
<apritzel> booting from a boot partition *and* adding a boot.scr is probably asking for too much at once
<youmukonpaku1337> yeah fair
<apritzel> for a start, you need to enable boot partition operation in your U-Boot config: CONFIG_SUPPORT_EMMC_BOOT
<youmukonpaku1337> riight
<youmukonpaku1337> done
<youmukonpaku1337> wait
<apritzel> and enable boot partition support in your eMMC chip, using either Linux' "mmc" tool, or U-Boot's eponymous, but very different command
<apritzel> as described in the U-Boot documentation
<apritzel> you would only need to do this once, though
<youmukonpaku1337> the latter is mildly easier because then i dont have to load APKs off sd lulz
<apritzel> yeah, indeed
<youmukonpaku1337> still, why does linux not see mmcblk1
<youmukonpaku1337> thats very weird
<apritzel> no, normal, because Linux probes devices rather randomly, and names them as it discovers them
<apritzel> so the first MMC device it finds becomes mmcblk0
<youmukonpaku1337> oh
<youmukonpaku1337> but then why is mmcblk1 still mmcblk1 even if i dont have sd in
<apritzel> you can try to fix this, in decent kernels, with an alias
<youmukonpaku1337> and how do i use an alias?
<apritzel> the normal DT in the Linux kernel tree doesn't carry an alias, but U-Boot adds one
<apritzel> so it *should* be stable if you boot with $fdtcontroladdr
<youmukonpaku1337> which i am doing
<youmukonpaku1337> and it *still* doesnt work with mmcblk1
<apritzel> aliases are in the /aliases section of the DT
<apritzel> where you have serial0=...
<youmukonpaku1337> yep
<youmukonpaku1337> and how can i add one for mmc0?
<apritzel> you shouldn't
<youmukonpaku1337> huh
<apritzel> that's done in arch/arm/dts/sunxi-u-boot.dtsi
<youmukonpaku1337> so it should work, no?
<apritzel> check u-boot.dtb in the root of your U-Boot tree, after a build
<apritzel> that's the DTB that U-Boot will embed into its image and use
<youmukonpaku1337> do i decomp it
<youmukonpaku1337> i assume so
<youmukonpaku1337> apritzel: mmc0=/soc/mmc@1c0f000
<youmukonpaku1337> mmc1=/soc/mmc@1c1100
<youmukonpaku1337> *1c11000
<apritzel> that looks alright, but I guess somehow the kernel didn't like the SD card description, and the driver bailed out probing
<apritzel> so check the bootlog and compare it to a known good one
<youmukonpaku1337> even without sd card it panics
<youmukonpaku1337> known good is booting to ram
<apritzel> it panics because it can't find the root device
<youmukonpaku1337> yes that i know
<youmukonpaku1337> also apritzel do i have to enable bootbus and partconf in uboot conf?
<youmukonpaku1337> because am unable to use mmc bootbus and partconf in uboot shell
<youmukonpaku1337> oh
<youmukonpaku1337> thats included under config support mmc boot lols
<apritzel> yes, you need CONFIG_SUPPORT_EMMC_BOOT to make those commands appear
<youmukonpaku1337> yep
<youmukonpaku1337> done
<youmukonpaku1337> alright so the only known good boot log is from initramfs so i doubt thatll be very useful
<apritzel> look for everything that contains "mmc"
<youmukonpaku1337> alright
<youmukonpaku1337> also one more thing
<youmukonpaku1337> nvm
<youmukonpaku1337> im stupid
<youmukonpaku1337> what
<youmukonpaku1337> in the
<youmukonpaku1337> apritzel: both initialize mmc 1c11000 just fine..
<youmukonpaku1337> but linux doesnt find the rootfs in it
<youmukonpaku1337> weeeird
<apritzel> try adding "rootwait" to the kernel command line
<youmukonpaku1337> oh yea
<youmukonpaku1337> lemme try that
<youmukonpaku1337> apritzel: WORKED
<youmukonpaku1337> YEAHHH
<youmukonpaku1337> i am now in debian
<youmukonpaku1337> next problem
<youmukonpaku1337> even with uboot compiled for boot0
<youmukonpaku1337> i mean
<youmukonpaku1337> mmc boot
<youmukonpaku1337> it still just goes into fel regardless
<youmukonpaku1337> apritzel
<youmukonpaku1337> oops
<youmukonpaku1337> forgot rw kernel param lmao
<youmukonpaku1337> apritzel: so uh what could be stopping booting from mmcboot0
<apritzel> it might actually be that the A13 does not support the eMMC boot partitions
<apritzel> because it lists just "SDC2" in the boot flow diagram
<apritzel> you should still be able to boot from eMMC, just from sector 16, like on SD card
<apritzel> but you let your partition start there, right?
<apritzel> it's common for a while now to let the first partition start at 1MB only
<apritzel> to leave some room for bootloaders (and also improve alignment)
<youmukonpaku1337> apritzel: the standard pocketbookos logs mention boot0 and boot1 though
<youmukonpaku1337> "boot0: passing to boot1" and such
<youmukonpaku1337> so it should work
<youmukonpaku1337> but alright
<youmukonpaku1337> i can just adjust partition size right
<youmukonpaku1337> apritzel
<apritzel> I think this refers to very different boot0/1
<apritzel> because boot0 is Allwinner's name for their SPL
<apritzel> and boot1 is then the second binary, loaded by boot0
<apritzel> let the first partition start at 1MB, and having a second partition might come in handy later, for a rescue system, for instance
<youmukonpaku1337> wha
<apritzel> so if you can spare like 200 or 300MB...
<youmukonpaku1337> can i just move p1 1mb
<youmukonpaku1337> and write uboot there
<youmukonpaku1337> i dont want to setup rescue
<youmukonpaku1337> worst case i boot off FEL
<apritzel> if you have parted installed, you might be able to shrink and move
<youmukonpaku1337> apritzel: alpine doesnt have parted but it does have fdisk
<apritzel> but depending on how you populated your partition, it might be easier to just re-create the partition, and re-write your image to it
<youmukonpaku1337> ehh
<youmukonpaku1337> i suppose
<apritzel> "moving" a partition is non-trivial, so you need the right tool for it
<apritzel> fdisk doesn't support those kind of fancy things
<youmukonpaku1337> oh ok
<youmukonpaku1337> will just delete and rewrite then
<youmukonpaku1337> i see
<youmukonpaku1337> apritzel: what would be 1mb in starting sector?
<youmukonpaku1337> oh
<youmukonpaku1337> 2048
<apritzel> yes
<youmukonpaku1337> apritzel: HELL YEAHH!!!!
<youmukonpaku1337> booted without fel
<youmukonpaku1337> tysm for all the help!!!
<youmukonpaku1337> the rest should be pretty smooth lol
<apritzel> famous last words ;-), but you're welcome!
<youmukonpaku1337> apritzel: all i have left to do is mod an otg cable and do a bit of trickery for GUD + other usb peripherals
<youmukonpaku1337> then im good to go lol
<youmukonpaku1337> seems like wifi pins dont work :(
<youmukonpaku1337> i guess im gonna have to use otg then
<youmukonpaku1337> p