How to create a ubifs with version 5? - linux

I want use the encrypt UBIFS which supported in the linux 4.10 and latter.
And I use the linux 4.18.4 to do the test.
I have done everything OK, and when I use the fscryptctl to set the encrypt policy, I get this error:
fscryptctl set_policy 6de1ee71051bd470 /var/ubifs/
UBIFS error (ubi0:0 pid 1400): ubifs_enable_encryption: on-flash
format version 5 is needed for encryption.
I find place where the error message printed in the kernel, and I try to print the current version for the UBIFS version, and I get the version is 4.
int ubifs_enable_encryption(struct ubifs_info *c)
{
......
if (c->fmt_version < 5) {
ubifs_err(c, "on-flash format version 5 is needed for encryption, current is version %d.", c->fmt_version);
return -EINVAL;
}
......
return err;
}
After I modify the code, And I get the following error message:
UBIFS error (ubi0:0 pid 1400): ubifs_enable_encryption: on-flash
format version 5 is needed for encryption, current is version 4.
So, that means the kernel need version 5 for encrypt, but I use the version 4.
And I need a tool to make the UBIFS with version.
Currently, I use the mtd-utils-2.0.2 which download from http://www.linux-mtd.infradead.org/ to build the ubifs image. And it make the UBIFS with version 4.
I have searched many information about the UBIFS version by google, but get nothing.
Does anyone know how to create a UBIFS with version 5?

