From efb71ed0ce6afee0643025f71e48eabca297d872 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 8 Feb 2017 04:46:54 +0100 Subject: Add boot data to MOST AS3525 Devices Adds boot data to as3525 devices Sansa C200v2 E200v2 Clip Clipv2 Clip+ ClipZip fuze, fuzev2 m200v4 Adds boot_data to features.txt default arm crt0.s now had boot data if HAVE_BOOTDATA is defined Change-Id: I614a556696540511a69fc12a4520b01c268bf8a9 --- apps/features.txt | 4 ++++ firmware/export/config/sansaclipplus.h | 2 ++ firmware/export/config/sansaclipv2.h | 2 ++ firmware/export/config/sansaclipzip.h | 2 ++ firmware/export/config/sansafuze.h | 2 ++ firmware/export/config/sansafuzev2.h | 2 ++ firmware/target/arm/crt0.S | 11 ++++++++++- 7 files changed, 24 insertions(+), 1 deletion(-) diff --git a/apps/features.txt b/apps/features.txt index 997727dbd9..3c0b0a3856 100644 --- a/apps/features.txt +++ b/apps/features.txt @@ -284,3 +284,7 @@ hardware_click #if defined(HAVE_PLAY_FREQ) play_frequency #endif + +#if defined(HAVE_BOOTDATA) +boot_data +#endif diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h index 07cf03280a..cf2b1136a3 100644 --- a/firmware/export/config/sansaclipplus.h +++ b/firmware/export/config/sansaclipplus.h @@ -7,6 +7,8 @@ #define MODEL_NAME "Sandisk Sansa Clip+" #define FIRMWARE_OFFSET_FILE_DATA 8 #define FIRMWARE_OFFSET_FILE_CRC 0 +/* Define if boot data from bootloader has been enabled for the target */ +#define HAVE_BOOTDATA #define HAVE_MULTIDRIVE #define NUM_DRIVES 2 diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h index c7833189b6..cf3f90e363 100644 --- a/firmware/export/config/sansaclipv2.h +++ b/firmware/export/config/sansaclipv2.h @@ -7,6 +7,8 @@ #define MODEL_NAME "Sandisk Sansa Clipv2" #define FIRMWARE_OFFSET_FILE_DATA 8 #define FIRMWARE_OFFSET_FILE_CRC 0 +/* Define if boot data from bootloader has been enabled for the target */ +#define HAVE_BOOTDATA #define HW_SAMPR_CAPS SAMPR_CAP_ALL diff --git a/firmware/export/config/sansaclipzip.h b/firmware/export/config/sansaclipzip.h index 9adf7023a9..9f1ff1f206 100644 --- a/firmware/export/config/sansaclipzip.h +++ b/firmware/export/config/sansaclipzip.h @@ -7,6 +7,8 @@ #define MODEL_NAME "Sandisk Sansa Zip" #define FIRMWARE_OFFSET_FILE_DATA 8 #define FIRMWARE_OFFSET_FILE_CRC 0 +/* Define if boot data from bootloader has been enabled for the target */ +#define HAVE_BOOTDATA #define HAVE_MULTIDRIVE #define NUM_DRIVES 2 diff --git a/firmware/export/config/sansafuze.h b/firmware/export/config/sansafuze.h index 528e99080e..d674d1f88a 100644 --- a/firmware/export/config/sansafuze.h +++ b/firmware/export/config/sansafuze.h @@ -5,6 +5,8 @@ /* For Rolo and boot loader */ #define MODEL_NUMBER 43 #define MODEL_NAME "Sandisk Sansa Fuze" +/* Define if boot data from bootloader has been enabled for the target */ +#define HAVE_BOOTDATA #define HW_SAMPR_CAPS SAMPR_CAP_ALL diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h index 595106eecf..a4d90160bd 100644 --- a/firmware/export/config/sansafuzev2.h +++ b/firmware/export/config/sansafuzev2.h @@ -5,6 +5,8 @@ /* For Rolo and boot loader */ #define MODEL_NUMBER 68 #define MODEL_NAME "Sandisk Sansa Fuze v2" +/* Define if boot data from bootloader has been enabled for the target */ +#define HAVE_BOOTDATA #define HW_SAMPR_CAPS SAMPR_CAP_ALL diff --git a/firmware/target/arm/crt0.S b/firmware/target/arm/crt0.S index b9cc27f5c5..07d860ed4f 100644 --- a/firmware/target/arm/crt0.S +++ b/firmware/target/arm/crt0.S @@ -21,6 +21,10 @@ #include "config.h" #include "cpu.h" +#if defined(HAVE_BOOTDATA) && !defined(BOOTLOADER) +#include "bootdata.h" +#endif + .section .init.text,"ax",%progbits .global start @@ -137,6 +141,11 @@ newstart: ldr ip, =main @ make sure we are using the virtual address bx ip +#if defined(HAVE_BOOTDATA) && !defined(BOOTLOADER) +/* boot data structure */ +put_boot_data_here +#endif + /* Cache-align interrupt stacks */ .balign 32 @@ -149,4 +158,4 @@ irq_stack: fiq_stack: svc_stack: -end: \ No newline at end of file +end: -- cgit v1.2.3