Skip to content

Commit

Permalink
Always pass root= parameter, and drop init= parameter
Browse files Browse the repository at this point in the history
Every device booting OpenDingux needs the root= parameter, so make it
mandatory.

They also all hardcode (in the kernel configuration) the init path, so
there's no need to specify it in UBIBoot.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Dec 6, 2022
1 parent dc54030 commit 068b7d3
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 31 deletions.
2 changes: 0 additions & 2 deletions src/config-a320.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#define CFG_CPU_SPEED 336000000
#define CFG_EXTAL 12000000

#define SYSPART_INIT "/mininit-syspart"

/* serial parameters */
#define LOG_UART 0
#define LOG_BAUDRATE 57600
Expand Down
2 changes: 0 additions & 2 deletions src/config-gcw0.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#define MBR_PRELOAD_ADDR 0x80000000

#define SYSPART_INIT "/mininit-syspart"

#define RFKILL_STATE 0

#define USES_HIGHMEM
Expand Down
2 changes: 0 additions & 2 deletions src/config-lepus.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

#define MBR_PRELOAD_ADDR 0x80000000

#define SYSPART_INIT "/mininit-syspart"

#define RFKILL_STATE 0

//#define USES_HIGHMEM
Expand Down
2 changes: 0 additions & 2 deletions src/config-rs90.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#define CFG_CPU_SPEED 360000000
#define CFG_EXTAL 12000000

#define SYSPART_INIT "/mininit-syspart"

/* serial parameters */
#define LOG_UART 0
#define LOG_BAUDRATE 57600
Expand Down
23 changes: 0 additions & 23 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,15 @@

/* Kernel parameters list */

/* Fill in root device and file system type? */
#if defined(SYSPART_INIT) || (defined(USE_UBI) && defined(UBI_ROOTFS_VOLUME))
#define PASS_ROOTFS_PARAMS 1
#else
#define PASS_ROOTFS_PARAMS 0
#endif

enum {
/* Arguments for the kernel itself. */
PARAM_EXEC = 0,
#if defined(USE_UBI) && defined(UBI_ROOTFS_MTDNAME)
PARAM_UBIMTD,
#endif
#if PASS_ROOTFS_PARAMS
PARAM_ROOTDEV,
PARAM_ROOTTYPE,
PARAM_ROOTWAIT,
#endif
#ifdef SYSPART_INIT
PARAM_READONLY,
PARAM_INIT,
#endif
#ifdef USE_SERIAL
PARAM_CONSOLE_SERIAL,
PARAM_CONSOLE_SERIAL_EARLYCON,
Expand Down Expand Up @@ -79,15 +66,9 @@ static char *kernel_params[] = {
#if defined(USE_UBI) && defined(UBI_ROOTFS_MTDNAME)
[PARAM_UBIMTD] = "",
#endif
#if PASS_ROOTFS_PARAMS
[PARAM_ROOTDEV] = "",
[PARAM_ROOTTYPE] = "",
[PARAM_ROOTWAIT] = "rootwait",
#endif
#ifdef SYSPART_INIT
[PARAM_READONLY] = "ro",
[PARAM_INIT] = "init=" SYSPART_INIT,
#endif
#ifdef USE_SERIAL
[PARAM_CONSOLE_SERIAL] = "console=ttyS" STRINGIFY_IND(LOG_UART)
"," STRINGIFY_IND(LOG_BAUDRATE),
Expand Down Expand Up @@ -192,10 +173,8 @@ void c_main(void)
set_alt_param();

if (exec_addr) {
#if PASS_ROOTFS_PARAMS
kernel_params[PARAM_ROOTDEV] = rootfs_dev;
kernel_params[PARAM_ROOTTYPE] = "rootfstype=vfat";
#endif
}
}

Expand Down Expand Up @@ -224,10 +203,8 @@ void c_main(void)
#ifdef UBI_ROOTFS_MTDNAME
kernel_params[PARAM_UBIMTD] = "ubi.mtd=" UBI_ROOTFS_MTDNAME;
#endif
#if PASS_ROOTFS_PARAMS
kernel_params[PARAM_ROOTDEV] = "root=ubi0:" UBI_ROOTFS_VOLUME;
kernel_params[PARAM_ROOTTYPE] = "rootfstype=ubifs";
#endif
}
#else /* USE_UBI */
#warning UBI is currently the only supported NAND file system and it was not selected.
Expand Down

0 comments on commit 068b7d3

Please sign in to comment.