This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Building Sitara SDK 1.00.00.3

I'm wondering if things have changed for the latest SDK doesn't build like the previous ones do. I ran the following commands

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- omap2plus_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage dtbs
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules
sudo chown -R <user> <rootfs location>
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=<rootfs location>

Where rootfs was a just a folder on my system, and it only produced a lib folder. Any reason why that's the case?
  • Moving this to "Sitara Processors Forum"

    Regards,
    Gigi Joseph.
  • Hi Ronald,

    I use the following commands to build the kernel:

    1. export ARCH=arm
    2. export PATH=<path to ti-processor-sdk-linux-am335x-evm-01.00.00.03>/linux-devkit/sysroots/i686-arago-linux/usr/bin
    3. export CROSS_COMPILE=arm-linux-gnueabihf-
    4. cd board-support/linux-3.14.43+gitAUTOINC+875c69b2c3-g875c69b
    5. make tisdk_am335x-evm_defconfig
    6. make -j4 //this will build zImage & dtbs
    7. make modules & make modules install

    The lib folder is created because kernel modules (.ko) are located in /lib/modules/<kernel_version>/kernel

    Another option is to use the makefile located in ti-processor-sdk-linux-am335x-evm-01.00.00.03 folder:

    1. export ARCH=arm
    2. export PATH=<path to ti-processor-sdk-linux-am335x-evm-01.00.00.03>/linux-devkit/sysroots/i686-arago-linux/usr/bin
    3. export CROSS_COMPILE=arm-linux-gnueabihf-
    4. from ti-processor-sdk-linux-am335x-evm-01.00.00.03 execute
    -- make linux
    -- make linux_install

    Hope this helps.

    Best Regards,
    Yordan

  • Hey Yordan,

    I have no problem completing those steps or the ones Linux Kernel User Guide on TI wiki. The rootfs folder though, only contains the lib folder and when I put it in an sd card to run on a beaglebone black, it doesn't boot up. 

  • You need to copy the generated .ko files to the corresponding folders in the rootfs partition of the sdcard.

    You shouldn't replace the whole lib folder, just copy the kernel objects to the respective folders on the sdcard.

    Best Regards,
    Yordan
  • I generally utilize the "linux_install" rule from the makefile in the root of the SDK. It uses a variable called DESTDIR to refer to the root file system. So if you've inserted your SD card and it shows up as /media/user/rootfs then you can run:

    sudo make linux_install DESTDIR=/media/user/rootfs

    That will do a proper installation of the files, i.e. there is a bit more than just the copy that happens. Here's the complete rule copied from the SDK:

    linux_install: linux-dtbs_install
    @echo ===================================
    @echo Installing the Linux Kernel
    @echo ===================================
    @if [ ! -d $(DESTDIR) ] ; then \
    echo "The extracted target filesystem directory doesn't exist."; \
    echo "Please run setup.sh in the SDK's root directory and then try again."; \
    exit 1; \
    fi
    install -d $(DESTDIR)/boot
    install $(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/zImage $(DESTDIR)/boot
    install $(LINUXKERNEL_INSTALL_DIR)/vmlinux $(DESTDIR)/boot
    install $(LINUXKERNEL_INSTALL_DIR)/System.map $(DESTDIR)/boot
    $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) INSTALL_MOD_PATH=$(DESTDIR) modules_install
  • Tried that. When I run my board with the sd-card inside I see 

    Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

  • Ronald Garay said:

    Tried that. When I run my board with the sd-card inside I see 

    Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

    This does not sound like it has anything to do with the modules.  It's not finding the init binary.  Were you able to boot using the pre-built binaries without making any changes?

    Is this on an EVM or on custom hardware?  If this is on custom hardware, please take a step back and try it on the EVM.  First try it with the binaries.  Then try to rebuild the kernel/modules for the EVM.

  • Hi, 

    I am using "ti-processor-sdk-linux-am335x-evm-01.00.00.03" SDK in my am335x platform. 

    Can you please let me know the u-boot compilation steps.

    Regards,

    Lofna

  • Hello Lofna,

    Go to ti-processor-sdk-linux-am335x-evm-01.00.00.03 directory, then run a make u-boot command to compile the U-Boot.

    Best regards,
    Kemal