I have recently accessed STMicroelectronics Base Distribution with BusyBox v1.18.2, built-in shell.

I read all the information on STLinux documentary regarding my problems, and followed all the steps.

There was no directory /home/STLinux so i just created a new one.

 # Step 2

[root@stlinux]# cp -r /opt/STM/STLinux-X.X/devkit/sources/kernel/linux-sh4/  
BusyBox v1.18.2 (2011-07-13 20:52:52 CST) multi-call binary.


Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY

    -a  Same as -dpR
    -R,-r   Recurse
    -d,-P   Preserve symlinks (default if -R)
    -L  Follow all symlinks
    -H  Follow symlinks on command line
    -p  Preserve file attributes if possible
    -f  Overwrite
    -i  Prompt before overwrite
    -l,-s   Create (sym)links

    # Step 3        

    [root@stlinux]#cd /home/STLinux/linux-sh4 
    -sh: cd: can't cd to /home/STLinux/linux-sh4

    # Step 4

    [root@stlinux]#make ARCH=sh CROSS_COMPILE=sh4-linux- vmlinux 
    -sh: make: not found

   # Step 5

   [root@stlinux]#make ARCH=sh CROSS_COMPILE=sh4-linux- help | grep ^mb
   -sh: make: not found

   # All other steps were associated with make.

   # Step 9

   [root@stlinux]#find . | grep "\.ko$"

   # Step 10

   [root@stlinux]# make ARCH=sh CROSS_COMPILE=sh4-linux- vmlinux
   -sh: make: not found

Is it possible to build the kernel without having these toolkits? If not, how can I install them without having any package managers?


Unfortunately, you cannot compile a kernel for STLinux on STLinux. You are not supposed to, at least. They are embedded devices with limited resources.

What you have to do is having or installing a Linux on another (Intel) machine, cross compile the kernel and then copy it over to the destination machine.

BTW, cross compilation is the act of building up binaries/tool on a machine of a different architecture.

If you look at the directive CROSS_COMPILE you have in your post, it seems evident the tutorial you are following is not written to be used directly on the device.

As an example, I cross compiled my ARM NetBSD toolchain, binaries and custom kernel in a Debian Jessie. You have to build the toolkit using the native development tools.

After that, it seems STLinux has some additions to the toolkit; you will then be using the new compiler and environment of the cross compiler toolkit to generate native binaries.

There is another related thread here: How do I install another distro on a linux DVR

Furthermore, I doubt you maybe successful compiling a new kernel without knowing what you are doing. The ARM/Mips architecture has some kirks that differ substantially from the standard Intel, and often this chinese devices got kernels substantially hacked.

Nonetheless, to give a very short answer to your question, no you won't be able to compile a new kernel on your device. The RAM and disk are usually pretty limited for the development needs.

  • How can i do so? can i just install it with ISO file containing specific distribution? – ShellRox May 8 '16 at 9:21
  • Added to the answer. Cannot be more specific as I am not familiar with STLinux. In short, no, you cannot compile a new kernel on your embedded device. – Rui F Ribeiro May 8 '16 at 10:44
  • You are welcome. I have a couple of chinese sbcs, and the story is pretty much similar...either you have the luck of some hobbyist community providing support for them, or they are pretty much dead in the water, and often there is only support for a specific kernel version hacked by the vendor... – Rui F Ribeiro May 8 '16 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.