Custom kernel/partition questions

Christopher Burrus
Christopher Burrus New Member Posts: 3
Greetings,
I have a decent amount of experience with compiling custom kernels and such, but not extensive. We are looking to take the up-board and compile a custom kernel with a few modifications while also changing the partition setup.

Afterwards, we would want to make an image of the whole board as a backup, and to deploy it to other up-boards as well.

I haven't found any documentation about how to go about doing that on the up-board, and in my experience it is a vastly different procedure for different hardware. Can anyone assist, or point me in the right direction?

Comments

  • [Deleted User]
    [Deleted User] Posts: 0
    Which kernel you're planning to use? If mainline, just go to kernel.org, download the kernel, extract, run make menuconfig, run make -j8, make modules_install, copy the zImage to boot partition, etc. Might be easiest to set up EFISTUB boot after the kernel is ready.
  • Christopher Burrus
    Christopher Burrus New Member Posts: 3
    @miasma

    Thanks for the response. I don't think I realized a generic kernel would work, I thought it would have to be a more specific one (I'm used to working with really remote hardware that generic kernels would never work for). I plan to just use the exact same version they delivered the up-board with (4.2.4 if I remember correctly) - I just need to enable a few additional features.

    How exactly would you recommend putting the new kernel onto the device? Or should I compile the new kernel on the device itself? I might need more of a basic "how to compile a custom kernel" than I realized. The other kernel I've worked heavily on is a the Firefly Rockchip RK3288, and the instructions for compiling that kernel were really complex.

    Any ideas how to make an image of the whole device after it's fully set up?
  • [Deleted User]
    [Deleted User] Posts: 0
    The generic kernels don't support all features like the HDMI audio atm, but you can also compile the patched UP compatible kernel. I think you can compile the kernel on any x86-64 machine without any special cross-compiling toolchain. If it takes too much time, you could use distcc. Well, for partitioning you could boot the machine using some live distro. For instance I usually use Arch Linux since it supports UEFI and GPT partition tables.
  • Christopher Burrus
    Christopher Burrus New Member Posts: 3
    Sorry for the comparatively dumb questions, but there are a few basic things I'm still stuck on, if you can help:

    Where would I find these patched kernels, or the patches to do it myself?
    Assuming I get the kernel files I need, get my config file just right, etc - you mentioned "copy the zImage to boot partition". I'm used to doing that through an external connection - is that the way to do it on the UpBoard? Or can you configure it live on the device? Either way, how exactly do you get the custom kernel on there?

    Thanks again for your help.
  • [Deleted User]
    [Deleted User] Posts: 0
    Quizart, the guide for the patched kernel was mentioned here https://up-community.org/forum/public-ubilinux/708-kernel-patches#1529

    For the machine to boot, you need to have correct partition layout on eMMC and uefi bootloader set up to boot from your image. I'd recommend e.g. Arch Linux wiki. The command is quite simple if you use EFISTUB and don't need a menu. You can also replace the old kernel in that case in place. USB live linux might help setting up the UEFI & kernel stuff for booting.
Privacy Policy