Skip to content
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

Help for a newbie #10

Closed
telnetdoogie opened this issue Dec 17, 2021 · 11 comments
Closed

Help for a newbie #10

telnetdoogie opened this issue Dec 17, 2021 · 11 comments
Labels
question Further information is requested

Comments

@telnetdoogie
Copy link
Contributor

I received the v1.11.10-23 GPL archive from Ubiquiti, but I think what I was expecting to receive was something that made a bit more sense to me...

The archive has:

buildroot.config
host-manifest.csv
manifest.csv

and four folders:

host-licenses/
host-sources/
licenses/
sources/

inside each of the sources folder are module / dependencies with patches, and the src.tar for each of those modules. For example:

sources/alsa-lib-1.1.5/
  - alsa-lib-1.1.5.tar.bz2
  - 0001-no-mmu.patch
  - 0002-dlmisc.patch
  - 0003-conditional-enabling-of-libdl-in-m4.patch
  - series (appears to be a list of the patches for this module)

How does one untangle what differences are pertinent between the previous version committed to this repo, versus what I received?

If it seems like I'm way too much of a newbie, I won't be offended if you let me know that ;) I would love to learn though.

@telnetdoogie
Copy link
Contributor Author

...perhaps there's a lot more building and kernel compilation experience than I was expecting before I'm able to diff the two sets of artifacts

@fabianishere fabianishere added the question Further information is requested label Dec 17, 2021
@fabianishere
Copy link
Owner

What I do is I extract the contents of the Linux tarball (located in sources/linux-xxxx) into the udm-kernel repository. This allows Git to collect the changes between the last commit and the new firmware release.

@telnetdoogie
Copy link
Contributor Author

SUPER helpful. Now a git status shows me the difference in the files... looks like this:

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   drivers/gpio/gpio-pca953x.c
        modified:   drivers/net/ethernet/al/al_eth.c
        modified:   drivers/net/ethernet/al/al_mod_hal_eth_epe.c
        modified:   drivers/net/ethernet/al/al_mod_hal_eth_main.c
        modified:   drivers/net/ethernet/al/al_mod_init_eth_lm.c
        modified:   drivers/net/phy/Kconfig
        modified:   drivers/net/phy/ar8216.h
        modified:   drivers/net/phy/ar8327.c
        modified:   drivers/net/phy/rtl8370.h
        modified:   drivers/net/phy/swconfig_ubnt.c
        modified:   include/linux/switch_ubnt.h
        modified:   include/net/netfilter/nf_conntrack_dpi.h
        modified:   include/net/udp_tunnel.h
        modified:   include/uapi/linux/netfilter/nfnetlink_conntrack.h
        modified:   net/ipv4/udp_tunnel.c
        modified:   net/ipv6/ip6_udp_tunnel.c
        modified:   net/netfilter/nf_conntrack_netlink.c

...looks like a manageable list

@telnetdoogie
Copy link
Contributor Author

telnetdoogie commented Dec 17, 2021

So now I have a branch in my fork with the changes applied, do you want me to do a pull request just for those changes? I assume I want to be able to actually build the kernel with those changes to make sure things work, but that looks like it's a different process (I don't see the .github folder for example in my branch which is a branch off of flavour/stock-v4.19

https://github.com/telnetdoogie/udm-kernel/commit/c1c6f387a454ffffd431dc23c85acc4afc524268

@fabianishere
Copy link
Owner

You'll have to merge these changes on top of the flavour/edge-v4.19 branch to get access to the .github folder.

@fabianishere
Copy link
Owner

If you send a pull request, I'll integrate those changes into the repository.

@telnetdoogie
Copy link
Contributor Author

telnetdoogie commented Dec 17, 2021

