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
<apritzel> mainline U-Boot has the latest DT, and you can use that very DT to boot any kernel, no need to load anything extra or rely on the distro shipping something
<ayunami2000> and that auto boots manjaro
<ayunami2000> from the emmc where i got it installed
<ayunami2000> but it just sits in fel mode until i run that command
<ayunami2000> on my pc
<ayunami2000> which this new u-boot build should fix
<apritzel> there is a much short command line: sunxi-fel uboot /path/to/u-boot-sunxi-with-spl.bin
<ayunami2000> i mightve tried that earlier and it failed maybe because my u-boot build wasnt correct
<apritzel> that does all the above automatically: it uses TF-A from the image, loads the SPL and U-Boot proper, and does the proper reset
<ayunami2000> but i cant remember anymore lol
<ayunami2000> btw i am correct in that i still need to wrap the u-boot-sunxi-with-spl.bin with toc0 right
<ayunami2000> before flashing to mmcwhatever2boot0
<apritzel> I don't know if Manjaro uses UEFI boot, do you see a grub screen, by any chance?
<ayunami2000> i do not
<apritzel> no, with the defconfig everything is done for you
<ayunami2000> oh ok cool
<ayunami2000> so just flash the u-boot-sunxi-with-spl.bin to mmcwhatever2boot0
<apritzel> mkimage (the U-Boot tool generating the one image file) knows about TOC0 now, and the defconfig sets that
<apritzel> yes
<ayunami2000> ok ill give it a try
<apritzel> and have you enabled the eMMC boot partition correctly?
<ayunami2000> SPL: eGON header is not found
<ayunami2000> can no longer inject uboot to fel
<apritzel> argh, yeah, right
<apritzel> this is because sunxi-fel requires an eGON image
<apritzel> it then parses the image and uploads the components, like you did above
<apritzel> but it doesn't understand TOC0
<ayunami2000> is there a way to unwrap from toc0
<apritzel> (yet, I have some patches, but they have issues)
<apritzel> if you want to do FEL boot, I recommend you turn off TOC0: use menuconfig, search (type '/') for TOC0 and switch it back to eGON
<apritzel> then rebuild
<ayunami2000> alr
<ayunami2000> ill copy the bin out of there
<ayunami2000> so i can have both
<apritzel> please note you still need the complete TOC0 build for eMMC boot
<ayunami2000> yeah im gonna have both
<ayunami2000> one for using with fel
<ayunami2000> one for emmc
<apritzel> yes
<ayunami2000> the one for emmc is the toc0
<apritzel> yes
<apritzel> do make ..._defconfig; build that (that's TOC0), then make menuconfig, switch to eGON, build that: that's for FEL
<ayunami2000> ok got both bin files
<ayunami2000> here goes
<apritzel> sorry for the mess, I am sitting on the TOC0 FEL patches for a while, but there is some weird bug I didn't find time to hunt down yet
<ayunami2000> YAYY ITS WORKING
<apritzel> eMMC boot?
<ayunami2000> lets see if it booted from sd or not
<ayunami2000> oh i still need to flash u-boot to the emmc
<ayunami2000> its now launched the weird version of manjaro
<ayunami2000> that has no wifi
<ayunami2000> that i have on the emmc
<apritzel> the TOC0 image should work on an SD card (offset 8k), eMMC partition (8K), and eMMC boot partition (no offset)
<ayunami2000> do you think i can flash the boot0 while booted
<apritzel> which boot0? The vendor one, from Remix?
<ayunami2000> no i mean flash the u-boot to emmc boot0
<ayunami2000> sorry
<ayunami2000> also i failed to backup boot0 or boot1 i only backed up the rest of the emmc
<ayunami2000> lol
<ayunami2000> ls
<apritzel> IIRC Remix use normal eMMC partitions
<ayunami2000> oops this is wrong keyboard
<apritzel> so you can put mainline on the boot partition
<ayunami2000> aaargh without wifi i cant get the bin file over to it
<ayunami2000> unless i use a flash drive
<ayunami2000> WAIT since its not booting off the sd card
<ayunami2000> i can take it out while its on
<apritzel> yes, or that
<apritzel> so you put mainline U-Boot TOC0 on an SD card, booted from there, and then it picked up Manjaro from the eMMC?
<ayunami2000> oh i havent gotten that far yet
<ayunami2000> i just now added the u-boot toc0 to the sd card from my pc
<apritzel> FEL booting still?
<ayunami2000> yeah rn im still in fel
<ayunami2000> im about to put the microsd back into the remix mini
<ayunami2000> and then use manjaro dd to flash it
<ayunami2000> to mmc boot0
<apritzel> sounds good
<ayunami2000> i have to unplug the hdmi every time
<ayunami2000> grumble grumble
<ayunami2000> bc its in the way
<apritzel> if you haven't used the eMMC boot partition before, please remember to activate it
<apritzel> yeah, the connectors are quite tight ...
<ayunami2000> oh yeah i did those 2 commands to the emmc
<apritzel> good
<ayunami2000> oh my god this manjaro install is so unstable
<ayunami2000> i keep getting logged out i can only assume xfce is crashing
<ayunami2000> ctrl alt f1 my beloved
<ayunami2000> rip i cant find the microsd device in manjaro
<ayunami2000> its apparently that bad of an install
<ayunami2000> guess im booting armbian off the sd card
<ayunami2000> whats the u-boot command i need to boot from microsd
<ayunami2000> rather than emmc
<ayunami2000> because the emmc install is bad but the microsd install is good
<apritzel> the BootROM tries SD card first, so you should always be able to recover
<ayunami2000> oh also my sd card has the force fel boot toc0 on it
<ayunami2000> along with armbian
<apritzel> if you put the mainline U-Boot TOC0 there instead, it should boot
<ayunami2000> like itll boot the sd card?
<ayunami2000> or the emmc
<ayunami2000> because rn when i use fel to put in uboot it boots emmc
<apritzel> it will load U-Boot from the SD card
<ayunami2000> yeah but my goal is to boot armbian which is stored on the sd card
<apritzel> then U-Boot should check the SD card partitions first, for finding Linux
<ayunami2000> well apparently it is not
<apritzel> if you boot from SD?
<ayunami2000> lemme try
<ayunami2000> maybe itll work
<apritzel> we figure out where we are booted from, and scan this device first
<ayunami2000> oh neat
<ayunami2000> lets see
<ayunami2000> its still in fel
<ayunami2000> btw, the reason i used the sd for fel boot is bc the button for fel boot broke
<ayunami2000> like it rattles around n stuff
<ayunami2000> hopefully it doesnt just always go to fel boot now
<apritzel> that hidden one, behind that small hole?
<ayunami2000> yep
<ayunami2000> i poked it too much
<apritzel> lol
<ayunami2000> lol
<ayunami2000> oh i forgot seek=8
<ayunami2000> lets try again
<apritzel> ouch, that means you nuked the partition table?
<ayunami2000> idk maybe there wasnt anything important on there though so its fine
<ayunami2000> damn ur right
<ayunami2000> is there a way to unnuke it easily
<apritzel> if that is an Armbian image, you should be able to restore it, by just copying the first sector
<ayunami2000> yep it is
<ayunami2000> awesome
<apritzel> dd if=armbian.img of=mmcblk count=1
<ayunami2000> lol its the pine64 armbian image
<apritzel> but then Armbian adjusts the partition size of first boot, IIRC, so this might not work too well
<ayunami2000> eh lets find out shall we
<apritzel> btw: it looks like the generic flavour of Manjori uses UEFI, which might magically solve your WiFi issue
<ayunami2000> oh neat
<ayunami2000> ill give it a try
<apritzel> since UEFI will use U-Boot's devicetree
<ayunami2000> ok so now at minimum it should boot to u-boot right
<ayunami2000> and maybe itll boot armbian not sure
<ayunami2000> its still in fel
<ayunami2000> why is it still in fel
vagrantc has quit [Quit: leaving]
<ayunami2000> is there a way to get fel to boot uboot from the sd
<apritzel> not easily, though you can chainload U-Boots (though this won't help you)
<ayunami2000> oh good news i think the partitions are at least somewhat better
<ayunami2000> i can use mmc in u-boot
<ayunami2000> and it sees a second device
<apritzel> so did you try the TOC0 image on an SD card at offset 8K now? That should boot regardless of the partition table
<ayunami2000> i did but it does not work it still goes to fel
<apritzel> maybe it's then the FEL button being stuck?
<ayunami2000> maybe.
<apritzel> it's not too complicated to open, just be careful with that touch cable that's somehow soldered to the lid
<ayunami2000> ive opened it thats how i discovered i broke the button lol
<apritzel> ah
<apritzel> it's odd, since the button needs to closed to force FEL, I guess if it's broken the connection would be open?
<ayunami2000> thats what i was thinking
<apritzel> it's worth double checking that SD card image: is it really the TOC0, at offset 8K?
<apritzel> Do you have serial connected? or just HDMI?
<ayunami2000> just hdmi
<apritzel> bummer, that would simplify the diagnosis
<ayunami2000> i can prob flash the u-boot toc0 to the emmc via u-boot
<ayunami2000> i actually already went thru making a vfat on a flash drive
<ayunami2000> and putting my failed attempt of u-boot on there
<ayunami2000> so i can just do that again
<ayunami2000> the only downside is that the flash drive is actually a rooted mini phone that i have to wait to boot
<apritzel> the U-Boot doc lists what to do for flashing U-Boot from U-Boot, also for the boot partition
<apritzel> sorry, have to call it a day here, but feel free to dump stuff in here, will read the logs tomorrow ...
<ayunami2000> alr, thanks for all ur help!!
<ayunami2000> really appreciated
<apritzel> yw
apritzel has quit [Ping timeout: 480 seconds]
<ayunami2000> oh my god it worked
<ayunami2000> i was able to use u-boot to flash the toc0 u-boot
<ayunami2000> to the emmc
<ayunami2000> and it WORKED IT BOOTS MANJARO YAYYYY
<ayunami2000> now the easier part, getting the right build of manjaro
<ayunami2000> ty again
ayunami2000 has quit [Quit: Page closed]
hentai has joined #linux-sunxi
ftg has quit [Read error: Connection reset by peer]
montjoie_ has joined #linux-sunxi
montjoie has quit [Ping timeout: 480 seconds]
gnarface has quit [Remote host closed the connection]
flyback has quit [Ping timeout: 480 seconds]
gnarface has joined #linux-sunxi
flyback has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
<parthiban> MasterR3C0RD please do submit the syscon changes. Thanks
Jookia has joined #linux-sunxi
hexdump0815 has joined #linux-sunxi
hexdump01 has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
apritzel has joined #linux-sunxi
warpme has joined #linux-sunxi
warpme has quit []
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
warpme has joined #linux-sunxi
mripard has joined #linux-sunxi
immibis has quit [autokilled: Host violated network policy. - Contact support@oftc.net for help. (2024-11-27 10:27:59)]
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
ing_warn_ has quit [Ping timeout: 480 seconds]
bauen1 has quit [Ping timeout: 480 seconds]
ing_warn has joined #linux-sunxi
apritzel_ has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
dsimic is now known as Guest1233
dsimic has joined #linux-sunxi
Guest1233 has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
apritzel_ has quit [Ping timeout: 480 seconds]
apritzel has quit [Ping timeout: 480 seconds]
warpme has quit []
warpme has joined #linux-sunxi
bauen1 has joined #linux-sunxi
apritzel has joined #linux-sunxi
JohnDoe_71Rus has quit [Quit: KVIrc 5.2.6 Quasar http://www.kvirc.net/]
warpme has quit []
warpme has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
warpme has quit []
hazardchem has quit [Remote host closed the connection]
hazardchem has joined #linux-sunxi
bauen1_ has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
apritzel has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
bauen1_ has quit [Ping timeout: 480 seconds]
vagrantc has joined #linux-sunxi
parthiban has quit [Remote host closed the connection]
parthiban has joined #linux-sunxi
ftg has joined #linux-sunxi
warpme has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
Jookia has left #linux-sunxi [#linux-sunxi]
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
warpme has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
JohnDoe_71Rus has quit [Quit: KVIrc 5.2.6 Quasar http://www.kvirc.net/]
warpme has joined #linux-sunxi
apritzel has joined #linux-sunxi
warpme has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bauen1 has joined #linux-sunxi
electricworry has joined #linux-sunxi
electricworry has left #linux-sunxi [#linux-sunxi]
electricworry has joined #linux-sunxi
<loki666> apritzel, was looking at sunxi bsp kernel5.4 ccu clk driver, and the .enable bit is 27, not 31 as in mainline
<loki666> it does ring a bell with what you tried to do to fix my issues with cpufreq
<apritzel> well, technically bit 31 is the enable bit, and bit 27 is a gate, so mainline is correct in this respect.
<apritzel> It's just that AW doesn't recommend to disable the PLLs at runtime, instead gate them only
<apritzel> loki666: but did that swap of bits change anything for your cpufreq experience?
<loki666> nope
<loki666> just looking at lines of code as a hobby
<loki666> but I couldn't find the reparenting mechanism you posted on ML in their kernel
macromorgan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
macromorgan has joined #linux-sunxi
<apritzel> loki666: interesting, but maybe it's implemented differently, and they hack it somehow in the cpufreq code?
<apritzel> because the H616 manual clearly states that the CPU should be clocked by something else during the PLL change
<apritzel> which is in contrast to earlier SoCs like the A64, where they claimed that changing the CPU PLL would be glitch-free, which is not really the case
ftg has quit [Read error: Connection reset by peer]