#garfield Logs
Apr 27 2020
#garfield Calendar
01:34 AM rue_mohr: I got my potatoes and strawberries mostly in order
05:53 PM Tom_L: rue_mohr, what does the && do in this line? make bzImage && make modules
05:54 PM Tom_L: can i just run them separate?
06:05 PM polprog: && runs make modules if make bzImage exited with success
06:05 PM polprog: you can
06:10 PM Tom_L: thanks
06:11 PM Tom_L: i thought that was the case but wasn't sure
06:23 PM Tom_L: so how do i remove a kernel entry from grub?
06:29 PM polprog: ive always done that automatically with os-prober..
06:56 PM aandrew: Yep && executes the rightmost iff left return code is 0, || iff left returns nonzero
06:59 PM Tom_L: well, i'll just run em one at a time since i've had issues
07:22 PM Tom_L: ok it's acting more like a kernel build this time..... slooooow
07:55 PM rue_mohr: Tom_L,
07:56 PM rue_mohr: make -j 9 bzImage then make will use 9 threads, instead of just 1
07:58 PM Tom_L: mmm, i'm past that now but good to know
08:00 PM Tom_L: do cores affect how many threads you can run?
08:03 PM Tom_L: says infinite jobs with no arg
08:04 PM Tom_L: so is that to add a restriction on it?
08:19 PM zhanx_ is now known as zhanx
09:02 PM rue_shop1: no
09:02 PM rue_shop1: cores effect how fast theads can get done
09:03 PM Tom_L: does make it go quicker :)
09:03 PM Tom_L: re'running it again
09:03 PM rue_shop1: yea, too much multitasking and it'll spend all its time switchng tasks
09:03 PM rue_shop1: usually about 2 threads/core is good for a compile like that
09:03 PM Tom_L: i think i muffed it the first time
09:03 PM rue_shop1: one of them can be loading the files and the other can be compiling
09:03 PM Tom_L: i was building against the preempt-rt one instead of the default kernel
09:03 PM rue_shop1: it can hit the hard drive pretty hard, you prolly got an ssd tho
09:03 PM rue_shop1: ok
09:04 PM Tom_L: probably not a good idea ehh?
09:04 PM rue_shop1: it what it is
09:04 PM Tom_L: ssd so who cares
09:04 PM rue_shop1: I was trying 3 threads/core
09:04 PM rue_shop1: all the time was waiting for my drive
09:05 PM Tom_L: i'm getting more determined to get this
09:05 PM Tom_L: it was missing /lib/modules/ last time
09:05 PM Tom_L: i dunno why
09:06 PM rue_shop1: you need the basic kernel dependencies
09:06 PM rue_shop1: thats why I recommended compiling a normal kernel first
09:06 PM Tom_L: how do i get those?
09:06 PM rue_shop1: kernel.org
09:06 PM ShopMoon: didnt we go over this before? :P
09:06 PM rue_shop1: all the versions are there
09:06 PM Tom_L: well they should be there. i just think i picked the wrong one the first time
09:07 PM rue_shop1: k
09:07 PM Tom_L: i'm also trying to validate these build directions for them so that's why i'm following them
09:08 PM Tom_L: how can i edit grub to get rid of the old preempt-rt one?
09:09 PM rue_shop1: did you use make-install to install the kernel?
09:09 PM Tom_L: that's the next step
09:10 PM rue_shop1: I dont use it as I remember it specifically only leaves you with the new kernel
09:10 PM rue_shop1: which means, if it cant boot your screwed
09:10 PM Tom_L: https://github.com/NTULINUX/RTAI/blob/master/README.INSTALL
09:10 PM Tom_L: there are the directions
09:10 PM rue_shop1: I alwats leave your old known-bootable kernel in til the new one is proven
09:12 PM Tom_L: yeah. this is completely a test pc so if i muff it up it will probably be something else next week anyway
09:13 PM Tom_L: right now grub has the original, the preempt-rt one and an old rtai that i screwed up and would like to get rid of
09:13 PM Tom_L: but somehow made it to grub
09:14 PM rue_shop1: I dont use grub, I hate it because its uncontrollable
09:14 PM rue_shop1: that said, the new version is better
09:14 PM rue_shop1: grub was designed for people to boot multiple operating systems
09:15 PM rue_shop1: because I only boot linux, lilo works great
09:15 PM Tom_L: well, i'm using all defaults since that's the purpose of this
09:15 PM rue_shop1: yep
09:16 PM Tom_L: see it's still missing /lib/modules/4.19.114
09:16 PM Tom_L: and pooped out on make install
09:17 PM Tom_L: i dunno why it's not getting there
09:17 PM Tom_L: maybe i do need to build the kernel one first
09:21 PM Tom_L: rue_shop1, to build the kernel org kernel, just don't add in the patches?
09:21 PM Tom_L: i kinda misplaced my notes on kernel building
10:00 PM rue_mohr: apt-get dependency-kernel or soemthing like that
10:00 PM rue_mohr: :)
10:02 PM Tom_L: huh?
10:02 PM rue_mohr: ok, so
10:02 PM rue_mohr: its a debian based system right?
10:02 PM Tom_L: it's building modules right now
10:03 PM rue_mohr: ubuntu or soetmhing?
10:03 PM Tom_L: buster
10:03 PM Tom_L: debian 10?
10:03 PM rue_mohr: debian ok
10:03 PM Tom_L: modules just finished
10:03 PM rue_mohr: so, can it finish the build without barfing?
10:03 PM Tom_L: probably
10:03 PM Tom_L: ready for make install i think
10:04 PM Tom_L: still bitches about that directory missing
10:04 PM Tom_L: what if i just issue make in it's directory?
10:04 PM Tom_L: i was somewhat following those posted directions for this one
10:04 PM Tom_L: except i skipped the patches
10:06 PM Tom_L: i wonder if i need to copy something there
10:06 PM rue_mohr: ok
10:06 PM Tom_L: halp!
10:06 PM rue_mohr: thats what I call barfing
10:07 PM Tom_L: this one is the plain vanilla download from kernel org
10:07 PM rue_mohr: ok, I have to fidn the kernel name
10:07 PM rue_mohr: klsjdfkl;jsdfh
10:07 PM rue_mohr: I hve to find the name of the package you need
10:07 PM aandrew: evening gents
10:07 PM aandrew: sounds like kernel compiles are the subject of the evening
10:07 PM Tom_L: linux-4.19.114
10:08 PM rue_mohr: there is a some kinda kernel build dependency package
10:08 PM rue_mohr: I'm gonna have to research to work out the name of it again
10:08 PM aandrew: rue_mohr: "build-essential" takes care of that if I'm not mistaken
10:09 PM rue_mohr: no, there is one just for kernel stuff
10:09 PM Tom_L: rue_mohr,
10:09 PM Tom_L: there is a patch file for it on kernel org
10:09 PM Tom_L: should i get it?
10:09 PM rue_mohr: no
10:09 PM Tom_L: ok
10:09 PM rue_mohr: only get whole images that are complete
10:09 PM rue_mohr: dont want to get into applying patches on pathces and pathces
10:10 PM Tom_L: linux-4.19.114.tar.gz
10:10 PM Tom_L: https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/
10:10 PM rue_mohr: tom, do try this tho
10:11 PM rue_mohr: (I think aandrew is right)
10:11 PM Tom_L: do i need that signature file too?
10:11 PM Tom_L: for it
10:11 PM rue_mohr: apt-get install build-essnetial
10:11 PM rue_mohr: Tom_L, no,
10:11 PM Tom_L: pretty sure i did that already
10:11 PM rue_mohr: there is another package
10:11 PM rue_mohr: nobody is talking about it
10:11 PM Tom_L: yeah it's installed already
10:12 PM Tom_L: i've built a kernel on this one. i should have what i need i think
10:12 PM rue_mohr: aandrew, debian, do ya know what the other package is?
10:12 PM rue_mohr: its like apt-get build-dep kernel or soemthing
10:12 PM aandrew: oh
10:12 PM aandrew: um
10:13 PM aandrew: yes
10:13 PM aandrew: apt-get build-dep <packagename>
10:13 PM Tom_L: which would be the linux-4.xxx one right?
10:13 PM rue_mohr: but there is a generic one... for kernels... I think
10:14 PM rue_mohr: Tom_L, do you have that library line its barking about agian?
10:14 PM aandrew: that's not more generic, that is more specific. not sure there is a kernel specific one?
10:14 PM Tom_L: unable to find a source package for xxxx
10:14 PM rue_mohr: wait
10:14 PM rue_mohr: lib/modules/
10:14 PM Tom_L: yeah it's not there
10:14 PM rue_mohr: did you run make modules_install ?
10:14 PM Tom_L: the other 2 are though
10:14 PM rue_mohr: modules_install should make that dir
10:15 PM Tom_L: didn't get that far before i got errors
10:15 PM rue_mohr: my head is somewhere else completely right now
10:15 PM Tom_L: no rule to make ....
10:15 PM aandrew: the old debian docs say apt-get install build-essential linux-source bc kmod cpio flex cpio libncurses5-dev
10:15 PM rue_mohr: it barfed during the main make or the make modules?
10:15 PM Tom_L: make bzImage
10:15 PM rue_mohr: tom ^^ give that a go
10:15 PM aandrew: and for linux
10:16 PM aandrew: apt-get install build-essential fakeroot followed by apt-get build-dep linux
10:16 PM aandrew: then apt-get source linux
10:16 PM Tom_L: ok start with what?
10:17 PM rue_mohr: apt-get source linux <--- be in a clean dir if you do that
10:17 PM rue_mohr: it dumps what it gets whereever you are
10:17 PM rue_mohr: and it'll get a debian kernel source
10:17 PM rue_mohr: but it might be a good sanity check
10:17 PM Tom_L: what's that do for me?
10:17 PM Tom_L: apt-get source linux
10:17 PM rue_mohr: tells you if something else is wrong
10:17 PM Tom_L: ?
10:18 PM rue_mohr: apt-get source linux <-- gets debians kernel source
10:18 PM Tom_dev: W: Download is performed unsandboxed as root as file 'linux_4.19.98-1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
10:18 PM rue_mohr: if THAT wont compile something its quite afoot
10:18 PM rue_mohr: always as rooy
10:18 PM Tom_L: i am
10:18 PM rue_mohr: jildgjkldfjkljkljkl;jkl;kl;sdfil;dfkl;dfkl;j freaking keybaord
10:18 PM rue_mohr: odd
10:18 PM Tom_L: and that's not the right kernel i want
10:19 PM rue_mohr: oooh damnity
10:19 PM rue_mohr: they dont let you just be root anymore
10:19 PM Tom_L: i sudo'd
10:19 PM rue_mohr: I know but if you cant build that kernel, you have another problem
10:19 PM rue_mohr: always start with things that are supposed to work
10:19 PM rue_mohr: and move twoards the things that are completely unproven to work
10:20 PM Tom_L: i'm about to start with a fresh buster install
10:20 PM rue_mohr: wont help
10:20 PM Tom_L: problem is, half what you tell me to do i don't understand what it's doing
10:21 PM rue_mohr: but if you trying to write from-scratch instructions, it'll be needed
10:21 PM rue_mohr: Tom_L,
10:21 PM rue_mohr: you have to get all the programs and libraries to be abel to build the kernel
10:21 PM rue_mohr: thats a bunch of different junk
10:21 PM rue_mohr: there is a package I cant remember the name of
10:21 PM Tom_L: i get taht part
10:21 PM rue_mohr: and none of my google search es are pulling it up
10:22 PM rue_mohr: when I do a kernel I just get the kernel.org, configure it, compile and install
10:22 PM rue_mohr: not sure whats going wrong on yours, I think your missing a package
10:22 PM rue_mohr: but the error
10:22 PM Tom_L: do i need to configure anything on it for this?
10:23 PM Tom_L: just leave defaults?
10:23 PM rue_mohr: says that it didn't make a kernel module dir, which is really strange
10:23 PM rue_mohr: I have no idea
10:23 PM rue_mohr: I spend 2 days to a wek configuring a kernel for exactly my system
10:23 PM Tom_L: been there
10:23 PM rue_mohr: the defualt configs, esp for debian, just include everything
10:23 PM rue_mohr: makes huge ugly kernels, but they work
10:24 PM Tom_L: what was that command again?
10:24 PM Tom_L: apt-get soemthing
10:24 PM rue_mohr: there were lots
10:25 PM rue_mohr: let me think
10:25 PM Tom_L: the start over one
10:25 PM rue_mohr: hard for me to walk you thru a kernel install just now
10:25 PM rue_mohr: I'm right in the middle of some circuit stuff
10:26 PM Tom_dev: let's not bother then
10:26 PM rue_mohr: I have a few more branches to follow
10:26 PM rue_mohr: ok
10:26 PM rue_mohr: Tom_dev, see if this one makes the difference
10:27 PM rue_mohr: apt-get build-dep linux
10:27 PM rue_mohr: then try your compile again
10:28 PM Tom_dev: it's gettin a bunch of crap
10:28 PM Tom_dev: now what?
10:29 PM Tom_dev: do i need to run make bzImange again?
10:33 PM rue_shop1: yup
10:33 PM rue_shop1: wait
10:33 PM rue_shop1: ctrl-c
10:33 PM rue_shop1: make clean
10:33 PM rue_shop1: that will fresh-start it
10:34 PM rue_shop1: then do
10:34 PM rue_shop1: make -j 8
10:34 PM rue_shop1: no bzImage, just that
10:34 PM Tom_L: ok it's running
10:34 PM Tom_L: make -j8
10:41 PM rue_shop1: ok
10:41 PM rue_shop1: if all is good it should just silently stop with no errors
10:45 PM Tom_L: we'll see here in a bit
10:49 PM Tom_L: rue_shop1, i don't understand in those directions i posted why they create a simlink to the actual kernel files?
10:49 PM Tom_L: ln -sfv linux-4.19.114 linux
10:49 PM Tom_L: i don't get why
10:51 PM Tom_L: also, when you build the normal kernel do you have to boot into it to add patches then boot again?
10:51 PM Tom_L: i would't think so
10:55 PM rue_mohr: na just copy it
10:55 PM rue_mohr: get it working, then patch it
10:55 PM rue_mohr: did it compile witout barfing?
10:57 PM Tom_L: still churning
11:04 PM Tom_L: seems to be done
11:05 PM Tom_L: make install... still no directory /lib/modules/4.19.114
11:06 PM Tom_dev: update-initramfs: Generating /boot/initrd.img-4.19.114
11:06 PM Tom_dev: W: missing /lib/modules/4.19.114
11:06 PM Tom_dev: W: Ensure all necessary drivers are built into the linux image!
11:06 PM Tom_dev: depmod: ERROR: could not open directory /lib/modules/4.19.114: No such file or directory
11:21 PM Tom_L: i'm calling it a night
11:37 PM Tom_L: it did put it there though.