Looks like it got added at mtd utils 2.1
Changes from 2.0.2 to `2.1.0:
Features:
- mkfs.ubifs: Implement support for file system encryption
- mkfs.ubifs: Implement selinux labelling support
- ubinize: add support for skipping CRC check of a static volume when opening
- ubimkvol: add support for skipping CRC check of a static volume when opening
- Add lsmtd program

Related

Ezjail and /etc/jail.conf in FreeBSD 10.2

I have a question regarding the following warning when using
Ezjail-3.4.1 on FreeBSD 10.2
/etc/rc.d/jail: WARNING: Per-jail configuration via jail_* var "enter code here" iables is obsolete. Please consider to migrate to /etc/jail.conf "enter code here"It is my understanding that this has changed in FreeBSD 9.0 but since 10.2 the new way is the default method and that warning is being generated.I haven't been able to find any information about this on google, a lot of users mentioning the errors but ignoring them because their jails still work.AFAIK in 10.0 the rc.d/jail script converts the old-style jail_
variables into a temporary jail.conf to handle the jail. So the warning
is generated by rc.d/jail
Regards
Mr-Hill
As you found out, jails on FreeBSD 10.x use a new configuration method. From /usr/src/UPDATING:
20131010:
The rc.d/jail script has been updated to support jail(8)
configuration file. The "jail_<jname>_*" rc.conf(5) variables
for per-jail configuration are automatically converted to
/var/run/jail.<jname>.conf before the jail(8) utility is invoked.
This is transparently backward compatible. See below about some
incompatibilities and rc.conf(5) manual page for more details.
These variables are now deprecated in favor of jail(8) configuration
file. One can use "rc.d/jail config <jname>" command to generate
a jail(8) configuration file in /var/run/jail.<jname>.conf without
running the jail(8) utility. The default pathname of the
configuration file is /etc/jail.conf and can be specified by
using $jail_conf or $jail_<jname>_conf variables.
Please note that jail_devfs_ruleset accepts an integer at
this moment. Please consider to rewrite the ruleset name
with an integer.
ezjail was never updated to use this new method, but that's ok: FreeBSD still accepts the previous method. You can ignore this warning.

SDCC valid device list is missing devices

I'm rebuilding a sdcc compiler after a mishap with my old system. I had been able to build on a pic18F4410, but my new setup does not include that in its valid device list.
The device list it is calling valid looks very small.
sdcc --use-non-free -mpic16 -p18f4410 test_blinkall.c
'18f4410' was not found.
Valid devices are:
p18f242 p18f248 p18f252 p18f258
p18f442 p18f448 p18f452 p18f458
p18f1220 p18f1320 p18f2220 p18f2320
p18f2455 p18f2550 p18f4220 p18f4320
p18f4331 p18f4455 p18f4520 p18f6520
p18f6620 p18f6680 p18f6720 p18f8520
p18f8620 p18f8680 p18f8720
I'm not sure where this device list is getting pulled from. I had it working once before(Using that exact compile line), so I'm sure the solution is out there somewhere...
I'd like to get that list updated with pretty much all supported PIC18 devices.
SDCC version:
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.6 #1249 (Sep 2 2015) (UNIX)
Got it working - followed some instructions somewhere on installing SDCC via CVS checkout/compile. Checks out the latest of an old version. New version is 3.5, not 2.5.6.
Downloaded 3.5 release. Works fine.

CentOS : Packing Kernel into RPM

I'm currently using CentOS 6 as a KVM host and will need to customise the kernel to suppport vfio-pci.
Where can I get the spec file for kernel 3.10+ or is there a src.rpm I can download that'll support this feature?
Additionally, I'll also need to patch the kernel with acs override patch and i915 vga arbiter fixes as mentioned in this article: https://bbs.archlinux.org/viewtopic.php?id=162768
Here's a thread for the ACS override patch: https://lkml.org/lkml/2013/5/30/513
and for the i915 vga arbiter fix: https://lkml.org/lkml/2014/5/9/517
How to I apply these patches to the kernel? Thanks.
I've decided to move to Fedora as they're more focussed on leading and advancement. I think it's more suited for the system I'm building.
Anyway, if you still interested in building the kernel on CentOS system, here's some of the things you can do.
SRPM of the kernel can be downloaded from ELRepo via the following link: http://elrepo.org/people/ajb/tmp/
However, it doesn't include the source file. You'll need to download this separately at:
https://www.kernel.org/
For the patch files, it's the difference between the source and target files. Save these differences as files. e.g. I would save the code below as a file called doc_kernel_param_patch:
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 47bb23c..a60e6ad 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
## -2349,6 +2349,16 ## bytes respectively. Such letter suffixes can also be entirely omitted.
nomsi Do not use MSI for native PCIe PME signaling (this makes
all PCIe root ports use INTx for all services).
+ pcie_acs_override =
+ [PCIE] Override missing PCIe ACS support for:
+ downstream
+ All downstream ports - full ACS capabilties
+ multifunction
+ All multifunction devices - multifunction ACS subset
+ id:nnnn:nnnn
+ Specfic device - full ACS capabilities
+ Specified as vid:did (vendor/device ID) in hex
+
pcmv= [HW,PCMCIA] BadgePAD 4
`pd. [PARIDE]`
You'll also need to update the specs file to refer to the patch files created:
Patch0 doc_kernel_param_patch
You can now start the build process. For more information refer to the following post:
https://www.centos.org/forums/viewtopic.php?f=14&t=50512

Bypass flash player version check or override the existing version number?

Is it possible to bypass a flash player version check?
I'm using an old embedded Linux device with FF 2.0 and Flash Player 10. Unfortunately we cannot upgrade the existing version any further. YouTube and many other video sites are working fine when modifying the User Agent string of the browser. We only have problems with a few sites that check the Flash player version.
E.g. Flash player check in JavaScript:
if($('.video-player-container').length > 0){
if (swfobject.hasFlashPlayerVersion("10.2.0")) {
else { flashWarning.... }
Or is there a way to override the existing version number without upgrading the player?
You may use a little hack to change the displayed version number. Short indication to do it is to change the shared library file by replacing every occurrence of your old version number with the new one:
sudo sed -i -e 's/your_current_version/desired_version/g' /usr/lib/flashplugin-installer/libflashplayer.so
After this, restart your browser and go to Adobe flash "about" page to see if it worked.
Longer indications may be found in this blog post.
edit: I should add a word of caution here: it is a very dirty method, which will likely work only until the next update of your flash player. And it will likely work only as long as the original and desired versions number have the same number of digits ! So, please do a backup of the original file before attempting it, i.e.
sudo cp /usr/lib/flashplugin-installer/libflashplayer.so /usr/lib/flashplugin-installer/libflashplayer.so.backup
and to restore the original unaltered file, type:
sudo mv /usr/lib/flashplugin-installer/libflashplayer.so.backup /usr/lib/flashplugin-installer/libflashplayer.so

How to compile the linux kernel with an obsolete option?

OK, so I have this embedded kernel whose network card used to work fine with the LLTEMAC option. The new one with LL_TEMAC doesn't. I still see the code with LLTEMAC in the source, but not in the available option in the .config file:
$ ack-grep LLTEMAC
drivers/net/ethernet/xilinx/xilinx_lltemac/Makefile:10:obj-$(CONFIG_XILINX_LLTEMAC) := xilinx_temac.o
drivers/net/ethernet/xilinx/xilinx_lltemac/xlltemac_main.c:2: * Xilinx Ethernet: Linux driver for the XPS_LLTEMAC core.
drivers/net/ethernet/xilinx/xilinx_lltemac/xlltemac_main.c:452:#ifdef CONFIG_XILINX_LLTEMAC_MARVELL_88E1111_RGMII
...
include/linux/xilinx_devices.h:83:/* LLTEMAC platform data */
Is there a way to compile the kernel with this removed option ?
Simply adding CONFIG_XILINX_LLTEMAC=y CONFIG_XILINX_LLTEMAC_MARVELL_88E1111_GMII=y to the .config file does not do anything as the dislaimer states: # Automatically generated file; DO NOT EDIT.
Thanks.
Why not just update this individual driver to understand the new configuration option?

Resources