CDC or Oracle JavaME Embbed Client resources for MIPS - java-me

I was asked to run a Java virtual machine on a Broadcom MIPS board and was very glad to find the OJEC cvm binary for MIPS from Oracle. Unfortunately, it seems that the binary wasn't built for my board since it could not be executed properly.
/mnt/nfs/Oracle_JavaME_Embedded_Client/1.0/binaries/bin # ./cvm
-sh: ./cvm: not found
Can I ask anyone knows if I can get the OJEC source code somewhere to rebuild the client with our toolchain we're using for the board? If yes, is there a guide for building the client?
While searching google, I found a CDC source code from the "Phoneme" project and could build the cvm with our mips toolchain. It works fine! I could run its test and some hello world samples. However, looking at the Phoneme svn log, I realized that the project is not active recently, last change is about a year ago. Could someone tell the project's status and how it is different to the OJECT?
I'm also confused with openjdk's hotspot. Is it different to the OJEC? or are they both based on the CDC?
Here is the cpu info I got from my box's /proc/
cat /proc/cpuinfo
system type : BCM7413B1 STB platform
processor : 0
cpu model : Broadcom BMIPS4380 V4.4 FPU V0.1
BogoMIPS : 404.48
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
ASEs implemented : mips16
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available

You just forgot to chmod the file to +x
The binary is for mips32r2, your platform is mips32r1.

Not much help, I know, but HotSpot is the OpenJDK (also the Oracle JVM) for its SE implementation - it isn't an ME implementation.
By the way, the command line you posted just looks like the cvm binary is missing in that directory.

Related

IMA fails to detect existing TPM eventhough it exists and functions correctly

I’m currently trying to perform integrity measurement using a TPM (SLB 9670) on a Raspberry Pi 3 model B+.
I have the TPM installed and working properly since I can execute some basic commands like tpm2_getrandom() and so on. Now I want to perform an integrity measurement using IMA, and I have recompiled the new kernel with the following config:
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_INTEGRITY=y
CONFIG_IMA=y
CONFIG_IMA_MEASURE_PCR_IDX=10
CONFIG_IMA_AUDIT=y
CONFIG_IMA_LSM_RULES=y
CONFIG_IMA_WRITE_POLICY=y
CONFIG_IMA_READ_POLICY=y
CONFIG_IMA_APPRAISE=y
CONFIG_IMA_APPRAISE_BOOTPARAM=y
CONFIG_HW_RANDOM_TPM=y
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
but the ima for some reason still doesn’t detect the TPM and gives the errors:
I have done some research and found out that maybe this is due to the fact that the ima get initialized before the TPM, so I have also tried to compile another version of the kernel where I change the code line in devices/clk/bcm/clk-bcm2835:
from:
postcore_initcall(__bcm2835_clk_driver_init);
to
subsys_initcall(__bcm2835_clk_driver_init);
But it still didn’t work.
Please help!
You are on the right path, I believe what is missing is the SPI & TPM kernel modules have to be configured to built-in. Take a look at this doc for the detailed steps.

Cross compiler for MIPS doesn't seem to create valid programs

