Hi everyone. I wasn’t sure whether to put this in the newbie section, or the ARM section, but I figured here is more on topic. I was wondering how people can create custom images of EndOS for arm boards. For example, a person named PUDGE made their own image for the Radxa Rock 5b: here) I was wanting to do the same, but for other boards. How do people do this in general.
is the script that creates all the images offered here:
To utilize this, on an aarch64 device open a terminal and create a folder in your home directory named ‘endeavouros-arm’
cd to that directory and enter
cd into the /home/endeavouros-arm/image-build-script and enter
time sudo ./script-image-build.sh
The script requires an argument, aborting
HELP
Build EndeavourOS ARM Images
options:
-h Print this Help.
This option is required
-p enter platform: rpi4 rpi5 odn pbp rad srpi sodn
These options are not required.
if -f and/or -c are not entered, the paramaters in () are the defaults
-f format type: (e for ext4) or b for btrfs
-c create image: (y) or n
example: sudo ./build-server-image-eos.sh -p rpi4 -f e -c y
Ensure directory "/home/don/endeavouros-arm/test-images" exists
you will get a description of the possible options.
-p rpi4 = RPi 4b, rpi5 = RPi 5, odn = Odroid N2, php = pinebook pro,
srpi = RPi server, sodn = Odroid N2 server.
-f format e = ext4, b = btrfs
-c create image y = create image, n = do not create an image
If you choose to create an image, the script will attempt to put that image in the directory:
This is great thanks a ton, this has been very helpful. For the device selection part of the install if the board I am using is none of the ones listed, what should I select?
First, in the script-image-build.sh you would have to look at function ‘_read_options’ starting at line 359 thru 424 and add a new option for your device.
The text file ‘base-packages.txt’ contains all the base packages that are common to all ARM devices EnOS supports. So you should be OK there.
The text file ‘base-device-addons.txt’ contains all the Device oriented packages.
It is like a primitive yaml file. Each line contains two words. The device name and a desired package name. You would have to add a device name and all the device oriented packages your device needs.
in script-image-build.sh, next look at line 459. It calls the function ‘_partition_format_mount’
In _partition_format_mount you would have to set up a Virtual block of disk space in your memory to act as a storage device. Writing to memory is much faster than writing to a physical storage device. In this case the memory block is labeled test.img and the image will be built into test.img.
Lines 23 through 49 lists the disk partitioning schemes for the various devices.
You may be able to use one of these schemes, or create a new scheme for your divce.
Next you would have to look at lines 460 to 478 and add to the ‘case’ statement to make a choice for your device. Lines 103 through 205 lists the functions to create the image using pacstrap. You would have to build on for your device.
Line 480 calls the function at line 489 which does a chroot into the image and runs the script-image-chroot.sh script as chroot and does some configuration and such.
Finally you end up with a file named ‘test.img’ that is the non compressed image, and also
‘test.img.xz’ which is the published compressed image.
There is more to it than the above, but hopefully that’s enough for you to get an idea of what needs to be done. Although you could just utilize chunks of script-image-build.sh
and create an image for just your desired device.
In the spirit of full transparency this is a collaboration of myself and @sradjoker
Thanks sradjoker for everything you did my friend.