Skip to content

Trying to run travis#2

Merged
rminnich merged 1 commit into
u-root:masterfrom
rminnich:travis
Mar 7, 2016
Merged

Trying to run travis#2
rminnich merged 1 commit into
u-root:masterfrom
rminnich:travis

Conversation

@rminnich

@rminnich rminnich commented Mar 7, 2016

Copy link
Copy Markdown
Member

No description provided.

@rminnich rminnich force-pushed the travis branch 6 times, most recently from a387b05 to 7eb014e Compare March 7, 2016 23:38
I think the directories I'm removing should never have been there.

Signed-off-by: Ronald Minnich <rminnich@gmail.com>
@rminnich

rminnich commented Mar 7, 2016

Copy link
Copy Markdown
Member Author

LGTM

our first travis run passed

Approved with PullApprove

rminnich added a commit that referenced this pull request Mar 7, 2016
@rminnich rminnich merged commit b237745 into u-root:master Mar 7, 2016
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
10000TB added a commit that referenced this pull request Feb 22, 2023
This is only triggered when we specify to not load
image. Downloaded image info, together with other
configs like cmdline will be saved to a file under
tmpfs, which can be reloaded via kexec cmd.

An example flow looks like

Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# echo '{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/ke
   rnel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }' > /tmp/linux_i
   mage_cfg.json
/# cat /tmp/linux_image_cfg.json
{ "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
/# ls /testdata
initramfs.cpio
kernel
/# kexec -d -I /tmp/linux_image_cfg.json
1970/01/01 00:01:25 Load image info from /tmp/linux_image_cfg.json
1970/01/01 00:01:25 read: { "InitrdPath": "/testdata/initramfs.cpio", "KernelPath": "/testdata/kernel", "Cmdline": "/proc/cmdline", "Name": "testloadconfig" }
1970/01/01 00:01:25 Call json.Unmarshal ...
1970/01/01 00:01:25 Start unmarshal
1970/01/01 00:01:25 lliJSON: {Name:testloadconfig KernelPath:/testdata/kernel InitrdPath:/testdata/initramfs.cpio Cmdline:/proc/cmdline LoadSyscall:false KexecOpts:{DTB:<nil> MmapKernel:false MmapRamfs:false}}
1970/01/01 00:01:25 Check lliJSON
1970/01/01 00:01:25 Done json.Marshal...
.
..
1970/01/01 00:01:26 Kernel: /tmp/kexec-image1468578633
1970/01/01 00:01:26 Initrd: /tmp/kexec-image3979801582
1970/01/01 00:01:26 Command line: /proc/cmdline
1970/01/01 00:01:26 KexecOpts: linux.KexecOptions{DTB:io.ReaderAt(nil), MmapKernel:false, MmapRamfs:false}
Booting Linux on physical CPU 0x0000000000 [0x000f0510]
Linux version 5.15.0 (xuehaohu@worldpeace.svl.corp.google.com) (aarch64-linux-gnu-gcc (Debian 12.2.0-3) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.50.20221208) #2 SMP Tue Feb 21 15:13:11 PST 2023
Machine model: linux,dummy-virt
efi: UEFI not found.
Zone ranges:
  DMA      [mem 0x0000000040000000-0x00000000ffffffff]
  DMA32    empty
  Normal   [mem 0x0000000100000000-0x000000013fffffff]
NET: Registered PF_INET6 protocol family
...
... (linux booting)
...
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
9pnet: Installing 9P2000 support
Freeing initrd memory: 12748K
Freeing unused kernel memory: 960K
Run /init as init process
1970/01/01 00:00:03 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

/# uname -a
Linux (none) 5.15.0 #2 SMP Tue Feb 21 15:13:11 PST 2023 aarch64 (none)
/#

Signed-off-by: David Hu <xuehaohu@google.com>
rminnich added a commit to rminnich/u-root that referenced this pull request Jul 12, 2024
rminnich pushed a commit to rminnich/u-root that referenced this pull request Jul 12, 2024
Add golang CI based on github templates

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Raysmond added a commit to Raysmond/u-root that referenced this pull request Sep 2, 2024
� This is the 1st commit message:

Organize errors for pkg/boot/universalpayload

Change-Id: I47a0bb941fe58f17e47c5844fc7fc6f1b6b1c924
Signed-off-by: Raysmond <raysmond.lei@newfw.com>

� The commit message u-root#2 will be skipped:

� squash! Organize errors for pkg/boot/universalpayload
�
� Signed-off-by: Raysmond <raysmond.lei@newfw.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant