Changes between Version 6 and Version 7 of OpenWrt/SDK


Ignore:
Timestamp:
08/27/2024 11:54:08 PM (3 months ago)
Author:
Ryan Erbstoesser
Comment:

add venice notes

Legend:

Unmodified
Added
Removed
Modified
  • OpenWrt/SDK

    v6 v7  
    6363Note:  The prebuilt toolchain may have some issue if the script arm-openwrt-linux-uclibcgnueabi-wrapper.sh is used (with regard to paths having whitespace).
    6464
     65=== Venice Notes
     66
     67Gateworks has not published a Toolchain / SDK and thus it should be built with the OpenWrt instructions on the [wiki:OpenWrt/building] page.
     68
     69This results in a toolchain in ./staging_dir and for 24.01 imx8m the toolchain will be toolchain-aarch64_cortex-a53_gcc-12.3.0_musl
     70
     71Once the toolchain is there, use the following commands to compile a Hello World:
     72{{{
     73# configure toolchain
     74export TOOLCHAIN=toolchain-aarch64_cortex-a53_gcc-12.3.0_musl
     75export STAGING_DIR=$PWD/staging_dir
     76export ARCH=arm64
     77export CROSS_COMPILE=aarch64-openwrt-linux-
     78export PATH=$PATH:$STAGING_DIR/$TOOLCHAIN/bin
     79cat << EOF > helloworld.c
     80#include <stdio.h>
     81#include <stdlib.h>
     82
     83int main(int argc, char **argv)
     84{
     85        printf("hello world!\n");
     86
     87        return 0;
     88}
     89EOF
     90${CROSS_COMPILE}gcc helloworld.c -o helloworld
     91}}}
     92
     93This builds a dynamically linked helloworld which you can inspect as:
     94{{{
     95$ file helloworld
     96helloworld: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1, with
     97 debug_info, not stripped
     98${CROSS_COMPILE}objdump -x helloworld | grep NEEDED
     99  NEEDED               libgcc_s.so.1
     100  NEEDED               libc.so
     101
     102}}}
     103
     104You can then copy this executable and run this on a board with OpenWrt 24.01 installed
     105
    65106=== Ventana Notes ===
    66107If desired, download the Ventana OpenWrt Toolchain/SDK and skip to step 4: