mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-01-07 15:50:14 +02:00
fix the tar parameter, rootfs name, some cleanup
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
This commit is contained in:
parent
18e79c4816
commit
300b07c464
@ -4,9 +4,9 @@
|
||||
|
||||
LOADER=openwrt-xburst-qi_lb60-u-boot.bin
|
||||
KERNEL=openwrt-xburst-qi_lb60-uImage.bin
|
||||
ROOTFS=openwrt-xburst-qi_lb60-root.ubi
|
||||
|
||||
UBIFS =openwrt-xburst-qi_lb60-root.ubifs
|
||||
ROOTFS_UBI=openwrt-xburst-qi_lb60-root.ubi
|
||||
ROOTFS_UBIFS =openwrt-xburst-qi_lb60-root.ubifs
|
||||
ROOTFS_TGZ=openwrt-xburst-qi_lb60-rootfs.tar.gz
|
||||
|
||||
QI_IMAGE_URL=http://downloads.qi-hardware.com/software/images/Ben_NanoNote_2GB_NAND/latest/
|
||||
QI_MIRKO_URL=http://downloads.qi-hardware.com/people/mirko/testing/
|
||||
@ -17,9 +17,9 @@ DL=$(if $(wildcard ../dl/.),../dl,dl)
|
||||
|
||||
all: reflash_rootfs reflash_kernel reflash_uboot
|
||||
|
||||
$(DL)/$(ROOTFS).ok:
|
||||
$(DL)/$(ROOTFS_TGZ).ok:
|
||||
mkdir -p dl
|
||||
wget -c -O $(DL)/$(ROOTFS) $(QI_IMAGE_URL)/$(ROOTFS)
|
||||
wget -c -O $(DL)/$(ROOTFS) $(QI_IMAGE_URL)/$(ROOTFS_TGZ)
|
||||
touch $@
|
||||
|
||||
$(DL)/$(KERNEL).ok:
|
||||
@ -32,16 +32,16 @@ $(DL)/$(LOADER).ok:
|
||||
wget -c -O $(DL)/$(LOADER) $(QI_MIRKO_URL)/$(LOADER)
|
||||
touch $@
|
||||
|
||||
$(DL)/create_rootfs.ok: $(DL)/$(ROOTFS).ok
|
||||
create_rootfs: $(DL)/$(ROOTFS_TGZ).ok
|
||||
mkdir -p $(DL)/rootfs_tmp
|
||||
tar zxf ./dl/openwrt-xburst-qi_lb60-rootfs.tar.gz -C ./$(DL)/rootfs_tmp/
|
||||
cp -rf ../sie_rootfs_files/* ./$(DL)/rootfs_tmp/
|
||||
mkfs.ubifs -r $(DL)/rootfs_tmp/ -m 4096 -e 516096 -c 4095 -o $(UBIFS)
|
||||
ubinize -o $(ROOTFS) -m 4096 -p 512KiB ubinize.cfg
|
||||
tar xvf $(DL)/$(ROOTFS_TGZ) -C $(DL)/rootfs_tmp/
|
||||
cp -rf ../sie_rootfs_files/* $(DL)/rootfs_tmp/
|
||||
mkfs.ubifs -r $(DL)/rootfs_tmp/ -m 4096 -e 516096 -c 4095 -o $(ROOTFS_UBIFS)
|
||||
ubinize -o $(ROOTFS_UBI) -m 4096 -p 512KiB ubinize.cfg
|
||||
touch $@
|
||||
|
||||
reflash_rootfs: $(DL)/create_rootfs.ok
|
||||
sudo usbboot -f ./usbboot_2gb_nand.cfg -c "boot;nerase 16 512 0 0;nprog 2048 $(DL)/$(ROOTFS) 0 0 -n"
|
||||
reflash_rootfs: create_rootfs
|
||||
sudo usbboot -f ./usbboot_2gb_nand.cfg -c "boot;nerase 16 512 0 0;nprog 2048 $(DL)/$(ROOTFS_UBI) 0 0 -n"
|
||||
|
||||
reflash_kernel: $(DL)/$(KERNEL).ok
|
||||
sudo usbboot -f ./usbboot_2gb_nand.cfg -c "boot;nprog 1024 $(DL)/$(KERNEL) 0 0 -n"
|
||||
@ -50,4 +50,6 @@ reflash_uboot: $(DL)/$(LOADER).ok
|
||||
sudo usbboot -f ./usbboot_2gb_nand.cfg -c "boot;nprog 0 $(DL)/$(LOADER) 0 0 -n"
|
||||
|
||||
clean:
|
||||
rm -rf $(DL)
|
||||
rm -rf $(DL)
|
||||
rm -rf $(ROOTFS_UBI) $(ROOTFS_UBIFS)
|
||||
rm -rf create_rootfs
|
||||
|
13
binaries/reflash/ubinize.cfg
Normal file
13
binaries/reflash/ubinize.cfg
Normal file
@ -0,0 +1,13 @@
|
||||
[rootfs]
|
||||
# Volume mode (other option is static)
|
||||
mode=ubi
|
||||
# Source image
|
||||
image=openwrt-xburst-qi_lb60-root.ubifs
|
||||
# Volume ID in UBI image
|
||||
vol_id=0
|
||||
# Allow for dynamic resize
|
||||
vol_type=dynamic
|
||||
# Volume name
|
||||
vol_name=rootfs
|
||||
# Autoresize volume at first mount
|
||||
vol_flags=autoresize
|
Loading…
Reference in New Issue
Block a user