Utils/mkbootimg issues

You should go to the path ‘/home/cinesoft/project/khadas/ubuntu/’ and run './utils/mkbootimg --kernel linux/arch/arm64/boot/Image --ramdisk images/initrd.img -o images/ramdisk.img’
It is not the path ‘home/cinesoft/project/khadas/ubuntu/u-boot/linux’

Hi terry,

    I have tried the path that u have given. But the same error has been shown . I have downloaded the 'utils' file to the path u have given. But it doesn't work.

Please check the attachment.

Can you verify the file ‘mkbootimg’?

terry@Server:~/project/khadas/ubuntu$ md5sum utils/mkbootimg 
3ddea229f94b8be9d8756bdbf5288f65  utils/mkbootimg

Hi Terry,

   I have tried the command ,that you have given and it works fine. we got the output like this " 3ddea229f94b8be9d8756bdbf5288f65  utils/mkbootimg ". Please go through the attachment.

A strange problem.

Can you confirm again the properties of the utils folder:

gouwa@Wesion:~/project/khadas/ubuntu$ ls -l 
total 3639560
drwxr-xr-x  6 gouwa gouwa       4096 Mar  9 16:40 archives
drwxr-xr-x  4 gouwa gouwa       4096 Jun  7 09:31 images
drwxr-xr-x 25 gouwa gouwa       4096 Jun  6 16:38 linux
-rw-rw-r--  1 gouwa gouwa        311 Jun  5 14:23 Makefile
drwxrwxr-x  2 gouwa gouwa       4096 Jun  5 10:20 rootfs
drwxr-xr-x  2 gouwa gouwa       4096 Jun  5 19:58 scripts
drwxrwxr-x 24 gouwa gouwa       4096 Mar 10 18:47 u-boot
drwxrwxr-x  4 gouwa gouwa       4096 Apr 25 17:07 utils

And please run and below command and paste to us:

gouwa@Wesion:~/project/khadas/ubuntu$ file utils/mkbootimg 
utils/mkbootimg: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.8, not stripped

If everything works fine, when you run mkbootimg, it should be:

gouwa@Wesion:~/project/khadas/ubuntu$ ./utils/mkbootimg 
error: no output filename specified
usage: mkbootimg
       --kernel <filename>
       --ramdisk <filename>
       [ --second <2ndbootloader-filename> ]
       [ --cmdline <kernel-commandline> ]
       [ --board <boardname> ]
       [ --base <address> ]
       [ --pagesize <pagesize> ]
       -o|--output <filename>

Good luck!

Hi Gouwa,

Thank you so much for your valuable time. I have executed the commands, which you have given in the reply. The screen shots is showing the results we got for executing that commands. Please check the screen shots and do the needful for further processing.

The ubuntu system of your host pc is 64bit and the file ‘mkbootimg’ is 32bit
You may be need to install some libraries to support it
Please search for google.

Yes, I think Terry is right, you can run the below command first and try again:

$ sudo apt install lib32ncurses5-dev

Good luck!

Follow my guide and it should work :slight_smile:

Hint: apt install libc6:i386 libstdc++6:i386

To fix that problem in Ubuntu:
sudo apt-get install lib32stdc++6

You might also need:
sudo apt-get install libstdc++6

1 Like

thank you Gouwa. I have installed the libraries that you have given. That was Ok. But now i got an another error in the same command. "error: could not load kernel ‘linux/arch/arm64/boot/Image’ " I am attaching the screen shot along with the mail.

double check if you really have the file /home/cinesoft/project/khadas/ubuntu/linux/arch/arm64/boot/Image you tell him to use
you might have messed up your pathes as your filexplorer shows another location where you put Image

Hi mmeyer,

         i have read through your guide. That was nice. I have tried to compile the Kernal.  I got the following errors. 

root@Cinesoft-Electronics-dept:/home/cinesoft/project/khadas/ubuntu# make ARCH=arm64 kvim_defconfig
make: *** No rule to make target `kvim_defconfig’. Stop.

Hi Tang ,

   Thank you for the support.

Thank Dude

Hi ravelo,

thanks for the assistance. It was the fastest replay. Boot.img has been created. Thank you. That was small Directory change.

Thanks dude.

1 Like

Hi all,
I have reached at " Build Ubuntu Rootfs via a Pre-built Image ". I have chooses " Armbian_5.27_S9xxx_Ubuntu_xenial_3.14.29_mate_KODI_20170702.img ".
While i building root file system, i couldn’t mount the pre-build image . Step is given below

"$ xdg-open archives/Armbian_5.24_Amlogic-s905x_Ubuntu_xenial_3.14.29_desktop_20161223.img "

after this step a drive has been created but i couldn’t mount it. Please go through the attachment.

I am adding more screen shots…
Please check it…

Hi, Ajithbalakrishnan:
It should be better to create a new topic for the new question, we need keep it tidy to make the topic readable.

We will reply you there, and if your problem has been fixed, please follow the Problem Solved Button to mark it as solved

BTW, I just think you can try to resolve your questions by yourself first, It seem that most of you questions is not too hard :wink:

Hi Gouwa,
Thanks for the reply . I will create another topic.

Hi Terry,

I compiled Khadas vim3 kernel. Now I want to generate boot.img with compiled arch/arm64/boot/Image file. How is it possible? (I think I should use mkbootimg)