WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tinycore 7.x and Kernel 5.4+  (Read 1669 times)

Offline edgardogho

  • Newbie
  • *
  • Posts: 27
Tinycore 7.x and Kernel 5.4+
« on: May 21, 2020, 10:57:50 AM »
Hi,
I have a number of units using Tinycore 7.2. I usually build my own kernel and keep it up to date (as much as possible). Using kernel 5.3.x everything works fine, but once I use kernel 5.4+ (currently 5.6.14) TCZs won't mount.
There is a message on DMESG saying " Squashfs: Unknown Parameter 'bs' ".
I looked into some kernel reports: https://lore.kernel.org/lkml/20191130181548.GA28459@gentoo-tp.home/T/ and apparently its due to Squashfs being handled by the kernel.

I modified fs/fs_context.c to have this:
Code: [Select]
if (strcmp(param->key, "bs") == 0){

return 0;
}

return invalf(fc, "%s: Unknown parameter '%s'",
      fc->fs_type->name, param->key);
which seems to do the trick.

What I'm confused about is that I can't find a mount line including the 'bs' option anywhere on /etc/init.d/ which is where tc-config tc-funcions exists.

Any idea where the 'bs' option is added to mount?
I can work around the problem in the kernel but I'm just curious where its included on the mounting of the TCZ.

Thanks

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: Tinycore 7.x and Kernel 5.4+
« Reply #1 on: May 21, 2020, 11:23:17 AM »
Hi edgardogho
Try this:
Code: [Select]
tc@E310:~$ grep -i bs /usr/bin/tc* | grep -i squash
/usr/bin/tce-load:      sudo /bin/mount $1 /mnt/test -t squashfs -o loop,ro,bs=4096
/usr/bin/tce-load:                      [ "$?" == 1 ] || sudo /bin/mount "$THISAPP" /tmp/tcloop/"$APPNAME" -t squashfs -o loop,ro,bs=4096 2>&1
tc@E310:~$

Offline edgardogho

  • Newbie
  • *
  • Posts: 27
Re: Tinycore 7.x and Kernel 5.4+
« Reply #2 on: May 21, 2020, 11:26:28 AM »
ohh, its tce-load on /usr/bin.. forgot to check there.
I think its cleaner to change the tce-load than to change the kernel, so I'll change it there.
Thanks!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: Tinycore 7.x and Kernel 5.4+
« Reply #3 on: May 21, 2020, 11:41:23 AM »
Hi edgardogho
... I think its cleaner to change the tce-load than to change the kernel, so I'll change it there. ...
You'll need to change the  initrd  for that. If you want to experiment before changing the  initrd , I think you can edit and backup
tce-load.  Then using the  base  boot code,  tce-load  probably won't get called. You could then load your extensions from  bootsync.sh
after  tce-load  is restored.