WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: core packing  (Read 3080 times)

Offline jnovacek

  • Newbie
  • *
  • Posts: 30
core packing
« on: February 07, 2014, 03:14:05 PM »
Hi all,
I need to pack some files directly into the kernel piCore. I used
cd /tmp/picore
sudo find | sudo cpio -o -H newc | gzip -2 > ../140123.gz
cd /tmp
advdef -z4 140123.gz

but this does not work. How do I pack?

Jiri

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1063
Re: core packing
« Reply #1 on: February 07, 2014, 05:40:09 PM »
What are you trying to pack?  repacking the initrd is a chore.   And you will have to re-do this if you ever upgrade the core.

I would investigate making your own extension, or even just it is easier to add the filesname to /opt/.filetool.lst

Then put the files in the appropriate location,  then run filetool.sh -b

this will back them up



Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: core packing
« Reply #2 on: February 07, 2014, 09:11:19 PM »
You'd have to reconfigure the kernel specifying adequate options and probably point it to the files unpacked from core.gz.

Most likely you will have to search for (kernel) documentation how to do such exactly beyond from Core, I've never seen that discussed here and there is nothing specific to Core about it, though Core may be an ideal candidate for inclusion in the kernel, as its whole base system is contained in a cpio archive.

My guess would be that a reason this is not more popular would be the lack of options to upgrade or make dynamical changes to base without recompiling the kernel.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: core packing
« Reply #3 on: February 08, 2014, 12:56:42 AM »
You'd have to reconfigure the kernel specifying adequate options and probably point it to the files unpacked from core.gz.


Guess we are no talking about custom kernel but adding files to the base system which means modifying initrd.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: core packing
« Reply #4 on: February 08, 2014, 12:58:57 AM »
Hi all,
I need to pack some files directly into the kernel piCore. I used
cd /tmp/picore
sudo find | sudo cpio -o -H newc | gzip -2 > ../140123.gz
cd /tmp
advdef -z4 140123.gz

but this does not work. How do I pack?

Jiri

Do not use advdef. Also -2 is not needed.

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: core packing
« Reply #5 on: February 08, 2014, 05:47:05 AM »
You'd have to reconfigure the kernel specifying adequate options and probably point it to the files unpacked from core.gz.


Guess we are no talking about custom kernel but adding files to the base system which means modifying initrd.

I guessed that by
Quote
need to pack some files directly into the kernel
OP means to pack files into the cpio archive which is embedded in the kernel (as opposed to external), in which case reconfiguring kernel would be required.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline jnovacek

  • Newbie
  • *
  • Posts: 30
Re: core packing
« Reply #6 on: February 10, 2014, 07:52:21 AM »
Hi all,
I need to pack some files directly into the kernel piCore. I used
cd /tmp/picore
sudo find | sudo cpio -o -H newc | gzip -2 > ../140123.gz
cd /tmp
advdef -z4 140123.gz

but this does not work. How do I pack?

Jiri

Do not use advdef. Also -2 is not needed.

I left out "advdef" and "-2", but it still will not boot. System writes a kernel panic unsupported filesystem.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: core packing
« Reply #7 on: February 10, 2014, 08:48:55 AM »
Did you change initrd size in cmdline.txt?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jnovacek

  • Newbie
  • *
  • Posts: 30
Re: core packing
« Reply #8 on: February 10, 2014, 11:09:48 AM »
Did you change initrd size in cmdline.txt?

Yes, this helped.
Thank you