Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 2.03 KB

sdk.md

File metadata and controls

89 lines (67 loc) · 2.03 KB
layout title description
article
Software developer kit
Get and setup nemo sdk

Getting nemo sdk

Last nemo sdk you can dowload here

Getting nemo build targets

Install sdk

cd 
export MER_ROOT=$HOME/mer
mkdir -p $MER_ROOT/sdks/nemosdk
sudo tar --numeric-owner -pxjf ~/Downloads/nemo-sdk.tar.bz2 -C $MER_ROOT/sdks/nemosdk

Add into you ~/.bashrc alias nemosdk='$HOME/mer/sdks/nemosdk/mer-sdk-chroot'

Update to last packages versions sudo zypper ref sudo zypper up

Install targets

cd
mkdir -p ~/mer/targets/nemo-$ARCH
sudo tar --numeric-owner -pxjf nemo-target_$ARCH.tar.bz2 -C ~/mer/targets/nemo-$ARCH

Setup targets

Enter into nemo sdk nemosdk

cd
sudo chown -R $USER ~/mer/targets/nemo-$ARCH
pushd ~/mer/targets/nemo-$ARCH
grep :$(id -u): /etc/passwd >> etc/passwd
grep :$(id -g): /etc/group >> etc/group

#For armv7hl
sb2-init -d -L "--sysroot=/" -C "--sysroot=/" -c /usr/bin/qemu-arm-dynamic -m sdk-build -n -N -t / nemo-$ARCH /opt/cross/bin/$ARCH-meego-linux-gnueabi-gcc

#For aarch64
sb2-init -d -L "--sysroot=/" -C "--sysroot=/" -c /usr/bin/qemu-aarch64-dynamic -m sdk-build -n -N -t / nemo-$ARCH /opt/cross/bin/$ARCH-meego-linux-gnueabi-gcc

#rebuild rpm db and ret last updates
sb2 -t nemo-$ARCH -m sdk-install -R rpm --rebuilddb
sb2 -t nemo-$ARCH -m sdk-install -R zypper ref --force

Test sdk

Enter into nemo sdk nemosdk

mkdir -p $HOME/nemo/tmp
pushd $HOME/nemo/tmp

cat > main.c << EOF
#include <stdlib.h>
#include <stdio.h>
int main(void) {
printf("Scratchbox, works!\n");
return EXIT_SUCCESS;
}
EOF

sb2 -t nemo-$ARCH gcc main.c -o test
sb2 -t nemo-$ARCH ./test

popd

Build packages

Enter into nemo sdk nemosdk

cd path_to_sources
mb2 build