I've set up a cross compiler using buildroot.
The target device is running Linux and it has a MIPS processor (it's a Dreambox dm500hd).
Buildroot configuration (only the things that I've changed):
Target configuration
Architecture: MIPS (little endian)
Architecture variant: Generic MIPS32
Toolchain configuration
[*] Enable C++ Support
[*] Enable compiler link-time-optimization support
I've followed the setup procedure and buildroot makes the compiler successfully (mips-linux-gcc and g++).
Hello World file (test-mips.cpp)
#include <iostream>
using namespace std;
int main() {
cout << "hello world";
return 0;
}
I can compile Hello World, but when I run it on the target device an error is thrown:
dm500hd:~$ ./test-mips
./test-mips: line 1: EL#4▒�P4: not found
./test-mips: line 1: syntax error: unexpected word (expecting ")")
The strange characters appear only if I build the compiler for little-endian: the error for programs compiled with big-endian is the same, but with spaces instead of ▒�.
I tried both little endian and big endian but the problem is the same. Have I done something wrong while configuring buildroot then?
Note: cat /proc/cpuinfo game me this result. Should I change the Architecture Variant?
system type : BCM7413B1 STB platform
processor : 0
cpu model : Brcm4380 V4.4 FPU V0.1
BogoMIPS : 403.45
cpu MHz : 405.010
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
processor : 1
cpu model : Brcm4380 V4.4 FPU V0.1
BogoMIPS : 403.45
cpu MHz : 405.010
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
Do you run on your target system the root filesystem generated by Buildroot ? Or do you just built your program with the Buildroot toolchain, and moved it to your existing filesystem on the target ?
In the latter case, then don't expect that to work out of the box. You have to make sure your program is ABI compatible with the reset of the system that already exists on your target system.

UART doesn't work on BeagleBoneBlack running Ubuntu 14.04

I have been working for a few days trying to get the UART1 port to work on a bbb. I flashed the prebuilt kernel from the elinux wiki (http://www.elinux.org/BeagleBoardUbuntu#Flasher), and the UART1 appears in the /dev folder (as /dev/ttyO1, with a capital "o" not a zero), but when I write to it, nothing comes out of the pins. I can use UART0 (on a separate little serial header, but not the one I need) without any trouble.
I see a lot of tutorials for enabling UART1 that deal with a folder called /sys/devices/bone_capemgr.* but I don't have one. I think it is because I have a newer kernel, and nearly all of those tutorials are exclusively for older kernels (<=3.8).
I read that the current 3.13 images from Robert C Nelson don't have a cape-manager (https://groups.google.com/forum/m/#!topic/beagleboard/ND3_w7_dn8Q), and you can use the "really simple cape manager" (https://github.com/RobertCNelson/rscm), but the build.sh script doesn't work on my 3.14 kernel. I tried to change a path in the script to fix it and now that bbb won't boot.
I also tried the beaglebone-universal-io script (
https://github.com/cdsteinkuehler/beaglebone-universal-io) but when I query the relevant pin:
sudo ./config-pin -q P8_26
I get the error:
P8_26 pinmux file not found!
Please verify your device tree file
Am I missing something really simple here?

Angstrom OpenEmbedded Kernel freeze when booting on original BeagleBoard

I am trying to get an original BeagleBoard (revC4) to boot a Angstrom OpenEmbedded image. Using instructions found here:
http://elinux.org/BeagleBoardAndOpenEmbeddedGit
and:
http://www.angstrom-distribution.org/building-angstrom
I have followed everything but the program freeze with message booting the kernel.
Output:
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)
Reading boot sector
Loading u-boot.bin from mmc
U-Boot 2009.11 (Feb 23 2010 - 15:33:48)
OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
DRAM: 256 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Board revision C4
Die ID #40a8000400000000040365fa1301c014
Hit any key to stop autoboot: 0
mmc1 is available
reading boot.scr
** Unable to read "boot.scr" from mmc 0:1 **
reading uImage
4335440 bytes read
Booting from mmc ...
Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.2.28
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4335376 Bytes = 4.1 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
I have tried both ttyS2 and ttyO2 in the bootargs without difference and have also upgraded both the xLoader and uBoot.
My end goal is to run a rudimentary ROS (Robot Operating System) and the BeagleBoard.
Any help would truly be appreciated.
I don't know if you ever got past this, but as I have recently been trying to get a Beagleboard up and running again, I'll put an answer here for the sake of anyone else trying to get things working.
TLDR version: Use Angstrom v2013.6 and hold the user button as you boot (or zero out the NAND flash) for the easiest solution that just works. See below for more details.
First of all, the place you're stuck at here is due to the u-boot flashed into NAND being out-of-date for a recent version of Angstrom. Simple fix is to hold down the user button when booting, which will bypass NAND and boot straight from the SD card, which presumably has the version of u-boot you just built. You can then stop the boot and either zero out the NAND or flash the current MLO and u-boot into it.
After that, you'll run into some more issues if you're using an image based on systemd. The meta-ti layer controls the basic parameters for the 'beagleboard' configuration and has its virtual/kernel provider set to linux-mainline, which is also in the meta-ti layer. At some point there was a new recipe version added for it which builds a 3.14 kernel, but the kernel configuration isn't suitable for systemd and the system will hang shortly after booting.
The good news is that Angstrom v2013.06 predates the 3.14 kernel change in meta-ti, and I was able to get that running just fine. I am trying to get a more recent Angstrom working with the 3.2 kernel that works with v2013.6, but I haven't had any luck yet.

Basic Linux dmesg questions

and thanks for looking at this question.
I am porting a Linux (2.6.37) driver between bus standards (PLB -> AXI) to be precise for a Xilinx FPGA-SoC. The device driver is compiled inline in the tree. I have a few questions that I am sure you guys can help me.
What listing in the Linux kernel tree, allows a device to print the device_init_ string on dmesg ? What file is required for the listing ?
Normally when a device driver is compiled outside the tree, the extension used (normally) is *.ko, is this the case when the device driver is compiled within the tree and merged using "make modules" ?
EDITS for Clarity
Suppose you have a device called "foo", that has to be compiled within the tree. I am observing that "foo" is printing dmesg strings for PLB but not for AXI. I was intending to ask how the device gets added to 'init' ? Which file holds the entry for "foo" that tells init that "foo" has to be loaded ?
For larger sense, foo = xilinx_hwicap
Thanks
RRS
P.S Thanks for your patience
printk(9) prints to the system message ring.
All modules in 2.6+, regardless of location, end in ".ko".

Resources