mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
photon: add photon etc init rcS build support
N/A Signed-off-by: liuhaitao <liuhaitao@xiaomi.com> Change-Id: I992ff8b3774e2661b047462145a1a8439da05351
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/stm32/photon/include/nsh_romfsimg.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_PHOTON_INCLUDE_NSH_ROMFSIMG_H
|
||||
#define __CONFIGS_PHOTON_INCLUDE_NSH_ROMFSIMG_H
|
||||
extern const unsigned char romfs_img[];
|
||||
extern const unsigned int romfs_img_len;
|
||||
#endif
|
||||
@@ -71,6 +71,12 @@ ifeq ($(CONFIG_RGBLED),y)
|
||||
CSRCS += stm32_rgbled.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NSH_ROMFSETC),y)
|
||||
ifneq ($(CONFIG_NSH_CUSTOMROMFS),y)
|
||||
RCSRCS = etc/init.d/rcS
|
||||
endif
|
||||
endif
|
||||
|
||||
DEPPATH += --dep-path board
|
||||
VPATH += :board
|
||||
CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/stm32/photon/src/etc/init.d/rcS
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
set +e
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifdef CONFIG_FS_TMPFS
|
||||
mount -t tmpfs CONFIG_LIBC_TMPDIR
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NSH_DISABLE_UNAME
|
||||
uname -a > /dev/syslog
|
||||
#endif
|
||||
Reference in New Issue
Block a user