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.

Sitara am335x Jvm

Other Parts Discussed in Thread: ASH

I am having a problem installing jvm. I have made all the steps in the folowing http://processors.wiki.ti.com/index.php/How_to_add_a_JVM but i receive the message in the terminal:

-sh: /home/root/ejre1.7.0_51/bin: Permission denied
root@am335x-evm:~# java -version
-sh: java: not found

This is how the file /etc/profile looks like:

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="/bin/vi" # needed for packages like cron
test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.

if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
# for an explanation of how to set this to your local timezone.
export TZ
fi

if [ "`id -u`" -eq 0 ]; then
PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
fi
if [ "$PS1" ]; then
# works for bash and ash (no other shells known to be in use here)
PS1='\u@\h:\w\$ '
fi

if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi


PATH=$PATH: /home/root/ejre1.7.0_51/bin
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM

umask 022

The jvm I installed is ejre-7u51-fcs-b13-linux-arm-vfp-hflt-client_headless-18_dec_2013.gz, I extracted it in the rootfs partition on home/root/ejre1.7.0_51/. It is possible it wasn't extracted 100% because on the rootfs there is 0 free space. How can i free more space on the SD card and use it for Linux? Thank u. 

  • Hi,

    How big is the SD card you are using? Have you tried with a bigger SD card?

    There is a smaller rootfs image that comes with the SDK, but it may turn out that the JVM could have missing dependencies with the smaller rootfs.

    Best regards,
    Miroslav

  • Hello,

    I use the SD card that came with the board, it has 4GB with 3 partitions: rootfs(800MB), Start_here(3GB) and Boot(90 MB). It seems i cannot delet nothing on the Start_here partition only on rootfs, but there is the linux installed. I am a beginner with Linux and Java so please excuse my lack of knowledge. Thank u for your response.

  • Hi,

    The START_HERE partition is quite useless, so you might as well repartition the SD card and remove it. There is a script included in the SDK that can do that for you:

    <sdk_folder>/bin/create-sdcard.sh

    Run it with the sudo command and reformat your sd card. The script is interactive and can be pointed to use the pre-built binaries inside <sdk_folder>/board-support/prebuilt-images/

    Best regards,
    Miroslav

  • I did what u said and it did not work. I tried even on a new SD card.

    claudiu@ubuntu:~$ sudo /home/claudiu/ti-sdk-am335x-evm-05.05.00.00/bin/create-sdcard.sh
    [sudo] password for claudiu:


    ################################################################################

    This script will create a bootable SD card from custom or pre-built binaries.

    The script must be run with root permissions and from the bin directory of
    the SDK

    Example:
    $ sudo ./create-sdcard.sh

    Formatting can be skipped if the SD card is already formatted and
    partitioned properly.

    ################################################################################


    Availible Drives to write images to:

    # major minor size name
    1: 8 0 3813376 sda

    Enter Device Number: 1

    sdb was selected

    ################################################################################

    **********WARNING**********

    Selected Device is greater then 16GB
    Continuing past this point will erase data from device
    Double check that this is the correct SD Card

    ################################################################################

    Would you like to continue [y/n] : y


    Checking the device is unmounted
    unmounted /dev/sdb1
    umount2: Device or resource busy
    umount: /: device is busy.
    (In some cases useful info about processes that use
    the device is found by lsof(8) or fuser(1))
    umount2: Device or resource busy

    sdb1 sdb2 sdb3
    40893440 1

    /home/claudiu/ti-sdk-am335x-evm-05.05.00.00/bin/create-sdcard.sh: line 355: [: : integer expression expected
    /home/claudiu/ti-sdk-am335x-evm-05.05.00.00/bin/create-sdcard.sh: line 387: [: : integer expression expected
    /home/claudiu/ti-sdk-am335x-evm-05.05.00.00/bin/create-sdcard.sh: line 425: [: : integer expression expected
    /home/claudiu/ti-sdk-am335x-evm-05.05.00.00/bin/create-sdcard.sh: line 486: [: : integer expression expected


    ################################################################################

    Partitioning is now done
    Continue to install filesystem or select 'n' to safe exit

    **Warning** Continuing will erase files any files in the partitions

    ################################################################################


    Would you like to continue? [y/n] : y


    /home/claudiu/ti-sdk-am335x-evm-05.05.00.00/bin/create-sdcard.sh: line 570: [: : integer expression expected
    mkdir: cannot create directory `/home/claudiu/tmp': File exists

    Mount the partitions
    mkdir: cannot create directory `boot': File exists
    mkdir: cannot create directory `rootfs': File exists
    mount: /dev/sdb1 already mounted or boot/ busy
    mount: according to mtab, /dev/sdb1 is mounted on /
    mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so


    Emptying partitions

    Syncing....

    ################################################################################

    Choose file path to install from

    1 ) Install pre-built images from SDK
    2 ) Enter in custom boot and rootfs file paths

    ################################################################################

    Choose now [1/2] : 1


    Will now install from SDK pre-built images
    now installing: ti-sdk-am335x-evm-05.05.00.00
    ################################################################################

    Copying files now... will take minutes

    ################################################################################

    Copying boot partition

    MLO copied

    u-boot.bin file not found

    u-boot.img copied

    uImage copied

    Copying rootfs System partition
    Written 100%

    Syncing...

    Un-mount the partitions
    umount2: Invalid argument
    umount: boot: not mounted
    umount2: Invalid argument
    umount: rootfs: not mounted

    Remove created temp directories

    Operation Finished

    claudiu@ubuntu:~$


    There seems to be a lot of invalid/error while running of the script file. And in the end the new  empty SD card is still a new empty SD card. Thnk.

  • I forgot to mention that the create-sdcard.sh script should be run from the /bin directory, as the script itself reminds you:

    mosneang claudiu said:

    The script must be run with root permissions and from the bin directory of
    the SDK

    Example:
    $ sudo ./create-sdcard.sh

    Also, I can only see one device listed as available:

    mosneang claudiu said:
    Availible Drives to write images to:

    # major minor size name
    1: 8 0 3813376 sda

    The size of it looks like it's the SD card, but usually sda is the hard drive. Please do a `cat /proc/partitions` and post the results here.

    This warning is also quite strange. It definitely looks like the selected device is not the sd card for some reason.

    mosneang claudiu said:

    **********WARNING**********

    Selected Device is greater then 16GB
    Continuing past this point will erase data from device
    Double check that this is the correct SD Card

    I would suggest downloading and using the latest SDK version 06.00.00.00. Your version (05.05.00.00) is quite old now and may have some problems with the create-sdcard.sh script.

    Best regards,
    Miroslav

  • Hello,

    I have installed  the latest SDK version 06.00.00.00 and run the create-sdcard.sh script, and it worked perfectly. It  installed the linux on the SD card and made 2 partitions.Then I installed the JVM, and it work's fine. Thank u very much for your help.