I super appreciate your help. I merged master into my branch (maybe should've done flavour-edge-v4.19 instead and have now done a successful build of the kernel which I'll test out here shortly. I'll submit a PR for my updates for 1.11.10-23 here shortly.

...looks like master is up to date with flavour-edge-v4.19 so I guess no harm no foul

@telnetdoogie
Copy link
Contributor Author

When attempting to load the built kernel it appears to cause a kernel panic and then the original stock kernel is loaded.

# cat /sys/fs/pstore/*
[    0.575326] pci-pf-stub 0000:00:04.0: writing to VF config space
[    0.575391] pci-pf-stub 0000:00:05.0: writing to VF config space
[    0.594244] ahci 0001:00:00.0: writing to VF config space
[    0.601907] al_eth 0000:00:00.0: writing to VF config space
[    0.613631] al_eth 0000:00:01.0: writing to VF config space
[    2.295691] al_eth 0000:00:02.0: writing to VF config space
[    2.307391] al_eth 0000:00:03.0: writing to VF config space
[    7.751487] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020
[    7.760341] Mem abort info:
[    7.763167]   ESR = 0x96000005
[    7.766248]   Exception class = DABT (current EL), IL = 32 bits
[    7.772222]   SET = 0, FnV = 0
[    7.775305]   EA = 0, S1PTW = 0
[    7.778469] Data abort info:
[    7.781405]   ISV = 0, ISS = 0x00000005
[    7.785268]   CM = 0, WnR = 0
[    7.788264] user pgtable: 4k pages, 39-bit VAs, pgdp = 00000000511f7f89
[    7.794930] [0000000000000020] pgd=0000000000000000, pud=0000000000000000
[    7.801744] Internal error: Oops: 96000005 [#1] SMP
[    7.806672] Modules linked in: ubnt_common(PFO)
[    7.811228] Process modprobe (pid: 348, stack limit = 0x00000000f7e3803f)
[    7.818066] CPU: 1 PID: 348 Comm: modprobe Tainted: PF          O      4.19.152-v1.10.0.3686-a2edd0c #1
[    7.827503] Hardware name: Annapurna Labs Alpine V2 UBNT (DT)
[    7.833270] pstate: a0000005 (NzCv daif -PAN -UAO)
[    7.838116] pc : ref_module+0x48/0x110
[    7.841890] lr : resolve_symbol.isra.0+0xa0/0x108
[    7.846616] sp : ffffff8009f13bb0
[    7.849982] x29: ffffff8009f13bb0 x28: ffffff8000b28000
[    7.855318] x27: ffffff8009f13df0 x26: ffffff80089d8670
[    7.860679] x25: ffffff8000b226c8 x24: ffffff80009e4080
[    7.866013] x23: ffffff80009df2b8 x22: ffffff8009f13d70
[    7.871346] x21: ffffff80009e4080 x20: ffffff80009e4378
[    7.876706] x19: ffffff8000b223c0 x18: 0000000000000000
[    7.882039] x17: 0000000000000000 x16: 0000000000000000
[    7.887400] x15: 5400160b13131717 x14: ff00000000000000
[    7.892732] x13: 0000000000000000 x12: 0000000000000007
[    7.898093] x11: 0000000000000030 x10: 0101010101010101
[    7.903427] x9 : 0000000000000003 x8 : 7f7f7f7f7f7f7f7f
[    7.908789] x7 : 6bff636064715e6d x6 : 0000000000008018
[    7.914122] x5 : 1800000000000000 x4 : 0080000000000000
[    7.919482] x3 : ffffff80009df2b8 x2 : 0000000000000000
[    7.924816] x1 : ffffff80009e4080 x0 : ffffff8008131a00
[    7.930177] Call trace:
[    7.932651]  ref_module+0x48/0x110
[    7.936077]  resolve_symbol.isra.0+0xa0/0x108
[    7.940484]  load_module+0x1108/0x22e8
[    7.944257]  __se_sys_finit_module+0xc8/0xd8
[    7.948550]  __arm64_sys_finit_module+0x28/0x38
[    7.953133]  el0_svc_handler+0xc8/0x1a8
[    7.956993]  el0_svc+0x8/0xc4
[    7.959985] Code: 1400000c f9400042 eb02029f 54000120 (f9401043)
[    7.966128] ---[ end trace 7197ffc4a5b46163 ]---
[    7.974407] Kernel panic - not syncing: Fatal exception
[    7.979684] SMP: stopping secondary CPUs
[    7.983650] Kernel Offset: disabled
[    7.987163] CPU features: 0x0,20006008
[    7.990963] Memory Limit: none
[    7.997672] Rebooting in 3 seconds..

@telnetdoogie
Copy link
Contributor Author

...would I need to rebuild udm-kernel-tools with the commit # from my latest changeset for these changes before I'm able to apply that kernel? I think when I updated udm-kernel-tools I used the previous kernel commit versus my own?

@telnetdoogie
Copy link
Contributor Author

I think I also didn't use the config.udm file from that build so the kernel I'm attempting to apply is wrong... I'll tinker for a bit

@telnetdoogie
Copy link
Contributor Author

never mind, I got this build working. I needed to rebuild udm-kernel-tools, merge this with the master branch, AND update the config.stock.udm with the image from the stock kernel. ALL good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants