-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation instructions? #4
Comments
We will eventually release a buildroot system to compile the kernel + a small initramfs but as of right now you can disable the hardcoded rootfs directory and use the cpio from the original release. |
https://gist.github.com/xerpi/3c720d345820691a2985502fcd80268f#gistcomment-3684668 has directions for a basic buildroot image that works. Just need to modify the dts file to tell it not to power down the machine immediately. But it would be good to add a buildroot repo to this gh project. |
I plan to rewrite the readme for each project with build steps. |
I wonder if I could retool my old buildroot project for this kernel fork...
Actually, that was rather painless. Hopefully it builds a little faster than it did on that 600MHz laptop I used to use.
…On Tue, Mar 30, 2021 at 6:14 PM Nick Desaulniers ***@***.***> wrote:
I plan to rewrite the readme for each project with build steps.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHE6CQPQQE5RBU4I2AU7WKTTGJLNJANCNFSM42DE744Q>
.
|
I think it would be better to keep the kernel build out of buildroot. It's simpler the other way around IMO; build a buildroot image as an initrd, then place it in the kernel sources and leave it in the kernel tree as rootfs.cpio.gz. The kernel build will produce the zImage with the ramdisk bundled. I would create a separate git repo under this org that has a script and uses git submodules to clone all relevant sources, and orchestrate the build via shell scripts. It would also be nice for us to provide prebuilt binaries, since most of the time during development not all pieces change and it's generally easier for users to test with those (though they can still use our build scripts if they want). I think that's a better approach than including patch files for kernel sources in buildroot. That won't scale when we break up the currently single commit for upstreaming. |
Since we don't want to pollute the linux dir with documentation (at least at this point. We can add documentations to Documentation/ later) for how to build or simply how to run this, do folks have thoughts on either approaches/ideas:
I think it would be good to have separate docs for fellow developers vs users that just want to run linux. I guess they don't need to be separate per se. Thoughts? |
Honestly, i'd be in favor of using the repo wiki. Too many repos will have build instructions, downloads, etc. in a gist or on some other page, which feels somewhat jarring, personally. |
SGTM. Yes gists aren't editable from others IIRC, so let's avoid those for documentation. @Wolfvak can you please enable wikis on all repos? One issue is that we wont be able to host binaries on the wiki pages, I think. |
Done |
I can get Buildroot to spit out a zImage when I fix the hardcoded path in the defconfig, but it doesn't contain a rootfs. I'm not sure how to fix that, as Buildroot won't spit out a rootfs until well after you pass that point. |
right, because the kernel will fail to build because the kernel config says "look for rootfs.cpio.gz in the current working directory and include it in the build of the kernel." When you build the kernel via buildroot, you're building these in the wrong order. You need to build the buildroot image without building the kernel at all. Then you take the resulting rootfs.cpio.gz and put that in the kernel sources. Then you build the kernel. |
I tried that, since you stated to do it in the PR I made, but it still spits out a bad zImage. |
If the rootfs.cpio.gz was not in the kernel sources, the kernel build should fail. If the rootfs.cpio.gz is invalid, non-decompressable, or init is not executable, you should see a kernel panic (that's relatively good, at least the kernel image isn't bad, just the ramdisk is). === I've now recompiled firm_linux_loader (instructions) and arm9linuxfw (instructions) and verified they work. I haven't tried this fork of the kernel yet, maybe something is messed up there with that. Let me verify and see if that's possibly the issue @ParzivalWolfram is hitting. Where/how should I post binaries of what I have? |
It's failing immediately on boot as it can't mount the rootfs. The rootfs i'm building is almost 23MB, the zImage that should contain it is just over 5MB. |
This is my buildroot config. (For some reason, I have to hardcode the commit for the kernel header specifically, I can't just tell it to use the master branch like I can the kernel itself.) |
Please see:
The directions will change more in the future, but we'll try to keep the wikis up to data. Might do more fomal HTML/MD pages. Might upload that twitch video to YT. |
We had kernel panic, it is caused by unload module and last close confirmation. call trace: [1196029.743127] free_sess+0x15/0x50 [rtrs_client] [1196029.743128] rtrs_clt_close+0x4c/0x70 [rtrs_client] [1196029.743129] ? rnbd_clt_unmap_device+0x1b0/0x1b0 [rnbd_client] [1196029.743130] close_rtrs+0x25/0x50 [rnbd_client] [1196029.743131] rnbd_client_exit+0x93/0xb99 [rnbd_client] [1196029.743132] __x64_sys_delete_module+0x190/0x260 And in the crashdump confirmation kworker is also running. PID: 6943 TASK: ffff9e2ac8098000 CPU: 4 COMMAND: "kworker/4:2" #0 [ffffb206cf337c30] __schedule at ffffffff9f93f891 linux-3ds#1 [ffffb206cf337cc8] schedule at ffffffff9f93fe98 linux-3ds#2 [ffffb206cf337cd0] schedule_timeout at ffffffff9f943938 linux-3ds#3 [ffffb206cf337d50] wait_for_completion at ffffffff9f9410a7 linux-3ds#4 [ffffb206cf337da0] __flush_work at ffffffff9f08ce0e linux-3ds#5 [ffffb206cf337e20] rtrs_clt_close_conns at ffffffffc0d5f668 [rtrs_client] linux-3ds#6 [ffffb206cf337e48] rtrs_clt_close at ffffffffc0d5f801 [rtrs_client] linux-3ds#7 [ffffb206cf337e68] close_rtrs at ffffffffc0d26255 [rnbd_client] linux-3ds#8 [ffffb206cf337e78] free_sess at ffffffffc0d262ad [rnbd_client] linux-3ds#9 [ffffb206cf337e88] rnbd_clt_put_dev at ffffffffc0d266a7 [rnbd_client] The problem is both code path try to close same session, which lead to panic. To fix it, just skip the sess if the refcount already drop to 0. Fixes: f7a7a5c ("block/rnbd: client: main functionality") Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: Gioh Kim <gi-oh.kim@cloud.ionos.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
I've been following progress on Linux 3DS since I dropped it, and I was wondering what your procedure for compiling is, as I'm willing to test commits on my N3DSXL.
The text was updated successfully, but these errors were encountered: