Commit Graph

20 Commits

Author SHA1 Message Date
Xiang Xiao b12f588140 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 13:58:26 +02:00
Gustavo Henrique Nihei ae714baae5 board/ctrl: Add BOARDIOC_BOOT_IMAGE for booting a new application image
This command enables the application to perform the final steps of the
booting process prior to finally switching the execution to another
firmware image.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-07-30 09:47:46 -07:00
liuhaitao a02f450773 board/ctrl: add BOARDCTL_SWITCH_BOOT switch boot system support
BOARDIOC_SWITCH_BOOT is required to communicate the boot partition from
userspace (OTA subsystem) to board. It can be used to change the system
boot behavior. So it's useful for A/B boot or even single boot case.

For the board support A/B boot case:
1. Download the new image from the sever
2. Write the new image to the alternative partition
3. Call BOARDCTL_SWITCH_BOOT to the alternative system

For single boot partition case:
1. Download the new image from the sever
2. Call BOARDCTL_SWITCH_BOOT and reboot to a small system
3. Write the new image to the main partition in the small system
4. Call BOARDCTL_SWITCH_BOOT again to the main system

Change-Id: Ifebb495784ecf06842946a249bec64f75dce894f
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-07-22 09:03:51 -07:00
chao.an 441b03c61c board/ctrl: add BOARDCTL_UNIQUEKEY support
Add unique key to support get trusted data from the trusted field

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-07 08:23:23 -03:00
Cis van Mierlo ab38af02e9 boardctl: added pm_checkstate() function to BOARDIOC_PM_CONTROL 2021-03-25 19:14:44 -03:00
Cis van Mierlo dc31b4f1c1 boardctl: added the option to change the pm state 2021-03-23 21:20:05 -07:00
Brennan Ashton fe0b5df223 boardctl: Remove warning pragma on BOARDIOC_USBDEV_CONNECT
We already have a debug assert and a return error this warning
will fail builds that are not even using this ioctl.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-07-19 15:49:13 -03:00
Gregory Nutt 547a3cb3d9 Run all .c and .h files in previous commits through nxstyle. 2020-03-22 08:24:07 -05:00
Gregory Nutt f7e11fb2a6 boards/: Remove references to CONFIG_FS_WRITABLE
Remove references from defconfig files, README.txt files and a couple of uses in .c files
2020-03-22 08:24:07 -05:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Gregory Nutt e207f020d7 boards/boardctl.c: pm_stay() was used were pm_staycount() was intended. The caused an error: void value not ignored as it ought to be. 2019-11-04 18:28:01 -06:00
Xiang Xiao 8a59ae70ff boards/boardctl.c: Expose power manager function through boardctl interface. 2019-11-04 07:41:25 -06:00
Gregory Nutt 118d611a8b Squashed commit of the following:
board/boarctl.c:  Add support for the new BOARDIOC_ROMDISK command.  This allows applications to create ROMFS block drivers without illegal direct calls to romdisk_register.

    include/sys/boardctl.h:  Add basic definitions to support a ROM disk creation boardctl() command.
2019-10-26 13:42:40 -06:00
Gregory Nutt 07edaa088c drivers/Kconfig: Add an option, CONFIG_DRVR_MKRD, to control whether or not the mkrd() implementation is build. Otherwise, if mkrd() is built unconditionally, it will be drawn into every build whether it is used or not and will increase the build size. 2019-10-26 11:43:34 -06:00
Gregory Nutt be325924fb This commit corrects a problem with NSH: NSH was calling the OS internal function ramdisk_register() in violation of the portable POSIX interface. This commit solves the problem by introducing a new boardctl() function BOARDIOC_MKRD which moves the RAM disk creation into the OS.
Squashed commit of the following:

    drivers/:  Run tools/nxstyle against all drivers/*.c.

    boards/boardctl.c:  Add new boardctl() command, BOARDIOC_MKRD, that can be used to create a RAM disk.  This will replace the illegal call to ramdisk_register() currently used by NSH.

    drivers/mkrd.c:  Add wrapper around ramdisk_register() for creating a proper ramdisk.
2019-10-26 09:35:32 -06:00
Nathan Hartman 46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -06:00
Gregory Nutt da9433a4c7 Fix another warnings and an error in typing introduced in the previous commit related to BINFS in PROTECTED mode. 2019-08-25 18:37:23 -06:00
Gregory Nutt f751aff7fe boards/boardctl.c and libs/libc/builtin: The BINFS file system uses the same builtin library and builtin arrays as does NSH. The builtin arrays are simple name-value pairs that map builtin function names with the user-space entry point. In the FLAT build, the builtin arrays are available everywhere via the backdoor left open by the FLAT address space. In the PROTECTED build, however, the kernel must maintain its own reference to the user-space builtin array. This commits adds those kernel globals and a new boardctl(BOARDIOC_BUILTINS) that can be used by applications to the provide the builtin list reference to the kernel. 2019-08-25 16:58:43 -06:00
Nathan Hartman be5a40c656 Fix typos in comments. 2019-08-21 09:32:59 -06:00
Alin Jerpelea a1c991d921 Merged in alinjerpelea/nuttx (pull request #963)
Move boards to boards folder

* boards: rename configs folder to boards

    This is the proposed layout after the change:

    boards: - folder containing board folders
            <board>: - name of each board
                    drivers: - extra drivers specific for platform
                    include: - header files for the boars
                    scripts: - extra scripts specific for platform
                        src: - board specific code
                      tools: - extra tools specific for platform
                    <config>: - board specific configuration(s)

    Note:
    <xxx> names are dependent on platform

    This is a logical change to aim to the arch layout but this is a
    huge change it should be done in several steps to lower the risk.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* Kconfig: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* Makefile: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* Makefile.*: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* Make.defs: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* .sh: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* .mk: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* .c & .h: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* .bat: replace configs with boards

    The change is needed after the path change

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-05 12:04:14 +00:00