# install prerequists
sudo apt-get install unzip -y
# download the NaCl SDK
http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
unzip nacl_sdk
# try to run update
root@cheney-play:~/nacl_sdk# ./naclsdk update
32-bit runtime environment was not found on this
system. Specifically the 32-bit dynamic loader which is needed by the NaCl
compilers was not found ('/lib/ld-linux.so.2'). On modern debian/ubuntu
systems this is included in the 'libc6:i386' package.
# fail and try another way.
sudo touch /lib/ld-linux.so.2
root@cheney-play:~/nacl_sdk# ./naclsdk update
Downloading bundle pepper_42
(file 1/2 - "naclports.tar.bz2")
|================================================|
..................................................
(file 2/2 - "naclsdk_linux.tar.bz2")
|================================================|
..................................................
Updating bundle pepper_42 to version 42, revision 509
(file 1/2 - "naclports.tar.bz2")
(file 2/2 - "naclsdk_linux.tar.bz2")
# be amazed at the girth of pepper_42
root@cheney-play:~/nacl_sdk# du -sh pepper_42/
1.7G pepper_42/
# try to run sel_ldr_arm
root@cheney-play:~/nacl_sdk/pepper_42# tools/sel_ldr_arm
Illegal instruction
# use gdb
Dump of assembler code for function NaClAppWithSyscallTableCtor:
0x2a00f178 <+0>: stmdb sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr}
0x2a00f17c <+4>: add r7, sp, #12
0x2a00f17e <+6>: sub sp, #4
0x2a00f180 <+8>: vpush {d8-d9}
0x2a00f184 <+12>: sub sp, #16
0x2a00f186 <+14>: mov r4, r0
0x2a00f188 <+16>: mov r11, r1
0x2a00f18a <+18>: mov.w r1, #496 ; 0x1f0
0x2a00f18e <+22>: movs r2, #0
0x2a00f190 <+24>: movs r5, #0
0x2a00f192 <+26>: blx 0x2a009b2c
0x2a00f196 <+30>: bl 0x2a025d3c <NaClCreateValidator>
0x2a00f19a <+34>: mov r6, r0
0x2a00f19c <+36>: str.w r6, [r4, #488] ; 0x1e8
0x2a00f1a0 <+40>: ldr r0, [r6, #24]
0x2a00f1a2 <+42>: blx 0x2a009928
0x2a00f1a6 <+46>: str.w r0, [r4, #288] ; 0x120
0x2a00f1aa <+50>: cmp r0, #0
0x2a00f1ac <+52>: beq.w 0x2a00f42a <NaClAppWithSyscallTableCtor+690>
0x2a00f1b0 <+56>: ldr r1, [r6, #32]
0x2a00f1b2 <+58>: blx r1
0x2a00f1b4 <+60>: movs r0, #30
0x2a00f1b6 <+62>: str.w r5, [r4, #292] ; 0x124
0x2a00f1ba <+66>: strb r0, [r4, #0]
0x2a00f1bc <+68>: mov.w r0, #16777216 ; 0x1000000
=> 0x2a00f1c0 <+72>: vmov.i32 q4, #0 ; 0x00000000
0x2a00f1c4 <+76>: str r0, [r4, #4]
0x2a00f1c6 <+78>: add.w r0, r4, #24
0x2a00f1ca <+82>: movs r1, #2
# this is a neon instruction, but the scaleway machines dont have neon support
root@cheney-play:~/nacl_sdk/pepper_42# cat /proc/cpuinfo
Processor : Marvell PJ4Bv7 Processor rev 2 (v7l)
processor : 0
BogoMIPS : 1332.01
processor : 1
BogoMIPS : 1332.01
processor : 2
BogoMIPS : 1332.01
processor : 3
BogoMIPS : 1332.01
Features : swp half thumb fastmult vfp edsp vfpv3 tls
CPU implementer : 0x56
CPU architecture: 7
CPU variant : 0x2
CPU part : 0x584
CPU revision : 2
Hardware : Online Labs C1
Revision : 0000
Serial : 0000000000000000