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