Forum Activities for Linux Mainline Support?

Ok. I will do this tonight.
Next I wanted to ask is the partition for kvim1 to boot.

 elif [[ "$DEVICE" = "kvim" ]]; then
    #Clear first 4mb
    dd if=/dev/zero of=${LDEV} bs=1M count=4 1> /dev/null 2>&1

  #partition with boot and root
    parted -s $LDEV mklabel msdos 1> /dev/null 2>&1
    parted -s $LDEV mkpart primary fat16 4M 128M 1> /dev/null 2>&1
    START=`cat /sys/block/$DEV/${DEV}p1/start`
    SIZE=`cat /sys/block/$DEV/${DEV}p1/size`
    END_SECTOR=$(expr $START + $SIZE)
    parted -s $LDEV mkpart primary ext4 "${END_SECTOR}s" 100% 1> /dev/null 2>&1
    partprobe $LDEV 1> /dev/null 2>&1
    mkfs.vfat "${LDEV}p1" 1> /dev/null 2>&1
    mkfs.ext4 "${LDEV}p2" 1> /dev/null 2>&1

#copy rootfs contents over to the FS
    mkdir -p $TMPDIR/root
    mkdir -p $TMPDIR/boot
    mount ${LDEV}p1 $TMPDIR/boot
    mount ${LDEV}p2 $TMPDIR/root
    cp -ra $ROOTFS_IMG/rootfs_$ARCH/* $TMPDIR/root/
    mv $TMPDIR/root/boot/* $TMPDIR/boot

#clean up
    umount $TMPDIR/root
    umount $TMPDIR/boot
    losetup -d $LDEV 1> /dev/null 2>&1
    rm -r $TMPDIR/root $TMPDIR/boot
    partprobe $LDEV 1> /dev/null 2>&1

I tried using this to make partition during generating Manjaro minimal image using manjaro-arm-tools
Is this the right approach to make fs partition?

the patch is causing some error.

==> Starting prepare()...
error: patch failed: arch/arm64/Makefile:79
error: arch/arm64/Makefile: patch does not apply
==> ERROR: A failure occurred in prepare().
Aborting...

I was successful in adding the kvim1 support to manjaro-arm-tool. It is able to make the partitions and copy the rootfs to the ext4 now we need to understand the bootloader process to make it boot.

I tried compiling the aarch64-linux-5.0.2 and build an img from this and the manjaro rootfs.

As I am trying to compile the linux-5.0.2 with your patch I am getting the above error.
Kindly advice. Thanks

At first glance it looks right, but I donā€™t see the task labels for sections. This makes it easy to use it with any media when recording an image, and makes it easy to transfer the finished system to another media.

You can test and create your own patch. Perhaps the point where the necessary lines in your source code differs from the standard. Can you show the source file or give a link to the kernel sources that are used ?

This is the kernel i used with your patch

Will try to compile the updated linix kernel by numpp for kvim

I looked at the kernel sources youā€™re using. You need to change the line number in the patch (the right place moved down).

I didnt understand ā€œthe right place moved downā€

Can I get any compiled linux for arch ā€˜pkg.tar.xzā€™ file for kvim to try and boot the system?

Currently my aim is to make it boot from any old kernel available for kvim1 once it does boot then i will look into compiling the latest kernel. (Compiling takes alot of time for my machine)
But not to forget that if you have any compiled pkg for kvim then will it boot on the obsolete android kernel?

Write down your resulting image of Manjaro to the media. Take the kernel, modules, and all the necessary scripts from any working version of Armbian and replace them with the ones on the manjaro media. Start the system and you can already build everything you want.

I will try this in sometime and get back to you.

Thanks

I tried this and when I start the system, It getting stuck at script to boot rootfs.

Sharing screenshot below. I will look into each script and copy it over to manajro and try again.

Edit

Now i am able to reach intiramfs with busybox.
But not able to boot in rootfs

Most likely you forgot to add the correct labels for the sections or you need to edit the scripts (specify in them the names of the labels that you have). By default, the first partition should be labeled ā€œBOOTā€, the second ā€œROOTFSā€. I draw your attention that it is so, in capital letters.

As an option. You can take the media from Arabian and simply replace the files in the second partition (which has the ROOTFS label). Please donā€™t forget to add modules, fstab and firmware from the image Armbian.

By the way, I started reading your thread in the Manjaro forum and noticed the question about the patches. I lost my login from their forum and you can write there, these patches do not break anything, on the contrary, they allow you to immediately use the resulting kernel on Odroid C2 and RK without processing it with the utility ā€œmkimageā€. I. e. it is possible to take at once the kernel ā€œImageā€ file and to start it with the ā€œbootiā€ command (I pay attention, not the "bootm"command). It is tested to work Libreelec and Arabian models of AML and RK.

I will try this approach as before i tried the opposite approach as boot is quickly to move as compared to rootfs.

If you have a manjaro image (even if itā€™s not working), upload it somewhere, Iā€™ll download it and see what else I can fix.

Yes i have the img i created using the manjaro-arm-tool by adding kvim in its function.sh
I will upload the image and share it with you.
Maybe you can help me in knowing what i m doing wrong.

1 Like

But the odroidā€™s uboot requires mkimage use.
Will it still work when using mkimage aswell as without

Strit is asking

This approach is giving me kernel panic.

Upload your image, Iā€™ll see. There can be many reasons.

PS Iā€™m diggin ā€™ my username and password, and wrote the answer on the forum. :slight_smile:

Yes i read that. Will upload the image tonight and share the link.

Here is the link of my img file but I think there are auto scripts missing.
This img is of the original aarch64 kernel without any patches.