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
<youmukonpaku1337> apritzel: get practically the same bootlog with that env var set for initrd high... i wonder what could be the issue here
<youmukonpaku1337> should i try manually defining dev ram0 and the address for initrd?
apritzel has quit [Ping timeout: 480 seconds]
montjoie_ has joined #linux-sunxi
montjoie has quit [Ping timeout: 480 seconds]
<smaeul> Loading Ramdisk to 48f39000, end 48f39000 ... OK
<smaeul> youmukonpaku1337: looks like U-Boot thinks your initramfs size is zero. you may need to remove the "0x" prefix from your numbers
<youmukonpaku1337> oh true
<youmukonpaku1337> might try
<youmukonpaku1337> but probs after i get some sleep
<youmukonpaku1337> q
youmukon1 has joined #linux-sunxi
youmukon1 has quit []
youmukon1 has joined #linux-sunxi
youmukon1 has quit []
youmukon1 has joined #linux-sunxi
youmukonpaku1337 is now known as Guest1397
youmukon1 is now known as youmukonpaku1337
<youmukonpaku1337> ugh
<youmukonpaku1337> why the hell did weechat set my nick to youmukon1
<youmukonpaku1337> oh my laptop didnt close connection when going to sleep
<youmukonpaku1337> fun
Guest1397 has quit [Ping timeout: 480 seconds]
vagrantc has quit [Ping timeout: 480 seconds]
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
freemangordon has joined #linux-sunxi
vagrantc has joined #linux-sunxi
warpme has joined #linux-sunxi
vagrantc has quit [Ping timeout: 480 seconds]
evgeny_boger has joined #linux-sunxi
evgeny_boger has quit [Ping timeout: 480 seconds]
warpme has quit []
junari has joined #linux-sunxi
<junari> hi to all. Maybe someone found a UART driver patch for RS485 flow control via GPIO?
junari has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
junari has joined #linux-sunxi
apritzel has quit [Remote host closed the connection]
apritzel has joined #linux-sunxi
junari_ has joined #linux-sunxi
junari has quit [Ping timeout: 480 seconds]
junari_ has quit [Ping timeout: 480 seconds]
<karlp> does the dtr-gpios or rts-gpios device tree bindings not work for you?
<karlp> combined with rs485-rts-active-low
<karlp> sorry, sorry, not that one, the other one...
kuba2k2 has joined #linux-sunxi
junari_ has joined #linux-sunxi
junari_ is now known as junari
<junari> there is should be serial_rs485 structure for that
junari has quit [Remote host closed the connection]
bauen1 has joined #linux-sunxi
youmukon1 has joined #linux-sunxi
DarkNeutrino has quit [Ping timeout: 480 seconds]
DarkNeutrino has joined #linux-sunxi
junari has joined #linux-sunxi
junari has quit []
junari has joined #linux-sunxi
hentai has quit [Remote host closed the connection]
youmukonpaku1337 has quit [Read error: Connection reset by peer]
hentai has joined #linux-sunxi
hentai has quit [Remote host closed the connection]
youmukonpaku1337 has joined #linux-sunxi
youmukon1 has quit []
<youmukonpaku1337> a
<youmukonpaku1337> smaeul: nope not it :(
<youmukonpaku1337> Loading Ramdisk to 486ab000, end 48f38400 ... OK
<youmukonpaku1337> but still panic
<smaeul> can you paste the full log, with `setenv initrd_high ffffffff` as well?
<youmukonpaku1337> oh ok i didnt do the initrd high
<youmukonpaku1337> let me try that
<youmukonpaku1337> one sec
<youmukonpaku1337> smaeul: alright even with that it panicked so lemme paste it
<smaeul> well you have "Unpacking initramfs...", so the kernel sees the initramfs, so I'm guessing the problem is with the initramfs contents
<smaeul> how did you generate it?
<youmukonpaku1337> smaeul: downloaded an alpine minirootfs, added in the kernel modules that megi provided and packed it in cpio
<smaeul> yes, but what command to generate the cpio archive?
<youmukonpaku1337> one sec
<youmukonpaku1337> find ./ | cpio --create -H newc > output.cpio
<youmukonpaku1337> in the alpine rootfs root dir
<smaeul> youmukonpaku1337: well there's your problem. the alpine minirootfs doesn't contain an /init, so it's not a complete initramfs as-is
<smaeul> you can do `ln -s sbin/init init` from the root of the initramfs directory, but the minirootfs doesn't include openrc, so at most you'll get some gettys
<smaeul> that would at least not crash
JohnDoe_71Rus has quit []
<smaeul> or if you just want an interactive shell, /init can be a short shell script
<smaeul> mount -t proc proc /proc && mount -t devtmpfs dev /dev && setsid sh -i </dev/ttyS0 >/dev/ttyS0 2>&1 && reboot -f
<smaeul> or similar
<youmukonpaku1337> im pretty sure minirootfs does include openrc
<youmukonpaku1337> but yeah i just need an interactive shell and then ill check if i can get something proper
<smaeul> 0
<smaeul> nope
<youmukonpaku1337> huh
<youmukonpaku1337> i do remember using openrc in a chroot
<youmukonpaku1337> i guess not then
kuba2k2 has quit [Ping timeout: 480 seconds]
<youmukonpaku1337> smaeul: I HAVE A SHELL!!!!!!!!
<youmukonpaku1337> LETS FUCKING GOOO
<youmukonpaku1337> uhhhh
<youmukonpaku1337> ok so minor issue
<youmukonpaku1337> after like 20 seconds it disabled dcdc2 which is the cpu power supply???? wtf
<apritzel> youmukonpaku1337: do you have regulator-always-on; in the dcdc2 node?
<youmukonpaku1337> lemme check
<youmukonpaku1337> if i dont thats insanely funny
kuba2k2 has joined #linux-sunxi
<youmukonpaku1337> apritzel: i do
<youmukonpaku1337> so thats mildly concerning
<smaeul> how do you know dcdc2 is getting disabled? regulator-always-on should definitely prevent that
<youmukonpaku1337> ~ # ldo2: disabling
<youmukonpaku1337> dcdc2: disabling
<youmukonpaku1337> and then i lose input
<youmukonpaku1337> so i think it powered off
<smaeul> alright, double-check your dts -- remember, it's the copy embedded inside U-Boot that is being used
<smaeul> also, if you have "&cpu0 { cpu-supply = <&reg_dcdc2>; };" in the DTS, then Linux should keep the regulator on anyway, though currently this requires having a cpufreq driver loaded
<youmukonpaku1337> smaeul: yes thats what im reading
<youmukonpaku1337> smaeul: the bootlog does mention something about cpufreq iirc
<youmukonpaku1337> nvm it doesnt
<youmukonpaku1337> as for my cpu0 in dts
<smaeul> youmukonpaku1337: alright, though also make sure you rebuilt U-Boot after you changed the DTS
<youmukonpaku1337> i did not change it
<youmukonpaku1337> lol
<youmukonpaku1337> because dcdc2 is always on anyway
<youmukonpaku1337> wait lemme reboot and try again xddd
<smaeul> well you changed it at some point, because you wrote it :)
<youmukonpaku1337> yes and thats whats in my latest build xd
<youmukonpaku1337> i always rebuild when i change dts
junari_ has joined #linux-sunxi
<smaeul> ok
<smaeul> just checking
<smaeul> you can also try `ls /proc/device-tree/soc/i2c@1c2ac00/pmic@34/regulators/dcdc2` (I think that path is right) before it dies to make sure regulator-always-on is there at runtime
<youmukonpaku1337> sure one sec
<youmukonpaku1337> lemme just paste the commands i used to boot here so i dont have to scroll for 2 hours in minicom lmao
<youmukonpaku1337> => setenv bootargs "earlycon=uart,mmio32,0x1c28400 console=ttyS0,115200n8"
<youmukonpaku1337> => setenv initrd_high 0xffffffff
<youmukonpaku1337> => bootz 0x42000000 0x43300000:7DF800 $fdtcontroladdr
<youmukonpaku1337> smaeul: no such file or directory
<youmukonpaku1337> huh
<youmukonpaku1337> /proc/device-tree exists but when i ls it it says "no such file or directory"
<youmukonpaku1337> wtf
<apritzel> maybe the kernel doesn't export it, you can try /sys/firmware/devicetree/base instead
<smaeul> and I might have got some part of the path wrong, too
<apritzel> yeah, that's tricky. I had the same idea, but gave up figuring out the exact path :-D
<youmukonpaku1337> apritzel: nope :p
junari has quit [Ping timeout: 480 seconds]
<youmukonpaku1337> not it
<youmukonpaku1337> this is mildly concerning
<smaeul> so maybe check each part successively
<smaeul> unfortunately regulators don't have an equivalent of `clk_ignore_unused` for a temporary workaround
<youmukonpaku1337> oh yea maybe im missing ldo2?
<youmukonpaku1337> hmm
<youmukonpaku1337> might be that lemme add it
<apritzel> ldo2 is probably crucial too (for the PLLs?), but dcdc2 should stay on regardless
<youmukonpaku1337> what the hell is &reg_dcdc3 {
<youmukonpaku1337> regulator-always-on;
<youmukonpaku1337> regulator-min-microvolt = <1200000>;
<youmukonpaku1337> regulator-max-microvolt = <1200000>;
<youmukonpaku1337> regulator-name = "vdd-int-pll";
<youmukonpaku1337> };
<youmukonpaku1337> meh ill add it
<apritzel> careful with adding random regulators, your board might not like the voltage on those pins
<youmukonpaku1337> fair
<youmukonpaku1337> but can't know if it works without trying :P
<youmukonpaku1337> oh fuck
<apritzel> there are examples of boards using the same SoC and the same PMIC, but one board using a particular regulator for 1.8V, another board the same regulator for 3.3V
<youmukonpaku1337> Error: arch/arm/dts/.sun5i-a13-pocketbook-616.dtb.pre.tmp:82.1-11 Label or path reg_dcdc2 not found
<youmukonpaku1337> Error: arch/arm/dts/.sun5i-a13-pocketbook-616.dtb.pre.tmp:89.1-11 Label or path reg_dcdc3 not found
<youmukonpaku1337> FATAL ERROR: Syntax error parsing input tree
<youmukonpaku1337> Check /home/q/pbkernel/pb-6.4/u-boot/arch/arm/dts/.sun5i-a13-pocketbook-616.dtb.pre.tmp for errors
<youmukonpaku1337> make[2]: *** [scripts/Makefile.lib:335: arch/arm/dts/sun5i-a13-pocketbook-616.dtb] Error 1
<youmukonpaku1337> make[1]: *** [dts/Makefile:44: arch-dtbs] Error 2
<youmukonpaku1337> make: *** [Makefile:1156: dts/dt.dtb] Error 2
<youmukonpaku1337> goddamit
<youmukonpaku1337> how do i cross compile dtbs lmao
<apritzel> it's probably just a typo somewhere
<apritzel> it gives you some breadcrumbs to follow
<youmukonpaku1337> nope
<youmukonpaku1337> nothing that wouldnt compile on my phone..
<youmukonpaku1337> also are dtbs architecture agnostic
<apritzel> yes, there is no "cross" in compiling DTs
<apritzel> it's just source level DT to DTB, which is the same everywhere
<youmukonpaku1337> got it
<youmukonpaku1337> well this is uhhh
<youmukonpaku1337> weird
<youmukonpaku1337> i have absolutely no idea why it isnt compiling
<apritzel> well, check your DT source again
<apritzel> or look at that file it tells you to look at
<youmukonpaku1337> uh
<youmukonpaku1337> diff arch/arm/dts/sun5i-a13-pocketbook-616.dts arch/arm/dts/.sun5i-a13-pocketbook-616.dtb.pre.tmp
<youmukonpaku1337> 206a207
<youmukonpaku1337> > #include "sunxi-u-boot.dtsi"
<youmukonpaku1337> in the tmp file\
<youmukonpaku1337> only difference
<youmukonpaku1337> as for my DT source
<youmukonpaku1337> take a look at this i suppose? i see nothing wrong
<apritzel> move &reg_dcdc2 and &reg_dcdc3 below the #include "axp209.dtsi" line
<youmukonpaku1337> oh ok
<apritzel> that seems to fix it for me
JohnDoe_71Rus has joined #linux-sunxi
<youmukonpaku1337> apritzel: built lets goo
apritzel has quit [Remote host closed the connection]
junari has joined #linux-sunxi
junari has quit [Remote host closed the connection]
apritzel has joined #linux-sunxi
junari has joined #linux-sunxi
mripard has quit [Quit: mripard]
<youmukonpaku1337> apritzel: smaeul: that fixed it
<youmukonpaku1337> so ig i just needed to add some regulators
<apritzel> why? anything broken?
kuba2k2 has quit [Ping timeout: 480 seconds]
<youmukonpaku1337> apritzel: yeah i had it turn off the cpu power supply after 10 seconds if you havent seen that :P
<youmukonpaku1337> now fixed by adding some regulators from megi's dtb to mine
<youmukonpaku1337> so uh
<youmukonpaku1337> i have a shell
<apritzel> check the MMCs (cat /proc/partitions)
<youmukonpaku1337> major minor #blocks name
<youmukonpaku1337> 179 0 7634944 mmcblk1
<youmukonpaku1337> 179 1 7130112 mmcblk1p1
<youmukonpaku1337> 179 2 32768 mmcblk1p2
<youmukonpaku1337> 179 3 1 mmcblk1p3
<youmukonpaku1337> 179 5 16384 mmcblk1p5
<youmukonpaku1337> 179 6 16384 mmcblk1p6
<youmukonpaku1337> 179 7 35328 mmcblk1p7
<youmukonpaku1337> 259 0 250368 mmcblk1p8
<youmukonpaku1337> 259 1 100352 mmcblk1p9
<youmukonpaku1337> 259 2 16384 mmcblk1p10
<youmukonpaku1337> 179 8 4096 mmcblk1boot0
<youmukonpaku1337> 179 16 4096 mmcblk1boot1
<youmukonpaku1337> sd isnt plugged in so lemme add that
<youmukonpaku1337> might transfer the stuff i need over it xd
<apritzel> so it seems like the eMMC is somewhat working then
<apritzel> I'd give it some stability test
<youmukonpaku1337> how
<youmukonpaku1337> ~~just write it over with zeros???~~
<apritzel> if you are happy to lose everything on it: maybe
<apritzel> or you back the partitions up one by one to an SD card
<youmukonpaku1337> its not like i can boot into pocketbook os anyway :P
<apritzel> or run md5sum on the block device
<youmukonpaku1337> and if i need stock os i can pull it off another pocketbook i have
<youmukonpaku1337> so fuck backups
<apritzel> well, then you could put your alpine rootfs into one partition, and lose the initrd
<youmukonpaku1337> id rather set up debian on mmc
<apritzel> or a Debian bootworm no-cloud image
<youmukonpaku1337> so that i dont need musl bullshit
<apritzel> *bookworm, rather
<youmukonpaku1337> why not a sid rootfs apritzel :p
<youmukonpaku1337> i like sid
<apritzel> then don't complain when something is broken ...
<youmukonpaku1337> of course :P
<youmukonpaku1337> anyway ill also need a boot partition i assume
<apritzel> I mean you probably have enough issues with the DT and kernel and what not
<youmukonpaku1337> meh fair guess ill grab bookworm
<youmukonpaku1337> worst case i upgrade to sid with sourceslist
<smaeul> u-boot can read ext4, so you don't really _need_ a boot partition
<youmukonpaku1337> yeah but id rather not have to boot over FEL each time
<youmukonpaku1337> xD
<youmukonpaku1337> plus i need to use a modded otg cable or stuff anyway
<apritzel> you can just put your u-boot-sunxi-with-spl.bin into the eMMC boot partition
<smaeul> FEL is unrelated to (GPT) partitions. U-Boot goes on that mmcblk1boot0 device
<youmukonpaku1337> oh ok
<youmukonpaku1337> will i need to write a kernel cmdline n stuff
<youmukonpaku1337> i assume i will
<youmukonpaku1337> oh also where would boot.scr containing that kinda stuff go
<apritzel> on a boot partition ;-), but I think this could also be the root partition, just something that U-Boot would scan
junari_ has quit [Ping timeout: 480 seconds]
<youmukonpaku1337> hm ok
<youmukonpaku1337> so uh
<youmukonpaku1337> how can i install debian
<youmukonpaku1337> in uh
<youmukonpaku1337> simple steps
<youmukonpaku1337> apritzel
<apritzel> without USB and network that's tricky: I'd try to get hold of some armhf image, and just dd that to an eMMC partition
<youmukonpaku1337> oh i can just throw it onto sd cant i
<smaeul> PPP over UART :D
<smaeul> more seriously, https://people.debian.org/~gio/dqib/
<apritzel> smaeul: ah, thanks, I just realised that the cloud images are 64-bit only
<smaeul> yeah, this has all the other architectures, including ports (read: RISC-V)
<smaeul> I'm assuming the Debian kernel already has everything needed for A13 enabled, so it should be pretty much dd-able
<apritzel> it looks like a .qcow2 in there, some one more hurdle before that ...
<smaeul> of course by "dd" I mean "qemu-img dd" ;)
<apritzel> and even after "qemu-img convert" it's a 10GB image file, so some more massaging needed
<apritzel> but hey: nobody said it would be a walk in the park ...
vagrantc has joined #linux-sunxi
<apritzel> Ubuntu had this nice "core" image some years back, some convenient 30ish MB image file that had enough to apt-get everything else
hentai has joined #linux-sunxi
junari has quit [Remote host closed the connection]
<youmukonpaku1337> apritzel: the image when converted with qemu-img for armhf is 265mb :P
<youmukonpaku1337> but i cant mount it
<apritzel> if you are looking at the dqib image the smaeul mentioned above: the one I checked had the partition starting at 64KB
<youmukonpaku1337> nvm
<youmukonpaku1337> apritzel: is that a bad thing
<apritzel> well, it means you need to give that offset to mount if you want to loop mount it
<apritzel> or dd it
<youmukonpaku1337> kay
<youmukonpaku1337> but yeah i got an image
<youmukonpaku1337> and converted with dd
<youmukonpaku1337> tis 650m
<apritzel> yes, that's about the size I got as well
<youmukonpaku1337> apritzel: so uh how would i go about writign that image to emmc and making it boot
<apritzel> if you got the raw filesystem image, I'd write it to an SD card, then dd it on the board to one of the eMMC partitions
<youmukonpaku1337> apritzel: idk i just used qemu-img convert :p
<youmukonpaku1337> also one more thing, alpine doesnt see the sd, can it not hotplug orwhat
<youmukonpaku1337> also
<apritzel> alpine?
<youmukonpaku1337> why the hell isnt sys mounted on /sys
<youmukonpaku1337> alpine as in the rootfs i have booted through fel xf
<youmukonpaku1337> xd
<apritzel> because someone needs to mount it there. Normally this is done by the init scripts
<apritzel> if you now shoehorn a normal rootfs into an initramfs, you probably cannot use the normal init scripts
<youmukonpaku1337> wait cant i just mount sysfs on /sys
<youmukonpaku1337> there we go
<youmukonpaku1337> mounted
<apritzel> sure you can, but you also *have* to, every time you boot it
<apritzel> same with proc
<youmukonpaku1337> proc is mounted
<youmukonpaku1337> apritzel: i used the simple init script made by smaeul :p
<youmukonpaku1337> just missed sysfs
<youmukonpaku1337> apritzel: also where do i put uboot xd
<youmukonpaku1337> as in how do i install it
<apritzel> pick the right chapter
<youmukonpaku1337> apritzel: so i assume i can write to the mmcblkXboot?
<youmukonpaku1337> huh
<apritzel> that's what I would suggest
<youmukonpaku1337> im not sure whether to use boot1 or boot0
<apritzel> be bold! just pick one ;-)
<youmukonpaku1337> why not both :D
<youmukonpaku1337> apritzel: also how can i wipe emmc and make one root partition
<youmukonpaku1337> cause theres like 10
<youmukonpaku1337> and idk how to use fdisk
<apritzel> then you would need to look that up ;-)
<youmukonpaku1337> apritzel: can i just dd from devzero then make a new partition table with a single partition>
<apritzel> just use fdisk to remove all partitions, then create new one
<youmukonpaku1337> apritzel: first sector 16 is ok?
<youmukonpaku1337> i guess it is then
<youmukonpaku1337> made a partition
<youmukonpaku1337> lemme put stuff i need onto sd and see
apritzel has quit [Ping timeout: 480 seconds]
bauen1 has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has quit []
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #linux-sunxi
apritzel has joined #linux-sunxi
<youmukonpaku1337> apritzel: i instead extracted the rootfs from the image and am gonna put it into a normal image without offset :D
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #linux-sunxi
immibis has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<youmukonpaku1337> apritzel: uhhh so i may have a problem
kuba2k2 has joined #linux-sunxi
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1) in ext4_reserve_inode_write:5744: Corrupt filesystem
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1): ext4_dirty_inode:5948: inode #12: comm dd: mark_inode_dirty error
<youmukonpaku1337> JBD2: Spotted dirty metadata buffer (dev = mmcblk0p1, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1) in ext4_reserve_inode_write:5744: Corrupt filesystem
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1): ext4_dirty_inode:5948: inode #12: comm dd: mark_inode_dirty error
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1) in ext4_reserve_inode_write:5744: Corrupt filesystem
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1): ext4_dirty_inode:5948: inode #12: comm dd: mark_inode_dirty error
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1) in ext4_reserve_inode_write:5744: Corrupt filesystem
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1): ext4_dirty_inode:5948: inode #12: comm dd: mark_inode_dirty error
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1) in ext4_reserve_inode_write:5744: Corrupt filesystem
<youmukonpaku1337> EXT4-fs error (device mmcblk0p1): ext4_dirty_inode:5948: inode #12: comm dd: mark_inode_dirty error
<youmukonpaku1337> 1120+0 records in
<youmukonpaku1337> 1120+0 records out
<youmukonpaku1337> quite concerning
immibis has joined #linux-sunxi
warpme has joined #linux-sunxi
kuba2k2 has quit []
<youmukonpaku1337> and now i cant get uboot nor alpine to see the sd card wtf
<youmukonpaku1337> apritzel
<youmukonpaku1337> => mmc dev 0
<youmukonpaku1337> Error enabling VMMC supply : 21504024
<youmukonpaku1337> i reformatted it like twice already
warpme has quit []
<youmukonpaku1337> apritzel: so uhh
<apritzel> for U-Boot to access the SD card you need to compile in REGULATOR_AXP and some I2C support
<apritzel> but it should work in Linux, have you tried it there?
<youmukonpaku1337> apritzel: i have, and it worked before :p
<youmukonpaku1337> as for linux, nothing in dmesg and no device appears
warpme has joined #linux-sunxi
<youmukonpaku1337> apritzel: so uhh
bauen1 has joined #linux-sunxi
warpme has quit []
DarkNeutrino has quit [Read error: Connection reset by peer]
DarkNeutrino has joined #linux-sunxi
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #linux-sunxi
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #linux-sunxi
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #linux-sunxi
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]