forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: mt76: mt7921e: add firmware for mt7922 wifi6e devices for Ryan ramips/mt7621: Add HATLab GateBoard-One Support uboot-rockchip: add HINLINK OPC-H68K support kernel: add quirk for Huawei-compatible OEM SFP GE-T kernel: backport workaround for Realtek RTL8672 and RTL9601C chips
- Loading branch information
Showing
45 changed files
with
2,584 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
package/boot/uboot-rockchip/src/configs/opc-h68k-rk3568_defconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
CONFIG_ARM=y | ||
CONFIG_SKIP_LOWLEVEL_INIT=y | ||
CONFIG_ARCH_ROCKCHIP=y | ||
CONFIG_SYS_TEXT_BASE=0x00a00000 | ||
CONFIG_SPL_LIBCOMMON_SUPPORT=y | ||
CONFIG_SPL_LIBGENERIC_SUPPORT=y | ||
CONFIG_NR_DRAM_BANKS=2 | ||
CONFIG_DEFAULT_DEVICE_TREE="rk3568-evb" | ||
CONFIG_ROCKCHIP_RK3568=y | ||
CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y | ||
CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y | ||
CONFIG_SPL_MMC=y | ||
CONFIG_SPL_SERIAL=y | ||
CONFIG_SPL_STACK_R_ADDR=0x600000 | ||
CONFIG_TARGET_EVB_RK3568=y | ||
CONFIG_DEBUG_UART_BASE=0xFE660000 | ||
CONFIG_DEBUG_UART_CLOCK=24000000 | ||
CONFIG_DEBUG_UART=y | ||
CONFIG_SYS_LOAD_ADDR=0xc00800 | ||
CONFIG_FIT=y | ||
CONFIG_FIT_VERBOSE=y | ||
CONFIG_SPL_LOAD_FIT=y | ||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-evb.dtb" | ||
# CONFIG_DISPLAY_CPUINFO is not set | ||
CONFIG_DISPLAY_BOARDINFO_LATE=y | ||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set | ||
CONFIG_SPL_STACK_R=y | ||
CONFIG_SPL_SEPARATE_BSS=y | ||
CONFIG_SPL_ATF=y | ||
CONFIG_CMD_GPT=y | ||
CONFIG_CMD_MMC=y | ||
# CONFIG_CMD_SETEXPR is not set | ||
# CONFIG_SPL_DOS_PARTITION is not set | ||
CONFIG_SPL_OF_CONTROL=y | ||
CONFIG_OF_LIVE=y | ||
CONFIG_NET_RANDOM_ETHADDR=y | ||
CONFIG_SPL_REGMAP=y | ||
CONFIG_SPL_SYSCON=y | ||
CONFIG_SPL_CLK=y | ||
CONFIG_ROCKCHIP_GPIO=y | ||
CONFIG_SYS_I2C_ROCKCHIP=y | ||
CONFIG_MISC=y | ||
CONFIG_SUPPORT_EMMC_RPMB=y | ||
CONFIG_MMC_DW=y | ||
CONFIG_MMC_DW_ROCKCHIP=y | ||
CONFIG_MMC_SDHCI=y | ||
CONFIG_MMC_SDHCI_SDMA=y | ||
CONFIG_MMC_SDHCI_ROCKCHIP=y | ||
CONFIG_DM_ETH=y | ||
CONFIG_ETH_DESIGNWARE=y | ||
CONFIG_GMAC_ROCKCHIP=y | ||
CONFIG_REGULATOR_PWM=y | ||
CONFIG_PWM_ROCKCHIP=y | ||
CONFIG_SPL_RAM=y | ||
CONFIG_DM_RESET=y | ||
CONFIG_BAUDRATE=1500000 | ||
CONFIG_DEBUG_UART_SHIFT=2 | ||
CONFIG_SYSRESET=y | ||
CONFIG_ERRNO_STR=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=rdloader | ||
PKG_VERSION:=1.0.1 | ||
PKG_RELEASE:=1 | ||
|
||
PKG_LICENSE:=GPLv3 | ||
PKG_BUILD_DEPENDS:=util-linux e2fsprogs | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
include $(INCLUDE_DIR)/cmake.mk | ||
|
||
define Package/rdloader | ||
SECTION:=base | ||
CATEGORY:=Base system | ||
TITLE:=kmod loader for ramdisk enviroment | ||
DEPENDS:=@TARGET_ramips +e2fsprogs +libblkid | ||
endef | ||
|
||
define Package/rdloader/description | ||
Lightweight kmod loader for ramdisk enviroment, | ||
support uuid-based rootfs mount | ||
endef | ||
|
||
define Build/Prepare | ||
mkdir -p $(PKG_BUILD_DIR) | ||
$(CP) ./src/* $(PKG_BUILD_DIR)/ | ||
endef | ||
|
||
CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=Release | ||
|
||
define Build/InstallDev | ||
rm -fR $(STAGING_DIR)/rdloader | ||
mkdir -p $(STAGING_DIR)/rdloader/{bin,lib,etc} | ||
|
||
$(CP) $(PKG_BUILD_DIR)/rdloader $(STAGING_DIR)/rdloader/bin/ | ||
$(CP) $(STAGING_DIR_ROOT)/usr/sbin/e2fsck $(STAGING_DIR)/rdloader/bin/ | ||
$(CP) $(STAGING_DIR_ROOT)/etc/e2fsck.conf $(STAGING_DIR)/rdloader/etc/ | ||
|
||
( \ | ||
export \ | ||
READELF=$(TARGET_CROSS)readelf \ | ||
OBJCOPY=$(TARGET_CROSS)objcopy \ | ||
XARGS="$(XARGS)"; \ | ||
find $(STAGING_DIR)/rdloader/bin/ -type f -a -exec \ | ||
$(SCRIPT_DIR)/gen-rddependencies.sh {} \; ; \ | ||
) | while read FILE; do \ | ||
cp $(STAGING_DIR_ROOT)/lib/$$$$FILE $(STAGING_DIR)/rdloader/lib/ || \ | ||
cp $(STAGING_DIR_ROOT)/usr/lib/$$$$FILE $(STAGING_DIR)/rdloader/lib/ \ | ||
; \ | ||
done; | ||
endef | ||
|
||
$(eval $(call BuildPackage,rdloader)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
set(CMAKE_C_STANDARD 99) | ||
project(rdloader C) | ||
|
||
add_executable(rdloader main.c insmod.c insmod.h mknod.c mknod.h mkdev_node.c mkdev_node.h blkid2.c blkid2.h cmdline.c cmdline.h switch_root.c switch_root.h) | ||
|
||
target_link_libraries(${PROJECT_NAME} blkid) | ||
|
||
install(TARGETS rdloader RUNTIME DESTINATION /usr/sbin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// Created by juno on 2022/1/11. | ||
// | ||
|
||
#include <stdio.h> | ||
#include <blkid/blkid.h> | ||
#include <errno.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include "blkid2.h" | ||
|
||
int get_blkid(const char *blkdev, char **uuid) | ||
{ | ||
blkid_probe pr; | ||
int ret; | ||
size_t len; | ||
const char *data; | ||
void *out; | ||
|
||
pr = blkid_new_probe_from_filename(blkdev); | ||
if (!pr) | ||
{ | ||
fprintf(stderr, "Failed open %s:%s\n", blkdev, strerror(errno)); | ||
return -1; | ||
} | ||
|
||
blkid_do_probe(pr); | ||
ret = blkid_probe_lookup_value(pr, "UUID", &data, &len); | ||
|
||
if (ret == 0) | ||
{ | ||
out = calloc(1, len + 1); | ||
memcpy(out, data, len); | ||
*uuid = out; | ||
} | ||
|
||
blkid_free_probe(pr); | ||
|
||
return ret; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// | ||
// Created by juno on 2022/1/11. | ||
// | ||
|
||
#ifndef INIT_BLKID2_H | ||
#define INIT_BLKID2_H | ||
|
||
int get_blkid(const char *blkdev, char **uuid); | ||
|
||
#endif //INIT_BLKID2_H |
Oops, something went wrong.