├── .gitignore ├── Makefile ├── init.sh ├── .gitmodules └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .config 2 | out/ 3 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include build/Makefile 2 | -------------------------------------------------------------------------------- /init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd crossgcc 4 | 5 | cd gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/bin 6 | tar jxvf ld.gold.bz2 7 | cd - 8 | 9 | cd gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/lib64 10 | tar jxvf libstdc++.a.bz2 11 | cd - 12 | 13 | cd gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin 14 | tar jxvf aarch64-none-linux-gnu-gdb.bz2 15 | cd - 16 | 17 | cd gcc-arm-9.2-2019.12-x86_64-arm-none-eabi/bin 18 | tar jxvf arm-none-eabi-gdb.bz2 19 | cd - 20 | 21 | cd gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/libexec/gcc/aarch64-none-linux-gnu/9.2.1 22 | tar jxvf cc1.bz2 23 | tar jxvf cc1plus.bz2 24 | tar jxvf f951.bz2 25 | tar jxvf lto1.bz2 26 | 27 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "linux/kernel"] 2 | path = linux/kernel 3 | url = https://github.com/sunplus-plus1/linux.git 4 | [submodule "nonos/Bchip-non-os"] 5 | path = nonos/Bchip-non-os 6 | url = https://github.com/sunplus-plus1/Bchip-non-os.git 7 | [submodule "nonos/Achip-non-os"] 8 | path = nonos/Achip-non-os 9 | url = https://github.com/sunplus-plus1/Achip-non-os.git 10 | [submodule "boot/uboot"] 11 | path = boot/uboot 12 | url = https://github.com/sunplus-plus1/u-boot.git 13 | [submodule "boot/xboot"] 14 | path = boot/xboot 15 | url = https://github.com/sunplus-plus1/x-boot.git 16 | [submodule "boot/draminit"] 17 | path = boot/draminit 18 | url = https://github.com/sunplus-plus1/draminit.git 19 | [submodule "linux/rootfs"] 20 | path = linux/rootfs 21 | url = https://github.com/sunplus-plus1/rootfs.git 22 | [submodule "build"] 23 | path = build 24 | url = https://github.com/sunplus-plus1/build.git 25 | [submodule "freertos"] 26 | path = freertos 27 | url = https://github.com/sunplus-plus1/freertos 28 | [submodule "ipack"] 29 | path = ipack 30 | url = https://github.com/sunplus-plus1/ipack.git 31 | [submodule "crossgcc"] 32 | path = crossgcc 33 | url = https://github.com/sunplus-plus1/crossgcc0.git 34 | [submodule "boot/trusted-firmware-a"] 35 | path = boot/trusted-firmware-a 36 | url = https://github.com/sunplus-plus1/trusted-firmware.git 37 | [submodule "firmware/iop"] 38 | path = firmware/iop 39 | url = https://github.com/sunplus-plus1/iop.git 40 | [submodule "firmware/arduino_core_sunplus"] 41 | path = firmware/arduino_core_sunplus 42 | url = https://github.com/sunplus-plus1/arduino_core_sunplus.git 43 | [submodule "optee"] 44 | path = optee 45 | url = https://github.com/sunplus-plus1/optee.git 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # How to compile 2 | Before you compile, please make sure these packages are installed: 3 | ```bashl 4 | sudo apt-get install openssl libssl-dev bison flex git make u-boot-tools libmpc-dev libgmp-dev python3-pip mtd-utils libncurses* mtools 5 | pip install pycryptodomex pyelftools Crypto 6 | ``` 7 | Fetch the source code: 8 | ```bash 9 | git clone https://github.com/sunplus-plus1/SP7021.git 10 | cd SP7021 11 | git submodule update --init --recursive 12 | git submodule foreach git checkout master 13 | ``` 14 | Configure the build: 15 | ```bash 16 | make config 17 | ``` 18 | Select your board: 19 | ```bash 20 | Select boards: 21 | [1] SP7021 Ev Board [11] I143 Ev Board [21] Q645 Ev Board [31] SP7350 Ev Board 22 | [2] LTPP3G2 Board [12] I143 Zebu (ZMem) [22] Q645 Zebu (ZMem) [32] SP7350 Zebu (ZMem) 23 | [3] SP7021 Demo Brd V2 24 | [4] SP7021 Demo Brd V3 25 | [5] BPI-F2S Board 26 | [6] BPI-F2P Board 27 | [7] LTPP3G2 Board (S+) 28 | ``` 29 | If you selected [1] or [11], please select the chip: 30 | ```bash 31 | Select chip. 32 | [1] Chip C 33 | [2] Chip P 34 | ``` 35 | ```bash 36 | Select configs (C chip). 37 | [1] eMMC 38 | [2] SD Card 39 | ``` 40 | ```bash 41 | Select rootfs: 42 | [1] BusyBox 43 | [2] Full 44 | ``` 45 | >If you want to change the kernel configuration, run: 46 | ``` 47 | make kconfig 48 | ``` 49 | >after make config has completed. 50 | > 51 | >**Note 0:** Please don't enter the `linux/kernel` folder and run "`make menuconfig`" 52 | > 53 | >**Note 1:** For USB gadget support, please refer to [here](https://github.com/sunplus-plus1/usb_gadget) 54 | 55 | Build the kernel: 56 | ``` 57 | make 58 | ``` 59 | If your local LANG is not english, please run 60 | ``` 61 | LANG=c make 62 | ``` 63 | When the build completes, you will find the image file in the `out` folder. 64 | 65 | If you chose 66 | * eMMC: 67 | * Copy `out/ISPBOOOT.BIN` to a USB stick, which should be a FAT32 filesystem 68 | * Update the eMMC from the USB stick: power off, set SW1 to on, SW2 to off, power on 69 | * Boot the kernel: power off, set SW1 to off, SW2 to off, power on 70 | * SD Card: 71 | * the image file is `out/boot2linux_SDcard/ISP_SD_BOOOT.img` 72 | * write it to the sdcard: `sudo dd if=ISP_SD_BOOOT.img of=/dev/sdX bs=1M`, where /dev/sdX is your sdcard device 73 | * insert your sdcard in the board and boot: power off, set SW1 to on, SW2 to on, power on 74 | 75 | For more information, please visit [here](https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/pages/375783435/SP7021+Application+Note) 76 | 77 | --------------------------------------------------------------------------------