rellla changed the topic of #linux-sunxi to: Allwinner/sunxi /development discussion - did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait! - https://github.com/linux-sunxi/ - Logs at http://irclog.whitequark.org/linux-sunxi - *only registered users can talk*
Gerwin_J has quit [Quit: Gerwin_J]
dev1990 has quit [Quit: Konversation terminated!]
DonkeyHotei has quit [Ping timeout: 268 seconds]
suprothunderbolt has joined #linux-sunxi
fl_0 has quit [Ping timeout: 258 seconds]
AneoX_ has joined #linux-sunxi
AneoX has quit [Ping timeout: 258 seconds]
gaston_ has quit [Quit: Konversation terminated!]
cnxsoft has joined #linux-sunxi
Asara has quit [Quit: brb]
anarsoul|c has joined #linux-sunxi
ldevulder_ has joined #linux-sunxi
ldevulder has quit [Ping timeout: 245 seconds]
Asara has joined #linux-sunxi
default__ has joined #linux-sunxi
megi has quit [Ping timeout: 248 seconds]
ldevulder_ has quit [Ping timeout: 258 seconds]
<wens> fake-hwclock + ntp
fl_0 has joined #linux-sunxi
Asara has quit [Quit: leaving]
TheSeven has quit [Disconnected by services]
[7] has joined #linux-sunxi
<veremitz> crony :p
<veremitz> as distinct from cronIE :)
Asara has joined #linux-sunxi
Putti has joined #linux-sunxi
Putti has quit [Ping timeout: 245 seconds]
lurchi_ has joined #linux-sunxi
lurchi__ has quit [Ping timeout: 245 seconds]
dddddd has quit [Remote host closed the connection]
chewitt has quit [Read error: Connection reset by peer]
default__ has quit [Read error: Connection reset by peer]
default__ has joined #linux-sunxi
vpeter has quit [Remote host closed the connection]
vpeter has joined #linux-sunxi
lvrp16 has quit [Ping timeout: 252 seconds]
lvrp16 has joined #linux-sunxi
f0xx has joined #linux-sunxi
selfbg has joined #linux-sunxi
[7] has quit [Ping timeout: 252 seconds]
TheSeven has joined #linux-sunxi
TheSeven has quit [Ping timeout: 248 seconds]
TheSeven has joined #linux-sunxi
default__ is now known as ldevulder
mripard_ has quit [Quit: leaving]
mripard has joined #linux-sunxi
yann has quit [Ping timeout: 245 seconds]
MoeIcenowy has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
MoeIcenowy has joined #linux-sunxi
mripard has quit [Quit: leaving]
mripard has joined #linux-sunxi
ganbold has quit [Quit: Leaving...]
jstefanop has joined #linux-sunxi
ganbold has joined #linux-sunxi
jstefanop has quit [Ping timeout: 272 seconds]
tnovotny has joined #linux-sunxi
ScrumpyJack has quit [Quit: Eat more sushi]
tllim has quit [Read error: Connection reset by peer]
<fALSO> bom dia
SopaXorzTaker has joined #linux-sunxi
<SopaXorzTaker> How do I tell the kernel that my rootfs is in the ramdisk image?
<SopaXorzTaker> I mean, I used miniroot to create an initramfs image.
<wens> just have the bootloader load the initramfs image
clonak has quit [Read error: Connection reset by peer]
clonak_ has joined #linux-sunxi
<wens> if your initramfs doesn't do pivot_root, then it stays on the initramfs :)
<SopaXorzTaker> No, I mean, my kernel panics due to not finding a rootfs for some reason.
<wens> then it's not going to the initramfs
<wens> did you get the bootloader to load the initramfs into memory _and_ pass the memory address to the kernel?
<SopaXorzTaker> The bootloader loads the initramfs uImage and verifies its checksum successfully, but I don't specify its address in the kernel arguments; should I do that?
<wens> you have to tell the kernel. how else is it going to know about it?
<wens> are you using bootz or booti?
<SopaXorzTaker> I'm using bootm.
<wens> use bootz. period.
<SopaXorzTaker> bootm <kernel addr> <initramfs addr> <dtb addr>
<wens> yeah, well pass the address as the second parameter?
<SopaXorzTaker> That's what I'm doing right now and the kernel doesn't see it.
<wens> does the bootloader complain about anything?
<KotCzarny> maybe you are loading ramdisk with some wrapper?
<SopaXorzTaker> No, it's seemingly fine and verifies the images successfully.
<KotCzarny> pastebin the dmesg?
<wens> I suggest just using bootz and get rid of the U-boot legacy image format
<wens> it is the preferred way
<SopaXorzTaker> Obtaining a log would be troublesome as I don't have an UART adapter attached (and I really, really should resolve that).
<KotCzarny> yup, it might print something interesting in between
yann has joined #linux-sunxi
<SopaXorzTaker> wens, so should I make a kernel zImage now?
<wens> SopaXorzTaker: what is the format of your initramfs anyway? gzip?
<SopaXorzTaker> Yes.
<SopaXorzTaker> I built it using miniroot and then used mkimage against that to get an uInitrd.
<wens> with or without the U-boot image wrapper?
<wens> try using the .gz file instead?
<SopaXorzTaker> Directly?
<wens> don't know if U-boot supports that, but it's worth a try
<wens> yeah
<SopaXorzTaker> bootm verifies the image header, I won't be able to, I think.
<SopaXorzTaker> >> "For at least the cubieboard with the mainline/devicetree kernel you will also want to set initrd_high before calling bootm, such as"
<SopaXorzTaker> hmm
Mangy_Dog has joined #linux-sunxi
<SopaXorzTaker> I shall try that, shall I?
<wens> yeah, I think that was the other bit
<wens> because U-boot relocates the initramfs image
<SopaXorzTaker> And the kernel expects to find it at the original location?
<SopaXorzTaker> Whoa, it crashed
_0x5eb_ has quit [Ping timeout: 272 seconds]
<wens> The U-boot README gives a proper explanation. It's a bit long to post here.
<wens> been a while since I used initramfs
ScrumpyJack has joined #linux-sunxi
<SopaXorzTaker> > uInitrd must not fall inside the range 0x43000000-0x4FFFFFF due to memory allocation conflicts.
<SopaXorzTaker> >> write 0x43300000 uInitrd
<SopaXorzTaker> gotcha
<wens> if initrd_high isn't set to 0xffffffff, looks like U-boot relocates it, and passed the new address to the kernel
<SopaXorzTaker> Hmm, still crashing
Gerwin_J has joined #linux-sunxi
<wens> probably something else.
<wens> like your images might be overlapping
<wens> btw, U-boot should provide some default values for kernel_addr_r, ramdisk_addr_r, fdt_addr_r, which you can use
<DuClare> Ymmv, everything just kinda magically works for me with itbs
<wens> they should be reasonably kept apart in memory so nothing overlaps, except for the largest of kernels/ramdisks
<wens> something kernelCI has run into
suprothunderbolt has quit [Ping timeout: 248 seconds]
<MoeIcenowy> wens: for initramfs it seems to be switch_root
<MoeIcenowy> not pivot_root
popolon has joined #linux-sunxi
afaerber has joined #linux-sunxi
f0xx has quit [Ping timeout: 246 seconds]
<SopaXorzTaker> I switched the framebuffer console to use a tiny font
<SopaXorzTaker> I can see the error now, it's indeed what I suspected.
<wens> which was?
<SopaXorzTaker> It can't see any root partition.
<MoeIcenowy> SopaXorzTaker: what screen are you using?
<MoeIcenowy> I remember Linux will automatically use tiny font when screen is small
<KotCzarny> but you need to find out why it doesnt mount ramdisk
<KotCzarny> MoeIcenowy: default font is 8x16, you can use 8x8
<wens> SopaXorzTaker: stupid question, do you have initramfs support built in the kernel?
<SopaXorzTaker> MoeIcenowy, 1024x600, but I intentionally made the font 8x8 so that the error doesn't get scrolled past as I don't use the UART console.
<MoeIcenowy> KotCzarny: when I'm using 480x272 LCD panel, it's automatically switched to 4x6
<SopaXorzTaker> wens, hmm, that's not actually such a stupid question
<wens> IIRC it is _not_ on in sunxi_defconfig
<MoeIcenowy> SopaXorzTaker: did you pack the initramfs w/ mkimage?
<wens> MoeIcenowy: he did
<MoeIcenowy> wens: send a patch for it ;-)
<SopaXorzTaker> In .config, there's CONFIG_INITRAMFS_SOURCE=""
<SopaXorzTaker> (kernel)
<wens> that's not it
<wens> CONFIG_BLK_DEV_INITRD
<MoeIcenowy> wens: initrd != initramfs
<SopaXorzTaker> Oh, right before that, didn't see it.
<MoeIcenowy> initramfs is a tmpfs, not about block device
<SopaXorzTaker> Yes, it's set to "y"
<wens> MoeIcenowy: Initial RAM filesystem and RAM disk (initramfs/initrd) support
<wens> MoeIcenowy: :)
<SopaXorzTaker> Okay, turns out I didn't update the script before trying, another attempt...
<wens> MoeIcenowy: it goes through the same code path I believe, being checking if the bootloader specified an initrd/initramfs
<SopaXorzTaker> I currently have > panic=30 rootwait fbcon=font:VGA8x8 initrd=0x42a00000 root=/dev/mem0 rw
<SopaXorzTaker> It halts, as there's no /dev/mem0 (and I don't know if that's what I should be doing, but it doesn't see anything otherwise)
<MoeIcenowy> SopaXorzTaker: it's not needed to pass initrd= for Linux kernel
<MoeIcenowy> Linux kernel doesn't recognize it
<SopaXorzTaker> It's also passed via bootm and the kernel doesn't see it.
<wens> SopaXorzTaker: just drop both initrd= and root=
<wens> SopaXorzTaker: you don't need them
<MoeIcenowy> yes
<SopaXorzTaker> That's what I was doing initially.
<MoeIcenowy> root=/dev/mem0 is harmful for initramfs setup
<MoeIcenowy> because initramfs is not backed by ram block device
<MoeIcenowy> and root= is not intended for an initramfs
<wens> SopaXorzTaker: again, you don't need them. with initramfs the kernel allocates a tmpfs mount and unpacks the initramfs stuff into it
<MoeIcenowy> it's intended for real final /
<SopaXorzTaker> So, how do I stop my kernel from wanting a rootfs?
<wens> SopaXorzTaker: and with initramfs, the kernel will ignore root= . It's up to the initramfs tooling to mount and switch to the real root.
<MoeIcenowy> SopaXorzTaker: build all your needed drivers in
<MoeIcenowy> and just set root= your reall /
<wens> SopaXorzTaker: with initramfs, the kernel will just load the initramfs and run init from it, and consider it done
<SopaXorzTaker> I don't have a real /, only a miniroot initrd
<MoeIcenowy> SopaXorzTaker: is it an initrd or an initramfs?
<MoeIcenowy> initrd is a real disk image w/ a fs
<MoeIcenowy> initramfs is just a cpio archive
<SopaXorzTaker> It's actually the latter, I have a cpio archive there.
<wens> SopaXorzTaker: if you don't see "Unpacking initramfs..." you are not getting initramfs for whatever reason
<MoeIcenowy> SopaXorzTaker: do your initramfs have /init ?
<SopaXorzTaker> wens, the kernel doesn't see initramfs for some reason, that's the issue.
<wens> SopaXorzTaker: so did you check your kernel config yet?
<MoeIcenowy> or /linuxrc
<MoeIcenowy> (I didn't remember which one is really executed
<wens> SopaXorzTaker: CONFIG_BLK_DEV_INITRD and CONFIG_RD_*
<MoeIcenowy> oh it's /init
<MoeIcenowy> for initramfs
<SopaXorzTaker> CONFIG_RD_GZIP/BZIP2/whatever is set to y
<SopaXorzTaker> I do have a /sbin/init in the initramfs
<MoeIcenowy> it's /init for initramfs
<MoeIcenowy> not /sbin/init
<SopaXorzTaker> I don't think that's present, no
<wens> IIRC /sbin/init works? buildroot images work fine for initramfs
<SopaXorzTaker> I'll try making a new uImage in the meanwhile
<SopaXorzTaker> also, somehow a kernel image showed up in the miniroot directory, but I only pointed it to the built kernel modules
fl_0 has quit [Quit: STRG + Q]
<SopaXorzTaker> Let's try not specifying it at all, I wonder what the kernel will do
<SopaXorzTaker> Hmm, the VFS error code seems to have changed
<wens> you really need to get a proper console
<wens> we basically have no idea what is happening with your system
ceng has quit [Ping timeout: 268 seconds]
<dgp> and maybe just use buildroot to build a kernel with an initramsfs embedded in it to start with
<SopaXorzTaker> dgp, that's a good idea.
Hell__ has joined #linux-sunxi
<dgp> Are you using JTAG + a breakpoint on printk as a console?
<SopaXorzTaker> with initramfs, the VFS reports error -2, else it's -6, interesting.
<wens> dgp: he's using an LCD screen
<SopaXorzTaker> dgp, no, I'm using a framebuffer console.
<wens> This is my working initramfs boot up script + log: https://wens.tw/initramfs.txt
<dgp> SopaXorzTaker: ok, just build a kernel with the initramfs included and go from there. Once you get a shell you'll be able to inspect /dev etc and see why it won't work
<SopaXorzTaker> "just build a kernel with the initramfs included"
<SopaXorzTaker> How can this be done?
<dgp> buildroot
megi has joined #linux-sunxi
<wens> buildroot image has /init, which just execs /sbin/init after setting up the console
<wens> SopaXorzTaker: so maybe try adding /init to your image if you run out of ideas?
Hellsenberg has quit [Quit: CPU triple-faulted.]
Hellsenberg has joined #linux-sunxi
Hellsenberg has quit [Client Quit]
<wens> SopaXorzTaker: oh, and increase the loglevel of your console
<wens> the default loglevel is not enough for debugging issues
<SopaXorzTaker> I've tried and it's apparently at the maximum verbosity.
<SopaXorzTaker> If I don't specify an initramfs, it's > VFS: Cannnot open root device (null) or unknown-block(0,0): error -6
<SopaXorzTaker> If I do specify the address, it becomes > VFS: Cannnot open root device (null) or unknown-block(0,0): error -2
<KotCzarny> isnt there ramdisk howto on sunxi?
<SopaXorzTaker> That's what I am following.
<KotCzarny> basics: there are two types of ramdisk, block one and files one
<KotCzarny> block one is called initrd, files one is initramfs
<KotCzarny> the only address you have to specify is in uboot, where you load initrd into ram, then bootm/bootz uses that address
<KotCzarny> initramfs doesnt use it at all
<KotCzarny> to use initramfs, in kernel config you specify base dir of files
<KotCzarny> to use initrd you have to prepare it yourself
<KotCzarny> initramfs is glued to kernel during build, initrd is separate file
<wens> you can also prepare initramfs yourself. it's just the difference of cpio vs rom/ram/cramfs
<KotCzarny> wens, yeah, but lets stick to basic workflow
<wens> I agree
<wens> SopaXorzTaker: maybe you could take a literal screenshot (with a camera) and post it somewhere
<KotCzarny> also, pastebin your .config
<wens> SopaXorzTaker: that would help people here that are trying to help you have more clues
<wens> SopaXorzTaker: otherwise we're just working in the dark, and TBH it's very frustrating
<SopaXorzTaker> My kernel config is sunxi_defconfig, unmodified.
<KotCzarny> does it enable initrd by default?
<SopaXorzTaker> Yes.
<SopaXorzTaker> Hmm, may this be caused by having CONFIG_BLOCK set?
<wens> no
<KotCzarny> hint, sunxi_defconfig DOESNT enable CONFIG_BLK_DEV_RAM:
<KotCzarny> :P
<KotCzarny> just checked
<KotCzarny> so no, you dont have initrd support enabled
<wens> KotCzarny: that is for initrd. thought we were talking about initramfs?
<KotCzarny> (with 5.2, but probably applies to all earlier ones)
<KotCzarny> nope
<KotCzarny> he loads ramdisk via uboot, right?
<wens> that is still initramfs
<wens> u-boot just calls it ramdisk
<KotCzarny> nope
<wens> yes
<KotCzarny> that's initrd
<wens> I'm telling you it's initramfs. I literally just booted a kernel with CONFIG_BLK_DEV_RAM=n and U-boot loading the rootfs image
<KotCzarny> SopaXorzTaker: how do you prepare your ramdisk? with cpio or dd/mkfs ?
<SopaXorzTaker> I used miniroot according to the tutorial in the wiki.
<KotCzarny> wens, but i think it could be worthwile to enable that option in defconfig
<KotCzarny> care to paste wiki link you are using?
<wens> KotCzarny: I'm telling you that's not the issue
<KotCzarny> wens, since i'm not familiar with that tutorial, i cant comment
<KotCzarny> but the initrd vs initramfs holds
<wens> KotCzarny: U-boot doesn't care
<KotCzarny> and i mostly use initrd in my projects, rarely initramfs
<KotCzarny> but kernel cares
Hellsenberg has joined #linux-sunxi
<wens> you give it an image, it loads it, and passes the address to the kernel
<wens> yeah, and miniroot on linux-sunxi does initramfs, not initrd
<karlp> I've always found initrd vs initramfs one of the most confusing things for new players.
<KotCzarny> SopaXorzTaker: what kernel params are you using for booting? is there any root=/dev/ram or something?
<dgp> karlp: it's just the format isn't it? an actual fs image (initrd) vs extracting a bunch of files from an archive (initramfs)
<wens> I'm just going to wait for a full boot log. Going back and forth like this is getting nowhere
<KotCzarny> yup
<wens> dgp: code path, preperation, and kconfig options required differ
<KotCzarny> dgp: its not just format, one is uding emulated block device, and other is using virtual fs
<wens> dgp: so you could have prepared initrd, but forgot to enable BLK_DEV_RAM, or CRAMFS or something
<KotCzarny> with initrd you have limited space to write
<dgp> wens: I think buildroot sets the right kconfig options if you build both the kernel and the rootfs with it
<wens> dgp: I build only the root, not the kernel, with buildroot
<dgp> having buildroot build the kernel with initramfs and dtb built right in is pretty handy
<dgp> especially when you have crap version of u-boot on a new board
<wens> it is. I just have different use cases.
<wens> I only use initramfs when mmc isn't supported yet for a new SoC
<SopaXorzTaker> KotCzarny, not anymore
<SopaXorzTaker> Specifying that explicitly made no difference
<wens> SopaXorzTaker: please try to get a snapshot of the log
<dgp> wens: I did the same.. :)
<SopaXorzTaker> I'll need the UART to capture the entirety of it.
<dgp> SopaXorzTaker: you should have probably wired that up to start with really
Hell__ has quit [Remote host closed the connection]
<SopaXorzTaker> That's right.
jaganteki has joined #linux-sunxi
fl_0 has joined #linux-sunxi
Hellsenberg has quit [Quit: CPU triple-faulted.]
Hellsenberg has joined #linux-sunxi
Hellsenberg has quit [Client Quit]
Hellsenberg has joined #linux-sunxi
ceng has joined #linux-sunxi
nashpa has quit [Ping timeout: 272 seconds]
nashpa has joined #linux-sunxi
Wizzup has quit [Ping timeout: 248 seconds]
gaston_ has joined #linux-sunxi
Wizzup has joined #linux-sunxi
lurchi_ is now known as lurchi__
reinforce has joined #linux-sunxi
Putti has joined #linux-sunxi
dddddd has joined #linux-sunxi
s_frit has joined #linux-sunxi
popolon has quit [Quit: WeeChat 2.5]
nashpa has quit [Ping timeout: 246 seconds]
jaganteki has quit [Ping timeout: 256 seconds]
s_frit has quit []
s_frit has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
Putti has quit [Remote host closed the connection]
Putti has joined #linux-sunxi
selfbg has quit [Remote host closed the connection]
megi has quit [Quit: WeeChat 2.4]
megi has joined #linux-sunxi
jstefanop has joined #linux-sunxi
ldevulder_ has joined #linux-sunxi
ldevulder has quit [Ping timeout: 245 seconds]
TEKrantz has quit [Quit: If at first you don't succeed, skydiving is not for you.]
nashpa has joined #linux-sunxi
cnxsoft has quit [Quit: cnxsoft]
tllim has joined #linux-sunxi
vagrantc has joined #linux-sunxi
yann has quit [Ping timeout: 244 seconds]
<montjoie> hello I have an olinuxino A33, uboot detect the ASIX USB connected on the otg port, but not linux, does I need to do something
ninolein has joined #linux-sunxi
AneoX_ has quit [Quit: Textual IRC Client: www.textualapp.com]
tnovotny has quit [Quit: Leaving]
f0xx has joined #linux-sunxi
dev1990 has joined #linux-sunxi
tl_lim has joined #linux-sunxi
putti_ has joined #linux-sunxi
Putti has quit [Remote host closed the connection]
tllim has quit [Ping timeout: 258 seconds]
yann has joined #linux-sunxi
putti_ is now known as Putti
wigyori has quit [Remote host closed the connection]
kaspter has quit [Read error: Connection reset by peer]
kaspter has joined #linux-sunxi
ganbold has quit [Ping timeout: 245 seconds]
JohnDoe_71Rus has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
DonkeyHotei has joined #linux-sunxi
xes has quit [Remote host closed the connection]
xes has joined #linux-sunxi
xes has quit [Read error: Connection reset by peer]
wigyori has joined #linux-sunxi
xes has joined #linux-sunxi
Putti has quit [Remote host closed the connection]
xes has quit [Remote host closed the connection]
xes has joined #linux-sunxi
xes has quit [Read error: Connection reset by peer]
SopaXorzTaker has quit [Remote host closed the connection]
Hell__ has joined #linux-sunxi
Hell__ has quit [Remote host closed the connection]
Putti has joined #linux-sunxi
Putti has quit [Ping timeout: 245 seconds]
MangyDog has joined #linux-sunxi
Mangy_Dog has quit [Ping timeout: 248 seconds]
afaerber has quit [Quit: Leaving]
f0xx has quit [Ping timeout: 245 seconds]
ninolein has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
iamfrankenstein has joined #linux-sunxi
dev1990 has quit [Quit: Konversation terminated!]
dev1990 has joined #linux-sunxi
dev1990 has quit [Remote host closed the connection]
dev1990 has joined #linux-sunxi
dev1990 has quit [Quit: Konversation terminated!]
dev1990 has joined #linux-sunxi
afaerber has joined #linux-sunxi
iamfrankenstein has quit [Quit: iamfrankenstein]
dev1990 has quit [Remote host closed the connection]
dev1990 has joined #linux-sunxi
xes has joined #linux-sunxi
xes has quit [Client Quit]
arnidg has quit [Quit: ZNC - https://znc.in]
arnidg has joined #linux-sunxi
gnufan_home has joined #linux-sunxi
xes has joined #linux-sunxi
fevv8[m] has quit [Quit: Idle kick: User has been idle for 30+ days.]
jstefanop has quit [Remote host closed the connection]
jstefanop has joined #linux-sunxi
jstefanop has quit [Read error: Connection reset by peer]
jstefano_ has joined #linux-sunxi
gaston_ has quit [Quit: Konversation terminated!]
jstefano_ has quit [Ping timeout: 248 seconds]
reinforce has quit [Quit: Leaving.]
ganbold has joined #linux-sunxi
MangyDog has quit [Ping timeout: 268 seconds]
lurchi__ is now known as lurchi_
vagrantc has quit [Quit: leaving]
jstefanop has joined #linux-sunxi
jstefanop has quit [Ping timeout: 244 seconds]